My long-term RPG instinct is to say "clearly they don't". (Pathfinder, 3.5, AD&D, etc.)  Looking at some NPCs seems to be back this up. The Veteran (MM 350) deals a straight 1d10 with their Heavy Crossbow, despite having Dex+1, and the Scout (MM 349) deals 1d8+Dex with their Longbow.  However, I cannot actually find where this is detailed in the PHB...   Section on Dexterity (PHB 176) does not have any exception for the crossbow.     You add your Dexterity modifier to your attack roll and your damage roll when attacking with a ranged weapon, such as a sling or longbow.  Crossbow features are Ammunition and Loading, but neither of these seem to address damage. (PHB 146-9]) The sections on "Making an attack" (PHB 196-8) don't mention anything about damage modifiers at all.   Also, I cannot find any mention in the  (Oct 2015).  Does anyone else have a RAW for "crossbows don't add Dex to damage?".    UPDATE: the MM has a few other examples that are not consistent with "Dex on damage", but in general, most are accurate. The answer below seems to back my findings, crossbows do add Dex modifier to damage.    UPDATE 2: the  (2015-12) corrects the Veteran example.


Initializing multiple variables in one line in C++

This is my code for a program that is supposed to prompt the user to provide a single letter, and then reports whether the letter is a vowel or consonant:  #include <iostream> using namespace std;  int main() {     cout << "input a single letter";     int var;      cin >> var;     int vowel = 'a','e','i','o','u';     int consonant = 'b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'     if (var == vowel) {         cout << "vowel";     } else if (var == consonant) {         cout << "consonant";     } else if (var != vowel && var != consonant) {         cout << "Error";     }     return 0; }   I am very very new at C++, and am trying to learn why I'm getting an error message.


Minipage inside framebox creates an undesired horizontal spacing

In the following MWE I'd like the second framebox to look the same as the first one (see the image below).  \documentclass[10pt]{article}  \begin{document}  \setlength{\fboxsep}{0pt} \setlength{\fboxrule}{.1pt} \framebox[\width]{A frame.}\par \framebox[\width]{ \begin{minipage}{4em} A frame. \end{minipage}}  \end{document}     Any clue ?  Thanks in advance.


I am trying to build an amplifier using op amp 741. But I am failing to build it on breadboard. I am connecting the positive end of a 9 V battery to pin 7 and negative end to pin 4. As per my knowledge and instructions available all over the internet. Pin 3 is to be connected with the input. The voltage source that I want to amplify has two leads coming out of it positive and negative. If I connect positive lead of my input to pin 3, where should I connect the negative lead?? Similarly, while measuring the amplified output from pin 6 what should be the other point of reference. I am need of a circuit fix. I am attaching the pic of the amplifier connections here. Your help will be really appreciated.


Is it safe to Factory Reset my tablet to improve performance? Will I lose the uninstallable apps?

I'm going to reset my Android tab because its internal memory is low.  Is it safe to erase the system data of my android tablet (not rooted)? If I restore the factory setting of my Android, will the uninstallable apps be also removed or only those that can be uninstalled?


How to display children terms for 3rd or 4th level taxonomy term using views?

How does one create (in a view) a list of the children (2nd, 3rd or 4th level) of a taxonomy vocabulary? In other words, if I want to display ONLY the 3rd level down of a parent term. Is that possible? Thanks. :)


Looking at any given stock, I can see top ten Sellers (cheapest first) and top ten Buyers (highest first). Question is.. does the top buyer buy down through the seller list until satisfied, then buyer #2 and so on... or is it less ordered than that?


How do I delete Windows after an Ubuntu install?

I downloaded Ubuntu 12.04 LTS to my Dell Dimension 4600 with Windows XP installed.  I now have a neat dual-boot system, but I want to get rid of the XP OS and keep Ubuntu as my only OS.  How do I do this?


Proof that composition of invertible linear transformations is invertible (without determinants)

A crucial concept in linear algebra is that the composition of two invertible linear transformations is itself invertible. Here is the first proof I learned of this fact:  Proof: Suppose that $T_1: \mathbb{C}^n \to \mathbb{C}^n$ and $T_2: \mathbb{C}^n \to \mathbb{C}^n$ are both invertible with respective matrices $A_1$ and $A_2$. Then the matrix of their composition $T_2 \circ T_1$ is simply $A_2A_1$. Since $T_1$ and $T_2$ are invertible, we know that $\det(A_1) \neq 0$ and $\det(A_2) \neq 0$. Thus, we see that $\det(A_1A_2) = \det(A_1)\det(A_2) \neq 0$. Thus, the composition is also invertible. $\square$  I'm trying to now give a proof of this fact without using determinants. Any idea on where to start?


Can spells be cast through a Wall of Force?

The spell description of  is silent on the question of whether spell effects can pass through the wall.  The semi-relevant part of the description states:     Nothing can physically pass through the wall.  It is immune to all damage and can't be dispelled by dispel magic.  A disintegrate spell destroys the wall instantly, however.  The wall also extends into the Ethereal Plane, blocking ethereal travel through the wall.   How are folks ruling on the question of spells passing through the wall (in both directions)?  If the answer is that spells cannot pass through the wall, do you rule that it also blocks line of effect (so that you can't target a spell on the other side)?


In terms of rankings how much 'MORE' does Google reward for HTTPS enabled websites

I have a ecommerce website that sells software and all transactions are secured using PayPal as the payment gateway. Since all transactions are secure using PayPals SSL it doesn't seem worth the time or money to enable it on my site.  Question(s):   Is it worth the extra cost and complexity to enable SSL? How much more does Google reward for HTTPS enabled websites?


Do I lose access to a feat if ability drain results in no longer meeting the prerequisite?

Do curses or ability damage/drain cause a character to be unable to use his feats?   For example, a Ranger with 20 Dex who has two-weapon-fighting feats and is using two weapons gets cursed or ability drained and his Dex drops to 14. Does that cause the character not to be able to use his two-weapon feats (which have a requirement of at least 15 Dex)?   What about his other feats that have prerequisites of blocked feats? (As another example: a fighter with the Whirlwind Attack feat, which requires Combat Expertise gets an INT penalty that drops his INT under 13, a prerequisite of Combat Expertise). I think that he can no longer use his Combat Expertise feat (because of low INT) and also Whirlwind Attack and any other feats that require Combat Expertise. Is that right?    I guess it is better to clarify the reason I am asking.  First of all, there are so many books, and there are too many authors that create them and test them. Many bugs are uncovered due to that reason. It is quite hard to keep track of all these things. I know that.   The reason for the question is, for higher-level builds, skill, feat, class, prestige class, template and ability score choices become more important. And there are casters, whose main combat skills depend on spells (clerics, sorcerers, and wizards, especially). Maybe druids can deal with key ability score penalties, and clerics may try to survive such conditions. Wizards and sorcerers have less of a chance when their key ability score drops. A curse may cause them to be without magic (or with some weak spells) if they fail to resist it. They probably have higher Will saves, but they all have the chance.   And I am trying to be sure about the situation of a warrior-based class, because feats mean a lot to them. So what happens when they get cursed? Failure to be able to use a key feat is important, but not as much as a wizard who is unable to cast spells.  Related FAQ answer is not enough about this situation (the following part)     A feat sometimes requires you to have a certain ability   score, which is the case with Two-Weapon Fighting (it   requires Dex 15). A character has, say, Dex 13, but wears   an item, in this case gloves of Dexterity +2, and now her Dex   score is 15. Can she take the feat and have it be active only   when she wears the item?      Actually yes, she could take the feat, but she would lose the   use of the feat if, for whatever reason, she loses the bonus from   the item.   So, still looking for something more satisfactory.  UPDATE: @LitheOhm's answer:  Players Handbook:     Two-Weapon Fighting   Prerequisite: Dex 15.    Complete Adventurer     Oversized Two-Weapon Fighting   Prerequisite: Str13, Two-Weapon Fighting   I wish to clarify that, I just wish to be sure about what to do in such situation. That is just an example and probably being able to use Oversized Two-Weapon Fighting feat will not save the character while he could not use basic Two-Weapon Fighting feats due to Lowered DEX. But I still wonder, whether he could still use Oversized Two-Weapon Fighting.  Of course there could be some other feats which fits that situation. That is just one I noticed.


What is the difference between "on the map" or "in the map"? Is one of them grammatically incorrect? Thanks!


It's unconventional, but is "T's & C's" technically correct?

It looks a bit weird and isn't the commonly used term, but is it not correct? The apostrophe would be marking the shortening of "terms" to "t" and "conditions" to "c", of course.


How convert database from SQL Server 2012 TO SQL Server 2005

I have SQL Server 2012 database which I need to use. But I can't install SQL Server 2012 on my PC.   I use SQL Server 2005 only.  How can I change the database SQL Server 2012 To SQL Server 2005 OR 2008   Or help with installing SQL Server 2012


Probability that a random binary matrix is invertible?

What is the probability that a random $\{0,1\}$, $n \times n$ matrix is invertible? Assume the 0 and 1 are each present in an entry with probability $\frac{1}{2}$. Is there an explicit formula as a function of $n$?  Does it tend to 1 as $n$ grows large? I'm sure this is all known...  Thanks!


Want to build my own Ubuntu from source code

I have two requirements    I want whole Ubuntu 12.04 Source code. I want to compile it.   Can you please tell me about from where I can get the source code and what tool I will need to compile it? From 30000 feet, it might look stupid but I really need this.   Thanks for your support...  Regards


How do I give my math.random a parameter in such a way that I will always receive at least, but not more than 3 digits? I'm currently in my first programming class at a community college, and this is an assignment for a small lottery program in Java. Any help or more of an in-depth explanation would be highly appreciated. Thank you!  //randomly generate 3 digit lottery number     int lottery = (int)(Math.random() * 1000);      System.out.println(lottery);      int lotteryDigit1 = lottery / 100;     int lotteryDigit2 = lottery / 10 % 10;     int lotteryDigit3 = lottery % 10;      System.out.println(lotteryDigit1 + " digit 1 ");     System.out.println(lotteryDigit2 + " digit 2 ");     System.out.println(lotteryDigit3 + " digit 3 ");     To help clarify the basis on which I am writing this program, here is a similar program that generates "2" random numbers for lottery. My job is to modify it to create 3 random numbers.  public static void main(String[] args)  {      //generate lottery number     int lottery = (int)(Math.random() * 100);      //prompt the user to enter a guess     Scanner input = new Scanner (System.in);     System.out.println("Enter your lottery pick (two digits): ");     int guess = input.nextInt();      //get digits from lottery     int lotteryDigit1 = lottery / 10;     int lotteryDigit2 = lottery % 10;      //get digits from guess     int guessDigit1 = guess / 10;     int guessDigit2 = guess % 10;      System.out.println("The lottery number is " + lottery);      //check the guess     if (guess == lottery)         System.out.println("Exact match: you win $10,000");     else if (guessDigit2 == lotteryDigit1 && guessDigit2 == lotteryDigit2)             System.out.println("Match all digits: you win $3,000");     else if (guessDigit1 == lotteryDigit1             || guessDigit1 == lotteryDigit2             || guessDigit2 == lotteryDigit1             ||guessDigit2 == lotteryDigit2)         System.out.println("Match one digit: you win $1,000");     else         System.out.println("Sorry, no match");       }   }


ZFC + $\exists$ Standard model $\rightarrow$ Con(ZFC + $\exists \omega$-model)

