Why are Grothendieck's and Hartshorne's definitions of quasi-coherence equivalent?

Hartshorne's Algebraic Geometry defines an $\mathcal O_X$-module $\mathscr F$ to be quasi-coherent if there is an open affine cover $(U_i=\operatorname{Spec} A_i)_{i\in\mathcal I}$ of $X$ such that each $\mathscr F\rvert_{U_i}$ is isomorphic to the sheaf of modules $\widetilde{M_i}$ associated to some $A_i$-module $M_i$. It is later proved that this is equivalent to the statement that for any open affine $U=\operatorname{Spec} A\subseteq X$, there exists an $A$-module $M$ with $\mathscr F\rvert_U\cong\widetilde M$.  On the other hand, Grothendieck's Éléments de Géométrie Algébrique defines $\mathscr F$ to be quasi-coherent if every point $x\in X$ admits an open neighborhood $U\subseteq X$ such that $\mathscr F\rvert_U$ is isomorphic to the cokernel of a morphism of free $\mathcal O_U$-modules.  Now I wonder how those definitions are equal. I tried proving it by myself, but both directions seem quite nontrivial to me... Any hints?


I'm trying to make a realistic render, but I'm having some troubles with lights and reflections  In this scene I have three lights around the object, the trouble is in the corners. I can't find why the reflection is not uniform across both parts of the meshes. Is the same object with two meshes, the entire object has the same material and I'm using the Blender Render (not cycles) and ambient occlusion. (Also applied "smooth" to the lateral faces)


How to check (via software) if my usb 3.1gen2 Type-C port supports Thunderbolt3?

I have an Asus N752VX-GC234 with a usb 3.1gen2 Type-C port and some sites say it supports Thunderbolt3, some say it doesn't.  How can I check to be sure? Is there a command I can use for this?    EDIT 1:  luca@charlieBrown:~$ lsusb -t /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M     |__ Port 4: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M     |__ Port 4: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M     |__ Port 9: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M     |__ Port 9: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M   My pc is advertised and reviewed to have 3x3.0 1x3.1gen2. How should I interpret the above outut?  Moreover, the relevant part of lshw  *-usb                 description: USB controller                 product: ASM1142 USB 3.1 Host Controller                 vendor: ASMedia Technology Inc.                 physical id: 0                 bus info: pci@0000:04:00.0                 version: 00                 width: 64 bits                 clock: 33MHz                 capabilities: xhci bus_master cap_list                 configuration: driver=xhci_hcd latency=0                 resources: irq:16 memory:df100000-df107fff   and I found  saying that this chipset does not allow simoultaneous 10Gbps and does not support Th3. So is this the answer?  Thanks, Luca


Number of weekdays between two dates - StartDate question

I need to calculate the number of weekdays between a StartDate and EndDate. I use the following which works fine but my StartDate needs to be the 'TradeDate' in the table, and not a specific date set for the StartDate. How can I change the 'SET @StartDate' correctly to pick the 'TradeDate' for each record in the table?  Declare @StartDate DATEtime Declare @EndDate DATEtime SET @StartDate = ? ? ? SET @EndDate = GETDATE() SELECT (DATEDIFF(dd, @StartDate, @EndDate) -1) -(DATEDIFF(wk, @StartDate, @EndDate) * 2) -( CASE WHEN DATENAME(dw, @StartDate) = 'Sunday' THEN 1 ELSE 0 END ) -( CASE WHEN DATENAME(dw, @EndDate) = 'Saturday' THEN 1 ELSE 0 END ) as DaysOutstanding, DealTicketReference, PortfolioCode from tbl where StatusId = '1' and Type = '0'


Rock Paper Scissors, school assignment, python 3.7

Making a RPS game for a school assignment import random #player score p1 = 0 p2 = 0 #add score def AddScore(a,c):     print(a + " +1")     if c == "hum":         p1+=1     else:         p2+=1      #gets player choices while p1 < 3 or p2 < 3:     print("Rock, Paper, Scissors, Shoot!")     a = int(input("Rock, Paper or Scissors? (1, 2, 3):"))     b = random.randint(1,3)     if a == b:         print("Draw!")     elif a > b and a != 1:         AddScore("Human", "hum")     elif a == 1 and b == 3:         AddScore("Human", "hum")     elif b > a and b != 1:         AddScore("Computer", "comp")     elif a == b and a == 3:         AddScore("Computer", "comp")     print(p1)     print(p2)  returns error on lines 9 and 21: UnboundLocalError: local variable 'p1' referenced before assignment


Mesh is on the inside of the object in certain areas?

When I am zoomed in on the object the mesh seems to go inside of the object.      In a more zoomed out view you can start to see the mesh again. I have changed the 'start' clipping distance to 0.001, however this doesn't seem to affect it very much. What am I doing wrong?    Here is the file:


I know that there was a change to   But while reviewing today on  I noticed that many questions were also in the queue yesterday. I think that is a bug.         When you look at one of the questions, you will see that the last activity was weeks ago, but the question appeared in the review queue yesterday and today.  I understand that the change also pulls in older questions that should be reviewed, but I expect this to happen only once. Why should we review the same questions when nothing has changed?


Change of meaning by replacing "into" with "in"

If you replace into with in, can a sentence change its meaning? For example, are the two sentences below equivalent in meaning?  I placed the coin into her hand. I placed the coin in her hand.


How to get rid of blur background in photography ? How to get the background in focus as well in photography?

I have a Nikon D-5300 with 18-140mm zoom lens, Recently I visited a place, where I wanted to capture the mountain and lakes with the subject. As a beginner I used to click in Auto mode. I was able to focus the subject and making the background in blur and vice versa with auto mode. Is there any way, so I can get a  clear back ground as well. Thanks


Show that $\mathbb{Z}_4\rightarrow \mathbb{Z}_8\oplus \mathbb{Z}_2\rightarrow \mathbb{Z}_4$ is exact

I want to know whether $0\rightarrow \mathbb{Z}_4\stackrel{f}\rightarrow \mathbb{Z}_8\oplus \mathbb{Z}_2\rightarrow \mathbb{Z}_4\rightarrow 0$ is exact wrt group homomorphism under addition.  Since $\mathbb{Z}_2^2\neq \mathbb{Z}_4$, so $$ f(1)=(x,1) $$  Since $\mathbb{Z}_4$ is cyclic of order $4$, so $$ 4x=0,\ kx\neq 0\ (1\leq k\leq 3)$$  Hence $x=2$ or $ 6$ so that $$ {\rm image}\ f = \{ (2,1),\ (4,0),\ (6,1),\ (0,0)\}$$ (That is, image of $f$ is unique)  Hence by direct computation, $$ (\mathbb{Z}_8\oplus \mathbb{Z}_2)/f(\mathbb{Z}_4) = ((1,1)) = \{ (0,0),\ (1,1),\ (2,0),\ (3,1) \} $$ Here element is a representative. That is $(1,1)$ is corresponded to $\{ (1,1),\ (3,0),\ (5,1),\ (7,0) \}$, whose order is $4$.  Hence it is exact. Here we have a question :  Question : To prove this, we must compute directly ? Does there exists more systematic way ? Thank you in anticipation.


Tips on finding experts on a specific topic

Ladies and gentlemen, hello. Attracted by one research topic, I am facing a challenge of finding the most relevant sources, more precisely, of identifying the reputed and most qualified authors. My question is not about a general sources search. Not about asking myself a question, thinking up proper key words and looking them up in academic data bases. Once I set myself a goal, including the one of searching for literature, I may go as far as it is physically possible. But apart from spending much time, my main concern is that in the end I will most certainly miss out on all or many experts in my subject. Thus, I am looking to understand is there a way for to know which are the most important researchers who already wrote on a certain quite narrow subject? Maybe someone can recommend sites specialised in such kind of search? Obviously, I already looked this question up on internet search engines but they do not return any meaningful results. Furthermore, I also saw this  which is too narrow and does not provide a general solution. Finally, asking senior researchers is not an option either because I am not affiliated to any institution.


Why Don't People Float while on Starships In Star Wars?

In every scene from Star Wars, where people are in a space shuttle, flying through space, they appear to be under the force of gravity, as if they are on a planet like earth... If they were truly in space then they would float in the space shuttles like the astronauts do on the ISS.  Is there some kind of 'artificial gravity generator' equipped in each space shuttle? Or do they ever provide an explanation for this physical phenomenon?


I want to prove the following: Let $X$ be an infinite set and $\tau$ a topology on $X$. If every infinite subset of $X$ is in $\tau$, then $\tau$ is the discrete topology on $X$.  Proof. Let $x\in X$. There exist two infinite subsets $A$ and $B$ of $X$ such that $\{x\}=A\cap B$. So every singleton is open in $X$. It follows that $\tau$ is the discrete topology on $X$.  Edit. Justifying the existence of $A$ and $B$. Assume that $C$ is a countable subset of $X$. Let $A$ be the set of odd-numbered points in $C$ and $B=(C-A)\cup\{x\}$ for some $x$ in $A$ (i.e. $B$ contains the even-numbered points together with $x$). $A\cap B=\{x\}$. This holds for every $x$ in $B$ as well (by symmetry) so such $A$ and $B$ always exist.


How do I transfer Pokemon from Black 2 to X/Y?

Like the title states, I'd like to transfer my Pokemon into the new game. I'd like to get my Pokemon to be Mega Evolved in Pokemon X


How can I install a tar.xz file from nodejs.org?

I'm a novice with Ubuntu.  I downloaded nodejs from the nodejs.org website.  The file I downloaded is node-v7.1.0-linux-x64.tar.xz  I know how to extract it, but that's it.   Please explain how I can install it, and where I should put it in the filesystem.


I saw in a episode of The Clone Wars, Yoda teaching younglings to build their lightsabers purely on force instinct.  Does this explain how Luke was able to construct his own lightsaber?


I would like to get the parent user after a sudo command in Python For example, from the shell I can do:  # Shows root; *undesired* output $ sudo whoami root  # Shows parent user sjcipher, desired output $ sudo who am i sjcipher   How do I do this in Python without using an external program?


So I have $$|a|=|(a-b)+b|\leq |a-b|+|b|\Rightarrow |a|-|b|\leq |a-b|$$ and $$|b|=|(b-a)+a|\leq |b-a|+|a|\Rightarrow |b|-|a|\leq |b-a|$$ now the next step in my book is listed as multiplying by $-1$ to get $$-|a-b|\leq |a|-|b|$$ Next they say that they combine these two inequalities now to get $||a|-|b||\leq |a-b|$. I can't seem to figure out the algebra they did to get this.


