I have edited a question, and i got this message:     Thanks for your edit!   This edit will be visible only to you until it is peer reviewed.   I then click on peer reviewed link and i can see:     Your suggested edit is pending review.   userXYZ reviewed this 3 hours ago: Approve   I take it my edit has been reviewed by that user and has been approved, right? does it have to be peer-reviewed by more users?  Edit:  I disagree with the "duplicate question" mark given. the question suggested is much more general and does not address my question specifically, This question is much more similar to the one linked on the accepted answer below, but finding that question could prove difficult given its Title is "It takes two to tango?"

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


I'm trying to typeset a manual with Texmaker for a computer program I've been working on, but I'm getting undefined control sequence errors when I try to insert a filepath in the format C:\Users\username. . .  There's probably an obvious solution, but it's been a long while since I used latex, and I can't find any answers online.  To make it clear, I'm trying to insert this filepath as plain text only, no fancy links, it's just text within  sentence.

I would like to properly typeset a file path, e.g.  C:\Program Files\Some program\bin\executable.exe   The first problem I encountered was that LaTeX tries to treat \Program as a command. I tried escaping it with another backslash which created a linebreak.  Then I found this package  but I am not really happy because it typesets system-specific delimiters (i.e. \ for Windows and / for Unix-like) as some weird arrows.  Which leads to my question: what is the preferred way of typesetting a file path in LaTeX?


Let $A$ be a local noetherian ring, $B$ and $C$ are finitely generated $A$-algebras and $M$ is a finitely generated $B$-module. Is the natural morphism $\mathrm{Hom}_B(M,B) \otimes_A C \to \mathrm{Hom}_B(M,B \otimes_A C)$ injective? If necessary, assume that $B$ is flat over $A$.  EDIT: Please note that the homomorphisms are as $B$-modules instead of $A$-modules as mentioned in .

Let $A$ be a commutative noetherian ring. Let $M, N$ be $A$-modules, and assume that $M$ is finite over $A$. Let $P$ be a flat $A$-module.  Is it true that there is an isomorphism $\operatorname{Hom}_A(M,N)\otimes_A P \cong \operatorname{Hom}_A(M,N\otimes_A P)$ ?  It appears that it holds at least locally (that is, when $P$ is free). Is it true in general? If so, is there a reference for this?  Thank you!


I give an example below.   "They've got the kind of weapons that can zap the enemy from thousands of miles away."  How to determine here that "away" is adjective or adverb?

The shop is five minutes away.     According to the dictionary, away is an adverb. An adverb modifies a verb. In the above example, what word does away modify? Why is away not an adjective?       The shop is five meters tall.     tall is an adjective in the second example. It modifies five meters (does it?). So why is away an adverb?


My MAcOs Sierra version 10-12-6  dont connect to internet anymore. I run diagnosis ISP failed, Internet failed, Server failed.  wifi (green light) Wifi settings (green light) Network settings (green light)  I have my laptop beside it and everything works fine. I am desperate I navigated internet tried a lot of things without success.  Thank you for any help or suggestions.

I've tried everything I can think of. Resetting the router, changing the channel number and band.   The internet connection is fine, and then just hangs for a minute or 2, then returns to normal.   The wifi icon remains connected, and I have the latest 10.10.4 update installed. At first I thought it was a DNS bug with Yosemite, and have played with the settings such as changing DNS provider, changing the IPV6 to IPV4 only etc.  Driving me nuts. Has anyone had a similar problem? I've checked the surroundings with wifi scanners and have chosen the best channel available.     One thing I have noticed, it seems a lot more reliable on 5GHz as opposed to 2.4Ghz It seems to affect my Macbook Pro Retina 13in Early 2015 a lot more than the other devices on the network. I'm using a Virginmedia  1.


I've read from other questions here that we should use "Yours sincerely" when we know the name of the recipient and "Yours faithfully" if we're writing to "Sir/Madam". Then what about "Dear Editor" and "Dear Parents" or "Dear Teachers"? Which one should I end with?   Can anybody help me out here? Thanks a lot!

When should one sign a letter with "Yours faithfully" or "Yours sincerely"?


I am trying to read txt file, find $id and increment it's value $id=>value. But the problem is that when I want to save changes the first new line is ignored so  10=>26 30=>11 33=>22   became this after I run the script  10=>2730=>11 33=>22   This  10=>26 30=>11 33=>22   Should result in this  10=>27 30=>11 33=>22   Here is the code. I am using $id = 10.   $tmp= "";     $file = file_get_contents(dirname(__FILE__) . "/requests.txt", "r");     $file = explode("\n", $file);     foreach ($file as $product){          $data = explode("=>", $product);         if($data[0] == $id) {             $data[1] += 1;             $product = $data[0]."=>".$data[1];             $tmp = $tmp.$product."\n";             continue 1;         }         $tmp = $tmp.$product."\n";     }     echo $tmp;     file_put_contents(dirname(__FILE__) . "/abc.txt", $tmp);

When is it a good idea to use ?  I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues?


I have two scopes $scope.job and $scope.jobs  I have var job;  If $scope.job is undefined I would like $scope.jobs to work under job so it would be var job = $scope.jobs but if $scope.job is defined I want to write it to that variable too.  if ( $scope.job ) {     var job = $scope.job;  } else {     var job = $scope.jobs;  }   But in shorthand

Is there a null coalescing operator in Javascript?  For example, in C#, I can do this:  String someString = null; var whatIWant = someString ?? "Cookies!";   The best approximation I can figure out for Javascript is using the conditional operator:  var someString = null; var whatIWant = someString ? someString : 'Cookies!';   Which is sorta icky IMHO. Can I do better?


I am a newbie in stats, and while reading:   I don't seem to understand why is an imbalanced dataset wrong? And why should we rebalance…  I imagine this example: let’s say on a classification problem, for a very rare disease, where we have 1M rows for ‘no’ and only one row for ‘yes’.  My way of thinking is that, the dataset is unbalanced for a reason, (it’s a rare disease!) then wouldn’t balancing it remove that knowledge we have about it being rare?? I feel like by balancing we are discarding a very important piece of information…  (also I thought this was a vital piece of the bayesian world, 'the prior', aren't we removing the prior when we balance?)

We already had multiple questions about unbalanced data when using , , ,  and a number of other similar questions, what makes it a very popular topic! Unfortunately, each of the questions seems to be algorithm-specific and I didn't find any general guidelines for dealing with unbalanced data.  Quoting , dealing with unbalanced data     (...) heavily depends on the learning method. Most general purpose   approaches have one (or several) ways to deal with this.   But when exactly should we worry about unbalanced data? Which algorithms are mostly affected by it and which are able to deal with it? Which algorithms would need us to balance the data? I am aware that discussing each of the algorithms would be impossible on Q&A site like this, I am rather looking for a general guidelines on when it could be a problem.


I'm creating a table with a S column type from the siunitx package. The items in this column are a range of numbers. There is a way to align this items, in the second column by the range-phrase "to"?  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \begin{table}[htb] \footnotesize \centering \begin{tabular}{SS} \toprule \textbf{Head 1 (\si{\cm})}          & \textbf{Head 2 (\si{\mm})}          \\  \midrule 30,12 & \numrange{2,4}{4,84} \\  3,45 & \numrange{356}{445} \\ 300,42 & \numrange{0,487}{1,334} \\ 33,00 & \numrange{6}{21} \\ \bottomrule \end{tabular} \end{table} \end{document}

I have a table in which I use \numrange of the siunitx package.  I would like to center align that column at the range-phrase. If I align it left, it sort of works, but if I align it center, it is not good enough. How can I solve this?    \documentclass{book} \usepackage[T1]{fontenc} \usepackage{siunitx}    \begin{document} \begin{table} \caption{All measured and their estimated outcome variables during 30 minutes of chair exercises} \label{table:outcomes} \sisetup{ range-phrase = -- }  \begin{tabular}{                 l                 c                 c                 c                 %S[parse-numbers = false,input-decimal-markers={-},output-decimal-marker = \text{--}]                 S[table-format=3.1, table-text-alignment=center]                 }  \multicolumn{1}{l}{}& \multicolumn{1}{c}{Mean}& \multicolumn{1}{c}{SD}& \multicolumn{1}{c}{Median}& \multicolumn{1}{c}{Range}\ \hline   \%vo2max (mL/min) & 66.0 & 16.5 & 66.9 & \numrange{30.3}{115.8}\\    &&& 54.6 & \numrange{30.3}{77.7}\\   &&& 69.9 & \numrange{43.8}{115.8} \   \hline     \end{tabular} \end{table}  \end{document}


This is a homework problem, I need to calculate $\int\frac{e^{iz}}{z}\, dz$ over some curves, but I can find a useful parametrization of $z$ that make this calculations not so difficult.  For example I have to find the integral over the arc in the superior semi-plane of $re^{i\theta}$ from $r$ to $-r$ I would like to use a polar parametrization but I end with   $\int_0^{\pi}ie^{re^{i\theta}}\, d\theta$, and then I don't know how to proceed, also a hint of a parametrization for lines would be useful.

As a part of an exercise I need to calculate      $$ \lim_{r\to0}\int_{\sigma_{r}}\frac{e^{iz}}{z}\, dz $$      Where  $$ \sigma_{r}:\,[0,\pi]\to\mathbb{C} $$      $$ \sigma_{r}(t)=re^{it} $$   I know how to calculate the integral on the full circle ($|z|=r$) using Cauchy integral formula: $$2\pi ie^{iz}|_{z=0}=2\pi i$$  I have checked if  $$ (\overline{\frac{e^{iz}}{z})}=\frac{e^{iz}}{z} $$  so that the integral I want to calculate is $$\frac{1}{2}\cdot2\pi i=\pi i$$ but I got that that the equality above does not hold.  Can someone please suggest a way of calculating this integral ?