$ZFC + \exists V_\alpha$ model of $ZFC \vdash Con(ZFC + \exists$ transitive standard model of $ZFC)$  and then  $ZFC + \exists$ transitive standard model of $ZFC \vdash Con(ZFC + \exists \omega-model$ of $ZFC)$  For the first one :   We can always find a countable extentional $M \subset V_\alpha$ elementary equivalent to $V_\alpha$. Let $M'$ be the mostowski collapse of $M$. $M' \approx M$ so $M'$ is model of ZFC. And because $M'$ is countable and transitive then $M' \in V_\alpha$ (since $H_{\omega_1} \subset V_{\omega_1}$ and $\alpha$ is surely far larger than $\omega_1$).   So $V_\alpha$ is the model of '$\exists$ a standard transitive model of ZFC'.  For the second one :   I don't really know how to do it... Does anyone have an idea ?


Add NPM profile to places to pull projects from for careers

It would be great to be able to pull projects from your  profile as well.  I've authored several open source tools as part of my employment, so they're stored under my employer's GitHub account, but published to NPM under my account.


I'm having trouble to correctly finish my bibliography. In the website's region, I cannot place the url correctly. Can anyone help me out? I've search some questions, but I wasn't able to get the answer...  \documentclass[a4paper,twoside,11pt,openright]{report} \begin{document} \bookmarksetup{startatroot} \addtocontents{toc}{\bigskip} \phantomsection     \addcontentsline{toc}{chapter}{Bibliography}     \begin{singlespace}         \bstctlcite{IEEEexample:BSTcontrol} \bibliographystyle{ieeetr}         \bibliography{References}                                \end{singlespace} \end{document   Reference example:  @ONLINE{Asus:Online, title = {ASUS “Xtion PRO LIVE”. }, month = April, year = {2014}, url = {http://www.asus.com/Multimedia/Xtion_PRO_LIVE/#specifications;} }   and the result is..


Show that $\binom{p^a-1}{k}\equiv(-1)^k\pmod{p}$ for $0\le k\le p^{a}-1$.   Solution: $\binom{p^a-1}{k}=\frac{(p^a-1)(p^a-2)\cdots(p^a-k)}{k!}$.       Idea: Then power of $p$ in $k!$ must be less than the power of $p$ in Numerator.          ----(**)  Then i can directly write  $p^a-1\equiv-1\pmod{p}$,$p^a-2\equiv-2\pmod{p}\cdots$ and $p^a-k\equiv-k\pmod{p}$.  Then, we have: $\binom{p^a-1}{k}\equiv(-1)^k\pmod{p}$.  Is my idea correct? If yes, how should I proceed to prove (**) statement.   Thanks in advance.


Why do people recommend 50mm or other prime lenses as starting lenses for learning photography?

I've seen quite a few people recommend the 50mm prime lenses, in particular the sub-$100 50mm/f1.8, as a starting lens for photographers (especially because they're likely to be using cameras with cropped sensors). From my experiences with the 18-55 mm kit lens (on a Canon EOS 550D), it seems that 50mm is not really very suited for indoor flashless group photographs where the wide aperture would be helpful. It is probably a good lens for portraits of one or two persons, and some low light photographs.  So, what are the advantages it offers over the kit zoom lenses (apart from the wider aperture), under what scenarios is it more useful, and why would you recommend it as a starting lens?


How can I add custom '.desktop' application launchers to Ubuntu Dock?

I have made .desktop files for Ubuntu 16.04 to access my Google Chrome profiles, but once I upgraded to Ubuntu 17.10 (it worked up to Ubuntu 17.04) they got removed from the dock and I can't pin them back. Sample File: #!/usr/bin/env xdg-open  [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon[en_US]=google-chrome Name[en_US]=Google Chrome Exec=google-chrome --profile-directory=Default Comment[en_US]=Chrome Name=Google Chrome Comment=Chrome Browser Icon=google-chrome Categories=Browser;Internet;


what is the correct tire size for a trek 7300 multitrack?

I have a trek 7300 multitrack hybrid bike. The tires and tubes are at least 7 years old and I would like to replace them. The rim does not have any sizing printed on it that I can see. The current tire is a WTB Slickasaurus which has marked (37/32) 700c and 700x37/32c. I understand the 700c is for tire diameter. What does the 37/32 represent?  Is the Slickasaurus a good tire for the bike, or would you recommend some others? I spend most of my time on paved roads, and occasionally a little gravel/dirt road.  edit: sorry you think this is a duplicate question. I did see the linked question before asking but it didn't seem to explain 3 numbers which is what I saw marked on my tire. Also I don't think the tire on the bike now is the original one it came with.  edit 2: here's how it looks on my tire


I'm currently creating a .vbs script which is used to change the default program for a specific file extension however I'm not fully certain as to what registry keys/values I need to change. Doing a google search, I came across many posts in which they all mentioned to change values in HKLM, HKCR and HKCU, it was a bit confusing because it's all pointing towards different places.  Let's say I want to change the .txt file extension so it opens using CustomProgram.exe, what are all the Keys/Values and their locations in which I need to change in order for it to work without any sort of error?


I don't understand how a zener diode placed in series with a resistor creates a constant voltage for a load in parallel with the diode. The load voltage drop must be the same as the zener diode voltage drop since they are in parallel, right?


I need salesforce syllabus with topic. I want to learn salesforce online can anyone out here provide me with salesforce syllabus which contains all the topics in salesforce. I want to learn online so please also suggest some best materials where i can start from basic.


Chinese characters ending up blank in Database

Im making an API for a company that inserts orders via this api into our DB, but I'm running into a problem:  Chinese characters don't get stored into my tables, how to fix this?  I have: - My test file which uses cURL to post set to utf8 via header* - The API code which inserts the data set to utf8 via header* - Stored my phpfile as an UTF-8 encoded file - mysqli connection set to utf8 ($connection->set_charset("utf8")) - mysql-database set to utf8_general_ci - mysql-table set to utf8_general_ci - mysql-columns set to utf8_general_ci - I insert the values into a VARCHAR and into a TEXT column (for test purposes) - Inserted the values directly into the query -> no result - Inserted the values via iconv("ISO-8859-1","UTF-8", $text)-> weird result - Inserted the values via iconv("UTF-8","UTF-8", $text)-> no result - Tested characters like áéíúó, which work perfectly fine - Set my postvalues for curl via foreach($post as $k=>$v){ $data.= $k.'='.$v;} to send as data - Set my postvalues for curl via http_build_query($post) to send as data - Used a query before inserted doing SET CHARACTER SET utf8 - Used a query before inserted doing SET NAMES 'utf8'   When I echo the query before inserting it, I see the chinese characters   When I check the database, it's blank values   (not unexpected:) When I Select it and output it, it's blank   *PHP charset header:  header('Content-Type: text/html; charset=utf-8');   I'm out of ideas, anyone?


How can I buy my own personalized Top Level Domain (TLD)?

Starting fomm tomorrow January/12/2012 I heard it's possible to apply for your own TLD i.e. .whatever in place of .com .org etc. I thought it would require a huge amount of money (I heard stories about paying $185K for one) but I found a company that seems to register a new TLD for just $1000.  The price to register a TLD including the unlimited number of domains that belong to it is: $1000.- only.  Do you think this is a scam or for real? Do you know about any other places where I can go to apply for personalized TLD?


#include <stdio.h>  typedef struct {     char a;     short b;     char c;     int d; } Test;  int main () {     printf("%ld", sizeof(Test));     return 0; }  Why the ouput is 12 and not 8? It seems that the compilers add the padding like this : char(1), short(2), padding(1), char(1), padding(3), int(4), so the result is 12, but why it doesn't put char, short, char, int so the result is 8?


How do I run specific sudo commands without a password?

On one particular machine I often need to run sudo commands every now and then. I am fine with entering password on sudo in most of the cases.  However there are three sudo commands I want to run without entering password:   sudo reboot sudo shutdown -r now sudo shutdown -P now   How can I exclude these commands from password protection to sudo?


Is a GUID unique 100% of the time?  Will it stay unique over multiple threads?


Illustrator: View -> Actual Size smaller than life size

I'm using Illustrator CS6 on OS X.  When choosing View -> Actual Size, the displayed elements are smaller on the screen than their actual size, say in centimetres.  How can I "calibrate" Illustrator to my screen's resolution (dpi) so that it can display objects at life size when using 100% zoom?  (Acrobat does have a DPI setting in its preferences, and I assume Illustrator must have it too.  But I cannot find it.)  Edit: To clarify, if I put a ruler next to the screen, and also turn on the ruler in the document, I want them to match up when selecting View -> Actual Size.


Child's name not reflected on train ticket (Indian Railways)

I booked an e-ticket with IRCTC for my family. There was a form to fill in the children's details and I gave the information about the 1-year-old child who is going with me. Once the booking was done, I'm not able to see the child's details in the e-ticket. Even though no money is charged for children and I entered their name, why wouldn't names show on the e-ticket?


What does it mean when an LED bulb starts blinking randomly?

Recently I noticed that my led bulb turns on/off for a split second randomly over the past few days. Does this mean it is starting to die or could it be something wrong with the lamp?  I've unscrewed to see if anything was damaged but could not detect any damage.


How Can I find the length of a json file?

So I am trying to make a quote system for a chat bot, and I'm having trouble with storing them. I have decided to move away from using a database because of how small scale it is, but I want to be able to constantly add to the file, is there any way I am able to find how many "variables" already in the file? My current file would be setup like this:  {   "quote1":"texthere",  "quote2":"texthere",  "quote3":"texthere",  "quote4":"texthere" }   Is there a possible way I am able to figure out how many quotes there are in the file? I am programming in javascript.


AGSM bibliography style sometimes doesn't abbreviate to "et al." for duplicate author+year

With BibTeX and the harvard/AGSM style, some references (from authors who have multiple papers per year) aren't abbreviated to "et al.", with the addition of a, b, et cetera. For example, with the code attached below, I get:    Only one paper is abbreviated to et al., the others not. Any idea why this is happening? The in-text references should be Basu et al. (2008a) and Basu et al. (2008b), which I believe AGSM should automatically do?  \documentclass[10pt,a4paper]{article} \usepackage{natbib}  \begin{document}  \cite{basu2008a, basu2008b, beare2006}  \bibliographystyle{agsm}  \bibliography{references.bib}  \end{document}   With BibTeX file (references.bib):  @string{jam="J. Appl. Meteor."} @string{ag="Acta Geop."} @string{blm="Bound.-Layer Meteor."}  @article{basu2008a,   author={Basu, S. and Vinuesa, J.-F. and Swift, A.},   title={Dynamic {LES} modeling of a diurnal cycle},   journal=jam,   year={2008},   volume={47},   number={4},   pages={1156-1174} }  @article{basu2008b,   author={Basu, S. and Holtslag, A. A. M. and Wiel, B. J. H. and Moene, A. F. and Steeneveld, G. J.},   title={An inconvenient "truth" about using sensible heat flux as a surface boundary condition in models under stably stratified regimes},   year={2008},   journal=ag,   volume={56},   number={1},   pages={88-99} }  @ARTICLE{beare2006,  author={Beare,R. J. and Macvean,M. K. and Holtslag,A. A. M. and Cuxart,J. and Esau,I. and Golaz,J. -. and Jimenez,M. A. and Khairoutdinov,M. and Kosovic,B. and Lewellen,D. and Lund,T. S. and Lundquist,J. K. and McCabe,A. and Moene,A. F. and Noh,Y. and Raasch,S. and Sullivan,P.},  title={An intercomparison of large-eddy simulations of the stable boundary layer},  journal=blm,  year={2006},  volume={118},  number={2},  pages={247-272} }


On Windows 7, the System process is taking up 100% CPU (well 50% on a dual-core) for a rather long time. Its CPU usage doesn’t seem to drop at all.  How can I diagnose this problem? What could be the cause? I don’t see any other problems with the system and am using an up-to-date copy of AVG, so I don’t yet believe it is malware.


Identify spatially contiguous clusters in raster data using kmeans

I would like to cluster the cells of a raster object into k contiguous regions using kmeans. The number of regions, k, is known. Each cell has various geographical attributes, such as temperature, precipitation, elevation etc. And I need R to sort pixels into k groups (regions) using these cell values. With stats::kmeans() that is a fairly simple exercise. Unfortunately, this method does not create spatially contiguous clusters. Instead, each group consists of pixels spread all over the grid.  I expected this to be a common problem, but could not find any R function that solves it. There should be some package out there that can perform clustering under the restriction of spatial contiguity.  The method of choice here is kmeans because I know how many groups I need. Any other technique from the field of unsupervised learning that allows me to a priori set this quantity, is of course also welcome.  I asked this question on Stack Overflow before and received a recommendation to also post it here, as GIS might be a better fit than SO.


Proving commutativity of addition for vector spaces

I'm trying to prove commutativity of addition for vector spaces, using the axioms for vector spaces. Apparently commutativity can be proven! Im having trouble getting a good feel for what is allowed and what is not. Here's my work so far:  $u+v+u+v = 2(u+v) = 2u + 2v = u+u+v+v = u+(u+v)+v$  Here I just wanna claim that $u+(v+u)+v = u+(u+v)+v$   $\Rightarrow -u+u+(v+u)+v+(-v) = -u+u+(u+v)+v+(-v)$ : here im just adding -u to the right, and -v to the left. Question: is this "adding to both sides" really legit in this context? Why?   Quick help proof: $-v+v = (-1)v+(1)v = (-1+1)v = 0v = 0 = v-v$  And another: $ 0+v = v+(-v) + v = (1)v + (-1)v + v = (1-1)v + v = v = v+0$  We have $0 + (u+v) + 0 = 0+(v+u)+0 \Rightarrow u+v = v+u$  This feels ugly and not at all elegant, especially the great leap "add -u to both sides" feels completely out of place. Do I need more lemmas? Is there a more elegant way?   //not homework or anything, just for my own pleasure, feel free to provide theory, as it is more insightful than solutions. :) Thanks!   EDIT: corrected notation a little.


C# - Why does a class, new() constraint use Activator.CreateInstance()?

I just asked   After thinking about this for a while, I'm wondering why the C# Compiler emitted IL like that.  Why couldn't it say some IL like: "Call T's default constructor"?


Did a whois today on Facebook (because it was unreachable) and noticed strange things coming up. Any idea what this is all about?  (Ignore the brush marks, hiding the stuff that was behind)


A questions goes like this:  X and Y are large,parallel conducting plates close to each other. Each face has an area A. X is given a charge Q. Y is without any charge. Points A, B and C are as shown in the figure.   To find the field at A, the solution goes; $E_A = E_1 + E_4 = \frac{Q}{4A\epsilon_0}$X$2 =  \frac{Q}{2A\epsilon_0}$. The same is held true for the field at $E_C$. How's this possible? If we label the surfaces from the left to the right as 1, 2, 3, and 4, wouldn't it be surface 3 that affects the field at A? And similarly, wouldn't surface 2 affect the field at C?


Minimizing $a^2+b^2+c^2+d^2$ for positive reals satisfying $(a+b) (c+d)=143$, $(a+c)(b+d)=150$, $(a+d) (b+c)=169$

Can anyone do this?  Suppose $a$, $b$, $c$, and $d$ are positive real numbers that satisfy the system of equations $$\begin{align} (a+b) (c+d)&=143 \\ (a+c) (b+d)&=150 \\ (a+d) (b+c)&=169 \end{align}$$ Compute the smallest possible value of $a^2+b^2+c^2+d^2$.


Planck length, planck time, and planck rotation?

given that there is a fastest speed at which anything can travel in our universe,299,792,458 meters per second, that seems to imply there may be a smallest distance in our universe, so first of all, is there any other evidence for or against a planck length being almost like a pixel through which energy can travel? am i wrong in thinking this?  and if so, i wonder, how many different directions could energy be transmitted out from a given 'planck-pixel' or unit of spacetime? is there some way that we could possibly test such an idea? have people already tried and to what degree?  so then that also makes me super curious, when it comes to an individual particle rotating, is there a smallest amount of rotation that can occur? or can the amount of rotation be infinitely divided? in other words, will we some day say that 0.00000009 (or whatever) degrees is the smallest amount of rotation any individual particle can move?  and conversely, is there a limit to how fast a particle can rotate? So basically, how many degrees of rotation can a particle spin over 1 planck length of time?  and how does rotation as i might tend to think of it, differ from rotation from the perspective of a particle, or 'spin', rather?


An integrable Functions is almost everywhere finite  Attempt: Let $X = \{ x : f(x) \, \text{  is infinite}\} $. We must show $m(X) = 0$. Suppose $m(X) > 0 $. then on $X$, we have  $$ \int\limits_X f \, dm > \infty$$  which implies $f$ cannot be integrable: contradiction.  Is this a correct solution? thanks


I need help understanding the dynamics of this oscillator

I'm a beginner at circuits (I'm a high school student interested in electronics), and I'm currently working on a school project about a Magnetostriction Oscillator. The circuit construction is as follows, and I need some help understanding certain aspects of the same.  So from my understanding, the circuit working is as follows:  When the battery is attached a voltage V is supplied to the LC oscillator. Which induces an oscillating flux in the rod: A question I had is that since its a DC supply, won't the capacitor saturate after the time constant is completed, making the induced magnetic field constant (all current directed through L1) The apparently oscillating magnetic field in the rod induces an EMF in L2 - which gets amplified through the BJT and gets fed back into the parallel LC oscillator (is this why it acts as an AC voltage allowing the parallel LC to oscillate??): I get the induced EMF (provided magnetic field is oscillating) - but don't get the amplification. Won't the induced emf/current get amplified and move towards the reference ground node instead of the LC oscillator?? If it does could you please explain why? Any additional help on understanding how the LC circuit oscillates and how the transistor plays a role in the same would be much appreciated!  Thanks a lot!!


Prove that, for all integers $k \geq 1$ and $n \geq k$, we have      $$\sum_{k=1}^n\binom{n}kk=n\,2^{n-1}$$   Would this involve differentiation by bringing the $n-1$ down? I tried to do that along with using the binomial theorem but couldn't quite get the answer on the right. This may be cause I was also confused on how to properly expand out $\binom{n}k$.  Any help?


During ubuntu installation , why do we need to create home mount point

When we install ubuntu as a separate partition along windows, we create mount point for root. /home also resides inside /.Then why do we need to create separate mount point for /home.What is the significance of this? And also what is the difference between selecting primary and logical for the mount points?


My employer sends out lots of internal marketing and "aren't we great" emails that I don't read. I currently have a rule which moves the emails sent by the worst offenders to a CompanyName Spam folder in Outlook 2010.  Is there a way to have the emails delete after a period of time, lets say 30 days, without me having to do this manually? Ideally, I'd like a single rule to say: IF it's from joe.bloggs@CompanyName.com MOVE to CompanyName Spam AND after 30 days, move to deleted items folder.  I can make a rule to find emails within a particular absolute date range, but not a rolling relative date range (such as today - 30).  To make this even more complicated, if this could be done without VBA, that would be greatly appreciated (as I'm slow at using VBA and encoding)  Thanks,