Does anyone know how I can install the Ubuntu updates (equivalent of sudo apt-get updateand sudo apt-get upgrade) without an internet connection at that machine?  I've got internet at home, but not at the remote site.  I also would like to do do-release-upgrade.  This isn't a duplicate since I'm trying to update everything, similar to apt-get upgrade.


Find all possible values $a,b\in [0,10^9]$ such that $a+b=ab$

My problem:     Find all possible values of a and b such that  $a+b=ab$, given that values of $a$ and $b$ are contained in the interval $[0,10^9]$


All $n$ such that $n+2$ is a cube and $n-2$ is a square.

I'm trying to find all integers $n$ such that $n+2$ is a cube and $n-2$ is a square.   I already know that only 6 and 123 are solutions but not know how to show it. I tried to use the proof of 26 being the only one such that $n+1$ is a cube and $n-1$ is a square but I'm having troubles doing it as in $\mathbb{Z}[i]$ I don't know how to conclude that if $y^3=x^2+4=(x+2i)(x-2i)$ then both $x+2i$ and $x-2i$ are cubes (It is at least true?).  Thank you very much.


In educational material for the Russian language and linguistic literature the need to put accents on Cyrillic vowels often arises. However when I tried to do this with luaLaTeX the accents where misplaced.  \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{fontspec} \setmainfont{Linux Libertine:style=Regular} \begin{document}  Е́сли вы изу́чите  \'{Е}сли вы из\'{у}чите  \'{E}сли вы из\'{y}чите % Here "E" and "y" are Latin glyphs, but this workaround does not                         % work with all Cyrillic letters e.g. Я, Ю \end{document}     The last line would looks nice, but unfortunately these are Latin glyphs.  Is this a problem with the font used (Linux Libertine) or with LaTeX?


Order of $G$ is 35, are there elements of order 5 and 7 in G?

I have a group of order 35 and I want to know if it contains elements of order 7 and 5. I know that it does and there is a proof that is much longer, but I wanted to know if the following worked to show that it does contain elements of order 5 and 7.   My Approach: Let $|G| = 35$. We know that any group of order 35 is cyclic so $G$ is isomorphic to $C_7$ x $C_5$ and $C_7$ contains an element of order 7 and $C_5$ contains an element of order 5. So, there are elements of order 5 and order 7 in $G$.


I've read tutorials on getting 1 mesh to conform to the shape of another via a combination of mesh deforming to a flat plane (with a solidify mod setup but not applied), parenting the object to the flat plane, and then applying a shrinkwrap on the flat plane (above solidify in the stack).    As you can see below, this works, but also deforms my original mesh badly.  Setup:    and the result:    Altering the shrinkwrap mode doesn't resolve this, any help is appreciated!!


How windows detects internet connection?

I have a Huwaei data card and Aircel SIM. I don't have internet plan or balance in my prepaid SIM but whenever I connect Internet it gets connected and windows shows Internet access.  and in fact I don't have internet access it just shows Internet access.    My question is how windows detects Internet connection ?


How can I log out of one browser? I don't mind whether it's per site or for all Stack Exchange sites, though having both would be nice. I don't mean the “” link in the : that would “log you out on all devices”. I only want to log out of one device, I want to stay logged in elsewhere. I tried the , which claims to “clear all local credentials in your browser”. But that only logged me out of , not out of the Q&A sites. And contrary to the claim it also logged me out of other clients. So how can I log out of one client while staying logged in in other browsers?


How do they calculate the distance merging massive bodies are away from earth using just the gravitational waves?

I guess the title sums up my question nicely. So, how do physicists/cosmologists/scientists determine the distance two or more merging bodies are away from earth given just their emitted gravitational waves.


Dividing a shape in half without creating a white line down the middle

This seems to be a recurring problem when cutting shapes directly in half when using Illustrator's 'Divide' tool. While the shape may look ok in the program itself when I output it as a png or reduce it to a smaller size in a raster-based program like Photoshop a white line appears right down the middle. Is there a better technique to avoid this?


how to rename a remote repo name so that it makes sense to you while git cloning

Usually the way I do renames to make sense for myself is -   $ git clone <remote URL.git> $ mv remotedir nameIwant    I was wondering if there is a better way to do it.   The reason is sometimes I  wanna try some of the forks and wanna keep the main repo. as pristine and the forks also renamed from where they came from. I do know that in ~/.git/config of the repo you can get the remote path but its easier to remember this way.   Is there a better way to do that ?  I did searches on the web but couldn't find anything which helped me.


I have looked at a few posts such as this one but it doesn't answer my question.  Basically I have use LINQKIT to build an expression which looks like this:  public Expression<Func<uv_Manifest, bool>> CreateManifestFilters(ManifestFilterItem filterItem) {     var predicate = PredicateBuilder.New<uv_Manifest>;          if(!string.IsNullorWhiteSpace(filterItem.CID)){         predicate = predicate.And(x => x.CID == filterItem.CID && x.CID != null);         }      return predicate; }   And I have a unit tests which looks like this:  [TestMethod()] public void CreateManifestFilters_FunctionHitWithCIDPopulated_ExpressionWillContainWhereOnCID() {     var filterItem = new ManifestFilterItem("002");     var predicate = PredicateBuilder.New<uv_Manifest>.And(x => x.CID == filterItem.CID && x.CID != null);      var result = _iManifestManager.CreateManifestFilters(filterItem);      var manifest = new uv_Manifest();      Assert.AreEqual(predicate, result);  }   What I am trying to do is check that the expression is doing a where on the property CID. However I get this error when the test fails:     Assert.AreEqual failed. Expected: ((CompareString(x.CID, value(FSVendor_Refactored.Tests.ManifestFixture+_Closure$__11-0).$VB$Local_filterItem.CID, False) == 0) AndAlso (Convert(x.CID) != null))>. Actual: ((CompareString(x.CID, value(FSVendor_RefactoredRepository.ManifestManager+_Closure$__2-0).$VB$Local_filterItem.CID, False) == 0) AndAlso (Convert(x.CID) != null))>.   I think I understand why it's failing, both the unit tests and CreateManifestFilters function are in different projects. So I believe that this is causing the test to fail.  Anyone know how to check the expression to check if it's doing a where on the CID property?  EDIT: This is NOT a duplicate as the other answer does not use PredicateBuilder therefore the linked answer doesn't suit my requirements.


Proving gcd(a, a+2) is 1 or 2 for every integer a?

I want to prove $gcd(a, a+2)$ = 1 or 2 for every integer $a$.   I know that (a, a+2) is equal to the least positive value of $ax + (a+2)y$, where $x, y \in \mathbb{Z}$. However, I'm a little stuck at this point. I'm thinking I should split apart the problem into two cases, one where $a$ is odd and one where $a$ is even? Any suggestions? Thanks.


Swipe direction for read document on iPad

Is there any recommendation about the direction of swipe for an app that allow user to read PDF documents? I mean if I have to chose is better the up/down or the left/right swipe?  In my own experience I prefer apps that allow me to swipe up and down to go through the document's pages. This is because sometime is more comfortable to scroll the document e watch the last part of the previous page while i'm reading the current page, this happens usually when the previous sentence / paragraph is cross pages. On the other side well crafted app like iBook allow only the horizontal swipe gesture.  It will be great if you will able to cite some research about this topic  Edit: On 23 October 2012 Apple  which brings as new feature the continuos vertical scroll. I think this is relevant to the scope of this question.


What should I do when my question is getting downvotes?

Often after asking a question, the OP realizes that he made a mistake asking the question. Then the question starts getting downvotes and they might be reasonable too. What should I do as an OP to the question? Editing the question is an option; but if the question is really a bad question, we can't improve it by editing unless we ask a totally different question editing the original one. So in that case, if the question itself is outright wrong, what should I do to make it a better question to serve the community?


Finding a faulty chip that draws too much current

Note that this is a theoretical question - there is no schematic I can show. I will show some schematic, but it will be a very simplified version of an actual circuit, only for illustration purposes.  Assume I have a voltage converter that takes as an input my main voltage (from a power supply) and outputs a certain voltage, for example 1.8V. It would look something like this:         – Schematic created using   When connecting my circuit to the P.S, I notice it draws too much current (the P.S shows that).  Since I have multiple voltage converters in my circuit (not shown here), I check resistance between each output of each converter to ground. I see that the resistance between 1.8V to ground is almost 0 Ohms. Now I know the fault is either in the voltage converter or one (or more) of the other components drawing power from that 1.8V.  I desolder the resistor shown in the image to disconnect the converter from the other components and see that the converter is fine, but checking resistance from the point connected to all those components still shows 0 Ohms.  My question is - how would you check which component is the faulty one, without desoldering each suspicious component? As you can see in the image, the 1.8V supply is connected directly to the components, without a resistor/bead.  For the sake of this question, assume I have access to whatever equipment needed (no matter how pricey). I wouldn't want solutions to be limited due to availability of equipment.  Thank you!


I'm experiencing a very annoying problem on my Windows 7 workstation. Two or more times per day the computer freezes for more than one minute (with the azure ring cycling), then it works as expected. The CPU utilization during these periods of unavailability is supposed to be low: I'm not asking for heavy computation when the problem occur.  The computer freezes while I'm executing ordinary activity such as inserting text from keyboard, opening a folder, opening a file or clicking a link in the browser.  There is no record of malfunctioning in the event log. The hard disk seems ok, I had some problem with the integrated nic and disabled it after adding a PCI one.  The workstation is inside a windows domain and folder redirection is active.  The operative system was reinstalled after the first symptoms, but nothing changed.  Do you think it can be due to a nearly faulted hardware ?  How can I investigate the root causes of this problem ? I completely lack adequate tools and ideas...  Thanks Filippo


Safety of Quick-Pickles at Room Temperature

I just followed a recipe for pickled turnips, but am questioning the step of letting them sit out at room temp for 5 days before refrigerating.  The recipe used: 1 cup white vinegar (5% acidity) 3 cups water 70 grams salt  It's a 1:3 vinegar to water ratio and, if my math is right, has a salinity level of about 7.5% (by weight).  I have found this same, or nearly the same, recipe on several websites so it seems to be pretty standard, but just wanted to ask about the safety of skipping refrigeration for nearly a week.