Here is the string:  format db "this is string a", 0, 0Ah   And I am trying to split it into this:  format db "this is string a" 0 0Ah   Is there any way can do this in python 2.7?  Thank you!

I have a string which is like this:  this is "a test"   I'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:  ['this','is','a test']   PS. I know you are going to ask "what happens if there are quotes within the quotes, well, in my application, that will never happen.


Sometimes I get an notification of a new badge, sometimes I don't.. Is this a bug or are some badges not special enough to get a notification of?    As you can see I got a notification of the  badge, but just before that I also earned the cleanup badge, I noticed a new badge on my profile and found out I never saw that one before. So, why have some badges notification and others none?

Yesterday, I have received two : Revival, and Self-Learner. However I was only notified of the Revival badge, because apparently the Self-Learner badge is not considered "".  What badges have their notification suppressed if the user has a 200-rep account somewhere on the Stack Exchange network, i.e. they won't trigger a new item in our achievements dialog?


Does $f^n(x)$ always mean $f(f(f(f(...f(x))))....)$ [n times]? i.e. $f^3(x)$ always means $f(f(f(x)))$? Does $f^0(x)$ mean $x$? [where $f\neq id$]  By always, I mean regardless of whether it's for proofs in computer science or for calculus.  Just want to be doubly sure so I don't make any unfounded leaps in my proofs by induction for computer science.  Apologies for this simian question. Many thanks!

I'm in year 11 right now and I just had a brief discussion with my maths teacher about function notation in trigonometry.  For a test, I wrote this,   sin(50)^2   I assumed that would be interpreted as sin(50)*sin(50)  But I was told the correct notation for this is is  sin^2 (50)   or optionally  (sin (50))^2   I'm curious if that is the 'proper' mathematical convention, or just how things are taught in high schools?  I'm Australian, in case there are some regional differences.  Thanks for the help!


I am making this very basic profile creator in java and as I was debugging I kept ending up with a NullPointerException error. I don't know how to solve this and I would appreciate it if someone could please tell me how to solve this. Here is the code: import java.util.Scanner;  public class Creator {     String[] userNames;     int[] birthYears;     String[] genders;     String userCommand;      Scanner scanner1 = new Scanner(System.in);     Scanner scanner2 = new Scanner(System.in);      public void create()     {         System.out.println("What is your name?");         userNames[0] = scanner1.nextLine();         System.out.println(userNames[0]);          System.out.println("In what year were you born?");         birthYears[0] = scanner1.nextInt();         System.out.println(birthYears[0]);          System.out.println("What is your gender?");         genders[0] = scanner2.nextLine();         System.out.println(genders[0]);     } }  In the main method, I just created a Creator object and used it to call the method create(). The code never gets past the "What's your name?" block of code and every time I run it I end up with this error: Exception in thread "main" java.lang.NullPointerException at Creator.create(Creator.java:19)  The error is referencing to this line: userNames[0] = scanner1.nextLine();  I have no idea how to fix this and I would appreciate it if someone told me how to fix it.

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


I have dark them extensions but it still flashes before page loads, when i google something for example, it flashes before loading. I'm looking for a way to remove it.

I am using firefox developer edition.  I have it configured with several programs that give it a dark theme.  My biggest problem with it is that because my eyes adjust to the screen being dark, the flash of unstyled content hurts my eyes whenever I open a web page.  Currently what I have done is to enable the dark theme, which does a good job taking care of the tab and url bar.  For the pages that are protected, I use ShadowFox to color them dark as well.  I then configured an addon called Dark Background and Light Text to color all of the webpages.  I have tried editing the display foreground and background color in about:config.  I have the developer theme set to dark.  Shadowfox takes care of editing the userChrome file.    Now my biggest problem is with websites like google.  With google, I get the original light colors for about a full second before the custom colors appear.  Most sites are not that bad, but all follow the same trend, showing light backgrounds before the dark ones.  Editing the display colors in about:config helped with some sites, but did not affect google at all.  I am wondering if there is any sort of configuration I can do to fix the fouc. I am perfectly willing to go as far as modifying the base colors in the source code if I need to.  I have not been able to find anything useful on the internet.  Is there anything I am able to do about this? Maybe change the color values in the source code?


When I punch a wall, Why doesnt my fist go through instead of staying at rest on the wall? What is cancelling out the force of my punch?

If you've ever been annoyingly poked by a geek, you might be familiar with the semi-nerdy obnoxious response of      "I'm not actually touching you! The electrons in the atoms of my   skin are just getting really close to yours!"   Expanding on this a little bit, it seems the obnoxious geek is right. After all, consider Zeno's paradox. Every time you try to touch two objects together, you have to get them halfway there, then quarter-way, etc. In other words, there's always a infinitesimal distance in between the two objects.   Atoms don't "touch" each other; even the protons and neutrons in the nucleus of an atom aren't "touching" each other.  So what does it mean for two objects to touch each other?   Are atoms that join to form a molecule "touching"? I suppose the atoms are touching, because their is some overlap, but the subatomic particles are just whizzing around avoiding each other. If this is the case, should "touching" just be defined relative to some context? I.e, if I touch your hand, our hands are touching, but unless you pick up some of my DNA, the molecules in our hands aren't touching? And since the molecules aren't changing, the atoms aren't touching either?  Is there really no such thing as "touching"?


I wrote a progressing algorithm using Python (QGIS 3.10.4). One of the input parameters is a .shp file where I defined as default. And if a user selects another .shp file than the default one, I want that the user chooses an attribute field of the selected layer which will be used for the categorized symbology later on. Currently, my code is like this, and attribute fields appears regardless of the user selection. Can one do it that way that QgsProcessingParameterField appears only the user chooses something else than the default? self.addParameter(     QgsProcessingParameterVectorLayer(         self.GEOLOGIE_LAYER,         self.tr('Pfad zur Karte'),         defaultValue=r"XXX\km500_geo_f.shp",         optional=False     ) )  self.addParameter(     QgsProcessingParameterField(         self.LABEL_FELD,         self.tr('LABEL-FELD'),         '',         self.GEOLOGIE_LAYER,         optional=False     ) )

I couldn't find anything about this problem.  Suppose to have the first parameters in a Processing script defined as an Enum:     self.addParameter(         QgsProcessingParameterEnum(             self.CHOICE,             self.tr('Choose the parameter'),             ['param1', 'param2']         ) )   While the second one as a number:  self.addParameter(     QgsProcessingParameterNumber(         name=self.VALUE,         description=self.tr('My value'),         type=QgsProcessingParameterNumber.Double,         defaultValue=40,         optional=False,         minValue=0,         maxValue=100     ) )   Is it possible to change the minValue, maxValue, description, ecc.. of the second parameter depending on the first or second choice of the first parameter already in the GUI?  e.g. if the user choose param1 then the second parameter should become:  self.addParameter(     QgsProcessingParameterNumber(         name=self.VALUE,         description=self.tr('My value'),         type=QgsProcessingParameterNumber.Double,         defaultValue=40,         optional=False,         minValue=0,         maxValue=100     ) )   while if he choose param2 it should became:  self.addParameter(     QgsProcessingParameterNumber(         name=self.VALUE,         description=self.tr('My AWESOME value'),         type=QgsProcessingParameterNumber.Double,         defaultValue=0,         optional=False,         minValue=50,         maxValue=500     ) )


Here's the link:   If you scroll down to the answer that starts like this...     Just showing the answer of Pandincus with "of the shelf" code and some   explanation: You need two solutions for this example ( I know it could   be done via one also ; ), let the advanced students present it ... So   here is the DDL SQL for the table :   You'll see that the user/timestamp information for that question is encapsulated in a code block.  Edit: Added image in case someone edits the post.

has a weird case of the mono, while .  Also, that question is missing some content at the end:


So I have a connected graph $G$, whose every minimal edge cut contains even number of edges. How to prove from this that the graph is Eulerian?  If I knew from this, that every vertex has even degree I would be fine, but how do I deduce this?   EDIT: I realise this question has been asked before, but why is the degree of every vertex even? The original answer doesn't elaborate on that.

I have to prove that Connected graph is Eulerian Graph if and only if the number of edges in minimal cut is even.  Implication from left to right. Well if $G$ is Eulerian Graph then degree of each vertex must be even. It's oblivious if i try to disconnect graph by removing all edges connected to the vertex with minimal degree. But minimal cut can be done also by dividing graph into 2 connected graphs (each graph with more then one vertex) and i have no idea how to deal with it.  Implication from right to left - completly no idea.