Use vectors to prove $\cos(\beta - \alpha) = \cos \alpha \cos\beta + \sin\alpha \sin\beta$

If two vectors $a$ and $b$ make angle $\alpha$ and $\beta$ with the $x$-axis, prove, using vectors, that:   $$\cos(\beta - \alpha) = \cos \alpha \cos\beta + \sin\alpha \sin\beta$$   I tried taking components of each vector along the plane, but that didn't get me anywhere. I tried taking component of vector $b$ along vector $a$, but I also got stuck there. Can anyone point me in the right direction?


How to delete all metadata from all JPEG files in folder using ImageMagick?

I have many JPEG files in folder D:\folder. I want to delete all metadata from all JPEG files in this folder. I used ImageMagick. I made: magick mogrify -strip "D:\folder\*" Am I right?


Is there any web site where I can learn Linux or Unix with video lessons? Of course, there should be many of them, but I think there is one most popular like, let's say, Coursera.


What's the difference between "either" and "neither"?

What's the difference between either and neither? Can you provide me some examples?


Taylor series of Infinitely differentiable function with nonnegative derivatives

Let $f(x)$ be a nonnegative and infinitely differentiable function on $[-a,a]$ to $\mathbb{R}$ such that $\forall x\in[-a,a]:f^{(n)}(x)\ge0$.  Prove that the series:  $$\sum_{i=1}^\infty \frac{f^{(i)}(0)}{i!}x^i$$  converges $\forall x\in(-a,a)$.


Hello i am trying to do so when line that is drawn as the finger moves on the screen (red line in image below) and when the finger is taken off the screen while the red line has crossed the black line i want an integer variable to increase with 1. Both lines has been drawn using UIBezierPath. But i don't know the most precise way to do this.  edit - The black line comes in from the left side.


Easiest way to solve $y''+y=\frac{1}{\cos x}$

I know how to solve it using Lagrange method of variation of constants, but is there easier way?


While slicing in python why end+1/end-1 other than end?

Suppose s="mrunal" I want to print run for that I am doing print(s[1:4]) But in python why print(s[1:3]) is not available. Simply I want to tell that why end in slicing is not that index which we want as last character? s="mrunal"  index 0 = "m" index 1 = "r" index 2 = "u" index 3 = "n" index 4 = "a" index 5 = "l" here index for "n" is 3. Why end index is not same as s[1:3]? Why it is not inclusive? why it uses exclusive?


How can I make text that is larger than the size of the output of {\Huge ...}?   I would like to be able to make text arbitrarily large (even if that is done by some suboptimal scaling routine).


I cannot carry heavy lens and camera so need to buy bridge type - like Macro photography - trying to decide between Sony RX10 II and Panasonic FZ1000.  Cannot find information on which would be best for Macro.


I am trying to implement a table given in the snapshot.  Firstly, I just want to draw a multirow, as it is shown in the image.    \documentclass[12pt, a4paper,twoside]{memoir} \begin{document} \definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725} \definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}  \setlength{\arrayrulewidth}{1pt} \setlength{\extrarowheight}{1.0pt} \begin{table}[H]   % added on 12172013 for caption and label \centering \caption{Table} \label{tb32b} %\arrayrulecolor{white} \begin{tabular}{|p{4.5em}|p{3.8cm}|p{7cm}|l|} \rowcolor{c1} \multirow{4}{*}{\textcolor{white}{Measure}}      & \multicolumn{2}{l|}{\multirow{4}{*}{\textcolor{white}{Description}}} &                                         \multirow{4}{*}{\textcolor{white}{NO.}}  \\ \hline  \arrayrulecolor{white}  \rowcolor{c2} \multirow{4}{*}{Orientation-based}  & \multicolumn{2}{p{11.25cm}|}{The first orientatiofdsafsafsadfsdafdsfasdfdasfdsafasdfsdafdsaffsdafasdt.}    & \multirow{2}{*}{$M_8$}    \\ \rowcolor{c2}  & \multicolumn{2}{p{11.25cm}|}{The second osafdsafsdafasdfsda the sadfdsas of the misdafdsa points.}      & \multirow{2}{*}{$M_9$} \\ \hline  \rowcolor{c2} \multirow{4}{*}{Pair-based} & Equ1 &  \multirow{4}{*}{sdafdsafasdfdsafasdfdsfasdfdsafdsafdsafasdfdsafasdfasdfsadfasdfsadfsadfasdfdsafdsafdsafdasfdsafdsafasdfasdfsadafdas}  & \multirow{4}{*}{$M_{10\_13}$} \\ \cline{2-3} & Equ2 & & \\ & Equ3 & & \\ &  Equ4 & & \\ \hline \end{tabular} \end{table} \end{document}   I found a thread but I cannot modifiy it successfully. The URL is   And then I have a new snapshot of my code. This one is closer to the expected table. But row line between M8 and M9 fail to display, and row colors of the last three rows were not showed.