I want to break the web link shown in figure to not be out of margin    I am using JabRef software to deal with my references and i wrote this link as follows :  \url{http://www.fuelcelltoday.com/news-archive/2012/august/fuel-cell-to-power-equipment-on-board-ocean-rowing-boat-during-world-record-attempt}   My used packages are:  \usepackage{placeins} \usepackage[utf8]{inputenc} \usepackage[square,compress]{natbib}             %% \removecolourlinks    \usepackage{multirow} \usepackage{tikz} \usepackage{booktabs}          \usepackage{pgfplots}          \usepackage{threeparttable}   \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{booktabs}         \usepackage{pgfplots}    \pgfplotsset{compat=1.8} \usepackage{subfigure}         \usepackage{graphics} \usepackage{gensymb} \usepackage[none]{hyphenat}   \usepackage{siunitx} \usepackage{caption} \usepackage{booktabs}  \newcommand*{\head}[1]{\textbf{#1}} \usepackage{cleveref} \usepackage[justification=centering]{caption} \PassOptionsToPackage{hyphens}{url} \usepackage{hyperref}


I have data look like this ( /Date(1500921000000)/ ) and I want to convert into Date. How IDK. help me, please


R - Data Simulation with Multiple Random Slopes

I am trying to run the following model:         I(week^2):mutation_status +         (week + I(week^2) | subject_id) ,          data = sim_dat)  This is the output I get from this model. The correlation between week and I(week)^2 is rather high (-0.95) and I was curious to know how I can change my data simulation code to lower that value. I am also having issues with convergence and would love to get thoughts on how to avoid issues regarding convergence. Thank you! Linear mixed model fit by REML. t-tests use Satterthwaite's method [lmerModLmerTest]  Formula: fetal_weight ~ week + mutation_status + week:mutation_status + I(week^2) +  I(week^2):mutation_status + (week + I(week^2) | subject_id) Data: sim_dat  REML criterion at convergence: 114  Scaled residuals:      Min      1Q  Median      3Q     Max  -1.9343 -0.3980 -0.0075  0.4168  1.9928   Random effects:  Groups     Name        Variance  Std.Dev. Corr         subject_id (Intercept)   1.51524  1.2309                          week         61.01832  7.8114   0.16                   I(week^2)   496.20236 22.2756  -0.19 -0.95  Residual                 0.05892  0.2427              Number of obs: 100, groups:  subject_id, 20  Fixed effects:                            Estimate Std. Error       df t value       Pr(>|t|)     (Intercept)                  3.1331     0.4226  17.9961   7.413 0.000000713699 *** week                        -1.2465     3.5210  18.0053  -0.354          0.727     mutation_statusY             0.5061     0.5977  17.9961   0.847          0.408     I(week^2)                   34.5706    10.8146  18.0084   3.197          0.005 **  week:mutation_statusY       -1.0697     4.9795  18.0053  -0.215          0.832     mutation_statusY:I(week^2) 202.5521    15.2942  18.0084  13.244 0.000000000101 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Correlation of Fixed Effects:             (Intr) week   mttn_Y I(w^2) wk:m_Y week        -0.160                             muttn_sttsY -0.707  0.113                      I(week^2)    0.145 -0.966 -0.103               wk:mttn_stY  0.113 -0.707 -0.160  0.683        mtt_Y:I(^2) -0.103  0.683  0.145 -0.707 -0.966  Code for data simulation: set.seed(123)  # set the seed J <- 20  # number of individuals (clusters) cs <- 5  # number of time points (cluster size) gam <- c(0, 0.75, 1.34)  # fixed effects G <- matrix(c(1.75, 0, 0,               0, 0.0125, 0,               0,0,0.0625),              nrow = 3)  # random effect variances (G-matrix) sigma2 <- 0.08  mutation_status <- rep(0:1, each = 5) mutation_status <- rep(mutation_status, times = 10)  X <- cbind(1, seq_len(cs),             (seq_len(cs))^2)  # for each individual X <- X[rep(seq_len(cs), J), ]  X <- X[rep(seq_len(cs), J), ]  X[,2] <- X[,2]*0.05 X[,3] <- X[,3]*0.05  # repeat each row cs times pid <- seq_len(J)  # individual id pid <- rep(pid, each = cs)   # Generate person-level (lv-2) random effects uj <- lmf::rmnorm(J, mean = rep(0, 2), varcov = G)  # Generate repeated-measure-level (lv-1) error term eij <- rnorm(J * cs, sd = sqrt(sigma2))  # Compute beta_j's betaj <- matrix(gam, nrow = J, ncol = 3, byrow = TRUE) + uj  # Compute outcome: y <- rowSums(X * betaj[pid, ]) + eij + mutation_status*X[ , 3]*10 + 3  # Form a data frame sim_dat <- tibble(y, time = X[ , 2], pid, mutation_status) sim_dat <- sim_dat[,c(3,2,4,1)] colnames(sim_dat) <- c("subject_id", "week", "mutation_status", "fetal_weight") sim_dat$week_2 <-sim_dat$week*5 + 15  sim_dat$mutation_status <- as.factor(ifelse(sim_dat$mutation_status == 0, "N", "Y")) sim_dat$subject_id <- as.factor(sim_dat$subject_id ) #Model Building


When the market cap goes down, does that mean people are taking money out?

My question is about the market cap figure on coinmarketcap.com and dealing with crypto currencies.  So yesterday the market cap was at 720 billion dollars. Today it's below 600b$.  Does this mean that people have converted 120b$ worth of cryptocurrency into regular currency?  I mean, I get that the value of a specific coin is driven by the number of people buying vs selling. But if they would sell crypto A and for the same amount buy crypto B, wouldn't the total market cap remain the same?


Why do we say a probability integral transformed variable is uniform on the interval [0, 1]?

I am reading and trying to learn about the  and some of its uses. From the CV question , the probability integral transform of random variable $X$ with size $n$ looks very simple:  $$U_{i} = \frac{R_{i}}{n+1}$$  where $R_{i}$ is the rank of the $i^{\text{th}}$ observation in $X$.  I can see where $U$ is uniformly distributed, but in Quantlbex's answer, they write "By construction the distribution of the transformed variables is uniform between 0 and 1."   My doubtlessly naïve question is: shouldn't that be "uniform between $\frac{1}{n+1}$ and $\frac{n}{n+1}$?" Or do we simply say "uniform between 0 and 1" because those are the limiting bounds for arbitrarily high $n$?


There does not seem to be any clear explanation of the different hosting types and technology abbreviations, so I decided to make a community post about the different types. Perhaps there will never be any good distinctions, but we here at SharePoint Stack Exchange can at least coin our own definitions and perhaps live by these. I believe this could make everything much easier. I hope others will edit this post so it becomes even more correct, as there are probably a lot of errors and subjective ignorance.


How should I withdraw a paper from a predatory journal?

My Co-author made the mistake of sending a research article to a predatory publisher(OMICS), which got accepted after 2 months of review. On the same day of their acceptance email, we sent a withdrawal request mentioning that there were serious concerns with the results of the paper(We lied). No contracts were signed, no fee was paid and there was no transfer of rights etc. They requested a fee of 300 USD for the withdrawal process. I ignored their email thinking that they won't publish the paper as no contracts/money was involved. Fast forward, a few weeks ago they have published the paper on their website on our name with the complete DOI and all, whereas the paper is already in a review process for another journal. What should be my next step now?  Unlike the previous question cases, my paper has been published on their website without any fee


How to remove deleted chatroom from favorite rooms?

Several of chatrooms I have favorited have been . They still remain among my favorite rooms (which is good; but I think I should have a possibility to remove them if I decide to do so). Here is a screenshot:  In this screenshot the room called Testing feeds have been frozen and it still has a star which, when I hover above it, shows a tooltip Toggle as a favorite room. But there are also two rooms that have been deleted, where this star is not shown. And I have not found any other way how to remove them from my favorites. (The fourth room in this screenshot is still alive.) So my question is:   Is there any way how to remove a deleted chatroom from your favorites?    P.S. I was not sure whether to tag this post as  or ; but I thought that my first assumption should be that I simply didn't find way to do this rather than assume that the software does not allow this.


How does friction act in rolling motion?

In case of rolling, static friction at the lowermost point becomes zero once pure rolling starts. So how is that when we apply a constant force on the centre of mass of the spherical body (or any other body that roll) it will experience friction at the lowermost point even after it starts rolling?


How do you implement the fastest possible  algorithm?  I am going to implement it in Java, so  solutions are ruled out. My application, , is cross platform, so I don't want .


I've just downloaded Pokemon GO on my iPod 5 and it keeps telling me in the app "GPS signal not found." Does this mean that I can't play the game without the wi-fi at my house? Also I'm pretty sure that my iPod 5 doesn't have a GPS system built into it so does that mean I can't play Pokemon GO?  Because my iPod doesn't have mobile data does that mean I can't play it outside like I am supposed to?


How to print a nested std::map using gdb?

My program has a nested  std::map object like  map < int, set < void *> *> m;   My program coredown in some situation, and I don't know the reason.  I suspect the problem is in  the nested map.   I only know using pmap to print simple map objects like std::map<int, int>, but don't know how to print more complicated map objects.  If a map is defined as map< int, int > m;, then  gdb pmap m int int    does work, but if a map is  defined as  map< int, set < void * > * > m;   then  gdb pmap m int set < void *> *   does not work


sftp: upload all files, directories and sub-directories contained in a folder