Suppose I am writing an (academic) text in British English, but have to quote a text from an author who writes in American English.  Should I preserve the author's original spelling, or convert it to my text's spelling standards?  This question is intended to be closed as a duplicate of  to improve Google visibility. (I did not manage to find that question through Google during my initial search, even though it is one of the best resources on the topic. This question supplies key words which the original doesn't have.)

I realize (or realise?) I may be splitting hairs here, but I find this question interesting, and I’ve never heard or seen it discussed before.  I was about to post a quote from Rich Hickey outside my cubicle, taken from  with him, in which the writer uses the traditional British spelling of realize.  Hickey is an American, as am I, so I changed it back to the American spelling.    However, it got me thinking: if Hickey were British, should I spell it his way?  The question then is whether I should do so only if quoting something he wrote, or even if I were quoting something he spoke — and thus something he did not actually spell.    Tangentially: should I think of this as quoting Hickey himself, or quoting the author who quoted him?  My gut instinct is that if you’re quoting something written, then you should maintain whatever spelling the author used, and if something spoken then it’s debatable, and using the spelling of your dialect (or of your audience’s dialect) is probably okay.   But I’d like to know: do any conventions exist on this matter?


A few months ago my friend signed up for Stack Overflow (not Meta) to ask a few questions on programming help. His questions were a little bit bad and consecutively I think 3 questions.  However, I tried to find his questions but they were all deleted. I asked him and he told me he deleted them.   According to this FAQ:     He doesn't seem to be able to meet these conditions of post ban:   He does not know how to answer questions for programming because he's a lot less skilled than I am How can he positively contribute when his questioning is locked? Deleted questions cannot be retrieved unless you have the link to undelete.   He called me earlier today about returning to this site and promises to study this site more often. However, he is not allowed to create new account.  But what else can he do to recover his rights?  NOTE: I have read that answer properly so correct my if I'm wrong but is there no solution for him to return to this site?   Is there a way to appeal a ban?

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


Typically a figure is placed at the end or beginning of  a section. How can I place a figure after I refer to it in a paragraph and after the current line?

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I want to find linearly independent column vectors in a square matrix without using rref. In similar Stack Overflow questions, to find linearly independent columns in a square matrix, the recommended method is to use eigenvalue. If eigenvalue is zero, its corresponding eigenvector is linearly dependent but it is just relationship between eigenvector and eigenvalue. i seriously want to know which indices in a matrix are linearly independent. thank you for your answering.

How can I prove that if I have $n$ eigenvectors from different eigenvalues, they are all linearly independent?


What do you think about my first proof employing strong induction? What mark/grade would you give me?    Theorem  Every natural number greater than 1 is a product of one or more primes.  Proof  First, introducing a predicate $P$ over $\mathbb{N}$, we rephrase the theorem as follows.         $$\forall n \in \{2, 3, \dots \}, \, P(n)   \quad \text{where} \quad   P(n) \, := \, n \text{ is a product of one or more primes}$$         We prove the theorem by strong induction; we induct on $n$.  Basis  We have $P(n)$ for $n = 2$, since $2$ is a product of one prime, namely $2$.  Inductive step  Below, we show that for all             $n \in \{2, 3, \dots \}$,             $$P(2) \land \dots \land P(n - 1) \land P(n) \Rightarrow P(n + 1)\text{.}$$  Let $k \in \{2, 3, \dots \}$.             We assume that $P(2) \land \dots \land P(k - 1) \land P(k)$ is true.             In the following, we use this assumption to show that $P(k + 1)$ is true.  We consider $k + 1$.             There are two cases: It is prime or not.             Obviously, the cases are exhaustive.             We consider the cases separately;             in each consideration, we conclude that $P(k + 1)$ is true.             In so doing, we conclude the inductive step for all cases.  Case 1:     Obviously, $k + 1$ is a product of one prime, namely $k + 1$.             Thus $P(k + 1)$ is true.  Case 2:     As $k + 1$ is not prime, by definition,             it may be represented as a product of at least two natural numbers             that are greater than $1$. Thus there are $i, j \in \{2, \dots, k - 1, k\}$ such that $ij = k + 1$.             By the induction hypothesis, $P(i)$ and $P(j)$ are true.             Hence, we can easily see that the product $\,ij\,$ is a product of primes.             Thus $P(ij)$ is true. (Thus $P(k + 1)$ is true.)  By the basis, the inductive step, and the method of strong induction;         $P(n)$ is true for all $n \in \{2, 3, \dots \}$.

I'm trying to get through Spivak's Calculus on my own and even though I kinda understand induction I'm not so sure that's the case when it comes to complete induction. So I tried to do a starred problem which involves using it. But I'm not sure that my proof is valid, can someone check this for me?  So the problem is that I have to prove that     For every natural $n>1$, if $n$ is not prime we can write it as a product of primes.   I'm starting with a base case. For $n=2$, $n$ is prime, so the assumption holds.  Let's assume that for some $n > 1$ and also all numbers $p <= n$ the assumption holds.  Then $n+1 = cd$. If $n+1$ is not prime, then $c < n+1$ and $d < n+1$, but as they are natural numbers, we can also write that $c <= n$ and $d <= n$. But we assumed that if $p <= n$, and $p$ is not prime, we can write it as a product of primes. So if $c$ or $d$ are not primes, we can write them as a product of primes. That means that $n+1$ can be written as a product of primes if it's not prime, which completes the proof.


I am new to Java and stackoverflow and am seeking answer from experienced folks, who have worked on Collections Framework.   I read that hashTable is thread safe and so is concurrentHashMap, but a concurrentHashMap is faster than a hashTable, since it gives lock on segments of the map to the accessing threads.   How does this work internally? How is the size of segment decided? Example: if there are 40 entries in concurrentHashMap, and 3 threads trying to retrieve/modify data, how will the segments be decided?   Any images/explanations/code on this would be really awesome. Thanks in advance.

What are the differences between a  and a  in Java?  Which is more efficient for non-threaded applications?


I am using amsbook. There, sections are numbered within chapters. For instance, if each of the first two chapters has 2 sections, then the sections are numbered as 1.1, 1.2, 2.1, 2.2.   I wonder how to make continuous section numbering 1, 2, 3, 4... (like the ones used in Halmos' measure theory book).

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


Sorry if I am asking this question that has been already asked, but I am kind of a noob at programming, I tried researching how to fix this bug but I am still having trouble trying to solve it. I am trying to compile this block of code here:  //Default constructor public Game () {     potAmount = 100;     betAmount = 0; }  public int getBetFromUser() {     //Introduction to the game     System.out.println("Welcome to Solitaire Dice Game..bet an amount\r\n" +              "\t-if you roll triples you win triple your bet,\r\n" +              "\t-if you roll doubles you win double your bet,\r\n" +              "\t-if you roll 10 or over, you keep your bet\r\n" +              "\t-otherwise you lose your bet\r\n" +              "A bet of 0 ends the game\r\n");     System.out.println("Your current pot is 100");     System.out.println("Enter your bet amount:");     betAmount = keyboard.nextInt();      return betAmount;   And I am trying to call it in my main class but I get this compile error:  Enter your bet amount:  Exception in thread "main" java.lang.NullPointerException     at Game.getBetFromUser(Game.java:26)     at Assign3.main(Assign3.java:9)

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


For instance, the Enthusiast and Fanatic badges. Both are based on logging in daily. For an extended period, and I do check almost daily, but living in the real world means that there may be a day when I simply can not log in to stack.  Now as a programmer I instantly think: "What if I just automate it?", it would be super easy to reload the page automatically on schedule. But that's cheating. . . Right? I plan on checking anyway, but the fallback would be nice. But still cheating. . .  Now I haven't done that, but what happens if I did? How "bad" is it to cheat on those badges? I mean is there no real reason not too, or could it get a user banished? And I'm sure there are plenty of other easily cheated badges, those two just jump out at me as extremely easy.  I'm not looking for a discussion on the ins and outs of cheating, I can come up with a dozen ways to do it, but on the consequences, or lack there of. On one level the badges (unlike rep) mean very little, on the other hand, it's still cheating. Or is it? Isn't the point to show dedication? And wouldn't cheating show that? Are there rules somewhere about this? Is the precedent?

It seems to me that badges like “fanatic” can be automated, i.e. someone could put a script together to “earn” that badge.  Is there any safeguard against such practice?  Or is it regarded as fair-play (as in “if you even managed to put such a script together, dude, you deserve it”?!


I read this in the mid-nineties in what seemed to be new hardback book, but some of the other anthology stories seemed 'of the sixties'.  The narrator was recounting his experience visiting some alien world and getting told about their education system. Basically the poorer performing students are hanged as an incentive to the others to work harder.  This has resulted, after generations, in having a world of very high educated and quick learners. An example is the narrator needs new spectacles and a typical passing student is called over, utilising normal household items he diagnoses the lens strength required, makes and polishes the glasses and presents them to narrator, all within (I think) eight minutes.  Narrator witnesses a few more examples like this, including the ability to create a ftl spacecraft out of kitchen white goods within thirty minutes, then he returns to Earth.  On Earth he discusses the educational system with an enquiry board and the consensus is there is nothing to fear from the aliens, a typical Earth student is capable of building such an ftl spacecraft in less than twenty minutes

I read this somewhere in the 1990s, but it was probably older. I vaguely remember it as being two stories in sequence in an anthology. One was a story involving an Earth administrator comparing Earth curriculum to Mars curriculum and the second was just a class listing for Martian curriculum.  In the first story, what sticks out in my head was the Earth administrator proudly claiming some high value of WPM for reading for his students and the Martian admitting that their rate was lower, and then added a comment along the lines of that the Martian students, when reading at the rate attained at Earth, could not recall every word of the book and recite them back verbatim. In the curriculum listing, I remember that the physical education classes included Tightrope Walking and Advanced Tightrope Walking. In short, the implication was that Mars held its children, and therefore its citizens, to much higher standards, at the cost of sacrificing actual childhood. The children never played, just studied and drilled.  In retrospect, it might not have been Mars... I know one side was Earth and the other was a planet in the Solar System, and Mars sounds about right, but so does Venus. Either way, it was the casual arrogance of the extra-terrestrial society and the blustering attempts of the Earth administrator that stuck out for me.


I've got a problem from my discrete math course that i've been stuck on for a while. This is a version of EGZ theorem for when $k=2^n$. I need to show that for every $n\in \mathbb{N}$, any set of integers the size of $2^{n+1}-1$ has $2^n$ numbers whose sum is divisible by $2^n$. I tried to prove it by induction:  For the base case, if $n=0$ then on any set with a single integer, the number is divisible by 1. Assuming that the statement holds for any $n$, I need to show that any set of integers the size of $2^{n+2}-1$ has $2^{n+1}$ numbers whose sum is divisible by $2^{n+1}$.  but got stuck after a few hours of trying to solve it. Any help would be appreciated.

Show that, of any set of $2^{n+1}-1$ positive integers numbers is possible choose $2^{n}$ elements such that their sum is divisible by $2^{n}$.   My approach: Let $a_1,a_2,\ldots,a_{2^{n+1}-1}$ positive integers numbers. Define, $s_j=a_1+a_2+a_3+\ldots+a_{2^{j+1}-1}$, $j\in\{1,\ldots,n\}$.   If any of the $2^{n+1}-1$, $s_j$, are divisible by $2^n$, we are done.   In case contrary, $s_j$ have a remainder $1,2,3,\ldots,2^{n}-1\mod(2^n)$. And, we know that $2^{n+1}-1>2^n-1$, so by Pigeonhole Principle, there exist a tleast two $s_j$ such that has a same remainder ($\mod(2^n)$), i.e., if $p<q$, then $$s_q-s_p=a_{2^{p+1}}+a_{2^{p+1}+1}+\ldots+a_{2^{q+1}-2}+a_{2^{q+1}-1}\equiv 0\mod(2^{n})$$  So, the set $\{a_{2^{p+1}},a_{2^{p+1}+1},\ldots,a_{2^{q+1}-2},a_{2^{q+1}-1}\}$ is the set we need. I know, this answer doesn't be right, but is the idea I have to occupy Pigeonhole.  EDIT: Both answers were very good, but, how I could occupy the pigeonhole principle in this problem?


I'm getting this error   Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes)   How come he tried to allocate 4194304 (which is smaller than the limit he specifies 134217728) and is exhausted?

I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big database for report generation.  The client POS is based on PHPPOS, and I have implemented a module that uses the standard XML-RPC library to send sales data to the service. The server system is built on CodeIgniter, and uses the XML-RPC and XML-RPCS libraries for the webservice component. Whenever I send a lot of sales data (as little as 50 rows from the sales table, and individual rows from sales_items pertaining to each item within the sale) I get the following error:  Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)   128M is the default value in php.ini, but I assume that is a huge number to break. In fact, I have even tried setting this value to 1024M, and all it does is take a longer time to error out.  As for steps I've taken, I've tried disabling all processing on the server-side, and have rigged it to return a canned response regardless of the input. However, I believe the problem lies in the actual sending of the data. I've even tried disabling the maximum script execution time for PHP, and it still errors out.


I know that this is probably asked many times already. I just want to center all items of my navbar vertically. I tried to set vertical-align: center; in my headercss tag. I probably miss something:

Login

                     <input class="searchbar" type="text" placeholder="Search...">                     <button class="search-button" type="submit"></button>
                           css:  *{     margin: 0;     padding: 0;     text-decoration: none;     list-style: none; }  body{     font-family: sans-serif; }  /* Navbar stuff */ header{     background-color: #424242/*#80aaff*/;     height: 60px; }  .navbar{     width: 80%;     margin: auto; }  .branding{     float: left; }  .navbar-links{     float: right; }  .navbar-links ul{     list-style: none; }  .navbar-links ul li a{     text-decoration: none;     text-transform: uppercase;     color: white; }

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


In my notes this statement is left unproven. I want to show that for any measurable set $E \subset \mathbb{R}$ with $\theta(E)>0$, there exists an interval $(a,b)$ that covers $E$ arbitrarily closely. From the definition of the Lebesgue Outer Measure:  $$ \exists \bigcup_i(a_i,b_i) \supseteq E : \sum_i(b_i-a_i) \leq \frac{1}{1-\epsilon}\theta(E) $$  And then $\theta(E)=\theta(\cup_i E\cap(a_i,b_i))$, but I'm not sure this helps. Can anyone show me how to finish this off?

In my self-study, I came across the following two interesting, related results:  Let $E$ be Lebesgue measurable, with $\mu(E)>0$ (here $\mu$ denotes the Lebesgue measure). Then:   for any $0<\rho<1$, there exists an open interval $I$ such that $\mu(E \cap I)> \rho \cdot \mu(I)$. In turn we should be able to use (1) with $\rho > 3/4$ to prove that  the set $E-E = \{x-y : x, y \in E\}$ contains an (open) interval centered at $0$ (in particular, if $\rho > 3/4$, the text I am using suggests that $(-\frac{1}{2} \mu(I), \frac{1}{2}\mu(I)) \subseteq E-E$).   I would like to see if anyone visiting today would be up for proving (1) or (2) (inclusive-or). I have tried to work out (1) a few times, but none of my attempts have been satisfactory.


When I multiply 1.265 by 10000 , I get 126499.99999999999 when using Javascript.  Why is this so?

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


I'm getting two conflicting reports and was wondering if anyone can help me. I was told that on the distribution panel, grounded conductors (neutral) and ground wires need to be separated in the distribution panel. The point of disconnect is at the meter and the neutral and ground wires, apparently, have to be separated downstream of the point of disconnect for proper grounding system. Is this true? I got a second opinion and was told that on a 3 wire service to panel, neutral and ground wires are allowed to be terminated on the same bar. Any help would be really appreciated. Thank you all!!

So to continue my line of electrical questioning (and perhaps narrow down my ), I took a look through the two panels in this house.  There is a 200amp main service in the basement, which then feeds up to a 100amp sub-panel for the main floor.  This 100amp sub feeds a kitchen (fridge, microwave, dishwasher, gas range), a bathroom, 3 bedrooms, and a living room.  The 200amp main feeds the 100amp sub, 2 bedrooms, a living room, a washer/dryer (gas dryer), a utility room (well pump, pressure tank, gas water heater, gas furnace), and an A/C.  My first concern is that the main service panel has the bare ground and neutral wires mixed on the two bus bars.  Reading around, some say this is OK, other's say it is bad.  Any thoughts?  The sub-panel is wired with grounds and neutrals on separate bars.  My second concern- is a 100amp sub sufficient for the main floor?


NON-DUPLICATE EDIT: This question is not a duplicate because I have tried the solution presented as the answer to the "original" question and it did not work. See results below.  I am attempting to use gdal.Grid in python to interpolate a .txt or .csv to a raster. I keep getting "ERROR 1: Failed to open datasource 'file.csv'. No point geometry found on layer file, skipping."  How do I get gdal.Grid to recognize the file? Or how do I need to alter the file in order to get gdal to recognize it?  EDIT: Ran ogrinfo twice, both with txt and csv versions. The results were the same each time, with the only difference being the extensions each time matched what was in the vrt and what the file was. ___Stupid question, if a text file is structured like a csv you can usually just change the extension to csv and programs will handle it, I've been doing that when "changing format", could this be part of the issue?  Below, column 1 is x, column 2 is y, column 3 is z but they do not have headers.  Data file structure:  555000,66600,001 555003,66610,002 555002,66601,003   VRT file  <OGRVRTDataSource>     <OGRVRTLayer name="file">         <SrcDataSource>CSV:file.csv</SrcDataSource>         <GeometryType>wkbPoint</GeometryType>         <GeometryField encoding="PointFromColumns" x="field_1" y="field_2" z="field_3"/>     </OGRVRTLayer> </OGRVRTDataSource>   Relavant python code  rasname = str(file) rasname = rasname.split('\\') rasname = rasname[-1] rasname = rasname.strip('.txt') vrtname = rasname + '.vrt' vrtname = input_dir + '\\' + vrtname  outputfile = output_dir + str(rasname) + '.tif'   gridopt = gdal.GridOptions(format='GTiff',algorithm='invdist:power=2')  output = gdal.Grid(outputfile, vrtname, options=gridopt)   Results of ogrinfo  INFO: Open of 'file.vrt' using driver 'OGR_VRT' successful. Warning 1: Cannot open datasource 'file.csv' in update mode. Trying again in read-only mode Error 1: Failed to open datasource 'file.csv'  Layer name: file Geometry: None Feature Coutn: 0 Layer SRS WKT:  (unknown)

Given the following .vrt file which I manually created:  <OGRVRTDataSource>     <OGRVRTLayer name="DGM5_BE">         <SrcDataSource>DGM5_BE.txt</SrcDataSource>         <SrcLayer>DGM5_BE</SrcLayer>         <LayerSRS>EPSG:25833</LayerSRS>         <GeometryType>wkbPoint</GeometryType>         <GeometryField encoding="PointFromColumns" x="x" y="y" z="d"/>     </OGRVRTLayer> </OGRVRTDataSource>   and the associated DGM5_BE.txt - here are the first lines:  x;y;d 397200;5837250;59,15 397205;5837250;59,04 397200;5837245;59,03 397205;5837245;58,94 397195;5837240;58,93 397200;5837240;58,9 397205;5837240;58,86 397210;5837240;58,9 397190;5837235;58,98   I run the following command to convert the DGM5:  $ gdal_grid -of GTiff -ot Float32 -l DGM5_BE DGM5_BE.vrt DGM5_BE.tif   This fails with the following error message:     ERROR 1: Failed to open datasource `DGM5_BE.txt'.   No point geometry found on layer DGM5_BE, skipping.


I am trying to truncate (by two decimal places) an array of floats in a numpy array. I do this by doing the following to each element: np.trunc(100 * i) / 100  However, due to some floating point problems in python, sometimes this formula above does not work. Take for example -2.01 * 100 = -200.99999999999997. Thus, the np.trunc(100 * -2.01) / 100 will not work. it will output -2.00. Is there a better way to truncate two decimal places in python using np.trunc? Without np.trunc? Thank you!


Let $B_r=\{x\in \mathbb R^3 : |x|\le r\}$ and let $dS_r$ denote the area element on $\partial B_r$. Set $$E(x)=C\int_{\partial B_R}\nabla_x |x-y|^{-1} dS_y$$  Show that for $|x|< R$, $E$ is zero and for $r<R$, the flux $\int_{\partial B_r} E(x)\cdot \nu \ dS_x$ is zero.  First of all, what does $\nabla_x$ stand for? The $\nabla$ without subscripts usually stands for the gradient, but I'm not sure about $\nabla_x$.  For the flux integral, is it better to use the divergence theorem or use the definition? In the former case, how do I find the divergence (i.e., how to differentiate a line integral)?

Let $B_r$ denote the ball $|x|\le r$ in $\mathbb{R}^3$, and write $dS_r$ for the area element on its boundary $\partial B_r$. The electric field associated with a uniform charge distribution on $\partial B_R$ may be expressed as  $$E(x)=C\int\limits_{\partial B_R}\nabla_x|x-y|^{-1}dS_y,$$ a) Show that for any $r<R$, the electric flux $\int\limits_{\partial B_r}E(x).\nu dS_x$ through $\partial B_r$ equals zero.  **b)**Show that $E(x)\equiv 0$ for $|x|<R$("a conducting spherical shell shields its interior from outside electrical effects").  For part a, I tried to to using divergence theorem as follows: $$\int\limits_{\partial B_r}E(x).\nu dS_x=\int\limits_{B_r}divE(x)dx= C\int\limits_{B_r}\int\limits_{B_R}div\nabla_x|x-y|^{-1}dS_ydx,$$ However, I don't know how to proceed next steps to prove the integrand is zero. By the way, could you please suggest me a method for part b)?  Thank you very much for your help.


After running sudo apt-get update, I get this issue:  Err:16 http://ppa.launchpad.net/pinta-maintainers/pinta-stable/ubuntu bionic Release 404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done                      E: The repository 'http://ppa.launchpad.net/pinta-maintainers/pinta- stable/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default.   I don't currently have Pinta installed, though. I uninstalled it via terminal after installing it a while back. I tried re-installing via the Ubuntu Software App, still got the same issue, I tried uninstalling it through it, still the same issue. I'm not sure why it displays that, and I don't know how to fix this error so I can get rid of this. Any ideas? Thanks!

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


A map $f: X \to Y$ is said to be an open map if for every open set $U$ of $X$, the set $f(U)$ is open in $Y$. Show that $ \pi_1: X \times Y \to X$ is an open map.  I say:  Let there exist $\lambda \in X \times Y$ such that $\lambda$ is open and $f(\lambda) \in Y$. If $\lambda$ is open in $ X \times Y$ then it is an element of $ U \times V \in X \times Y$ such that $ U \in X$ and $V \in Y$ are open sets.  Now, if $\lambda$ is $\in U \times V$ then this map must be sending some $\lambda$ to  $V$ in $X$. I can't say why I made the last assumption, it just seemed intuitively right? How do I show it, though?  But I suspect that showing that the whole $X$ is an open set (i.e. if we were discussing topologies) would be much easier way to show that this is an open map but I can't for the life of me figure out how to do that.

Let $X$ and $Y$ be (any) topological spaces. Show that the projection  $\pi_1$ : $X\times Y\to X$   is an open map.


Hello for this program that is meant to return the number of coins needed to give the change it works fine until the value goes between 0 and 0.05. When I input 0.01, the program does not go into the while loop at all (I checked by making something print at the start of the while loop). Why does it not run?      #include <stdio.h>     #include <cs50.h>     #include <math.h>      int main(void)     {         float change;         do {             change = get_float("Change owed: ");         }         while (change < 0);         int no = 0;         while (change >= 0.01) {             if (change >=  0.25) {                 change = change - 0.25;                 no = no + 1;                 printf("a %f\n", change);             }             else if (change >= 0.1) {                 change = change - 0.1;                 no = no + 1;                printf("b %f\n", change);             }             else if (change >= 0.05) {                 change = change - 0.05;                 no = no + 1;                 printf("c %f\n", change);             }             else if (change >= 0.01) {                 change = change - 0.01;                 no = no + 1;                 printf("c %f\n", change);             }         };         printf("%i", no);     }


My app supports 5 languages. I have a string which has some double quotes in it. This string is translated into 5 languages in the localizable.strings files.  Example:   title_identifier = "Hi \"how\", are \"you\"";   I would like to bold out "how" and "you" in this string by finding the range of these words. So I am trying to fetch these quoted words out of the string and the result would be an array containing "how" and "you" or their range.  func matches(for regex: String, in text: String) -> [String] {   do {         let regex = try NSRegularExpression(pattern: regex)         let results = regex.matches(in: text,                                     range: NSRange(text.startIndex..., in: text))         return results.map {             String(text[Range($0.range, in: text)!])         }     } catch let error {         print("invalid regex: \(error.localizedDescription)")         return []     } }  matches(for: "(?<=\")[^\"]*(?=\")", in: str)   The result is: ["how", ", are ", "you"] rather than ["how","you"]. I think this regex needs some addition to allow it to search for next quote once two quotes are found, so to avoid the words in between quotes.

How do I get the substring " It's big \"problem  " using a regular expression?  s = ' function(){  return " It\'s big \"problem  ";  }';


I was trying to install Git on my Ubuntu 18.04 version with the command  sudo apt-get install git   But I was recieving the below shown error. How can I fix this one?   The following packages have unmet dependencies:    git : Depends: git-man (< 1:2.17.0-.) but 1:2.17.1-1ubuntu0.7 is to be installed

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


In my essay the sentence      The results can be clearly seen.   was corrected to:      The results can clearly be seen.   What is the rule behind this correction?   Most of the time I use "can be" together without any words in between. Is that wrong?

I can't distinguish the difference in meaning between these  two sentences.   It really doesn't matter.  It doesn't  really matter.    It seems that there is a nuanced difference, but I cannot see what this is.


I wrote text on an object, but it is visible on the backside of the object i.e. Image:

How can you have an image as a texture (in this case on cloth) that is only applied to one side of a plane?  I would like the reverse side to be a solid color.  Please see below image where the cloth has the image texture on both sides.


Suppose $|X|=2^{2^{\aleph_0}}$, $A \subset X$ and $|A|=2^{\aleph_0}$. Is it possible to prove that $|X \setminus A|=2^{2^{\aleph_0}}$ without using the axiom of choice and its consequences?

I'm currently reading a little deeper into the Axiom of Choice, and I'm pleasantly surprised to find it makes the arithmetic of infinite cardinals seem easy. With AC follows the Absorption Law of Cardinal Arithmetic, which states that for $\kappa$ and $\lambda$ cardinal numbers, the larger infinite and the smaller nonzero, then $\kappa+\lambda=\kappa\cdot\lambda=\max(\kappa,\lambda)$.  I was playing around with the equation $k+\aleph_0=\mathfrak{c}$ for some cardinal $k$. From the above, it follows that $\mathfrak{c}=k+\aleph_0=\max(k,\aleph_0)$, which implies $k=\mathfrak{c}$.  I'm curious, can we still show $k=\mathfrak{c}$ without the Axiom of Choice? Is it maybe possible to bound $\mathfrak{c}-\aleph_0$ above and below by $\mathfrak{c}$? But then I'm not quite sure such algebraic manipulations even mean anything, or work like that here. Certainly normal arithmetic does not! Thanks.


Let $X \sim \mathcal{N}(\mu,\sigma^2)$. I think it's true that  $$\mathbb E \Phi(X) = \Phi \left(\frac{\mu}{\sqrt{1+\sigma^2}}\right)$$ where $\Phi$ is the cdf of standard normal.  This holds up under simulation: if you run the R code  set.seed(1) mu <- rnorm(1) sigma <- abs(rnorm(1)) number_of_simulations <- 1e5 simulated_result <- mean(pnorm(rnorm(number_of_simulations,mu,sigma))) analytical_result <- pnorm(mu*sqrt(1/(1+sigma^2))) abs(simulated_result - analytical_result)   you should get a number close to 0.  Let $f$ be the pdf of $X$. We have  $$\mathbb E \Phi(X) = \int_{-\infty}^{\infty}\Phi(x)f(x)\,dx$$  which doesn't look trivial to solve. Is there a proof or a well known result that can prove this? Or is there a good intuitive explanation of it?  The question originally arose from the Merton framework for credit risk. Define $$Q = \frac{B - \sqrt{\rho}Z}{\sqrt{1-\rho}}$$ where $Z\sim \mathcal{N}(0,1)$ then we get $\mathbb E\Phi (Q) = \Phi(B)$ which is equivalent to the formula in this question.

Suppose $\phi(\cdot)$ and $\Phi(\cdot)$ are density function and distribution function of the standard normal distribution.  How can one calculate the integral:  $$\int^{\infty}_{-\infty}\Phi\left(\frac{w-a}{b}\right)\phi(w)\,\mathrm dw$$


For instance, say a book is titled "Genesis and Its Interpretations". Is it correct to capitalize "its" in the title?

Are there any concrete rules that say which words (parts of speech) in a title should start with a capital letter? What would be a correct capitalization for the title of this question?


i am making a password and email page and need to validate the email with a reg-ex. my problem is the reg-ex i use will only validate to after the @ sign after that point all emails are valid,i need a full proof reg-ex that validates and makes sure its either ".com" or the English alternative (spell check wont accept) at the end can anyone help?  My code for anyone needing it:           <form ... onsubmit="return checkForm(this);">
email: <input type="email" name="email">

Password: <input type="password" name="pwd1">

Confirm Password: <input type="password" name="pwd2">

<input type="submit">
    </form>

Is there a regular expression to validate an email address in JavaScript?


This is a question taken from some notes, and I do not know how to solve it, nor I know how to start. Can anyone help me?  Prove that $|E| \geq \lfloor \frac{|V|}{2} \rfloor ^2 $ implies the graph $G$ has at least one triangle.

I found the following proof for Mantel's theorem in Lecture 1 of . I cannot understand the equality that I have highlighted in the image was arrived at. I would appreciate some assistance.     Theorem 1 (Mantel's theorem) *If a graph $G$ on $n$ vertices contains no triangle then it contains at most $\frac {n^2}{4}$ edges.       First proof Suppose that $G$ has $m$ edges. Let $x$ and $y$ be two vertices in $G$ which are joined by an edge. If $d(v)$ is the degree of a vertex $v$, we see that $d(x)+d(y)\leq n$. This is because every vertex in the graph $G$ is connected to at most one of $x$ and $y$. Note now that    $$\bbox[5px,border:2px solid red]{    \sum_x d^2(x)=\sum_{x,y\in E} \big( d(x)+d(y)\big)    }    \leq mn.$$   On the other hand, since $\sum_x d(x)=2m$, the Cauchy-Schwarz inequality implies that    $$\sum_x d^2(x)\geq\frac{\big(\sum_x d(x)\big)^2}{n} \geq \frac{4m^2}{n}.$$   Therfore   $$\frac{4m^2}{n} \leq mn,$$   and the result follows. $\tag*{$\square$}$   For people with visulal limitations, the highlighted part is: $$\sum_x d^2(x)=\sum_{x,y\in E} \big( d(x)+d(y)\big) \leq mn.$$


I want to be able to change the main page title based on some value that I get in a views preprocess function.  The View is displayed as a page.  function MYTHEME_preprocess_views_view(&$variables) {    // Can I set the page title from here? }   The title I am trying to override is the title printed by the /templates/content/page-title.html.twig below:  {# /**  * @file  * Theme override for page titles.  *  * Available variables:  * - title_attributes: HTML attributes for the page title element.  * - title_prefix: Additional output populated by modules, intended to be  *   displayed in front of the main title tag that appears in the template.  * - title: The page title, for use in the actual content.  * - title_suffix: Additional output populated by modules, intended to be  *   displayed after the main title tag that appears in the template.  */ #} {{ title_prefix }} {% if title %}   <h1{{ title_attributes }}>{{ title }}</h1> {% endif %} {{ title_suffix }}

I'm using Drupal 8.0.5, and need to force a title on a View.  I've tried various Views hooks, but will focus on ().  There's a ViewExecutable $view taken as an argument, which is not passed by reference.  I've tried:  function mymodule_views_pre_render(ViewExecutable $view) {   $view->setTitle('foo');   // $view->save(); // I've also tried this }   I've gone through step-debugging to ensure it's getting called, but it seems the  method does not affect the output that renders. I've also set my theme back to Seven to ensure there's not a theme issue involved.  I'm also happy to embed the View using a custom block, but I am running into the same issue there.  How does one modify a  object properly?


What is the optimal value of the -j flag for make ?  I know that all my source is free of errors.  Is it the number of cores?  Or the number of logical processors?

I want to compile as fast as possible.  Go figure.  And would like to automate the choice of the number following the -j option.  How can I programmatically choose that value, e.g. in a shell script?  Is the output of nproc equivalent to the number of threads I have available to compile with?  make -j1 make -j16


When I opened my feed, and clicked on some question with comment that I've made - it displayed "Loading the question failed". I've clicked retry a couple of times, but it didn't help.  Also I've tried to to close application from settings, and try again, but it still reproduces.  Here is that question - .  Seems it's already deleted, but it still shows in Android App Feed.  I suppose as the question is deleted by the author, it shouldn't be displayed in my Feed.  And also when I click to reply icon for it. once it crashed app. I've send a report in Android.  App Version: 1.0.1  Android Version: 4.4.2

Just noticed this:  Someone @replied to me in a question which appropriately showed up in my feed.  I go to click on that notice in the feed, and it presents me with "Loading the question failed."  I'd show a picture, but I don't think that it's entirely relevant - I believe it's reproducible if an answer is posted, someone makes a reply, the answer is removed, then that someone else goes back in the feed to try and revisit the post.  Alternatively, why not synchronize the interface between what a 10K user sees on the site, and what they see in the app?  As a 10K user, I would expect to see deleted questions and answers.


I want to split an image.jpg into parts and merge it again.  I used the following commands:   split -b 1440 image.jpg # It divides it into 6 parts. cat xaa.jpg xab.jpg xac.jpg xad.jpg xae.jpg xaf.jpg > new-image.jpg    Now I want a script that does the same work of the previous commands.

In Windows I can write a file containing commands for cmd (usually .cmd or .bat files).  When I click on those files it will open cmd.exe and run them commands the file contains.  How would I do this in Ubuntu?         I'm sure this is a duplicate, but I can't find my answer. Its similar to these questions, but they don't answer the question:


I want to do something with dialog in my code and I have a problem with this thing. My problem occurs at here:   btnDialogCancel.setOnClickListener(new View.OnClickListener()    Can anyone please help me ? thx a lot  Here is my MainActivity class:  public class MainActivity extends AppCompatActivity {  private ProgressBar prgChronemeter; private TextView txtShowSecond; private Handler handler = new Handler();  private Button btnSelectMin; private Button btnDialogSelect; private Button btnDialogCancel; private  EditText etMinute; private  Dialog dialog;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);        prgChronometer = (ProgressBar) findViewById(R.id.prgChronometer);     txtShowSecond = (TextView) findViewById(R.id.txtShowSecond);      btnSelectMin = (Button) findViewById(R.id.btnSelectMin);      btnSelectMin.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             customDialogCalistir();         }     }); }  private void customDialogCalistir(){     dialog = new Dialog(this);     dialog.setContentView(R.layout.dialog);     btnDialogCancel = (Button) findViewById(R.id.btnDialogCancel);     btnDialogSelect =(Button) findViewById(R.id.btnDialogSelect);     etMinute = (EditText) findViewById(R.id.etMinute);      btnDialogCancel.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             dialog.dismiss();         }     });     btnDialogSelect.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {              dialog.dismiss();         }     });     dialog.show(); } }   Here is my dialog.xml file  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent" >      <Button         android:id="@+id/btnDialogSelect"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginRight="16dp"         android:text="Seç"         android:layout_marginStart="42dp"         android:layout_marginTop="155dp"         android:layout_alignParentTop="true"         android:layout_alignParentStart="true" />      <EditText         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:inputType="textPersonName"         android:ems="10"         android:layout_centerHorizontal="true"         android:id="@+id/etMinute"         android:layout_marginTop="50dp"          />      <Button         android:id="@+id/btnDialogCancel"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginLeft="20dp"          android:layout_marginEnd="12dp"          />  </RelativeLayout>

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


I noticed when posting a question, a new user can't post images or more than 2 links in a question. While this is sensible as bad things could happen, this doesn't prevent somethingbad dot com slash bad stuff from happening.  The issue is that censorship feels limiting, especially to users who have registered but haven't participated actively yet. What if the question is a graphics question dealing with layers? I feel that the rep-system is quite limiting for lurkers who view a lot of content but don't necessarily contribute much themselves. I can understand limiting anons, as this would be too much to monitor, but I feel like registered users should be more trusted, especially if they have accounts on other stack exchanges.  The question: Should we trust users who have rep on other SE sites with more posting abilities?

I cannot submit my answer to    I am aware that my reputation is low. Also, spam posting is discouraged.  My answer includes a compilation of Android graphing libraries, with links, so fellow hackers do not have to Google each and every one of them.  I believe this answer is superior to the current answers, because it is updated to 03/2012 and covers more than 90% of all Android charting libraries.  How can I post the answer, or how can I increase my reputation without being able to post quality answers? The old school websites included just a bunch of links to other places, I am an old man!  Alternative solution would be to blog it, and just post a link to my blog, which is not optimal.


Suppose, $y_i|u_i\sim MN(X_i(t_i), \sigma_e^2I_{m_i})$ and $U\sim MN(0,I_p)$. Now how to find the marginal distribution of $f(y_i)=\int f(y_i|u_i)f(u_i)du_i$? Since one is multivariate normal and other is univariate normal, can we actually find the product before the integration? Or it will be a no-closed form expression? Even if it's the case, how do we come up with the no-closed form expression? $X_i(t)=\dfrac{exp[Z_i(t)]}{\int_a^dexp[Z_i(s)]ds}$ and $Z(t)= b(t)^Tc+b(t)^TAU $ So $X_i(t)$ is determined by $u_i$ via $Z_i$ Here $X_i(t)$s are functions at grid points $[t_{i1},...,t_{im_i}]$

Suppose, $y_i|u_i\sim MN(X_i(t_i), \sigma_e^2I_{m_i})$ and $u_i\sim N(0,1)$. Now how to find the marginal distribution of $f(y_i)=\int f(y_i|u_i)f(u_i)du_i$? Since one is multivariate normal and other is univariate normal, can we actually find the product before the integration? Or it will be a no-closed form expression? Even if it's the case, how do we come up with the no-closed form expression? Here $X_i(t)=\dfrac{exp[Z_i(t)]}{\int_a^dexp[Z_i(s)]ds}$ and $Z(t)= b(t)^Tc+b(t)^TAU $ So $X_i(t)$ is determined by $u_i$ via $Z_i$


I'm trying to come up with a way to effectively easily clean all POST and GET variables with a single function. Here's the function itself:  //clean the user's input function cleanInput($value, $link = '') {     //if the variable is an array, recurse into it     if(is_array($value))     {         //for each element in the array...         foreach($value as $key => $val)         {             //...clean the content of each variable in the array             $value[$key] = cleanInput($val);         }          //return clean array         return $value;     }     else     {         return mysql_real_escape_string(strip_tags(trim($value)), $link);     } }   And here's the code that would call it:  //This stops SQL Injection in POST vars foreach ($_POST as $key => $value) {     $_POST[$key] = cleanInput($value, $link); }  //This stops SQL Injection in GET vars foreach ($_GET as $key => $value) {     $_GET[$key] = cleanInput($value, $link); }   To me this seems like it should work. But for some reason it won't return arrays from some checkboxes I have in a form. They keep coming out blank.  I've tested my code without the above function and it works fine, I just want that added bit of security in there.  Thanks!

Earlier today a question was asked regarding .  The top answer, at time of writing, suggests in PHP just using htmlspecialchars and mysql_real_escape_string.   My question is: Is this always enough? Is there more we should know? Where do these functions break down?


I have a jquery function that swaps a bootsrap dropdown to a dropup, if the distance from the element to the bottom of the window is smaller than the height of the dropdown menu. It works fine, until the DOM gets updated and something gets added to the bottom of the window (let's say a new section or some menu gets expanded). The new distance from the element doesn't get accounted. I tried delegation with the .on method to check if the DOM gets updated but that did not fix the issue.  $('.dropdown').on('click', function(){   var elemDistanceToBottom = $(window).height() - $(this).offset().top;   if($('.dropdown-menu').height()>elemDistanceToBottom ){      $(this).closest(".dropdown-fix").addClass("dropup");   } });

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


I have the following string  a = "animal: [cat.], animal:[dog.]" print(a)  >>> animal: [cat.], animal:[dog.]   I would like to replace each part of the string between [ and .] (included) with a given value (e.g. frog).   The expected output is:  animal: frog, animal: frog   I tried the following so far:  import re  b = re.sub(r'(\[\b).*(\b\.])','frog', a) print(b)  >>> animal: frog   That it slightly different from the expected output.   I think this is due to the fact the code see the first [ and the last .] as delimiters, consequently replacing with frog all the string between.   Instead, I would like the code to consider two pairs of delimiters: those containing the word cat and those containing the word dog.   Do you have any suggestions?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I have pressed CTRL + R to create a loop cut which is interrupted at the left side of the front wall. I am not sure why my loop cut stops instead of going all the way round.    I have uploaded a ~.blend file here:   Thank you!

Alright so I've seen some postings about loop cuts and done some research. I am very new to blender and modeling overall. I am trying to loop cut this concrete barrier. Now I'm following a tutorial and kind of did my own thing in some areas. I cleaned it up following some instructions in another answer here on stack exchange.  I can't for the life of me figure out why I can loop cut around the whole bottom:   ...but not the whole middle:   I see this marked as answered by another question. That question refers to ngons and inside faces. Now once again I'm totally new to this. I looked on the inside. I don't believe I have inside faces or any ngons by the terms I've read online in my research.  Here is a wireframe picture and the inside view:     Maybe I'm missing something the answers on other posts are saying. If so and you know what it is I'd be very appreciative of what it is.


I restored my iPhone from back up as I accidentally deleted some messages that I needed. But, I have lost all my photos as they were not selected to be included in back up and iPhone photo library wasn’t enabled. Is there any way I can get them back? I haven’t synced to iTunes for a long while.

I used to have an iPhone 4s and all the data from there is synced in my iTunes in my Mac. I just got an iPhone 5s yesterday and decided then to plug it to my iTunes. There was a welcome message and 2 options: whether to set up as new iPhone or set up as old iPhone (4s contents).  So to be able to make everything fast, I chose the latter, but then all the new photos in my iPhone 5s were deleted and were replaced with all the contents from my 4s. Is there any way I could retrieve it?


public Account findByInterest(String interest){     for(Map.Entry<Long, Account> e : accounts.entrySet()){         for(int i = 0; i < e.getValue().getInterests().size(); i++)         {             if(e.getValue().getInterests().get(i) == interest){                 return e.getValue();             }         }      }     return null; }   I'm trying to search in a HashTable of Objects to find an objected with a List of Strings, which has the same string as this method receives... What am I doing wrong?

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


I recently saw the lighter variant where the variables $a,b,c,d$ were limited to real numbers in a Competitive math book. The solution involves case work bash based on the sign of the variables and using the symmetry of the equation. However I was interested if the problem can be generalized to the complex plane, using the Euclidean definition of distance and some interesting property associated with it like the Triangle Inequality . I believe such a solution would be more novel and synthetic. I think visualizing a quadrilateral in the complex with adjacent sides $a, b ,c $ and $-(a+b+c) $ might lead to a solution I ran a program and took random values and failed to find a counterexample. while(t--)     {         srand(t);         a1= rand();         a2= rand();         b1= rand();         b2= rand();         c1= rand();         c2= rand();         if(mod(a1,a2) + mod(b1,b2) + mod(c1,c2) - mod(a1+b1,a2+b2) - mod(a1+c1,a2+c2) -mod(b1+c1,b2+c2) + mod(a1+b1+c1,a2+b2+c2)  <0  )           wrong ++;     }

How to prove for any complex numbers $a$, $b$, $c$, the inequality $$|a|+|b|+|c|+|a+b+c| \geq  |a+b|+|b+c|+|c+a|$$ is correct?


I have a div in body:

   The  has its intrinsic width and height (and unknown). So how do I do to center the
 in srceen (by CSS, not Jquery or Javascript)?

How can I horizontally center a
 within another
 using CSS?

Foo foo


I want to create an array like this: public class Population<T> {     T[] a = new T[10]; }  However, the complier throws me this error: Type parameter 'T' cannot be instantiated directly  Why does this happen, and what can I do to overcome this issue?

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I know that the implementation of the interface Serializable makes an object to be serialized, but how is possible that when the interface is simply a definition of a class with their methods like:  interface Serializable {    public one();    public two(); }  public class Dog implements Serializable { private static final long serialVersionUID = 1L;   ... }   (class Dog doesn't implement any method of Serializable)  Simply I don't understand, can you explain me?

What is meant by "object serialization"? Can you please explain it with some examples?


I read a story in the 70s about a child that was predicted to be a musical genius and left alone with musical instruments and absolutely no outside musical influences. He eventually was exposed in some way to outside music and forbidden to play again.

I read a short story a long time ago and I can neither remember the title nor the author.  The main character is a musician.  He is sequestered and allowed to play all day on some kind of a fantastic instrument; however, he has been barred from listening to any music for fear that it will stifle with his innate creativity.  Someone secretes him some Bach, he listens to it, and is then caught and cast out.  He gets a series of jobs and is inevitably punished for breaking some music-related taboo.  Any ideas?


I recently joined a company as a trainee and we have to skype our priorities or task that we are going to do on that day.  For example, people write priorities like this:  1. HTML/CSS training - [0.5 hours].  2. PHP training - [9 hours].  Now I do know about quasi possessive but this doesn't sound like a quasi possessive. I want to know whether it should be 9 hour or 9 hours? Maybe it might be 9 hours because it's more than 1 but writing 0.5 hours seems a bit confusing. Please let me know what's the correct usage. Thank you.

I have seen people say both 0.25 mile and 0.25 miles. Should we use plural or singular for a fraction of a mile?


First scenario: Sometimes, there are off-topic questions with a bounty, which belong to another site. On the other site, the question already exists and have some answers. The person who wrote the best answer also has an account on the second site. Second scenario: With Area 51, some sites overlap, and the same question can be asked by two different users on both sites. One has answers and the others don't. The person who wrote the best answer doesn't have an account on the second site. My question: In both cases, is it OK to make a partial copy of the best answer without telling the person nor the asker that the answer contain an exact part of another?

I flagged  earlier with a custom reason explaining that the code had simply been copied from an answer to a similar question on another SE website. The author of the newer answer has provided a link to the original answer (probably important to know).  The flag was declined (no evidence etc.) so I just wanted to get the official policy on this.  I'm now under the impression that copying answers from one SE site to another is absolutely fine, as long as a reference is provided to the original answer.  Could someone confirm if this thinking is true or false? Or is it just a judgement call?


I installed ubuntu without a password, However, I am asked for a password for upgrading, and restarting ubuntu. Is there a way to get around this? I have tried the various ways to discover what the password is - including using my old password and other forum tips - no luck.

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


In the edit mode everithing fine , but when i go to edit mode, smth crazy is going on  holes everywhere and i dont know how to fix this

I was practicing with modeling a leaf using a image reference. Everything went fine and I finished modeling my leaf, but I wanted to make it more realistic (I'll add textures later), I saw lots of people using the Subdivision Surface modifier but it doesn't work for me.  My model:   My model when I add the Subdivision Surface modifier


There are many ways to close apps: mouse-and-click on an 'x' somewhere, choose "Quit" as a menu option, keyboard shortcuts (ctrl-w, cmd-q, alt-f4 etc.)  I notice some apps I use ask me "Are you sure you want to exit?" when I try to close them.  What are the UX guidelines as to when there should be an "Are you sure you want to exit?" confirmation dialogue?

Every now and then, I come across applications that, when clicking on the main window's "X", ask me whether I'm sure that I want to quit the application.    I'm not talking about asking me to save unsaved documents, but about applications that aren't document related at all.  This always bothers me, since I feel totally interrupted in my workflow. I was already thinking two steps ahead of what I want to do next, and this message box abruptly pulls 100% of my attention.  My question:  Are there any valid use cases where a non-document-centric application should ask me whether I'm sure that I want to exit the application?


This is just for fun(ctors).  I was wondering if limits in category theory are a generalization of limits (of nets) in topology. I found  a complete and satisfactory answer for limits of filters, and I know that there is a correspondence between filters and nets that preserves its limits.  However, I have friends who dislike filters (sad, but true), and in order to prove this equivalence to them I wish to know if there is a direct way to prove this without explicitly using filters. More precisely, if $\mathscr{I}$ is a directed set and $f:\mathscr{I}\rightarrow X$ is a net, there is some functor $F:\mathscr{I}\rightarrow\mathscr{C}$ (for any nice category $\mathscr{C}$) such that $f$ converges to $x$ iff "something" related to $x$ in $\mathscr{C}$ is the limit of $F$?  Thank you!

Is there any connection between category-theoretic term 'limit' (=universal cone) over diagram, and topological term 'limit point' of a sequence, function, net...?  To be more precise, is there a category-theoretic setting of some non-trivial topological space such that these different concepts of term 'limit' somehow relate?  This question came to me after I saw (  ) a surprising fact that generalised metric spaces can be seen as categories enriched over preorder $([0,\infty],\leq)$.


I'm facing a strange problem about a staging database used by my ETL (to update rows).  Only rows to update are stored in the database, then a script is executed to update the destination database. At the end of the process, It truncates the staging database. It removes all data, however the allocated size for my database grows every execution time of my SSIS package. So, is there a way to reduce the allocated size and to limit the maximum allocated size ? In SQL Server Management Studio, there is a wizard to reduce data size and database size.  Is there the same command in T-SQL ?  Thanks !

I have a Database nearly 1.9Gb Database in size, and MSDE2000 does not allow DBs that exceed 2.0Gb  I need to shrink this DB (and many others like this at various client locations).  I have found and deleted many 100's of 1000's of records which are considered unneeded: these records account for a large percentage of some of the main (largest) tables in the Database. Therefore it's reasonable to assume much space should now be retrievable.  So now I need to shrink the DB to account for the missing records.   I execute DBCC ShrinkDatabase('MyDB')...... No effect. I have tried the various shrink facilities provided in MSSMS.... Still no effect. I have backed up the database and restored it... Still no effect.   Still 1.9Gb  Why?  Whatever procedure I eventually find needs to be replayable on a client machine with access to nothing other than OSql or similar.


I have these three lines:    export bunion_uds_file="$bunion_socks/$(uuidgen).sock";   "$cmd" "$@" | bunion   rm -f "$bunion_uds_file"   I need to make sure the last line always executes..I could do this:    export bunion_uds_file="$bunion_socks/$(uuidgen).sock";   (     set +e     "$cmd" "$@" | bunion     rm -f "$bunion_uds_file"   )   or maybe like this:    export bunion_uds_file="$bunion_socks/$(uuidgen).sock";   "$cmd" "$@" | bunion && rm -f "$bunion_uds_file" || rm -f "$bunion_uds_file"   I assume creating the subshell and using set +e is slightly less performant etc.

I need to know whether a command has succeeded or failed, and unconditionally run some cleanup afterward.    Neither of the normal options for executing sequential commands seem to be applicable here:  $ mycmd.sh && rm -rf temp_files/    # correct exit status, cleanup fails if mycmd fails $ mycmd.sh ;  rm -rf temp_files/  # incorrect exit status, always cleans up $ mycmd.sh || rm -rf temp_files/    # correct exit status, cleanup fails if mycmd succeeds   If I was going to do it in a shell script, I'd do something like this:  #!/usr/bin/env bash mycmd.sh RET=$? rm -rf temp_files exit $RET   Is there a more idiomatic way to accomplish that on the command line than semicolon-chaining all those commands together?


So I recently dual booted Ubuntu 14.04 onto a Windows 10. I handled the partitioning correctly. I checked that it is there after a reboot and I have a installed it with  secure boot off, hibernation off,  system protection off,  and a power setting off.  Yet my computer goes straight to Windows 10 with no Grub prompt to choose Linux. I have press/held the shift, f1, f2, f10, f11, f12 key and only the f12 key has brought up a menu, however the menu only appears when the install USB is in and my only choices are to boot Windows or INSTALL Ubuntu.   How can I fix this so a grub menu appears on boot?  I have seen in other posts a mysterious etc/grub folder, can i edit this from Windows? If so, where is this folder?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


What's the difference between a random variable and a statistic?  It seems that formally, a random variable is simply any real-valued function (and its domain is a set that we call a "sample space").  But isn't the exact same also true of a statistic? That is, isn't a statistic also simply any real-valued function (whose domain is a set called a "sample space")?    Example. We roll a die. The sample space is $\Omega=\{1,2,3,4,5,6\}$.  Let $T$ be double the value of the die roll: Formally, $T:\Omega\rightarrow \mathbb R$ is the function defined by $T(x)=2x$.  Is $T$ a random variable, a statistic, or both?    In your answer, please give:   A precise definition of a random variable A precise definition of a statistic An answer to the question in my example: "Is $T$ a random variable, a statistic, or both?"

I keep seeing conflicting definitions of a statistic. Is a statistic a random variable such that it is a function of the random variables of a random sample? Or is it the value of the function of the random sample, after each random variable of the random sample has taken on a specific value?   $$(1) \ S=f(X_1,X_2...X_n)$$  $$(2) \ s=f(x_1,x_2...x_n)$$  I haven't been able to get any clarification for this and I've seen the term statistic describe both situations


How can I use the Tags in Profile Description. I saw few StackOverflow friends using the TAGS in there Description page. Can some one tell me how can it be done? It will be nice for me to just simple click on the tags and check for new questions and answers!!

I am wondering because I was editing my profile and I though it would be nice to put the languages I know and stuff like tags.  Is it possible to post a tag? If it's not, do you think it's possible to implement on the profile?  For example:  [c#]   Would generate    With tag formatting and link...


The title says it all really... This is one of those value statement things. 'Show we care' is the proposal. It just sounds like lazy English to my ear, I want to say 'Show that we care'  Ignoring the trite nature of the statement, should I care?

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


E.malformed line 56 in source list/etc/apt/sources.list (dist parse)  E. The list o sources could not be read     My version is 12.04lts

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I'd like to extract the extension out of a filename with multiple dots. For instance:  gbamidi-v1.0.tar.gz   I should get "tar.gz", not "gz" or "0.tar.gz".  I prefer a solution not relying on bash exclusive features (using posix commands like sed or cut is ok).  EDIT: A reasonable solution could be: "get everything after the second-last dot, but exclude numbers or substrings with a lenght <=1"

How do I get the file extension from bash? Here's what I tried:  filename=`basename $filepath` fileext=${filename##*.}   By doing that I can get extension of bz2 from the path /dir/subdir/file.bz2, but I have a problem with the path /dir/subdir/file-1.0.tar.bz2.  I would prefer a solution using only bash without external programs if it is possible.  To make my question clear, I was creating a bash script to extract any given archive just by a single command of extract path_to_file. How to extract the file is determined by the script by seeing its compression or archiving type, that could be .tar.gz, .gz, .bz2 etc. I think this should involve string manipulation, for example if I get the extension .gz then I should check whether it has the string .tar before .gz — if so, the extension should be .tar.gz.


I know this problem can be solved by restarting with Windows 8 in an normal mode, but I don't have Windows 8 any more. I'm trying to rescue the files that I had on a laptop on which the motherboard burned out, and I can't install Windows 8 in this one: I have only Ubuntu on this machine.  I'm trying to mount it from terminal using  sudo mount -o ro /dev/sdc4 at /media/bug/   This gives me the error message  Error mounting /dev/sdb4 at /media/bug/52B0E048B0E0345F: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdb4" "/media/bug/52B0E048B0E0345F"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sdb4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   How can I recover my files using Ubuntu? It says that I can mount the volume as ro, but I don't know how to do that, and I don't know it that would allow me to copy my files.

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I want to understand why objects in the Recycle Bin don't need to be renamed when two or more objects have same name. In other places, two objects cannot have the same name: we are forced to rename them.

What does the Recycle Bin in Windows actually do?  Is it just a glorified folder and a holding place for soon to be deleted files, or does it do something specific?  Specifically, are files that are "moved" to the Recycle Bin actually moved on the hard disc, or are just the pointers to the files moved?  I am a fairly experienced user, I just wanted a more depth explanation of the Recycle Bin.


I can't seem to find an answer to this. For a given configuration, say for a Hydrogen atom: the proton has properties which give it a positive charge. This is a known truth.  Now lets take Hydrogen's antiparticle (anti-Hydrogen) and compare the structure - All the information I've found so far only points to a difference in charge without explaining the structure that governs the charge of the proton or anti-proton.  I'm trying to understand what structural differences define a particle as being either matter or antimatter.  Can anyone help with this?

The identification of an electron as a particle and the positron as an antiparticle is a matter of convention. We see lots of electrons around us so they become the normal particle and the rare and unusual positrons become the .  My question is, when you have made the choice of the electron and positron as particle and anti-particle does this automatically identify every other particle (every other fermion?) as normal or anti?  For example the proton is a particle, or rather the quarks inside are. By considering the interactions of an electron with a quark inside a proton can we find something, e.g. a conserved quantity, that naturally identifies that quark as a particle rather than an antiparticle? Or do we also just have to extend our convention so say that a proton is a particle rather than an antiparticle? To complete the family I guess the same question would apply to the neutrinos.