A phrase I came across tonight was "Here's the good news and the bad news." Trouble is, "Here's" means "Here is", and "is" is meant for one thing, not two things. I'm describing two things. However, "Here are the good news and the bad news" sounds bizarre.  What to do?


Thunderous Smite: definition of "creature"

The description of the 1st-level spell  (PH 282) states the following:     [...] Additionally, if the target is a creature, it must succeed on a Strength saving throw or be pushed 10 feet away from you and knocked prone.   How is a creature defined? Without this spell, I would have defined literally everything as a creature, but then why would this distinction exist? Just so you can't push a boulder away, which 99% of DMs wouldn't allow this spell to do anyway? That seems odd to me.  I couldn't find anything online that defines creatures as something other than , so I came here hoping that someone would have an answer.


Can you please explain me phenomenon of reflection at subatomic level?

When we see atoms under an electron microscope, what exactly are we seeing? I mean, these spheres that we know as atoms are electron clouds and that is what we are seeing, am I right?     Can you please explain to me, how exactly our eyes are able to see those spheres that we know as atoms? Like photons are hitting those constantly moving electrons and then they reflect back and hit the retina of our eyes where it gets absorbed. That’s fine. But I want to know, how exactly photons are interacting with those constantly moving electrons of an atom of an object from which they are being reflected?


A proof involving nested integrals and induction

Prove that   $$\int_0^x dx_1 \int_0^{x_1}dx_2 \cdots \int_0^{x_{n-1}}f(x_n) \, dx_n =\frac{1}{(n-1)!}\int_0^x (x-t)^{n-1}f(t) \, dt$$  I'm trying induction over $n$. The case $n=1$ is trivial.   When $n=2$   \begin{align}\int_0^x dx_1 \int_0^{x_1}f(x_{2})\,dx_2 = & \int_0^x\int_0^{x_1}f(x_2) \, dx_2 \, dx_1 \\ = & \int_0^x \int_{x_2}^{x} f(x_2) \, dx_1 \, dx_2 \\ =& \int_0^x f(x_2)(x_1-x_2) \, dx_2 = \frac{1}{(2-1)!}\int_0^x (x-t)f(t) \, dt\end{align}  I couldn't take the induction step though. Any thoughts? I appreciate the help.


Neural networks output probability estimates?

Suppose my training data contains ~100 variables, and each example is tagged as "success" or "failure".  I understand how a neural network can be used to try and predict success vs failure based on the variables.  However I am interested in the neural network outputting the posterior probability rather than success or failure. In fact, I evaluate the efficacy of the NN based on how accurate the probabilities are (eg. AUROC over the entire dataset) rather than % of cases with correct prediction.  Are NN's the right tool for the job here and if so how do you structure the NN to output this?  (NOTE: I'm a ML newbie!)


16.04 Ubuntu - cannot enable focus follows mouse

I just "updated" from 14.04 to 16.04. I like gnome metacity, but cannot get it to focus follow mouse. I've tried at least 4 methods and rebooted, without success. I've been using the net since 1991, so am an old dog who REALLY hates clicking, and esp raising current window if I'm referring to another window.