On machine A I have the folder /home/a/  On machine B I have the folder /home/b/  I wish transfer all files, directories and sub-directories of /home/a in /home/b with sftp On machine A I tried the commands: sftp fibon82@machineB.com put /home/a/* /home/b/  but it doesn't work, i get the error message: "skipping non-regular file /home/a/a1"... [a1 is a sub-directory of a] How could I modify the put instruction? Thanks! :) EDIT: I solved using scp: scp -r /home/a/ fibon82@machineB.com:/home/b/


What is the memory consumption of an object in Java?

Is the memory space consumed by one object with 100 attributes the same as that of 100 objects, with one attribute each?  How much memory is allocated for an object? How much additional space is used when adding an attribute?


Will AggregateRating markup that is generated dynamically by client side JavaScript show stars on Google search?

Google show stars in Google search with JavaScript dynamically generated rich snippets?  I'm thinking about starting a widget that my users will put in their website. My widget will generate rich snippets in order to allow Google show stars on Google search.  I know that rich snippets work when they are put in static HTML.  Can they be dynamically generated via JavaScript as well?


Gravititonal fields compared to electromagnetic fields - are they infinite in range?

me and my friend has a discussion last night, and he argued that both an electromagnetic field and gravititonal field are infinite in their area of effect, but with diminishing effects as you get farther away from the object.  I argued that only gravity field is infinite in range.  So which one of us is correct, and please explain in laymen's terms, as we're not physicists :)


Why does python have a specific module for arrays? I know that arrays can only hold one datatype and Python has a module for array's but why does python have a specific module for array's because if we want we can create a list with the same datatype. So what it the actual advantage of having a array module in python? This is a array: from array import *  a = array("i", [5, 8]) print(a)  I can do the same exact thing with a list: a = [5, 8] print(a)  What the advantage with the python module array?


I'm using system() to do various commands such as ls -a. Is there any way that I can get system to store the output in an variable inside my program,  instead of printing the result to console?


I get a message:     Sorry, you are only allowed to ask 50 questions in a 30 day period   Why is there a question limit? 50/month is just not enough :)


I need a simple floating point rounding function, thus:   double round(double);  round(0.1) = 0 round(-0.1) = 0 round(-0.9) = -1   I can find ceil() and floor() in the math.h - but not round().  Is it present in the standard C++ library under another name, or is it missing??


Change the image source on rollover using jQuery

I have a few images and their rollover images. Using jQuery, I want to show/hide the rollover image when the onmousemove/onmouseout event happen. All my image names follow the same pattern, like this:  Original Image: Image.gif Rollover Image: Imageover.gif  I want to insert and remove the "over" portion of image source in the onmouseover and onmouseout event, respectively. How can I do it using jQuery?


I want to get a iso file, i just want to get the iso file but it keeps downloading this folder, I just want the iso file not entire folder with 2 gb of content


Gonzalez and I talked about .  Gonzalez: In pilot, Rachel is a spoiled girl who just escaped from her wedding.  Where he used the present tense. Should he have used the past tense?  ... Rachel was a spoiled girl ...


Can I connect 12ga wire for a gas range to 10ga wire from the service panel?

I am remodeling my kitchen right now.   Can I use the existing 10ga line which already been built and used in my house for an electrical range to hook up 14ga or 12ga wire for my new gas range?


Given a curve $y$ having constant curvature with $y=f(x)$ with $f''(x) > 0 $. I have to prove that this curve is a part of a circle. My Try Assume curvature of the curve as $c$. Then, I can write $$c = \frac{f''(x)}{(1+f'(x)^2)^{\frac 32}}$$ After this, I am unable to solve the non-linear differential equation. Is my approach wrong? Thanks in advance !


Friedmann vacuum solution linear rather than exponential?

Does the Friedmann vacuum equation have a linear solution rather than an exponential one?  Using natural units one can write Friedmann's equation for the vacuum as $$ \begin{eqnarray} \left(\frac{\dot a}{a}\right)^2 &=& \frac{8\pi G}{3}\rho_{vac}\\\tag{1} &=& L^2 \left(\frac{\rho_0}{L^4}\right) \end{eqnarray} $$  where I define the Planck length $L=(8\pi G \hbar / 3 c^3)^{1/2}$, $\hbar = c = 1$, and $\rho_0$ is a dimenionless constant.  Now let us interpret the Planck length $L$ to be the size of the smallest volume of space that can be described by general relativity.  But the Weyl postulate, together with cosmological observations, also imply that space is expanding.  Therefore we must have  $$L = a(t) L_0\tag{2}$$  where $L_0$ is the Planck length measured at the reference time $t_0$ where $a(t_0)=1$.  Inserting Eq.(2) into Eq.(1) we find  $$\left(\frac{\dot a}{a}\right)^2 = L_0^2 \left(\frac{\rho_0}{a^2L_0^4}\right)\tag{3}$$  where the Friedmann equation (3) has been rescaled in terms of the Planck length $L_0$ measured at the reference time $t_0$.  Eq.(3) has a linear solution  $$a(t) = \frac{t}{t_0}.$$  The scaled mass density $\rho(t)$ of the vacuum is not constant but rather given by  $$\rho(t) = \frac{\rho_0}{a^2 L_0^4} = \frac{1}{t^2 L_0^2}.$$


How do I remember which units counter which in StarCraft 2?

I find myself clicking on the "Help" button at the top of the screen to figure out Rock-Paper-Scissors counters on the fly. The Help system is nice, but I'd prefer if there were some easier way to quickly learn what counters what without having to memorize an .  I recall in Warcraft III, there were different types of damage and armor, like "Piercing" and "Siege" or something.  If such a thing exists for StarCraft 2, it might be what I'm looking for.  How can I learn my StarCraft 2 unit counters quickly?


How would you keep a cached nested dictionary to use in an operator?

I'm wonder if it is possible to have saved globally accessible dictionary variable without creating a property.


I've been trying to get my hands on Swift, but I can't seem to find it.  Is it released yet?  If not, when will it be released?


Is there a word that describes all items in a sequence or list which is not the first item?

Is there a word that can be used to refer to all the items in a list or sequence which is not the first item? For example, take this list:  (oranges, apples, raspberries, pears)  How can I refer to (apples, raspberries, and pears)?


can i get mobile number of iphone from ios 6

Can i get mobile number of iphone using ios sdk. I have found some CTCarrier but i could not get phone number of sim card.  I found some conversation in stack that it is not possible. Is that correct ?  Plz help


Which features of a wizard's familiar, if any, are considered magical?

The  spell has a duration of instantaneous, which implies that the familiar itself is not an ongoing magical effect. However, the spell provides a number of ongoing features that are definitely supernatural:    The familiar disappears when it drops to 0 HP. The wizard can temporarily or permanently dismiss the familiar. The wizard can communicate with the familiar telepathically. The wizard can observe through the familiar's eyes and ears. The familiar can deliver touch spells on behalf of the wizard.   Which of these features are considered magical? For example, would any of them show up to a detect magic spell or be suppressed by an antimagic field? In addition, is my assumption above correct that the familiar itself is not considered magical?


Any way to unstack the icons in dock of Ubuntu 18.04?

I don't know whether there's a duplicated question or not but I've been search this  for a long time.  The problem is that all the icons of the same application is stacked into one icon, so I need several steps to select to minimize or maximize the window I want, is there any way to unstack the icons like Windows 7/10 ?  Or can anyone confirm that there's no way to do this?


How can I pass command-line arguments to a Perl program?

I'm working on a Perl script. How can I pass command line parameters to it?  Example:  script.pl "string1" "string2"


template class error: undefined reference to

template<class T> class coulomn {     public:         coulomn();         ~coulomn();         int addcoulomn();         int addvalue( int x, int y, T t);         T printvalue( int x, int y);         int resize( int x, int y);     private:         vector<vector<T>> matrix;         int _sizeX, _sizeY;  };          #include "coulomn.h"  template<class T> coulomn<T>::coulomn() {     _sizeX=0;     _sizeY=0; } template<class T> coulomn<T>::~coulomn() {  } template<class T> int coulomn<T>::addcoulomn(){     matrix.emplace_back(NULL);     return 0; }         i was trying to make a matrix with vector vector with an userdefined type , but my template class doesnt work. if i test it with for example int it works, but i can t implement the template


SQL query to list the foreign keys between two tables

Two tables were created running an SQL script which created a lot of other tables in addition to the two we are concerned about. Many of them have foreign keys from other tables that were created by the script. How do I find if there are any foreign keys between two tables, say TableA and TableN? Is it possible to list these using an SQL script? I can manually check by using the MySQL Workbench reverse engineer option that generates an ER diagram but I would rather prefer doing it using a query.


What is necessary to get CPU-G to run on 18.04? I have performed all of the necessary steps I can find (see  and ) and searched the internet generally, to no avail.  Attempting to start the program using the Super key brings up the icon, but clicking the icon does nothing. Likewise, entering cpu-g in the Alt-F2 window also has no effect.  I'm sure this must be something really basic, but I don't have the skills to know what to look for.  Thank you.


Installed Windows 10 in a VirtualBox VM, is it possible to find the OEM product key?

I have an HP Z230 workstation which came with Windows 8.1 Pro downgraded to Windows 7 Pro preinstalled.  I have since replaced the harddrive and installed Ubuntu 16.04 on it.  I have also installed VirtualBox, and installed Windows 10 Pro in a VM.  From looking online I understand the product key is in the UEFI firmware?  The activation screen in Windows 10 says:     We can't activate Windows on this device because the previous version of Windows was not activated prior to upgrading to Windows 10. Go to the Store to buy genuine Windows. Error code: 0x803F7001   Questions:   Am I able to use the Windows 8.1 product key from my bios to activate Windows 10 in my vm? If so, how can I retrieve the product key (using Ubuntu 16.04)?


Are extra effects considered weapon damage on a sword of sharpness?

The  says:     When you attack an object with this magic sword and hit, maximize your weapon damage dice against the target.   Do some other effects (language use is intentional) add on to this, or is it only the weapon's damage based on the weapon chart in the Player's Handbook?  Examples:   Are the 's Sneak Attack damage dice maximized? Is the 's extra damage die from its Brute trait maximized? If I customize the sword to do extra cold or fire damage (based on a die roll), are those damage dice maximized?


Could someone tell me a simple proof to If a|b and b|a iff a=+-b.


I am not new to java but just recently practicing about jdbc. I'm trying to fetch data from mysql database and load it to jtable..  here's my code for fetching the data class name FileMaintenance  public DefaultTableModel getProducts() {     DefaultTableModel dtm = new DefaultTableModel();     try{          dtm.addColumn("Product Code");         dtm.addColumn("Description");         dtm.addColumn("Unit Price");         dtm.addColumn("Selling Price");          conn.stmt = conn.conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);         sql = "SELECT prodcode,proddesc,origprice,sellingprice FROM products";         rs = conn.stmt.executeQuery(sql);          while(rs.next()){             String code = rs.getString(1);             String desc = rs.getString(2);             String uprice = rs.getString(3);             String sprice = rs.getString(4);              dtm.addRow(new String[]{code,desc,uprice,sprice});         }         return dtm;     }catch(Exception ex)     {         JOptionPane.showMessageDialog(null,"Unable to fetch data...","Error",JOptionPane.ERROR_MESSAGE);     }     return null; }   and there as the line that I used to call the method from FileMaintenance class  public void UpdateJTable() {     DefaultTableModel model = new FileMaintenance().getProducts();     jtable.setModel(model); }   now when I try to run the app, it says I'm connected to database which is true because I already tried inserting data and its successful, but there's an error occur. the error is related to DefaultTableModel because its point to line  DefaultTableModel model = new FileMaintenance().getProducts(); jtable.setModel(model);   it says:     Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException           at MyForm.UpdateJTable(MyForm.java:119)           at MyForm$1.windowOpened(MyForm.java:104)           at java.awt.Window.processWindowEvent(Window.java:2048)           at javax.swing.JFrame.processWindowEvent(JFrame.java:296)           at java.awt.Window.processEvent(Window.java:2009)           at java.awt.Component.dispatchEventImpl(Component.java:4861)           at java.awt.Container.dispatchEventImpl(Container.java:2287)           at java.awt.Window.dispatchEventImpl(Window.java:2719)           at java.awt.Component.dispatchEvent(Component.java:4687)           at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)           at java.awt.EventQueue.access$200(EventQueue.java:103)           at java.awt.EventQueue$3.run(EventQueue.java:694)           at java.awt.EventQueue$3.run(EventQueue.java:692)           at java.security.AccessController.doPrivileged(Native Method)           at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)           at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)           at java.awt.EventQueue$4.run(EventQueue.java:708)           at java.awt.EventQueue$4.run(EventQueue.java:706)           at java.security.AccessController.doPrivileged(Native Method)           at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)           at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)           at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)           at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)           at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)           at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)   could someone please tell me what is the problem with this code?


How do you teleport a player to spawn when they win a 1v1

On a kitpvp server I manage, players can duel. When they duel each other, they get teleported to a room. I'm having trouble teleporting the player back to spawn after they win. I can do it manually, but I'd rather it be automatic.


Associate scheme (eg. cms://) to a Windows program

Possible Duplicates:         Is there a way to associate a scheme, like cms:// to a Windows program?  So when an user types cms://user:password@server.com, it opens the program and can automatically connect using the given credentials.


How are the standard errors of coefficients calculated in a regression?

For my own understanding, I am interested in manually replicating the calculation of the standard errors of estimated coefficients as, for example, come with the output of the lm() function in R, but haven't been able to pin it down. What is the formula / implementation used?


As we know, when the pronoun someone is used, the succeeding verb will be conjugated in the 3rd-person singular. Thus, the following sentence demonstrates legal usage:     I cannot enter the room; someone is cooking.   However, note the following sentence:     I cannot enter the room; someone is cooking, are they not?   As can be seen in the second sentence, when a question tag is used, it doesn't use the corresponding conjugation of the 3rd-person singular previously used, but rather, it takes on the 3rd-person plural. Why is this the case? What is more, why is the following sentence illegal?     I cannot enter the room; someone are cooking, are they not?   I thank you, in advance, for your responses.


I've got an old Dell d630 that's running xp and I want to use ubnutu on it. It seems to be a 32 bit machine and have been trying to boot it up from a flash drive with no success.


How do I make a file default opened by the terminal on double click?

This is my file, which I saved as eclipse-start.sh    I also made it executable. But it always starts in gedit??


The Collatz conjecture algorithm applied to negative integers

Does applying the Collatz conjecture algorithm to negative integers always result in sequences ending with $-1$ and then repeating themselves an infinite number of times? It is so for the first several seed values.  After hours of thinking and research, I don't know how to answer the question.


Writing Hindi language with Bolnagri in Ubuntu 17.04

In earlier versions of Ubuntu there used to be bolnagri keymap but in Ubuntu 17.04 it is not there. As bolnagri keymap was very comfortable to user I want it to install Ubuntu 17.04 as this  is not working.


Is there any chat feature on Stack Exchange?

In , an user initiated a private discussion for understanding my concern better. (There is a chat window on the 5th comment)  Which badge is required for that?


On many, many occasions in Skyrim, I fight an enemy and get them to low health. At this point, by far the most common thing they say is:     No more! I yield! I yield!   I have, of course, learned better. But originally I figured "eh, what the hell, I've already pickpocketed him for everything, I'll let him live". As soon as he'd recovered enough to stand, he attacked me again (so I cut his head off).  Point is, are there any enemies that will actually yield when defeated (excluding Brawls), or is there really no honour among bandits?


How do I access a hard drive from a live CD?

How can I access my hard drive from a Live CD? As far as I can tell the hard drive can only be accessed via /media/longnumberhere after its been mounted. Is there a way to access the hard drive a drive instead? (so it can be accessed by /dev/hda)


my server-side shows nullPointerException when client-side runs java

I have a server with Linux Mint OS which has a server-side Maven project that reads some environmental variables.   The environmental variables are declared in /etc/profile.d/my_env_vars.sh with:  export MY_VAR=/opt/my_app  export PATH=$MY_VAR:$PATH   My server side has a function that when I run it from eclipse (installed in my server) it works fine with no errors.  public File convert( byte [] image) throws IOException {     String filePath = System.getenv("MY_VAR");     File imageFile = File.createTempFile("TEMP", "tmp", new File(filePath));  ...     return imagenFile; }   My client-side also is a maven project. It sends a byte[] image to the function above and the server gives it back a result, but I got the NullPointerException error:  java.lang.NullPointerException java.io.File.<init>(File.java:277) the second line of my function File imageFile = File.createTempFile("TEMP","temp...   Immediately in my server terminal I verified the environmental variable by echo $MY_VAR and it gives me the correct value (/opt/my_app)  Why does my function work correctly in my server-side but it gives nullPointerException error in the client-side?  I have tried by declaring the environmental variables in other files as ~/.bashrc ~/.profile /etc/bash.bashrc and nothing works. I read in other post to try to edit ~/.bash_profile but Linux Mint doesn't have that file.  I really appreciate any advice.


Why is this lambda generating a null pointer exception?

My first attempt at using a stream and a lambda expression:   Stream<TableType> myTTStream = Arrays.stream( T[source] ); // T[source] is a 1D row from a 2D array     Optional<TableType> closest = myTTStream              .filter( tt -> !tt.visited ) // tt is each TableType object in the stream; select for unvisited             .sorted( (tt1, tt2) -> Integer.compare(tt1.dist, tt2.dist) ) // sort them by distance to an output stream             .findFirst() // get the first (lowest) distance (returns a possibly empty Optional describing the first element)             ;      return ( !closest.isPresent() || closest.get().dist == Integer.MAX_VALUE ) ? -1 : closest.get().dist; // have to get the value from the Optional   The code creates a stream from a row of the T[][] array, filters it for the boolean visited false, sorts the result, and returns the first (lowest-valued) item of the stream. It seems to work except when no items get through the filter, in which case findFirst() causes an error leading ultimately to a null pointer exception.   I don't understand this because findFirst() returns an Optional, which according to the docs, may be empty. So what's the problem? If it's due to the sorted() method being fed an empty stream, then why doesn't that line cause the error?   I'm pretty sure there are no null elements in the T array.   The stack trace (the code above is the body of the method "closestUnvisited"; line 238 is the ".findFirst()" call):   Exception in thread "main" java.lang.NullPointerException at GraphM.lambda$0(GraphM.java:236) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at GraphM.closestUnvisited(GraphM.java:238) at GraphM.findShortestPath(GraphM.java:167) at GraphM.main(GraphM.java:343)


I just started doing logic and everything is going fine. But we just got to Material Implication and I don't really understand it. From for example $q$, we can get $q \lor \lnot p$ by Disjunction, and from there, using Material Implication, we can get $p \to q$.   The thing I don't understand is how is this valid. Let's say    $p$ is "it's raining", and  $q$ is "the floor is wet",    and $p \to q$ holds. But just because the floor is wet, doesn't mean that it's raining. So how can we conclude that $p \to q$ just from $q$?  I'm sorry if it's confusing.


Is the product of two Gaussian random variables also a Gaussian?

Say I have $X \sim \mathcal N(a, b)$ and $Y\sim \mathcal N(c, d)$.  Is $XY$ also normally distributed?  Is the answer any different if we know that $X$ and $Y$ are independent?


Windows 8: Block Internet except for all but two programs

Question marked as duplicate, as is nearly every other question about blacklisting and whitelisting. Some of these questions are different because: 1) XP has a different firewall than Vista/Win7/Win8 2) Some questions are about blacklisting, others whitelisting. 3) Some whitelisting questions are by domain names, others by application. 4) Some questions are focusing on easily switching profiles, while others are seeking permanence. The main answer that has been provided from the linked duplicates is how to configure the Windows firewall. This does not completely help, and even where it does, is not very easy. My answer was to use tinywall, which seems to be working. Might i suggest that these questions are not so easily marked as duplicates, because the nuances of each can make a huge difference in whether previous answers are applicable.  A friend has a laptop running Windows 8.1 which is using an Internet connect from T-Mobile's Rocket (USB/4G) which comes with 200 MB/month for life. The purpose of the Internet connection is to use Fast Forward for his son, which should use about 50MB/month for our usage of it. So, the 200MB should be enough, possibly for virus definitions as well. His house has no other Internet connection, and no wireless networks are strong enough to be used. Periodically, if required, i can bring his laptop to my apartment and get him all pending updates (as i am doing right now).  A such, i want to block all traffic except for Fast Forward and Windows Defender definition updates. Will the Windows Firewall do that? If so, how?  --  For the first week or two, he also wants to get healthcare under the new law. So, browsing needs to be available at first. Extra Internet bandwidth will be purchased as required for this endeavor, but i'd like to help him keep that to a minimum for him as well.  How would we best go about this?


How can I mount a partition on every reboot using Bash Script?

I have a partition mounted with mount /mnt/filesys.bin /mnt/mymnt/  Each time I reboot, I need to remount. How can I keep this mounted after every reboot?


Is it possible to return zero if a value is less than zero without using a case statement?  e.g. Max(a, 0) <-- 'Max' doesn't exist.  I would like my code to be as succinct as possible.


Creating Google calendar reminder every month on the 15 but not at Saturdays or Fridays

I would like to create a reminder on Google Calendar every month on the 15th, but if the 15th in that month is a Friday/Saturday, I want it automatically to set it to the closest Sunday/Thursday. Is this possible?


Don't automatically edit the post to insert "possible duplicate" links

When a question is closed as a duplicate, its body is edited to auto-insert the link to that duplicate. I think there are a couple problems with that:   If the question is reopened, the auto-generated insert isn't automatically removed. It allows the poster (or anyone else) to roll back the post and protest the closure by reverting the automatic edit.    I propose that the links to the duplicate(s) are moved into a separate "header" field above the post instead of being edited into the body of the question. That way it could be removed or hidden if the question is reopened and it could not be edited or reverted without reopening the question.   There is some potential for loss of functionality there, since right now it is possible to edit the post to either include additional related links or remove obsolete/incorrect ones. That could be addressed by making the "duplicate field" editable at a certain reputation level (10k?) and enabling others to suggest edits for it that'd go through the usual approval/rejection process.  Thoughts?


What does index $\mu$ in $\partial_{\mu}$ mean?

I am a beginner in QFT, and  am reading it from Quantum Field Theory Demystified by David McGowan,  a Tata McGraw-Hill publication.  Here, in this book, the author at one point, while explaining Laggan giant Field Theory,  writes that the first derivative of a field  $\varphi $ is denoted by $\partial _\mu \varphi $. What does the $\mu $ mean?  A screenshot is attached:


I have always been intrigued by the word usage in the title of this . Wikipedia mentions that the song was influenced by Irish and Scottish ballads:     Dylan recalled writing the song as a deliberate attempt to create an anthem of change for the moment. In 1985, he told Cameron Crowe: "This was definitely a song with a purpose. It was influenced of course by the Irish and Scottish ballads ...'Come All Ye Bold Highway Men', 'Come All Ye Tender Hearted Maidens'. I wanted to write a big song, with short concise verses that piled up on each other in a hypnotic way. The civil rights movement and the folk music movement were pretty close for a while and allied together at that time.    Is there a dialect where the form a-<gerund> is common? e.g. a-cooking, a-cleaning, etc.  If so, in what context would you use the form a-<gerund>?


Badges not appearing in notification messages on mobile site

On the mobile site if you get a notification about a badge you can't see the colour of the badge.  Mobile site    Main site:


Is there a proof for this Fibonacci relationship?

I was looking at the decomposition of Fibonacci numbers using the definition of $F_n = F_{n-1} + F_{n-2}$, and noted the pattern in the coefficients of the terms were Fibonacci numbers. It appears to hold, and I believe it's true, but I haven't seen a proof for it. Does one exist?  $F_n = 1F_{n-1} + 1F_{n-2}$ $F_n = 2F_{n-2} + 1F_{n-3}$ $F_n = 3F_{n-3} + 2F_{n-4}$ $F_n = 5F_{n-4} + 3F_{n-5}$ etc  This can be generalized to $F_n = F_xF_{n-(x-1)}+F_{x-1}F_{n-x}$


accepted channels to request the addition of tags whilst not having the requisite reputation

First of all:   Now the question substance:  Is there an accepted channel for an unprivileged user to request the addition of a tag? If so, what is it? If not, is there a reason for its non-existence, and if so what is that reason?


Is $n^{th}$ root of $2$ an irrational number?

Possible Duplicate:          Will every $n^{th}$ root of $2$ be an irrational number? If yes, how can I prove that?


It appears connecting on any premium account does not let me connect to any servers and displays:      "Failed to login: Invalid ip 111.111.111.111"   Possibly Minecraft Authentication issue, from reports is seems it may be worldwide? Login authentication through the launcher works fine. But connecting to a server responds with "Invalid ip"  EDIT MojangStatus has posted on twitter regarding this for anyone wondering:     We’re working on fixing the issue people are currently experiencing   with authentication - TM     I will also link the mojang portal although it says everything is working fine:   This question provides far more useful info and the correct answer than:  If the answers could be marked appropriately and not marked as a duplicate as this does not provide users with the correct answer. Thank you


Use rectangular contour to integrate $\int_{0}^{\infty}\frac{\sin(ax)}{e^{2\pi x}-1}dx$

I have been self-studying CA and find it very interesting. So, working through problems in a book I have, I ran across  $$\int_{0}^{\infty}\frac{\sin(ax)}{e^{2\pi x}-1}dx=\frac{1}{4}\coth(a/2)-\frac{1}{2a}$$  and $$\int_{0}^{\infty}\frac{\sin(ax)}{e^{x}+1}dx=\frac{1}{2a}-\frac{\pi}{2\sinh(\pi a)}$$  For the former, I wrote it as $\frac{e^{aiz}}{e^{2\pi z}-1}$ and used a rectangular contour with vertices $0, \;\ R. \;\ R+i, \;\ i$  $e^{2\pi z}-1$ has poles at $ni$. Of these, I think $i$ only lies within the contour.   Unless I am in error, I then calculated the residue at $i$ to be $\frac{e^{-a}}{2\pi}$  So, $2\pi i(\frac{e^{-a}}{2\pi})=ie^{-a}$  Now, where I get hung up is setting up the integrals around the contour. Two of which should tend to 0 as $R\to \infty$.  Here is what I done.  $$\int_{0}^{R}\frac{e^{iax}}{e^{2\pi x}-1}dx+\int_{0}^{\infty}\frac{e^{ai(R+iy)}}{e^{2\pi (R+iy)}-1}idy+\int_{R}^{0}\frac{e^{ai(x+i)}}{e^{2\pi (x+i)}-1}dx+\int_{\infty}^{0}\frac{e^{ai(iy)}}{e^{2\pi iy}-1}dy=-\sinh(a)$$  I am unsure of the limits on the second and fourth integrals.  I am not so sure this is correct. The second and fourth ones, which represent the vertical sides,  should tend to 0 as $R\to\infty$. I hope :).   This than gave me $(1-e^{-a})\int\frac{e^{iax}}{e^{2\pi x}-1}dx=-\sinh(a)$.  Which does not look correct. I did manage to solve this using series and $\pi csc(\pi z)$, but the contour I am unsure of.   Can someone lend a hand here?. Any advice on either would be appreciated.   For the other one, I only posted it because it looks similar, but I believe is actually more involved and 'tougher' if you will. If I can get one, perhaps I can manage to evaluate the other.  With that one, I think the same rectangle with the same vertices can be used, but $\pi i$ would have to be avoided. Perhaps a Principal Value in there somewhere. But, I was told to use vertices $0, \;\ R, \;\ R+2\pi i, \;\ 2\pi i$  Since I am relatively new to CA, setting up those integrals is the confusing part.    I can do easier types of contour integrals, but want to learn more about these more challenging ones.   Thanks for any assistance.


Edit a single Xcode project in multiple computers

I've been working on a Xcode project in my iMac but now that I have a MacBook Air I would like to continue working on that project when maybe I am traveling or in a place where I don't have my iMac. My question is that if there is any way to edit a single Xcode project in multiple computers, I heard something about Git but I don't know exactly what it does. Thanks


How to attach file to mail using SSMTP ONLY!

I have this bash script that prepares and sends an email using SSMTP. The line that sends the message looks like this:  /usr/local/sbin/ssmtp -vvvv $recipients < $mail_file   $recipients: the recipient list $mail_file: the mail file  How would I attach a "/var/logs/foo.log to this mail? NB: An SSMTP-only solution is needed.


How far can water rise above the edge of a glass?

When you fill a glass with water, water forms a concave  with constant contact angle $\theta$ (typically $\theta=20^\circ$ for tap water):    Once you reach the top of the glass, the water-air interface becomes convex and water rises up to a height $\Delta h$ above the edge of the glass, allowing you to fill the glass beyond the naive capacity $\pi r^2 h$:    So when getting myself a glass of water, I came to wonder exactly how much this increases the capacity of a glass, and what physical constants are involved.  My intuition would be that for a very large glass, $\Delta h$ converges to a constant so that the effective water capacity of the glass grows like $\pi r^2 (h+\Delta h)$ (to make things simple I'm assuming that the glass is very thin: $\Delta r\ll r$). Perhaps such a constant depends on the precise shape of the rim of the glass. But if not, perhaps it is a constant multiple of the capillary length?  So, what can we say about $\Delta h$, the "rim contact angle" $\alpha$, or the shape of the water-air interface when the glass is filled at maximum capacity?


How to upgrade from 8.04 (hardy heron) to the latest upgrade

I have a compaq Presario R3000 running hardy heron 8.04 with gnome.  I want to update to the latest version, but i am having a bit of trouble.  I've tried using Update Manager but when I try to upgrade to 10.04.4 (which is the only option) it says that it is no longer supported, but i keep going, and it starts downloading stuff then prepares to upgrade, but then when i gets to "setting new software channels" it gives an error.  I don't know how to boot off a usb.


Can *.ssf files from Trimble GPS be imported as features to display in ArcMap?

I have not come across *.ssf files before but I believe they are a Trimble GPS binary format.  Someone has asked me if these files which he thinks have line/poly features can be imported for display in ArcMap 10.0.  I am keen to know whether this is possible because my research so far seems to indicate that they are for correcting feature accuracy rather than containing features.  Can *.ssf files be converted for display in ArcMap?


Why are there people who don't believe Jedi ever exist?

Han Solo is not the only one who does not believe the Force is real, or that the Jedi never existed in history. However, why do such beliefs appear to be so widespread?  My question has two interlinked parts:   Have there always been non-believers in the existence of the Force and its wielders? How/why is Palpatine so successful in suppressing galactic history of the Jedi, effectively converting them from a publicly well-known galactic institution to mythical superstition?   If you think about it, a common human who experienced the Clone Wars in his 10s or 20s would only be in his 30-40s by the time of the original trilogy, and 50-70s by Ep VII. The Jedi of the Galactic Republic would still be in living memory, not to mention so many long-lived species who have personally known individual Jedi for centuries before Palpatine was even born.  These people who know the Jedi are no myth pose a major problem to Palpatine’s campaign to rewrite history. So how is Palpatine so successful? Persuading the public to hate the Jedi helps make purging them popular, but doesn’t do much on its own towards stopping people from talking about them to their kids as though they actually existed in the past.  Palpatine can’t shut everyone up for sure, but the Jedi has also existed too recently in history for the notion of people believing they were never real to start overnight. Is it possible that there were such beliefs already in existence?


Troubles replacing null values with specific numbers

After i've used "zonal statistics as table" on some buffers, some values got lost (which seems to be a common problem when buffers overlap as mine does). Now, i would like to replace these Null values by using the "Field calculator". I would like the cells with null values to take on the last value that was not a null value - eg. in the picture attached to this question, i would like the first set of Null values to get the value that preceeded them (in this case 0,655745625495911). I am aware i can do it manually but as the table consists of 330000 rows i would rather not. So, can anyone help me with a pythoncode to change these null values to the value that preceeds them?


sudo: unable to resolve host (name already added to /etc/hosts)

Whenever I use sudo, I get this:  sudo: unable to resolve host dave00-G31M-ES2L   Here is my /etc/hosts:  dave00@dave00-G31M-ES2L:~$ cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   dave00-G31M-ES2  # The following lines are desirable for IPv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters   I logged out/in already. How can I solve this?


Remove special symbol from the character

i want to remove ` symbol from below string .  how can i do that?  For example :  string StateName = "Québec"; in the above string e character has special symbol, how can i remove special symbol from the string to make it as Quebec;


Fréchet differentiability from Gâteaux differentiability

Let $X$ be a Banach space and $\Omega \subset X$ be open.  The functional $f$ has a Gâteaux derivative $g \in X'$ at $u \in \Omega$ if, $\forall h\in X,$ $$\lim_{t \rightarrow 0}[f(u+th)-f(u)- \langle g,th \rangle]=0$$   How can I prove the following:  If $f$ has a continuous Gâteaux derivative on $\Omega$, then $f \in C^1(\Omega,\mathbb R)$.


Why can't I post answers to questions on Stack Overflow?

I was trying to post an answer to a question on Stack Overflow but for some reason the frontend (yes, frontend lol) had disabled the button. The button was disabled, so for posting it I had to go to inspect mode and enable the button. I did post the answer haha.


"...would have trouble imagining...": Is this present participle or gerund?

Given the sentence:     Most people who live and work near Washington, DC, would have trouble      imagining dinosaurs walking around the area.   Grammatically, what would ‘imaging’ be called in this case? Present participle or gerund or something?  I mean, if it is a present participle, ‘imagining~’ might be a description of the subject. And if it is a gerund, ‘imagining~’ might be an object of the verb phrase of ‘have trouble’. How do they explain this ‘imagining’ after ‘have trouble’?


What is the purpose of Netplan in Ubuntu?

Recently I've decided to find out how to configure the network in Ubuntu 20.04. Several years ago I used /etc/network/interfaces for this purpose, but now everything changed. As I've found for Ubuntu Desktop  does all the work and for Ubuntu Server, it's customary to use systemd-networkd. I also found  — the network configuration abstraction renderer. What is the motivation to use this piece of software? Is it more convenient to have one more layer between the user and the actual network configuration utility? Why I can't write configuration for NetworkManager on a desktop without any intermediate layer? I'd explored  and found such points:  No persistent generated config, only original YAML config Retains the flexibility to change backends/policy later or adjust to “apt purge network-manager” as generated configuration is ephemeral  I don't understand this idea. As a server user most of the time I have a static network configuration, that is why I prefer to use systemd-networkd and write configs for this solution. As a desktop user, I need to have the ability to connect to different Wi-Fi networks and apply different network policies for different connections (e.g. limit traffic for mobile connection). That is why I use NetworkManager on my desktop. For desktop and server I have completely different use cases, so, as a majority of users, I don't think that I'll ever switch from one tool to another. That is why some additional abstraction layer is useless. I agree that Netplan can be useful for some cloud use cases when you want to store configuration as a code in one place, but is it useful to have this tool in the default Ubuntu Desktop installation? I'll be happy if someone explain to me what is the purpose of Netplan in Ubuntu, especially Ubuntu Desktop.


Is there oscillating charge in a hydrogen atom?

, I claimed that there was obviously an oscillating charge in a hydrogen atom when you took the superposition of a 1s and a 2p state. One of the respected members of this community (John Rennie) , saying:     Why do you say there is an oscillating charge distribution for a hydrogen atom in a superposition of 1s and 2p states? I don't see what is doing the oscillating.   Am I the only one that sees an oscillating charge? Or is John Rennie missing something here? I'd like to know what people think.


How to show a block on pages with url parameters?

I have a block that I want to show on pages matching news and news?page=1. In the 'only show on these pages' section I have news and news/* but it doesn't match the second url. Is there a way to do this?   Update 1: I have also tried this:  <?php     $url = request_uri();     if (strpos($url, "news")) {     return TRUE;         }     ?>   But even after clearing all the caches it doesn't seem to have worked either.  I also tried the pattern news?page=* but that doesn't work either! Surely somebody considered being able to show blocks on paginated pages?  Update 2: Found the answer   Turns out the block I was trying to display was a View which was also set to display a pager (even though one doesn't appear). Turning the pager off resolved the issue.


Does Windows 98's command.exe invoke a dos prompt or a command prompt? this question is inspired by this!  added Somebody thought that this question was a duplicate of "Does Windows still rely on MS-DOS?" I am not asking if Windows 98 runs on MS-DOS, I know it does. I'm asking specifically if the command prompt or MS-DOS prompt that exists within Windows 98, is a command prompt, or an MS-DOS prompt. And since it has been closed so one can't post an answer. I guess it was called an MS-DOS Prompt in Win98https://www.exclamationsoft.com/exclamationsoft/netmailbot/help/website/HowToOpenADOSCommandWindow.html btw-  command.com  (def not cmd.exe and I suppose there was no command.exe)


$n\ge 8\,\Rightarrow\, n = 3j + 5k\ $ for $\,j,k,n\in \Bbb N$

I'm new to Math Induction, I don't know how it goes from $𝑘 + 1 = 3𝑥 + 5𝑦 + 1$ into $5𝑦 = 5𝑦 − 5 + 5.$  I'm trying to prove that:   Any whole number of at least 8 cents can be obtained using coins of 3 and 5 cents  Assume: There is a number $𝑘$ for which there are $𝑥$ and $𝑦$ such that $𝑘 = 3𝑥 + 5𝑦$  Here's my working:  $𝑘 = 3𝑥 + 5𝑦$  Therefore $𝑘 + 1 = 3𝑥 + 5𝑦 + 1$  $5𝑦 = 5𝑦 − 5 + 5$  $5𝑦 = 5 𝑦 − 1 + 5$  $𝑘 + 1 = 3𝑥 + 5𝑦 + 1$  $𝑘 + 1 = 3𝑥 + 5(𝑦 − 1) + 5 + 1$  $𝑘 + 1 = 3𝑥 + 5(𝑦 − 1) + 6$  $𝑘 + 1 = 3(𝑥 + 2) + 5(𝑦 − 1)$  $𝒌 + 𝟏 = 𝟑𝒙' + 𝟓𝒚'$


Tag synonym proposal: [original-author] -> [original-poster]

Suggest to make tag  (18 questions tagged as of now) to be a synonym of  (9 questions).  Preference for master tag, even though it has less questions, is because I believe it is used more (it even has an ). Given low amount of questions involved I was also thinking about retagging. However per  I preferred to make a synonym request.


Google apps timeline inaccurate location

My Google apps timeline says I went to a postcode and stayed there for 3 hours when I never left my house which is 4 miles away from where it says I was it was in the middle of the night when I wasn't even on my phone I was asleep. But on the following date it says I was at my house from 1200am-135pm which was obviously the start on the next day and which means I was at both locations at the same time. Any light shredded on this would be great. Is there anyway to prove I didn't leave my house


Are the bacteria in the stomachs of unborn babies beneficial?

Babies are born with . I heard on The radio that when a child is given antibiotics for the first time unique bacteria in the stomach are destroyed and cannot be replaced. Is this true, and, if so, does this have negative effects on the health of the newborn?  Closely Related, but different:


When the Aons changed in Elantris, why didnt the Seons lose consciousness, due to the fact that their Aons were faulty?


Let $f: \Bbb{R}^2 \to \Bbb{R}^2$ given by $$f(x,y)=(3x+2y+y^2+|xy|,2x+3y+x^2+|xy|)$$ Is it differentiable at (0,0)?  I considered this as $f(x,y)=(f_1(x,y),f_2(x,y))$ and checked that both $f_1$ and $f_2$ are differentiable, is it okay?


Is it possible to associate an image with a category in Wordpress? I'm outputting a list of all categories and would like to feature an image alongside each category name.


I met a problem with  (0xC0000005) by using below code, I saw this code in Duo Security source code, Duo can run this code successfully , but when I run this code it will fail with this code the same as them.  I tried to debug, seems it failed when *iter = '\0' happen.  #include <stdio.h> #include <stdlib.h>  char * duo_split_at(char *s, char delimiter, unsigned int position) {     unsigned int count = 0;     char *iter = NULL;     char *result = s;      for (iter = s; *iter; iter++) {         if (*iter == delimiter) {             if (count < position) {                 result = iter + 1;                 count++;             }             *iter = '\0';         }     }      if (count < position) {         return NULL;     }      return result; }  int main() {     char* pw_gecos = "code1/code2/code3//textField/usergecosparsed";     const int delimited_position = 5;     char delimiter = '/';     char* user = NULL;     user = duo_split_at(pw_gecos, delimiter, delimited_position);     printf("%s",user);     return 0; }   Below code works perfectly by using getpwnam() to get user's gecos part:  #include <stdio.h> #include <stdlib.h> #include <pwd.h>  char * duo_split_at( char *s, char delimiter, unsigned int position ) {     unsigned int    count   = 0;     char        *iter   = NULL;     char        *result = s;      for ( iter = s; *iter; iter++ )     {         if ( *iter == delimiter )         {             if ( count < position )             {                 result = iter + 1;                 count++;             }             *iter = '\0';         }     }      if ( count < position )     {         return(NULL);     }      return(result); }   int main() {     char        * user = "daijwei";     struct passwd   *pw;     if ( (pw = getpwnam( user ) ) == NULL )     {         printf( "error" );         return(-1);     }     const char      delimiter       = '/';     const unsigned int  delimited_position  = 5;     user = duo_split_at( pw->pw_gecos, delimiter, delimited_position );      printf( "%s\n%s\n", user, pw->pw_gecos );      return(0); }   But now new question came to me , I have downloaded the glibc from GNU website , try to find how getpwnam work , but I failed. Does anyone know how getpwnam work or the source code for it ?  I only find a file named by getpwnam.c but inside the file , I can't understand what is it.  #include <pwd.h>   #define LOOKUP_TYPE struct passwd #define FUNCTION_NAME   getpwnam #define DATABASE_NAME   passwd #define ADD_PARAMS  const char *name #define ADD_VARIABLES   name #define BUFLEN      NSS_BUFLEN_PASSWD  #include "../nss/getXXbyYY.c"


some quick back ground:   I recently sold my shares in a company I started to accept a great position with a large company.   It was a cross country move for me and my family. Once my property sells back where I left I will be in a position to pay off almost all of my debt right away, and be able to pay the rest within 1.5 years with the new pay scale.   That being said, here is my hang up:  I have about the same amount of debt in a vehicle loan @ 0% as I do in a student loan @ about 6%. Cash flow is a bit of a concern at least initially while we settle into our new home.   The payment on the vehicle is $645/month and the student loans are $225/mo. The other thing to consider is the vehicle is far beyond what I need now and I have about $8500 in equity in it (but i kind of love the vehicle lol)   I am looking for some opinions on which loan i should satisfy now and which one I should wait to pay until 2017. or if I should dump the vehicle and regroup?


2011 13inch MBP - Can I use 2 external displays - one with MINI DVI and one with Thunderbolt?

I have 2011 13 inch MBP running OSX Mavericks (10.9.4). 2.3 GHz i5 processor, 8GB DDR3 Memory and Intel HD Graphics 3000 512 MB (VRAM) Graphics.  I want to know if I can run 2 external monitors alongside my MBP display. That would make a total of 3 Monitors - 2 external and the MBP monitor.   I have read about solutions like Matrox DualHead2Go but I would like to know if there is anyway I can use one display on the Mini DVI port and the other on the Thunderbolt port?   I would prefer a solution which didn't require me to combine 2 monitors into 1 screen like the Matrox does. The reason for this is: I would like to use fullscreen apps on all 3 monitories.


Does there exist a closed formula for $$\underset{n=1}{\overset{N-1}{\sum}}\dbinom{N+n}{n}?$$ I've searching on wikipedia but I haven't found this kind of sum.


Find lim$_{n \to \infty} \sum _{ k =0}^ n \frac{e^{-n}n^k}{k!}$

We need to find out the limit of,  lim$_{n \to \infty} \sum _{ k =0}^ n \frac{e^{-n}n^k}{k!}$  One can see that $\frac{e^{-n}n^k}{k!}$ is the cdf of Poisson distribution with parameter $n$.  Please give some hints on how to find out the limit.


A word that describes a word for which there are no words

I have searched the internet, read every dictionary and scanned website after website, and cannot find a word that describes a word for which there are presently, in your language, no words. Does such a word exist.    Is there a word or term that means a word that doesn't exist in a language?


Intuition behind Weight of Evidence and Information Value formula

In credit scoring models, we use Weight of Evidence to create bins for continuous variables and Information value to filter out important variables. \begin{align} \text{WoE:} \qquad &\ln \frac{\text{Distr Good}}{\text{Distr Bad}} \cdot 100  \\[10pt] \text{IV:} \qquad &\sum_{i=1}^n \left( \text{Distr Good}_i - \text{Distr Bad}_i \right) \cdot \ln \frac{\text{Distr Good}_i}{\text{Distr Bad}_i} \end{align} Can someone help explain the intuition behind these formulas?


how can i validate this emaild "email@-domain.com" with regex

i want to validate following email id   email@-domain.com   for that i am using following regex but it is not validating above email id , what type of change in my current regex works for me   here is my regex    /^[A-Za-z0-9_\+-]+(\.[A-Za-z0-9_\+-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.([A-Za-z]{2,10})$/


"Roll Up Summary" trigger to summarize Opportunity Amount to Custom Object

I have a custom object "Opportunity Project", and Opportunity has a lookup to the custom object. Each "Opportunity Project" could have a handful of Opportunities related to it. Need a basic trigger that grabs the total of the Opportunity Amounts and updates a currency field on the Opportunity Project record. (Cannot make Opportunity a Child under a custom object)


Existence of unique fixed point in compact Metric space

Let $(X,d)$ be compact. Show: for a map $f$ that when $\forall x, y \in X$ with $x\neq y$   $d(f(x),f(y))<d(x,y)$ is fulfilled.  Then $f$ has a unique fixed point.


(a) Prove that $N \times N$ is a countable set  (b) Let T be the set of two element subsets of N. Prove that T is countable.  This is a question in my exam review package.  I missed the lesson on countable sets and such, proving them seems simple enough (I have what seems to be a decent solution package provided to me by peers), however this question is just all over the place in terms of an explanation.  I'm just wondering if someone could guide me through the explanation of the solution.    Homework question.


"switching box" with microcontroller and relays

I need to build a switching box, which switch between 4 pairs of the contacts, and give one of the pairs to the output (to read one of the 4 signals).  I am going to do that as follows: For each pair of contacts I would have a DPST relay. Each of the relay I would connect to the output pins of the microcontroller (if the relay needs 5V, and microcontroller has 5V operating voltage, it should be possible directly. Otherwise, if operating voltage is lower, I would use operational amplifier or transistor-based one). A 4-buttons keyboard array would be connected to the input of the microcontroller, so that only signal between respective contacts go to the output of my circuit, since only circuit with this contacts would be closed by relay.  However, I don't have so much experience so far, and need advice/comments if this plan should work or something looks wrong, bad (if I miss or overcomplicate something).   I also consider possibility of using circuit without any microcontroller, but just mechanic switch, operating DPST relays. My understanding of the 2 options illustrated at the images below. Only 1 pair of contacts shown, because the others would look the same.    I also would appreciate comments if choice of such  would be ok. It has DPST modification which I need, and also provided already with protecting diode.   Voltage and currents through the contacts will be low (less than 10V voltage, less than 1mA current), and the main requirement is that my switching box shouldn't affect those currents, which I am going to measure at the "out" contacts.


How to change UDP port 1434 ms-sql-m service

I am running sage evolution 200 on a cloud server. Until recently the program was running fine. Then the cloud host decided to block UDP port 1434 on their router as they claim it was being attacked. When I use port query, it return TCP port 1433 is listening but port 1434 is filtered. I contacted my cloud server provider and was advised to change port 1434 to another port number. I am not a computer expert by any means and need assistance is changing this port even though it's the official port for SQL Server.


We have $n$ distinct balls ($n>7$) and want to randomly (and independently) distribute them into $N$ distinct boxes ($N>n$) which are placed one next to the other. a) What is the probability that all balls are placed in consecutive boxes? b) What is the probability that all balls are placed in consecutive boxes and balls with number $1$, $4$ and $7$ are also placed in consecutive boxes?  I am not sure but I will try: a) There is a block of n balls which must be placed in one of the $N-n+1$ gaps formed if we arrange the boxes and fill $n$ consecutive of them. So there are $N-n+1$ places place this block. The $n$ balls in the block can be arranged in $n!$ ways. Also the N boxes can be arranged in $N!$ ways. So all in all we have $n!N!(N-n+1)$. b) Again we have $N!$ ways to arrange the boxes but the balls can be arranged in $(n-3)!$ ways, right? I don't know what is the total number of ways to place all balls in the boxes - plus that I see no restriction regarding the number of balls per box. Any help?


Number of views increases for the question if the page refreshes. Is it a design intent?

Number of views increases for the question if page refreshes. Is it a design intent? Or increase number of views per question only when the non-current user views at once.


Best practice to do a table and a longtable in landscape mode over the full width of the page

I would like to know what is the best practice to do a table and a longtable in landscape mode over the full width of the page by resizing automatically my columns.   Indeed:   I would like to use a table if I have a few rows    and    when I have a lot of lines, I would like split correctly my table on two pages, for example.    Having evaluated several solutions, I have not obtained what I wished.  For example with the code above my table is split, i don't see the last column :  \documentclass[% paper=A4,                   % paper size --> A4 is default in Germany twoside=true,               % onesite or twoside printing openright,                  % doublepage cleaning ends up right side parskip=full,               % spacing value / method for paragraphs chapterprefix=true,         % prefix for chapter marks 12pt,                       % font size headings=normal,            % size of headings bibliography=totoc,         % include bib in toc listof=totoc,               % include listof entries in toc titlepage=on,               % own page for each title page captions=tableabove,        % display table captions above the float  draft=false,                % value for draft version ]{scrbook}%  \begin{document}  \chapter{TEST}  \begin{landscape} \begin{table}[!h] \small  % Switch from 12pt to 11pt; otherwise, table won't fit \setlength\LTleft{0pt}            % default: \parindent \setlength\LTright{0pt}           % default: \fill \begin{longtable}{@{\extracolsep{\fill}}c*{6}{c}} \toprule {\bfseries Column 1 Text Text Text} &  {\bfseries Column 2 Text} &   {\bfseries  Column 3 Text} &  {\bfseries Column 4} &  {\bfseries Column 5 Text} &    {\bfseries Column 6Text Text} &  {\bfseries Column 7 Text Text}\\ \midrule Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text  Text Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ Text Text Text & Text Text& Text Text Text  Text Text Text& Text Text  Text Text Text& Text & Text Text & Text \\ \bottomrule   \end{longtable} \caption{} \label{table:chap2} \end{table}         \end{landscape} \end{document}     And with lot of lines


Flag weight is not getting decrease after flag a post on MSO

Generally I the post which are "off-topic" for MSO. Since last few days I am noticing that whenever I flag any post as "off-topic" my remaining flag count doesn't get change. Right now I have remaining flag of 47 which. Just about 15 mins I flag two recent post which are off-topic for MSO, , .   Both the flags turn into "helpful" flag and still I have remaining flag count at 47, it is not decreasing, why so ?


(JAVA) Break command is executing when it shouldn't

I just started to learn Java, and I'm a bit lost as to why my "break" command at the bottom of the code is being executed.  import java.util.Scanner;  public class GradeValues {      private static Scanner scanner;      public static void main(String[] args) {         boolean keepGoing = true;         String grade; // initializing variable for grade          while(keepGoing = true){             System.out.println("What percentage did you get? ");  //Ask User the question             scanner = new Scanner(System.in); //starting the scanner              grade = scanner.nextLine();  //storing user input of percentage              int percentage = Integer.parseInt(grade);  //converting string to a int              if(percentage >= 80 && percentage <= 100){                 System.out.println("Your grade is an A!  Awesome job!");             }else if(percentage >= 70 && percentage <= 79){                 System.out.println("Your grade is an B!  Nice work!");             }else if(percentage >= 60 && percentage <= 69){                 System.out.println("Your grade is an C!  That's average. =( ");             }else if(percentage >= 50 && percentage <= 59){                 System.out.println("Your grade is an D!  Come on man, you can do better.");             }else if(percentage < 50){                 System.out.println("Your grade is an F!  You need to hit the books again and try again.");             }else{                 System.out.println("I think you type the wrong value.");             }              System.out.println("Would you like to check another grade?");  //Asking user if they want to do it again             Scanner choice = new Scanner(System.in);  //Gets user input             String answer = choice.nextLine();  // Stores input in variable "answer"             if(answer == "yes"){                 keepGoing = true;  //While loop should keep going              }else{                 keepGoing = false;  //While loop should stop                 break;  //this should stop program             }         }     } }   Considering that the keepGoing boolean variable is still true (if the user types 'yes'), the application will still stop because of the break in the else statement.  Can someone let me know why it's doing that and how to fix that?


Mutex in Python 2.6? Make Sure Only One Instance of the .exe Runing

I have a python 2.6 program used in windows (py2exe), I need to make sure it will there will be only one running checking the docs for python2.6 it says Mutex Is gone? What should I do to make sure it runs only one instance of the program? Thanks a lot!


How to check for equals? (0 == i) or (i == 0)

Okay, we know that the following two lines are equivalent -    (0 == i) (i == 0)   Also, the first method was encouraged in the past because that would have allowed the compiler to give an error message if you accidentally used '=' instead of '=='.  My question is - in today's generation of pretty slick IDE's and intelligent compilers, do you still recommend the first method?    In particular, this question popped into my mind when I saw the following code -   if(DialogResult.OK == MessageBox.Show("Message")) ...    In my opinion, I would never recommend the above. Any second opinions?


Reasons to use traditional next button over Infinite Scrolling

To browse through the various pages ,  has been touted as a better alternative to the traditional next page icon because of a better user experience. It much easier to scroll down compared to pressing the next button.   Why does StackExchange which prides itself on user experience implement the traditional next page icons instead of Infinite Scrolling ??  What are the possible reason ??  Infinite Scrolling    Traditional next page button