After update to 15.04 I have abiword starting by itself upon login to GNOME or Unity. It does not happen in openbox or blackbox.  How do I prevent this application from starting without removing the application itself ?  I do not have abiword added to Startup Application, nor to .config/autostart, nor it is in /etc/xdg/autostart. The rc.local is clean, as well.  (=^・^=) [2] serg @ ubuntu:/home/xieerqi >_  ls .config/autostart/                                caribou-autostart.desktop chinese-calendar-autostart.desktop chromium-browser.desktop.bak firefox.desktop gnome-do.desktop gnome-terminal.desktop.bak gnome-user-share.desktop indicator-multiload.desktop lxrandr-autostart.desktop nemo-autostart.desktop reconnect-task.desktop scrlayout.desktop telepathy-indicator.desktop ubuntuone-launch.desktop vino-server.desktop wicd-tray.desktop.bak  (=^・^=) [3] serg @ ubuntu:/home/xieerqi >_  grep 'abiword' .config/autostart/*                    (=^・^=) [4] serg @ ubuntu:/home/xieerqi >_  grep 'abiword' /etc/xdg/autostart/*                   (=^・^=) [5] serg @ ubuntu:/home/xieerqi >_     pstree however, reports upstart as the parent of abiword's process.  (=^・^=) [6] serg @ ubuntu:/home/xieerqi >_  pstree | grep abiword         |         |         |-upstart-+-abiword-+-{abiword}   Better look:  |-lightdm-+-kwalletd         |         |         |-upstart-+-abiword-+-{abiword}         |         |         |         |         |-{dconf worker}         |         |         |         |         |-{gdbus}         |         |         |         |         `-{gmain}


Recurrence relation: $x_{n+1} = \frac 12 x_n + \frac 1 {x_n},$

$$x_{n+1} = \frac 12 x_n + \frac 1 {x_n}, x_0 \neq 0$$ $$ a = \frac a2  + \frac 1a \Rightarrow a = \frac {a^2 + 2} {2a} \Rightarrow 2a^2 = a^2 + 2 \Rightarrow a^2 = 2 \Rightarrow a = \pm \sqrt 2$$  If $x_0 > 0$, then any subsequent terms will be positive too. If $x_0 < 0$ , then - negative. Hence, if $x_0 > 0$, then $\lim_{n \rightarrow \infty} x_n = \sqrt 2$. If $x_0 < 0$, then $\lim_{n \rightarrow \infty} x_n = - \sqrt 2$  Is it complete solution? I know that it's correct answer, but may be I missed something in proof?


Custom Facebook connect image - Is it Facebook's policy violation?

I was going to change Facebook's default login button with my custom image like .  I mean like this:    But  which state its against Facebook's policies.  Is it really a violation? If it is how come Mashable using custom image? Can someone answer me?  Update  This is the exact image I would like to use.    Facebook mentioned like this in .     While you may scale the size to suit your needs, you may not modify   the “f” logo in any other way (such as by changing the design or   color). If you are unable to use the correct colour due to technical   limitations, you may revert to black and white.   So my sign in with Facebook image violating Facebook policy in anyway?


how can be this possible? What is wrong with this.

We can see that  1^2 =1 ; 2^2 =2+2 ; 3^2=3+3+3 ; . . . x^2=x+x+x+..... (x times)  differentiation on both sides gives  2x=1+1+1+....... (x times)  2x=x  What's happening hear.How is this possible.  Assume X be as integer and non-integer ,both cases.


Best lens for taking pictures of surfers

I'm just trying to decide which new lens to get. I need to take surf and windsurf photos from onshore. Sometimes 300 mm is enough but there are many times they are too far away. I have a sigma 70-300 but I need something better, if the light is not perfect it doesn't give me the sharpness I hope for. I can not afford the 400L 2.8 of course, so I'm trying to choose between the Canon EF 100-400L, Canon EF 70-300L (which I heard is far better than the base one), or Sigma 50-500. My body is a canon 600D.


I have ten image view in my app that their visibility is set to invisible in XMl. I wrote if condition in java to visibility them programmatically but I don't know why they still are invisible.      EditText b = (EditText) findViewById(R.id.edit_b_beam);     EditText h = (EditText) findViewById(R.id.edit_h_beam);     EditText fc = (EditText) findViewById(R.id.edit_fc_beam);     EditText fy = (EditText) findViewById(R.id.edit_fy_beam);     EditText ffy = (EditText) findViewById(R.id.edit_ffy_beam);     EditText nAs = (EditText) findViewById(R.id.edit_nAs_beam);     EditText ds = (EditText) findViewById(R.id.edit_ds_beam);     EditText nAAs = (EditText) findViewById(R.id.edit_nAAs_beam);     EditText dds = (EditText) findViewById(R.id.edit_dds_beam);     EditText cover = (EditText) findViewById(R.id.edit_cover_beam);       ImageView image_b=(ImageView) findViewById(R.id.image_b);     ImageView image_h=(ImageView) findViewById(R.id.image_h);     ImageView image_fc=(ImageView) findViewById(R.id.image_fc);     ImageView image_fy=(ImageView) findViewById(R.id.image_fy);     ImageView image_nAs=(ImageView) findViewById(R.id.image_nAs);     ImageView image_ds=(ImageView) findViewById(R.id.image_ds);     ImageView image_cover=(ImageView) findViewById(R.id.image_cover);     ImageView image_ffy=(ImageView) findViewById(R.id.image_ffy);     ImageView image_nAAs=(ImageView) findViewById(R.id.image_nAAs);     ImageView image_dds=(ImageView) findViewById(R.id.image_dds);      if(!b.getText().toString().isEmpty())         image_b.setVisibility(View.VISIBLE);     if(!h.getText().toString().isEmpty())         image_h.setVisibility(View.VISIBLE);     if(!fc.getText().toString().isEmpty())         image_fc.setVisibility(View.VISIBLE);     if(!fy.getText().toString().isEmpty())         image_fy.setVisibility(View.VISIBLE);     if(!nAs.getText().toString().isEmpty())         image_nAs.setVisibility(View.VISIBLE);     if(!ds.getText().toString().isEmpty())         image_ds.setVisibility(View.VISIBLE);     if(!cover.getText().toString().isEmpty())         image_cover.setVisibility(View.VISIBLE);     if(!ffy.getText().toString().isEmpty())         image_ffy.setVisibility(View.VISIBLE);     if(!nAAs.getText().toString().isEmpty())         image_nAAs.setVisibility(View.VISIBLE);     if(!dds.getText().toString().isEmpty())         image_dds.setVisibility(View.VISIBLE);   it doesn't depend on what I write in my EditText for example:  b.setText("0"); if(b.getText().toString().equals("0"))         image_b.setVisibility(View.VISIBLE);   image_b is still invisible!


How do I create equation whose number matches my section number

I am currently writing a paper in Latex. I am using \section, \subsection, etc. for sections. In each section I use  \begin{equation} bla... \end{equation}   for equations I have.  I want my equation to be numbered like (3.3.1), (3.3.2), ... for section (3.3) and so on, but the code I used just gave me equations numbered (1), (2), .... I am wondering how to change the way I number my equations.


Should mobile ask for taps on spoilers, not clicks?

The spoiler      WELL HELLO!   currently reads on mobile devices "Click to show spoiler"    On desktop devices, the spoiler appears as an empty blockquote, like this:    Should the spoiler warning say "Tap to reveal" rather than "Click"? Or should I keep longer fingernails?


I am trying to understand some code I found which reads command line arguments (attached below). My concern is what purpose of the "if __name__ == __main__"line is...  Why would I use that line instead of just using the code below, main(sys.argv[1:]). What extra use does it provide?  import sys, getopt  def main(argv):    inputfile = ''    outputfile = ''    try:       opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="])    except getopt.GetoptError:       print 'test.py -i <inputfile> -o <outputfile>'       sys.exit(2)    for opt, arg in opts:       if opt == '-h':          print 'test.py -i <inputfile> -o <outputfile>'          sys.exit()       elif opt in ("-i", "--ifile"):          inputfile = arg       elif opt in ("-o", "--ofile"):          outputfile = arg    print 'Input file is "', inputfile    print 'Output file is "', outputfile  if __name__ == "__main__":    main(sys.argv[1:])


Top-bar notifications are not updating (a) after I view them and (b) to reflect new changes

This is new behavior tonight: both the reputation and inbox counters are stuck in time.  My reputation notification indicator seems to be stuck at a particular value; it shows "+52" regardless of what I do.  In the following screen shot you can see that these notifications are not new (they were an hour ago, but I've opened that notification thingy several times now):    After I click on the notification it goes away on the current page -- but on the next page-load it's back, on multiple sites.  The same thing happens with the inbox notification; after I clicked that and went to a new page the red 4 was back.  This happens in Firefox (31.0) and Chrome (36.0.1985.125) on Mac OS 10.6, and I'm also seeing it in Chrome on my Android phone.  Further, while investigating this and writing this post, I got two new rep updates -- and they neither changed the count nor show up in the drop-down:    (I took the first screen shot after these events occurred.)  I think I've seen reports of the first problem -- the notice not dismissing -- before, but can't find them.  I can't remember seeing reports of the second problem.


50 volts on hot to neutral but 120 volts with wall switch

I was checking a "dead" outlet for friend. Bottom reads 120volts on hot to ground but top receptacle reads 50 volts hot to ground until the wall switch is flipped then it reads 120volts. Whiskey tango??


There exist elements of finite order $n$ in $GL_2(\Bbb Z)$ for every positive $n$.

I am trying to prove the title statement. So far, I have tried to do this algebraically. For example, for $n = 2$, and a matrix $\begin{pmatrix}  a & b \\ c & d  \end{pmatrix},$ I tried to find such $a, b, c, d$ where $ab - cd = 1$ or $-1$ and where $\begin{pmatrix}  a^2 + bc & ab + bd \\ ac + dc & cd + d^2  \end{pmatrix} = \begin{pmatrix}  1 & 0 \\ 0 & 1  \end{pmatrix}.$ I found that $\begin{pmatrix}  4 & 3 \\ -5 & -4  \end{pmatrix}$ works. However, is there a way to do this without algebra for larger $n?$ Any hints as to how I would go about this?


How does iOS and OS X detect when a Wi-Fi network is a personal hotspot?

When there is a Personal Hotspot network available, it displays a chain link icon instead of the usual lock icon in the list of available networks on iOS and OS X.    My question is, how does OS X distinguish these networks? Is it specified in 802.11 how hotspots broadcast their SSID's differently?


Are there Nuclear Weapons in Star Wars universe?

In Rogue One, destruction caused by single laser fire of Death Star looked similar to nuclear weapon destruction. But, seeing it was given such a big focus (even Empire was showing it off to create fear), I wondered whether there're nuclear weapons in Star Wars universe.  Also, I see TIE fighters and X-wings always have low yield bombardments. Our real world fighter jets (having nuclear warheads) could do better to destroy Thermal Oscillator on Starkiller.  Does Star Wars universe have nuclear weapons or other mass destruction weapons having similar yield (of course, excluding Death Star and Starkiller)?


This is probably a stupid question, but need to know if i had two weapons: A - DPS 100, attack speed 2 (these are all hyperthetical figures ofcourse) B - DPS 200. attack speed 1  Does it matter which i put in the left or right hand? I hear to put the higher speed weapon on the primary slot.   Is this true and is there any other things to note when slotting weapons?


Does the sequence $$\displaystyle \frac{n}{\sum\limits_{k=1}^{n}\Big(\frac{k}{k+1}\Big)^k}$$   converge?   Attempt. Since $\Big(\frac{k}{k+1}\Big)^k \rightarrow 1/e\neq 0$ and the terms are positive, the series $\sum\limits_{k=1}^{\infty}\Big(\frac{k}{k+1}\Big)^k$ diverges to $+\infty$. I find hard to determine if $n$ or the sum goes faster to $+\infty.$   Thanks in advance.


Show that if $M $ is orthogonal matrix, then $\det M =\pm 1$.

I write like following my prove, and I need to know if it's correct: If P is an orthogonal matrix, then $$PP^t = I = P^tP$$ Therefore, $$\det(P^tP) = \det (I) \implies \det(P) \det (P^t) \implies \det (P) \det (P) = [\det (P)]^2$$   So $$ [\det(P)]^2 = 1 \implies \det (P) = \pm \sqrt 1 $$  So  $$ \det (P) = \pm 1$$ I prove it writing this, I would like to know if this proof is correct.


cannot invoke vendingitem.getname because this.shelf[i] is null

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "VendingItem.getPrice()" because "this.shelf[i]" is null public String cheapItems(int val){         for (int i = 0; i < totalItems; i++){             if(shelf[i].getPrice() < val)                return (shelf[i].getName());         }         return null;     }  In main method: System.out.println(v.cheapItems(5));  And getting this error Exception in thread "main" java.lang.NullPointerException: Cannot invoke "VendingItem.getPrice()" because "this.shelf[i]" is null


The daily freezing and melting of water causes large rocks to break up into smaller pieces.  I have faced a sentence and can't understand what is meaning of it. As far as I know after noun + and + noun we have to use verb for plural, but the sentence says different. Please help me.  Thanks for your ideas.


This a little program that I am making for my little brother how need help in remembering verbs. What its suppose to do at this point in time is pick a word and as the user to then type in the same word but in a different time eg generate run  user input running . I have all the words in a 2d array which allows me to compare them . However when I type in the correct answer it say that i am incorrect.   package javaapplication1;  import java.util.Random;  import java.io.*;  public class JavaApplication1 {  public static void main(String[] args)  throws IOException {     BufferedReader userInput =                new BufferedReader(new InputStreamReader(System.in));     String[][] myArray = { {"awake" , "awoke" , "awoken"},  {"be" , "was/were" , "been"}, {"beat" , "beat" , "beaten"}, {"become" , "became" , "become"}, {"begin" , "began" , "begun"}, {"bend" , "bent" , "bent"}, {"bet" , "bet" , "bet"}, {"bid" , "bid" , "bid"}, {"bite" , "bit" , "bitten"}, {"blow" , "blew" , "blown"}, {"break" , "broke" , "broken"}, {"bring" , "brought" , "brought"}, {"broadcast" , "broadcast" , "broadcast"}, {"build" , "built" , "built"}, {"burn" , "burned" , "burnt"}, {"buy" , "bought" , "bought"}, {"catch" , "caught" , "caught"}, {"choose" , "chose" , "chosen"}, {"come" , "came" , "come"}, {"cost" , "cost" , "cost"}, {"cut" , "cut" , "cut"}, {"dig" , "dug" , "dug"}, {"do" , "did" , "done"}, {"draw" , "drew" , "drawn"}, {"drive" , "drove" , "driven"}, {"drink" , "drank" , "drunk"}, {"eat" , "ate" , "eaten"}, {"fall" , "fell" , "fallen"}, {"feel" , "felt" , "felt"}, {"fight" , "fought" , "fought"}, {"find" , "found" , "found"}, {"fly" , "flew" , "flown"}, {"forget" , "forgot" , "forgotten"}, {"forgive" , "forgave" , "forgiven"}, {"freeze" , "froze" , "frozen"}, {"get" , "got" , "gotten"}, {"give" , "gave" , "given"}, {"go" , "went" , "gone"}, {"grow" , "grew" , "grown"}, {"hang" , "hung" , "hung"}, {"have" , "had" , "had"}, {"hear" , "heard" , "heard"}, {"hide" , "hid" , "hidden"}, {"hit" , "hit" , "hit"}, {"hold" , "held" , "held"}, {"hurt" , "hurt" , "hurt"}, {"keep" , "kept" , "kept"}, {"know" , "knew" , "known"}, {"lay" , "laid" , "laid"}, {"lead" , "led" , "led"}, {"leave" , "left" , "left"}, {"lend" , "lent" , "lent"}, {"let" , "let" , "let"}, {"lie" , "lay" , "lain"}, {"lose" , "lost" , "lost"}, {"make" , "made" , "made"}, {"mean" , "meant" , "meant"}, {"meet" , "met" , "met"}, {"pay" , "paid" , "paid"}, {"put" , "put" , "put"}, {"read" , "read" , "read"}, {"ride" , "rode" , "ridden"}, {"ring" , "rang" , "rung"}, {"rise" , "rose" , "risen"}, {"run" , "ran" , "run"}, {"say" , "said" , "said"}, {"see" , "saw" , "seen"}, {"sell" , "sold" , "sold"}, {"send" , "sent" , "sent"}, {"show" , "showed" , "shown"}, {"shut" , "shut" , "shut"}, {"sing" , "sang" , "sung"}, {"sit" , "sat" , "sat"}, {"sleep" , "slept" , "slept"}, {"speak" , "spoke" , "spoken"}, {"spend" , "spent" , "spent"}, {"stand" , "stood" , "stood"}, {"swim" , "swam" , "swum"}, {"take" , "took" , "taken"}, {"teach" , "taught" , "taught"}, {"tear" , "tore" , "torn"}, {"tell" , "told" , "told"}, {"think" , "thought" , "thought"}, {"throw" , "threw" , "thrown"}, {"understand" , "understood" , "understood"}, {"wake" , "woke" , "woken"}, {"wear" , "wore" , "worn"}, {"win" , "won" , "won"}, {"write" , "wrote" , "written"}};      Random rand1 = new Random();      int  n = rand1.nextInt(88) ;     System.out.println(n);     System.out.println("The word is: " + myArray[n][0]);     System.out.println("Input your answer :");     String input  = userInput.readLine();     if (input == myArray[n][1]) {        System.out.println("Well done");      }     else{         System.out.println("Better luck nex time");          System.out.println("The correct answer was : "                        + myArray[n][1]);     }     }   }


how to make a variable global inside a function

How do you declare a variable as global once it has been created inside a function? This is my example code (not what it is being used for): def function():     pancakes = input("pancakes input")     pancakes = global(pancakes) #i don't know how to do this part  def function2(pancakes):     print(pancakes)      function() function2(pancakes)  By the way I know that returning the variable also works but it will not with my program.


Operator precedence of +(concatenation) vs == in Javascript and Java

let valueOne = 3; let valueTwo = "3"; if(valueOne==valueTwo)     {console.log("same")} else     {console.log("different")}      console.log("valueOne==valueTwo: " + valueOne==valueTwo);   Why is the output:  same false   It doesn't even print the string  valueOne==valueTwo:.  However, when extra parentheses are added it's outputting the expected results.  console.log("valueOne==valueTwo: " + (valueOne==valueTwo));      Output:   same valueOne==valueTwo: true   It appears that the == operator has lower precedence than concatenation in javascript,   which is different from Java:    Anyone know the design concern here?  Thanks!


I've no idea why this script sends email into the spam folder. I tried to fix it using SMTP but it was useless, it only works using Hotmail.  I'm using MAMP for local hosting because my work is not online yet.  Why? How can I fix this problem?  Script:   <?php  require("PHPMailer.php"); session_cache_limiter( 'nocache' ); header( 'Expires: ' . gmdate( 'r', 0 ) ); header( 'Content-type: application/json' );   $to         = 'myEmail';  // put your email here  $email_template = 'simple.html';  $subject    = strip_tags($_POST['subject']); $email       = strip_tags($_POST['email']); $name       = strip_tags($_POST['name']); $message    = nl2br( htmlspecialchars($_POST['message'], ENT_QUOTES) ); $result     = array();    $mail = new PHPMailer();  $mail->IsSMTP();    $mail->Host = "smtp.gmail.com";  $mail->SMTPAuth = true;  $mail->SMTPSecure = 'ssl';  $mail->Port = 465;   // gmail account data  $mail->Username = "myAccountGmail";  $mail->Password = "myPasswordGmail";   if(empty($name)){      $result = array( 'response' => 'error', 'empty'=>'name',    'message'=>'Error!&nbsp; Name is empty.' );     echo json_encode($result );     die; }   if(empty($email)){      $result = array( 'response' => 'error', 'empty'=>'email', 'message'=>'Error!&nbsp; Email is empty.' );     echo json_encode($result );     die; }   if(empty($message)){       $result = array( 'response' => 'error', 'empty'=>'message', 'message'=>'Error!&nbsp; Message body is empty.' );      echo json_encode($result );      die; }    $headers  = "From: " . $name . ' <' . $email . '>' . "\r\n"; $headers .= "Reply-To: ". $email . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=UTF-8\r\n";   $templateTags =  array(     '{{subject}}' => $subject,     '{{email}}'=>$email,     '{{message}}'=>$message,     '{{name}}'=>$name,     '{{phone}}'=>$phone     );   $templateContents = file_get_contents( dirname(__FILE__) . '/email-templates/'.$email_template);  $contents =  strtr($templateContents, $templateTags);  if ( mail( $to, $subject, $contents, $headers ) ) {     $result = array( 'response' => 'success', 'message'=>'Thank You!&nbsp; Your email has been delivered.' ); } else {     $result = array( 'response' => 'error', 'message'=>'Error!&nbsp; Cann\'t Send Mail.'  ); }  echo json_encode( $result );  die;


Why Do We Say That the Electric Forces Are Stronger Than the Gravitational Forces?

I understand that both the electric and gravitational forces are inversely proportional to the squared distance from the point source and that the gravitational constant is around $10^{-20}$ times Coulomb's constant.  I don't understand why this suffices to conclude that the gravitational force is stronger than the electric force. The two constants that I see getting compared here have different units. One involves electric charges, while the other involves gravitational masses. To me, this makes as much sense as saying that a second is larger than a meter.  Is it related to the energy densities of these fields? If yes, how? I think that it is not the duplicate of the mentioned question because the point being asked in that question is why do we consider gravitational fields weaker even if they are more dominant in the universe at macroscopic levels. But, I want to ask that what are the criteria based on which we define the relative strength or weakness of forces/fields. What do we exactly mean by declaring a force/field stronger than the other? Is it related to their energy densities?


SQL Injection with database-stored email adresses

I got a quick question: Is it possible to get SQL-Injected by storing users email-addresses in a MySQL database? I am familiar with the filter_var($email, FILTER_VALIDATE_EMAIL) PHP function to check valid email addresses, however, even though I apply this function in my registration-page, I can still enter symbols like ` or ' in the email input, which are, as far as I know, typical to cause problems in databases. To not beat around the bush for any longer: Do I need another function to check those kind of characters, and if yes, can you give me some ideas and examples? Thank you


Calculating the sample cumulative distribution function for a Kolmogrov-Simulation test to examine the goodness of fit with given data

I have sample data for 'Times between successive crashes of a computer system' which is for a 6 month period and the data is given in hours. The data in brief is : 1,10,20,30,40,52..... I need to use the Kolmogrov-Smirnov test to examine the goodness of fit for a exponential distribution. I am given parameter α = 0.00435 , Mean = 1/α = 230 hours. The total number of data points in the sample is 22. I'm not sure how to calculate the sample cumulative distribution function (Fs(x)). Currently my approach to it was that each data point should be divided by the sample size(22). As in for data points 1,10,20 the  Fs(x) = 1/22,10/22 etc. Can I get a confirmation on this approach ?


Novel with related stories, including one about an agrarian society where the elders can control thoughts to help cope with the loss of loved ones

I read it in middle school and loved it, but I went back to the school library recently while home and looked for it to no avail.  I will list all the details I remember:  It starts off with an agrarian society in which people are all happy.  A person has memories of a grandparent who died a long time ago, they leave the village and find the grandparent's fresh corpse.  It turns out the elders can control thoughts and deal with loss that way, by making it seem long ago.  There is a boy with certain colored eyes, meaning he can read thoughts and has some impressive cognitive abilities.  He takes a test in some academy and the last question is very difficult, and relates to astrophysics.  It is expected to be unsolvable, but he just lifts the answer from the teacher's mind, and is heavily questioned for it.  There is a colony of people, led I think by an adult brother and sister, who after landing on some planet, freeze themselves for around 20,000 years.  They awake to see a similar agrarian society to the beginning of the book.  There is something to do with a woman going to a new planet for opportunities, and she is chased by some irradiated dogs near a school or park.   It wasn't really YA lit, it was pretty long (500-600 pages), and I believe it was broken into individual stories that sort of tied together near the end.  I have been looking for this one for so long, I will try and remember other details if that helps


Why do we have OS names like Mountain Lion, Jellybean, and Quantal Quetzal instead of numbers?

Less of a pressing question and more a "what happened here"?   At some point in the past decade (most) OS's have switched over to these codenames for their versions with names like Mountain Lion, Jellybean, etc. After a heated discussion with my Dad (who prefers version numbers) about why the names would be done like this, it dawned on me to ask if there was a (valid) UX reason for it vs. just a marketing/trademark one.  I don't think this idea has been explored all that well, just because we have such scattered implementations of it -- Android and Ubuntu are the only ones who use alphabetized naming conventions as a reinforcement of version numbering, Apple uses it for OSX (Snow Leopard, Lion...) but not for iOS (iOS4, iOS5...), and Windows isn't consistent about this stuff at all (XP, then Vista, then 7, then 8...)  Is there any rhyme / reason to all of this?


How to derive quantiles of a non-standard normal distribution

Let X = [11.17, 9.52, 10.69, 9.84, 10.84, 9.88, 10.28, 12.23, 8.49, 10.79] be a normally distributed data with mean = 10.37 and standard deviation = 1.02. How to determine the corresponding value to +1.02 and -1.02 standard deviations, which covers 69% area of the probability distribution.


How can a Lie subgroup of a matrix Lie group not be a matrix Lie group

Let $G$ be a matrix Lie group and let $H$ be a Lie subgroup of $G$. My understanding is that all $g \in G$ are matrices, since $G$ is a subgroup of the general linear group. Then aren’t all elements $h \in H$ matrices, since $h \in G$?  From what I can gather $H$ is a matrix Lie group if $H$ is a closed subset of $G$. But if $H$ is not a closed subset of $G$, why is it not a matrix Lie group? Is the reasoning in the first paragraph wrong?


How to adjust this tabularx in Beamer frame size?

I am thinging how to format the table fit the frame size nicely in LaTeX.  I can recall that \tiny/... is not the optimum option here.  Code which output in Fig. 1   \documentclass{beamer} \usepackage[english]{babel} \usepackage{tabularx} \usetheme{Berkeley}  \logo{ %% llx lly urx ury \includegraphics[trim=8cm 2cm 11cm 2cm,clip, height=\headheight, width=\headheight]{example-image} } %\usepackage{hyperref} % Not needed! \begin{document} % https://tex.stackexchange.com/a/384801/13173 \section{1. skills} \begin{frame} \frametitle{Lorem}  % Maybe this one TODO but not \tiny https://tex.stackexchange.com/a/208763/13173 \begin{table}[] \centering %\caption*{Test} \begin{tabularx}{\textwidth}{|l|l|l|l|l|l|l|l|l|} %\begin{tabularx}{\textwidth}{|x|x|x|x|x|x|x|x|x|} \hline Avain lorem & V2 & V1 & V0 & START lorem & P1 & P2 & P3 & Kriittinen lorem \\ \hline  &  &  &  &  &  &  &  & \\ \hline \end{tabularx} \end{table}  \begin{Form} \begin{enumerate} \item \ChoiceMenu[name=football,radio,default=-0]{Do you play football?}{Much (2)=2,Little (1)=1,Not at all (0)=0} \item \ChoiceMenu[name=ice-hockey,radio,default=-0]{Do you play ice-hockey?}{Much (2)=2,Little (1)=1,Not at all (0)=0} \end{enumerate} \end{Form} \end{frame}  \end{document}   Output in Fig. 1    Fig. 1 Output    Proposal tabular format there but I think adjustbox is the worst what you can do   \begin{adjustbox}{max width=\textwidth,center} \begin{table}[hpt] \centering     \begin{tabular}{|l|l|l|l|l|l|l|l|l|}     \hline     Avain lorem & V2 & V1 & V0 & START lorem & P1 & P2 & P3 & Kriittinen lorem \\ \hline      &  &  &  &  &  &  & & \\ \hline     \end{tabular} \end{table} \end{adjustbox}   Output in Fig. 2    OS: Debian 9 TeXLive: 2017


Krivine in his book (Lambda-calculus: Types and Models) introduces the grammar of lambda-terms and then abbreviations to denote them. The grammar itself is not ambiguous:  Lambda-terms are obtained by applying, a finite number of times, the following rules :   any variable x is a λ-term ; whenever t and u are λ-terms, then so is (t)u ; whenever t is a λ-term and x is a variable, then λx t is a λ-term.   Then: "the term $(...(((t)u_1)u_2)...)u_k$ will also be written "$(t)u_1 u_2 ...u_k$". But let us consider the two following different $\lambda$-terms:   $v_1 = ((x)\lambda y. (y)z)w$  $v_2 = (x)\lambda y. ((y)z)w$   ($w, x, y, z$ are variables) and now it seems that I have two ways to interpret the notation $(x)\lambda y. (y)z w$:   either $t = x$, $k = 2$, $u_1 =\lambda y. (y)z$ and $u_2 = w$ or $t = x$, $k= 1$ and $u_1 = \lambda y. ((y)z)w$   It seems that the notation "$(t)u_1 u_2 ...u_k$" is ambiguous. Which rule am I violating in my interpretation?


Make dead keys insert both characters if the combination is not recognized

There are ways to configure dead keys in Linux to mimic the behavior they have in Windows ?  This document describe how it works in Windows:  The difference between Linux and Windows dead keys is highlighted in bold:      When you press the APOSTROPHE (') key, QUOTATION MARK (") key, ACCENT GRAVE (`) key, TILDE (~) key, ACCENT CIRCUMFLEX key, or CARET (^) key, nothing appears on the screen until you press the a second key. If you press one of the letters designated as eligible to receive an accent mark, the accented version of the letter appears. If you press an ineligible key, two separate characters appear.   In Linux when you press a second key not eligible to receive a accent, the first key pressed is lost. This reduce the typing productivity, a lot.


I’m trying to find the easiest and earliest way to obtain corpses magically.  My intent is to use the corpses in reanimation with the Animate Dead and Create Undead spells. Wish can pull off such a feat, but I can’t find any other spell than Wish that seems capable of accomplishing such a feat.


My wife and I were discussing whether it is allowable to put an adjective in front of "of them". For instance, I could say "I want 5 cats" and "I want 5 of them". However, while it sounds perfectly normal to say "I want 5 new cats", "I want 5 new of them" doesn't roll of the tongue very smoothly.  If it is incorrect to place an adjective in front of "of them"?


Are there any approximation for ratios of factorials (and other similar high-precision ratios with rounding issues?)

I was wondering if there is some mathematical approximation for calculating the ratios of factorials. I don't mean a shortcut to deriving the factorial results through a means like Stirling's Formula, but of bypassing the factorial calculations altogether when the final ratio would actually turn out to be a small number. The reason I'm asking is that I occasionally run into manifestations of this problem when teaching myself to convert statistical and data mining equations into T-SQL code, where the highest precision float data types can only go up to about a 135! or so before triggering arithmetic overflows. The final product of these ratios, however, is often much smaller even when very high values are plugged in, and would fit comfortably within the range of the data types I'm using.  For example, 200! is beyond the range of our data types. But if you plug it into the equation N! / (N -1)! it would return 0.0049751243781094527363184079602, which fits easily. What I need is some general-purpose method for reaching the same answer (or something close to it) without using factorials as either the divisor or dividend. Approximations would be acceptable.   I'm also running into a similar issue when nearly infinitesimal decimal points are tacked onto the end of divisors. For example, I found it difficult to code the Hosmer-Lemeshow Test because the final test statistic often involves computations like this: 1 / (1 + some number like 0.1-E50). When the two parts of the divisor are added together, the infinitesimal part is rounded off in almost all computer languages I've heard of. Like the factorial ratios, the final product would fit easily within most high-precision data types, but cannot be reached through the standard equation. Is there a means of approximating these type of equations as well (or even of factoring them by splitting the divisor somehow?).   Thanks for any help in advance. In order to avoid duplicating any existing questions I tried to do some searches across the Internet and in CrossValidated on this issue over the last month or so on both, but may be using the wrong search terms, because I'm coming up empty. I figured CrossValidated would be the right forum, since I'm encountering these issues from time to time with various statistical and data mining algorithms, most recently the Hosmer-Lemeshow Test.


MLE Estimator for ${\cal U}[\theta - 0.5,\theta + 0.5]$

Let $X_1,..,X_N$ be a random sample drawn from a uniform distribution ${\cal{U}}[\theta-.5,\theta+.5]$. I am trying to find the MLE of $\theta$.  In all other questions posted, I see $\theta$ at least enter the pdf. But it's not the case here. Wondering if there is a way to do it?  Thanks!


Searching for updates takes ages on freshly installed Windows 7 Pro

The title says it all. Since a few months, on every Windows 7 workstation I reinstall, the first check for updates takes several hours, during which there is no disk nor network activity but an svchost process is maxing out an entire CPU core and takes up about a GB of RAM.  Eventually once I let it run for several hours it finds the updates and starts installing them, so it's not an actual problem but still a big annoyance when I need to reinstall a machine for which I don't have an image ready.  Resetting Windows Update by stopping the services and deleting the SoftwareDistribution folder doesn't have any good effect and just makes the slow process restart from the beginning. Installing them manually via WSUSOffline still exhibits the same issue - it hangs for hours on "Listing IDs of installed updates" while svchost starts going crazy with CPU and RAM usage again.  There doesn't seem to be anything relevant in the event viewer - in the "Setup" category the last event is from "Servicing" saying that "KBWUClient-SelfUpdate-Aux" was successfully installed; there are no update-related errors of any kind. There is however a CAPI2 error saying "Failed extract of third-party root list from auto update cab at ... authrootstl.cab ... A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file", but I'm not sure whether it affects Windows Update. Needless to say, the system clock is correct.  This issue has been going on for months (including the CAPI error) and wastes hours of mine & my clients' time.  Does anyone have a solution ?


Show that $R/ I=\{x+I\mid x\in R\}$ is a Ring if $I$ is an Ideal and it isn't if $I$ is only a subring

As the title says I have to show that for $R$ a commutative ring with neutral element, $ R/ I=\{x+I\mid x\in R\}$ is a ring if $I$ is an ideal and it isn't if $I$ is only a subring. It's the first time I am hearing about Rings so it's not that easy for me. I am proving the Ring conditions and the first one is that it has to be an abelian group. Let's start with the associative property: We take $x,y,z \in R/I$: We have to show that $(x+I+y+I)+z+I=x+I+(y+I+z+I)$ For example on the left hand side I guess that I have to do $((x+y)+I)+z+I$ and then $(x+y+z)+I$ and same with the other side but what gives  me the right to write $(x+I+y+I)=((x+y)+I)$, why can I take $x$ and $y$ together and then the same logic with $z$ and also (this might be very trivial) why is the $I$ only counted once and not 3 times. And also, what does the Ideal give me in this specific case that the subring does not? Thanks in advance for the help.


"The Netherlands are" vs "The Netherlands is"

When speaking about The Netherlands as a country, should it be considered as a plural or singular word?  Examples:   The Netherlands is a country. The Netherlands are famous for cheese and windmills.   Is there a general rule for this? Do instances such as "The United States of America" and "The United Arab Emirates" follow the same rule?


Wifi is slower than Ethernet cable connection?

I configured my new router and noticed that WiFi connection is way slower than Ethernet connection.   Ethernet connection giving a download speed of ~60Mbps and upload speed of ~30Mbps while the Wifi only giving download speed of ~20Mbps and upload speed of ~15Mbps.  This is a new router with 802.11n and it says it support 300Mbps.  Here are the Wifi settings of the router,is there anything I can change to get higher speed :


AES: Why ShiftRows() before MixColumns()?

In above picture you can see a AES state array over 2 rounds through the S- and P-Boxes of AES. It's taken from  and intends to show how 2 rounds of transformation are necessary to achieve full diffusion after only the first byte has changed.  If one would MixColumns() before MixRows() diffusion, one would reach diffusion one step earlier. So I wonder what is the reason to ShiftRows() before MixColumns()?


Latex - Miktex cross references linking back to ref point

Using pdftex i can  cross ref to a label say \ref{label1} for example. Clickin on it in the .pdf document you 'll be linked to the label. I'd like there to be a "back reference link" to the point that called \ref{label1}. Is this possible without adding another label to that point? Thank you.


Can a class derive from more than one abstract class?

Just wondering if a class can derive from more than one abstract class? My intuition says no.


Solving 2-degree equations in 3 variables.

We are given 3 equations: $x^2+\sqrt3 xy + y^2 = 25$ $y^2 + z^2 = 9$ $x^2 +xz+ z^2 = 16$. $x,y,z$ are positive real numbers. Then we have to find value of $xy + 2yz + \sqrt3 xz$.


How to customize the Lubuntu menu? Where is the .xml file responsible for it?

I know that the menu can be modified editing the .xml file responsible for it, but I've did a research on the web and nothing helped me find this file. So I'm here asking, how to customize the Lubuntu menu? Where is the .xml file responsible for it?  This is the Lubuntu menu: (the image is just to illustrate the question, as I could not find a screenshot of Lubuntu 12.10 menu)


How do you run your own code alongside Tkinter's event loop?

My little brother is just getting into programming, and for his Science Fair project, he's doing a simulation of a flock of birds in the sky. He's gotten most of his code written, and it works nicely, but the birds need to move every moment.  Tkinter, however, hogs the time for its own event loop, and so his code won't run. Doing root.mainloop() runs, runs, and keeps running, and the only thing it runs is the event handlers.  Is there a way to have his code run alongside the mainloop (without multithreading, it's confusing and this should be kept simple), and if so, what is it?  Right now, he came up with an ugly hack, tying his move() function to <b1-motion>, so that as long as he holds the button down and wiggles the mouse, it works. But there's got to be a better way.


Evaluating $\lim_{x \to \infty} (3^x+7^x)^{1/x}$

The question is to evaluate $$\lim_{x \to \infty} (3^x+7^x)^{1/x}$$  I tried evaluating the limit as $exp(\lim_{x\to \infty} (3^x+7^x-1)(1/x))$.I couldn't proceed after this.Any help shall be highly appreciated. Thanks.


How to get the name of submit button created dynamically on button click

I am creating HTML button dynamically using jquery and adding that into a Panel .The number of button will vary as per the value in the database table.Now as per my requirement i need to get the name of submit button as soon as i click any of the button but i am not able to do it. Here is my jquery code..  obj = data.d; var obj1 = obj.split(','); for (var j = 0; j < obj1.length; j++) { var h = ""; h += "<input type='button' class='btn btn-custom ' id='b1' value=" + obj1[j] + ">"; $('#p1').append(h); }   and here is my button click event which is not working as required..   $('#b1').click(function () {  var ss = $(this).val();  alert("ss ");  });   Please help me ..Thanks


Quadratic Equation Based Problem:Prove either $a = 2l$ & $b = m$ or $b + m = al$

If by eleminating $x$ between the equation $x² + ax + b = 0$ & $xy + l  (x + y) + m = 0$, a quadratic in $y$ is formed whose roots are the   same as those of the original quadratic in $x$. Then prove either $a =  2l$ & $b = m$ or $b + m = al$.   Today while we were solving this sum in class our professor told us that rather than directly eliminating $x$ from both the equations there is a shortcut method too.Since the equation after eliminating $x$ in $y$ is same as the the original quadratic in $x$ we can simply replace $y$ by $x$ in the second equation to form another quadratic. Then we can apply the condition for one root common or both roots common between this new quadratic and the original quadratic to reach final result.  But I didn't get why we can replace $y$ by $x$ in the second equation.Can someone please explain in detail?Thanks.


I have a list of all premier league teams:  teamlist = ["arsenal", "aston-villa", "bournemouth", "chelsea", "crystal-palace", "everton","leicester-city", "liverpool", "manchester-city", "manchester-united", "newcastle-united", "norwich-city", "southampton","stoke-city", "swansea-city", "tottenham-hotspur", "watford", "west-bromich-albion","west-ham-united" ]   I need to compute all possible team1-vs-team2 pairings.  At present I have the following code:  oppo = 0  for team in teamlist:         print team + "-vs-" + teamlist[oppo]         oppo+=1         print team + "-vs-" + teamlist[oppo]         oppo+=1   which will output:  arsenal-vs-arsenal arsenal-vs-aston-villa   However I need this to go through each team, display all of their possible home game fixtures, then move onto the next team in teamlist, output all of their possible home games fixtures and repeat until all teams are done.


Could discovered gravitational waves in fact be an aether wind?

Proving the existence of gravitational waves might revolutionise cosmology, but the method used by LIGO is quite similar to the famous  built more than a hundred years ago.  Might the Michelson-Morley experiment have failed due to some technological errors? Could putative gravitational waves found by LIGO be nothing but aether wind ripples?  May be this g-waves which were predicted by Einstein are actually ripples caused by aether wind and this thing was first predicted about 500 years before.


If I try to run a;;b in sh, I get this error:  sh: <number>: Syntax error: ";;" unexpected   If I try a;;;b I get the same error, not ;;; instead of ;;, so I think that ;; means something, although I don't know what does it mean.  Here is an example:  $ echo A;;echo B sh: 1: Syntax error: ";;" unexpected $ echo A;;;echo B sh: 1: Syntax error: ";;" unexpected $ echo A; ;echo B sh: 1: Syntax error: ";" unexpected   Here you can see that when I use ; ; instead of ;; the error is different, pertaining to the fact that I used ; without a command before. ;; seems to be a different operator, although I don't know what it applies to.


How to change which image from website is shown in Google search result?

Can anyone tell me how Google decides which image to use when it shows an image with the search results (as is the case with mobile search, sometimes)?  If you look at these mobile search results …    … and take the AliExpress.com result as an example, by inspecting  you can see that  used by Google seems to have no special declaration, etc. It is just the first JPG that appears in that page's HTML - so I was thinking maybe that's why it's the image that is used in the Google search results.  However, when you look at these mobile search results …    … and consider the Backpack Billboards result,  reveals that  being used is actually the seventh image declared in the HTML.  So can anyone shed any light on how Google determines which image to be displayed? I would like to know so I can then have control over which image is displayed for my site.  Update / Solution  Thanks to the answers, below, this is the code I have now added to my head HTML in order to get the thumbnail shown in Google when searching for backpack billboards:  <script type="application/ld+json"> {   "@context": "http://schema.org/",   "@type": "Product",   "name": "Regular Backpack Billboard",   "image": [     "https://backpackbillboards.com/wp-content/uploads/2017/12/backpack-billboards-1x1.jpg",     "https://backpackbillboards.com/wp-content/uploads/2017/12/backpack-billboards-4x3.jpg",     "https://backpackbillboards.com/wp-content/uploads/2017/12/backpack-billboards-16x9.jpg"    ],   "description": "Backpack Billboards feature a rechargeable battery which powers the internal LED lights providing a bright illuminated display for up to 8 hours.",   "sku": "BPBB8",   "brand": {     "@type": "Thing",     "name": "Backpack Billboards"   },   "offers": {     "@type": "Offer",     "priceCurrency": "USD",     "price": "299.00",     "priceValidUntil": "2020-11-11",     "itemCondition": "http://schema.org/NewCondition",     "availability": "http://schema.org/InStock",     "seller": {       "@type": "Organization",       "name": "Backpack Billboards"     }   } } </script>


Tolerance bound for a normalized variable

Based on a sample $(x_i) \sim_{\text{iid}} {\cal N}(\mu, \sigma^2)$, how can you get an exact or a well-approximated upper tolerance bound (i.e. an upper confidence bound of a quantile of the distribution) of $\dfrac{x_i}{\sigma}$ ? Here, we assume both parameters $\mu$ and $\sigma^2$ are unknown.


what are these strange artifacts on this photo?  how to avoid them?  photo is shot with canon 1200d 50mm f1.8   4seconds shutter    thank you


Are empty-sets equal to themselves? Is there one universally acepted empty-sets? Or many? And to stipulate on this, are there any axioms by which we can follow such a premise if one is put forward or am I to assert three potential outcomes? That empty sets are equal to themselves, are not equal, or are equal given certain parameters


Extract all band values of a multiband raster to Polygons as separate columns

I am trying to extract the values of a multiband raster to a polygon in R. ACVheatingdegreedayS <- stack("location/multibandraster.tif") ACVheatingdegreedayS <- ACVheatingdegreedayS %>%    projectRaster(ACVheatingdegreedayS, crs="EPSG:3035")  ( zCVhdd1 <- CVheatingdegreedayS[[1]] )  I want to avoid that last line of code where I break the multiband into a single band. There are 70 bands, so creating separate rasters would be very time consuming. Anyone know of a way to extract all bands of a multiband raster to a polygon?


I heard it is usually better not routing at 90 degree angles. However what about with via, as I've read that it is usually recommended to use one layer for horizontal and another layer for vertical. Can I route safely like the picture below?


\begin{table}[ht] \centering \begin{tabular}{c|ccccccc} \hline & col1 & col2 & col3 & col4 & col5 & col6 & col7 \\ \hline \rowcolor{red} row1& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ row2& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ \rowcolor{red} row3& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ row4& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ \rowcolor{red} row5& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ row6& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ \hline \end{tabular} \end{table}   I have a simple table with color coded rows (red or black), and I would like to append a simple color coded legend that tells the reader Red = Male, Black = Female. Perhaps something that looks like this?


How does one automate apt-get commands such as update and upgrade?

As an administrator to many Ubuntu servers that run on AWS - sometimes I cannot keep track of what servers need package updates and when. Is there a way to automate this process in a sense where running sudo apt-get update and sudo apt-get upgrade is just done automatically?  EDIT: This is in question to running Ubuntu 16.04 LTS servers.


How to use SSH to run a local shell script on a remote machine?

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


visual studio open windows form from console application c#

The title is a bit vague, but my problem is this. In Microsoft visual studio im making a console application in c#, and in the code i wanted to be able to launch a windows form inside the same project. In visual basic this can be done with Application.run(formName), however if done in c# using a refrence, the windows form oppens but then immediately stops responding. What is the correct way to open a form from a console app?  class Program {     static void Main(string[] args)     {          Console.WriteLine("Enter a number");         int x = int.Parse(Console.ReadLine());          if (x == 3)         {             menu menuInstance = new menu();    //menu would be the name of the windows form             menuInstance.Show();            }           Console.ReadKey();          }     } }


How can I export a specific menu out of wordpress? I have a list with many URLs and I need to copy it to multiple sites. But I don't want to do it manually.


Limit of function using L'Hôpital's rule: $\lim_{x \to \infty}{x-x^2\ln(1+\frac{1}{x})}$

I have to calculate $\lim_{x \to \infty}{x-x^2\ln(1+\frac{1}{x})}$. I rewrote it as $\lim_{x \to \infty}{\frac{x-x^3\ln^2(1+\frac{1}{x})}{1 + x\ln(1+\frac{1} {x})}}$ and tried to apply L'Hôpital's rule but it didn't work. How to end this?


How to align the two buttons to the center of a div of 'position:absolute' using flexbox?

This is the outcome of my code so far:    What I actually want to achieve is to move the two button to the center horizontally. But at the moment they are aligned to the left.  This is the result I want to achieve:    I have tried alignItems but it has no effect. I don't want to use any margin because the container size may vary.  Here is my code:    const H = "540px"; const W = "720px";  const ContentView = ({ width, height }) => (
Hello! Alt View!
 );  const ControlView = ({ width, height, onReveal, onCopy }) => {   const container = {     width,     height,     position: "relative"   };   const controlsContainer = {     width,     height,     position: "absolute",     left: 0,     top: 0,     border: "5px solid green",     display: "flex"   };   return (

             <button               style={{                 width: "400px",                 height: "60px",                 minWidth: "200px",                 display: "block"               }}               onClick={onReveal}             >               Reveal             </button>

             <button               style={{ width: "400px", height: "60px", minWidth: "200px" }}               onClick={onCopy}             >               Copy Meta             </button>

   ); };  class App extends React.Component {   constructor(props) {     super(props);     this.state = { playing: false };   }    _onReveal() {     this.setState({ playing: true });   }    _onCopy() {     window.alert("Meta data copied");   }    renderAltView() {     return <AltView />;   }   render() {     const { width, height } = this.props;     if (!this.state.playing) {       return (

Controls
           <ControlView             width={width}             height={height}             onReveal={() => this._onReveal()}             onCopy={() => this._onCopy()}           />
       );     }     return (
         <ContentView />
     );   } } ReactDOM.render(<App width={W} height={H} />, document.getElementById("app"));

     Unfortunately I cannot get it to work in SO code snippet. A working version is here at codepen   What flex directive I can use to position the buttons as I want?


Integer Solutions of $x^2+y^2=100,003$ Using Modulo Arithmetic

Problem: Prove whether or not $x^2+y^2=100,003$ has any integer solutions using modulo arithmetic. My professor gave the following solution: $x^2+y^2=100,003 \equiv 3 \pmod 4$. By the previous proof verifying that no integer of the form $4k+3$ with integer $k$ is the sum of two squares. Thus $x^2+y^2=100,000$ has no integer solutions.  Why did my professor know to use modulo 4 with remainder 3 looking at the problem? I can't think of any reason to do that.


Is any quotient of a Euclidean domain by a prime ideal a Euclidean domain?

Let $R$ be a Euclidean domain, i.e., a ring with a norm $N : R \rightarrow \mathbb N$ such that for any $a,b\in R$ with $b\not=0$, we may write $a = qb + r$ for some $q,r \in R$ with $N(r) < N(b)$. Let $I$ be a prime ideal of $R$, so $R/I$ is a domain. Must $R/I$ in fact be a Euclidean domain?   I know that this is true if we replace "Euclidean domain" with "PID", and false if we replace it with "UFD", so there is no clear intuition to be gained from similar concepts. My first attempts at a proof was to borrow a construction from analysis and define a norm on $R/I$ by  $N(a + I) = \inf\{N(a+i) : i\in I\}$  but this didn't really get me anywhere.   So, this fact true? If so, how can I prove it? If not, whats a counterexample?


What is difference using enum class variables in main and other callable in c++?

1 #include<type_traits> #include<iostream> using namespace std;  enum class Widget; using UType = underlying_type_t<Widget>; UType getWidget();  int main() {     cout<<getWidget();     cout<<static_cast<int>(Widget::a);     return 0; }  UType getWidget() {     return static_cast<UType<Widget>>(Widget::a); }  enum class Widget {     a, b, c };  2 #include<iostream> #include<type_traits> using namespace std;  template<typename T> using UType = underlying_type_t<T>;  enum class Widget;  template<typename T> UType<T> getWidget();  int main() {     cout<<getWidget<Widget>();     //cout<<static_cast<int>(Widget::a);     return 0; }  template<typename T> UType<T> getWidget() {     return static_cast<UType<Widget>>(Widget::a); }   enum class Widget {     a, b, c };  When I used Widget::a in main, compiler failed because of "Undefined identifier Error". But, when I called GetWidget, this code was compiled. What is difference in two situations? ---2 is working if I use getWidget(). but 1 isn't. ---compiler : visual studio 2019 iso c++14 standard ---error message :  c2027 : use of undefined type 'Widget'  C2065 : 'a' : undeclared identifier


Unconstrained convex quadratic integer programing

Let $N_i=\{0,1,\dots,\bar{n}_i\}$ and define $N=N_1\times \dots \times N_I$. I have a minimization problem of the form $$ \min_{n\in N} \sum_i A_i n_i +\sum_i \sum_{j\neq i} B_{ij} (n_i-n_j)^2 $$ where $A_i\geq 0$ and $B_{ij}\geq 0$ for all $i,j$. This problem can be written as a convex quadratic integer program.   What are the standard algorithms to solve these problems numerically? Are they guaranteed to find a global solution? How fast are they?


Been looking for a Word sort of like Chauvinism

A word that expresses a person highly prejudiced in favor of their homeland or culture. Chauvinist is too harsh and it seemed to myself and a friend that the word was just out of reach. Zealot is also too strong. Any suggestions?  Sentence: I had no idea that he was so ______. Or I had no idea was such a _______.


I'd say the search works incorrectly, but verbatim is verbatim, which means it doesn't actually work as intended.  When looking for a phrase This post does not cite any references or sources, search shows me 10 results, omitting This, not and or. I know, because search optimization, right? But when I distrustingly looked for "This post does not cite any references or sources", I got no results. Right when there were just about ten of them. Not so verbatim after all?


What exactly is the difference between:  typedef enum {   something1,   something2,   .....   somethingN } myEnum;   end just   enum myEnum{   something1,   something2,   .....   somethingN };   I know in first case I have typedefed unnamed enum, of course, just wonder which approach is better and why?