Here's my code :    string zoekstring = Request.QueryString["txt"].Replace("'", "''");     List<IntranetDocument> result = documenten.FindAll(x => x.Titel.Contains(zoekstring));      if(result.Any())     {         foreach (IntranetDocument doc in result)         {             ListItem li = new ListItem();             li.Text = doc.Titel;             li.Value = doc.Locatie;             ListFiles.Items.Add(li);         }     }     else     {         ListItem li = new ListItem();         li.Text = Res.Get("Algemeen_NotFound");         li.Value = "#";         ListFiles.Items.Add(li);     }     This will do a FindAll on all my documents (that I've previously loaded in via an SQL query) and checks on the document Titel. So if I search for "report" it will give me back all documents where Titel contains "report" for example for quarterly finance reports.    Now I'd also want documents returned where Titel contains "Report" with an uppercase R. Or even "rePort" or "ReporT" or "REPORT"... you get the idea. i want the FindAll ... Titel.Contains(zoekstring) to not only return the document where titel contains LITERALLY "zoekstring" but also a potential uppercase/lowercase...    How can I achieve this?

Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such.


Snape was literally Voldemort's right-hand man. He ends as somewhat of a hero in the series. Despite having a desire to respect him, I always remember he must be quite the killer to supplant Bellatrix, Malfoy, and other Death Eaters. Did Snape kill a lot of people?

It's well known that Severus Snape was, in one way or another, a Death Eater since he was at Hogwarts. He hung out with the likes of Avery and Mulciber who became well known Death Eaters, he joined Voldemort right after he left Hogwarts, and he basically became Voldemort's right hand man until the very end.   However, in his time as a Death Eater did he ever kill anyone? We know that he was a Death Eater for around 3 years before Voldemort fell; Lily and James died at 21 and they were the same age as Snape, so it would have been 3 years since they left Hogwarts. Then after Voldemort came back in book 4, Snape would have been a Death Eater again for around 3 years. That's a total of around 6 years of Death Eaterhood with Voldemort.  So, in either of these periods, did Snape commit murder as part of his job as Death Eater? I'm not counting a certain death at the end of book 6 for reasons which are obvious if you've read book 7.   Clearly it's much more likely he killed before Voldemort fell since that roughly correlated with the period when he pledged allegiance only to Voldemort, before he became a teacher at Hogwarts. But did he ever do it?


How could be proved that a function that sends compacts into compacts and connected into connected implies f continuous ?  I’d appreciate even just the idea behind that (if the proof is too long)  Thanks

Greets   I came up the other day with the following question: Is it true that $f:\mathbb{R}^n\longrightarrow{\mathbb{R}^m}$ is continuous if and only if $f$ maps compact sets onto compact sets and maps connected sets onto connected sets?  I'm having trouble showing the "if", and I haven't found a counterexample to this part, so I would appreciate ideas to prove or disprove this.  Thanks


I perform some Calculations with floats, and sometimes I divide a number by zero or even zero by zero. As a result, some values of my output array contain -1.#IND0000 values. After that I need to determine whether the value is "normal" or "NaN". How can I do it with if statement?

Is there an isnan() function?  PS.: I'm in  (if that makes a difference).  I had this solved by using isnan() from <math.h>, which doesn't exist in <cmath>, which I was #includeing at first.


in trending says  The highlights of his waning administration include encounters with Rudy Giuliani, a healthcare disaster and a dildo collector.   says  People keep telling me this sentence is a perfect example of the need for the Oxford comma, but I am here to tell you that @BCDreyer knew EXACTLY what he was doing when he wrote this sentence, and I am fully here for it, one hundred percent.  What do missing an Oxford comma and having it mean respectively in the first tweet? (I am having trouble to understand why it is being discussed.)

According to the Wikipedia page for the , "Use of the comma is consistent with conventional practice" and "Use of the comma is inconsistent with conventional practice." Did the Oxford Comma come before its omission, or was the Oxford Comma traditionally omitted?  It makes logical sense that every item in a list would be separated in the same way: by a comma. If the Oxford Comma is conventionally correct, when and why did people begin to omit it?


I have an old computer which has 512MB RAM and 128MB Graphic card. It has windows 95 currently, it loads fine but it has some issues with Internet connection and pendrive. I am tired of solving problems.   I booted live CD of Ubuntu 10.10. It loads slow and some display problems. But it resolved my internet problem and pendrive. So I want install Ubuntu which is equivalent to windows 95 in boot, application load, graphics level. Can anyone suggest Ubuntu version? What about Xubuntu?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I was looking at  which explains why finite fields are not algebraically closed. But the comment of Joshua Tilley made me doubt. If $K=\{\alpha_1,\ldots,\alpha_n\}$ is a finite field then the polynomial $p(x)=(x-\alpha_1)\ldots (x-\alpha_n)+1$ is just constant no? But the definition of algebraically closed is that every non-constant polynomial has a root. So how does this prove anything? I know there is something I don't get since it is not the first time I see this proof.

Despite the fact that $\forall n, n^3 + 2n \equiv 0 \pmod 3$, I understand that $n^3 + 2n$ (considered as a polynomial with coefficients in $\mathbb Z/3\mathbb Z$) is not equal to the zero polynomial.  What is the value of defining polynomials in this (strange) way? What situations does it make things simpler?  I ask this because it seemed natural to me to define polynomials as a subset of functions, so I was surprised by this.


I am trying to show that there exists a topology in which $ s(X) \le d(X) $. I am working with the co-countable topology with an infinite topological space X. I understand the $d(X)$ is uncountable and the $ s(X) $ is countable.  For the density, I understand that I have to show that no countable set is dense.  For the spread, I know a little less. I know that I have to take an uncountable subset of X and show the spread is countable in the co-countable topology.  I understand these concepts however I am having trouble writing them on paper.   Any hints and direction would be appreciated!

Is the density of X always less than or equal to the spread of X? If not, can someone help me find a counter example?  $s(X) = sup ( \vert A \vert : A \textrm { is a discrete subset of } X ) $  $d(X) = \min ({ \vert D\vert : \overline{D} = X})$


The given question is:     27 people are in a room each with an identical deck of poker cards.   Each one draws a card from their deck.      Let X be the number of the types of card drawn. For example, if   everyone draws the same card, X=1, but if everyone draws a different   card, X=27. What is the expected value of X?   I have calculated the odds that at least one card of type E to be drawn is: $$1-(51/52)^27 = 0.408023$$  There is also a hint given which I cannot make any sense of:     Don't focus on whether or not each person has a unique card; that   actually doesn't help you with the answer (if there are four people   that share a card with someone else, does that mean all four are the   same, or that they have 2 pairs?). Instead, focus on the likelihood of   each type of card being chosen at least once.   Using the expected value formula:  $$ E(X) = \sum_{i=1}^{n} p_i * O_i$$  Where $O_i$ is the outcome of the $i^{th}$ event occurring and $p_i$ is the probability of that event occurring. In this case we know the expected value for the event everyone draws the same card would be: $$E(X=1)= (\frac1{52})^{27} * 1$$  I can also calculate the event that no one has the same card: $$E(X=27)= (\frac1{52})^{27} * 27$$  Where am I wrong and is there a better way approach this problem?

A large number of variants of this question were already asked here, including these - , , which are close, but none seem to answer my question. Assume that $n$ balls are thrown randomly and independently into $k$ bins.  What is the probability of finding $x$ empty bins? What is the expectation of the number of empty bins?


How to map on to a particular row element say " NCC "where the number of the row containing that element changes whenever page get's loaded.    for(int i=0;i<19;i++)         {            System.out.println(driver.findElement(By.xpath("///* [@id="leftcontainer"]/table/tbody/tr["+i+"]/td[1]/a")).getText());         }   unable to loop through the XPath.

How to Handle Dynamic Changing IDs In XPath? for example :   //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1]   In this xpath id "3647323225296998740" is changing every time when reloading the page.   Is there any way to handle this type of situation in Selenium?


Let $K$ be a field. Then $K[x,y]$ is not a PID because $x$ is irreducible but the quotient $K[x,y]/(x)$ is isomorphic to $K[y]$, which is not a field.  So there must be an ideal in there which is not principal. What is an example of such an ideal?

The ideal $I= \langle x,y \rangle\subset k[x,y]$ is not a principal ideal.   I don't know how to consider it. Any suggestions?


I apologize for being vague, but our teacher specifically told us to do so if we ask questions  I have 9 flags I want to store as an integer. ie, 0b111111111 would be all of them tripped.  Right now I have an if statement adding to the int if it's tripped. ie.   if (flag0=="tripped" && flag0=="hasn't been tripped before") flagInt += 1;  if (flag1=="tripped" && flag1=="hasn't been tripped before") flagInt += 2;  if (flag2=="tripped" && flag2=="hasn't been tripped before") flagInt += 4;   and so on,  I'm having difficulty writing the code to check if a flag has been tripped or not. How could I do this?  edit: I've considered converting the integer to a string of it's binary representation, so I could just chck with brackets, but I have to do this for quite a bit of data, and that would make it too slow

How do you set, clear, and toggle a bit?


I have Gigabyte GSmart Tuku T2 and it runs 4.0.4 version of android. I don't have update software option in my settings. Is there any way to update my android version to jelly bean?

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


Problem: Suppose that $f:\Re^+\to\Re^+$ is a continuous function with the following property: for all $x\in\Re^+$, the sequence $f(x), f(2x),f(3x)\cdots$ tends to $0$. Prove that $\lim\limits_{t\to\infty}f(t) = 0.$   Please help to solve this problem, teacher, said act to the contrary, but I do not understand how there podstupitsya.Znayu that is somehow connected with the theorem of Baire.This is a homework assignment.  Thanks!

Can anyone help me with this problem?     Let $f:[0,\infty)\longrightarrow \mathbb R$ be a continuous function such that for each $x>0$, we have $\lim_{n\to \infty}f(nx)=0$. Then prove that $\lim_{x\to \infty}f(x)=0$.   Our teacher told first to prove Baire's theorem, and then show that this is a consequence of that theorem. I proved Baire's theorem, and I spend a few hours thinking on how Baire's theorem is related to this problem, but I couldn't find anything. I'd really appreciate your help.


I have a little knowledge about geometry and algebraic topology . I want to learn some basic conception and thought of algebraic geometry. Besides , I want to know main of theory of sheaves. What book I should read ?

What are the best algebraic geometry textbooks for undergraduate students?


At the risk of this becoming XY, I'll state my purpose. A few games (such as Kingdom Rush) have this annoying habit of automatically pausing when you click in another window (so that the game window loses focus).  I want focus for multiple windows, so I can work with a browser whilst the game still runs in the other window (both are tiled on the same screen).  Is there a program to help here, or maybe there's another workaround?

I want control Excel with my keyboard while using the mouse on Firefox. I need to maximize Excel and I have two monitors so covering the distance to travel between them is a little annoying.  Windows 7 x64


\documentclass[twoside]{article} \usepackage{lipsum} % Package to generate dummy text throughout this template \usepackage[explicit]{titlesec} \usepackage{times}[3.35139mm] % Use the Palatino font %\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs \linespread{1.15} % Line spacing - Palatino needs more space between line \usepackage{microtype} % Slightly tweak font spacing for aesthetics %\usepackage[bottom]{footmisc} \usepackage{hyperref, graphicx} \usepackage[hmarginratio=1:1,margin=16.51mm, top=20mm, bottom=25mm,columnsep=20pt]{geometry} \usepackage{flafter}

This  is about blurring text but it is not about blurring everything in the document.  shows how to add the watermark over all pages (but it does not work with pictures,  shows how to do it with some extra star over pictures).   How can I blur the whole document and add a DEMO watermark on each page and possibly leave only one sentence without blurring?


I'm using  that adopts PCA for domain adaptation. I have some questions regarding how it handles the situation when the # of features is larger than the # of samples. Here is the snippet of the relevant Matlab code.  The input to the function is a design matrix $X$, where the rows correspond to observed samples and columns to features.  [nSmp,nFt] = size(X);  % centering X (zero-meaning) mu = mean(X,1); X = bsxfun(@minus,X,mu);  % select the faster way to do PCA if nFt > nSmp     [V1, D1] = eig(X*X'/(nFt-1)); %%%%%%% Why?? %%%%%% else     [V1, D1] = eig(X'*X/(nFt-1)); %% standard doing %% end   % sort the eigenvalues and re-order the eigenvectors % in descending eigenvalues order D1 = diag(D1); [evs,I] = sort(D1,'descend'); V1 = V1(:,I);  % cumulative percentage of variance accounted D1 = cumsum(evs); D1 = D1/D1(end);  % W_prj is the pca coefficient if nFt > nSmp     W_prj = X'*V1; %%%%%% Why?? %%%%%%% else     W_prj = V1;    %% standard doing %% end  % normalize PCA coefficient so that for each column, the L2 norm is 1 W_prj = bsxfun(@rdivide,W_prj,sqrt(sum(W_prj.^2,1)));   % project X to PCA subspace Xnew = X*W_prj;   I do not understand the parts where I put a "why??" in comment.  I know that eigendecomposing $X^TX$ is the standard way of computing PCA coefficients, as is done in the else clause of the first if statement. The PCA coeffcients are eigenvectors that are reordered according to the eigenvalues.  But when the # of feature is larger than # of samples, why is it OK to first eigendecompose $XX^T$, reorder the eigenvectors according to eigenvalues, and then return $X^TV_1$ as the PCA coefficients? Are there some kernel methods involved in this doing? What's the rationale behind this doing?  I have asked the same question . When either post gets an answer, the other post will be deleted.  Thanks in advance!

I have a $20\times100$ matrix $X$, containing my $N=20$ samples in the $D=100$-dimensional space. I now wish to code up my own principal component analysis (PCA) in Matlab. I demean $X$ to $X_0$ first.  I read from someone's code that in such scenarios where we have more dimensions than observations, we no longer eigen-decompose the $X_0$'s covariance matrix. Instead, we eigen-decompose $\frac{1}{N-1}X_0X_0^T$. Why is it correct?  The normal covariance matrix is of size $D\times D$, each element of which tells us the covariance between two dimensions. To me, $\frac{1}{N-1}X_0X_0^T$ is not even of the correct dimensions! It is $N\times N$ matrix, so what would it tell us? Covariance between two observations?!


i am trying to calculate these formulas:   -and-  (p-side: x < -xp , n-side: x > xn) But i wonder, how can i find pn0 and np0 Thanks in advance.

i am trying to plot the distance-carrier_concentration graph above with these formulas:   -and-  (p-side: x < -xp , n-side: x > xn) But i could draw only red lines on the graphs with these formulas. How can i or with what formula draw black lines on the graph that majority carrier and space charge region concentration? I am new and i need your help :) Thanks in advance.


How many different ways are there to write $2016$ as the difference of two squares?  So the question is asking for the integer solutions for $2016 = x^2-y^2$. The prime factorization of $2016$ is $2016=2^5\cdot3^2\cdot 7^1$. I’m not sure how should I continue from here, what would be the proper way?

There exists a well-known result concerning a number of representations of $n$ as a sum of two squares. Is there anything similar for a number of representations of $n$ as a difference of two squares? Thank you.


Suppose you visit a bad location on earth with your laptop. Thieves are about to break in and steal your laptop.  So you run :  rm -rf /folder   but what if thieves have very advanced tools to recover deleted files ? perhaps as advanced as FBI / CIA tools.   Perhaps they will be able to recover that deleted folder w/ files ?  What would be the a way to ensure they can not ?

I know that most files, when deleted, aren't actually removed from the disk, and can be recovered later.  How can I ensure that a directory I had deleted will actually be removed from the disk? Are there utilities for that?  I'm using Debian Linux.


Whenever I switch on Ubuntu I always see the following message.  (Initramfs): /dev/sda1 contains a file system with errors, check forced.   Inodes that were a part of a corrupted orphan linked lost found.   /dev/sda1 : UNEXPECTED INCONSISTENCY; RUN fsck manually.(I.e .,   without -a or -p options). fsck exited with status code 4. The root   filesystem on /dev/sda1 requires a manual fsck

I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted.  Now when I try to boot into Ubuntu I get this message:  fsck from util-linux 2.26.2 /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs) _   How can I fix this?


I have two render layers. I want to change some properties, such as object visibility, material settings, etc between these layers. Is there any way for me to do this? I am not looking for a situation specific way to do this, I want a general way to change properties between layers.

I am superimposing CGI over video footage, and have run into a problem in making materials for objects that act as 'shadow catchers'.  Essentially I want a shader that is shadeless—like an emitter—but catches shadows and light from other objects. This is so I can reconstruct objects in footage so other objects in the scene interact convincingly with them.  Here's an overcomplicated diagram to illustrate my point:   (In this particular scenario, the problem could be glossed over by using RGB curves, but that is definitely not the case with more complicated scenes)  Isn't this a common situation? How to the real guys do it? Thank you.  (I am welcome suggestions of other ways of doing this.)


Okay, this may sound quite stupid, but I am currently learning special relativity in my physics class (2301 OSU). So since both frames assume that their frame is stationary and that time in all other frames is dilated. So if Twin A stays on earth and Twin B travels at constant velocity to another planet, both can say that the other person is aging slower. But since the twin that’s traveling goes through some sort of acceleration to return back to earth, they do age slower (due to effects of general relativity according to my friend). But what if that twin could return to compare clocks without having to accelerate (I know its not possible but its just a what if situation), how would their clocks compare?

Take the following gedankenexperiment in which two astronauts meet each other again and again in a perfectly symmetrical setting - a hyperspherical (3-manifold) universe in which the 3 dimensions are curved into the 4. dimension so that they can travel without acceleration in straight opposite directions and yet meet each other time after time.  On the one hand this situation is perfectly symmetrical - even in terms of homotopy and winding number. On the other hand the Lorentz invariance should break down according to , so that one frame is preferred - but which one?  So the question is: Who will be older? And why?  And even if there is one prefered inertial frame - the frame of the other astronaut should be identical with respect to all relevant parameters so that both get older at the same rate. Which again seems to be a violation of SRT in which the other twin seems to be getting older faster/slower...  How should one find out what the preferred frame is when everything is symmetrical - even in terms of GRT?  And if we are back to a situation with a preferred frame: what is the difference to the classical Galilean transform? Don't we get all the problems back that seemed to be solved by RT - e.g. the speed limit of light, because if there was a preferred frame you should be allowed to classically add velocities and therefore also get speeds bigger than c ?!? (I know  is only a local theory but I don't understand why the global preferred frame should not 'override' the local one).  Could anyone please enlighten me (please in a not too technical way because otherwise I wouldn't understand!)  EDIT Because there are still things that are unclear to me I posted a follow-up question:


I'm confused. I just tried to upgrade a Ubuntu Server system from 16.10 to 17.10 .... Without success. All typical ways of updating such an Ubuntu system do not work. do-release-upgrade tells me: An upgrade from 'yakkety' to 'artful' is not supported with this tool. And apt dist-upgrade simply tell me: Nothing to upgrade.  There are tutorials using both tools to upgrade to 17.04 which don't help as now 17.10 is already released. They - of course - advice exactly both ways described above but following them results in the strange situation I just described.  So the questions is:    How can I upgrade to 16.10 to 17.10?  Or at least: How can I upgrade 16.10 to 17.04 (so that I in consequence might be able to update to 17.10)?     Here's an example:  root@mysystem:~# apt update && apt dist-upgrade Hit:1 http://de.archive.ubuntu.com/ubuntu yakkety InRelease Hit:2 http://security.ubuntu.com/ubuntu yakkety-security InRelease       Hit:3 http://de.archive.ubuntu.com/ubuntu yakkety-updates InRelease      Hit:4 http://de.archive.ubuntu.com/ubuntu yakkety-backports InRelease Reading package lists... Done                      Building dependency tree        Reading state information... Done All packages are up to date. Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@mysystem:~# apt-get install update-manager-core Reading package lists... Done Building dependency tree        Reading state information... Done update-manager-core is already the newest version (1:16.10.10). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@mysystem:~# nano /etc/update-manager/release-upgrades root@mysystem:~# do-release-upgrade -d Checking for a new Ubuntu release No new release found root@mysystem:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.10 Release:    16.10 Codename:   yakkety root@mysystem:~#    Of course the key Prompt in /etc/update-manager/release-upgrades is set to normal.  And do-release-upgrade -d leads to:  root@mysystem:~# do-release-upgrade -d Checking for a new Ubuntu release No new release found root@mysystem:~#      Note: The question is: Why is there no update path at all? Even if 16.10 as well as 17.04 is not maintained any longer there should be an update path.    As moderators do not seem to understand either the questions or the answers and associate this question to a completely uncorrelated question and prevent providing a real answer, I don't see another way as to provide the answer here within the question.  Answer: There is no update path. That's the problem. Yes, it's the Ubuntu way to not provide an update path for non-LTS releases as soon there is even a single non-LTS release in between the current release and the most recent one. This renders non-LTS releases completely useless after two non-LTS release have been published. There is no official way of upgrading.  So you have two options:  a) Do a reinstallation with a more recent (LTS) version. This is the cleanest solution you can get.  b) Or do some manual work with risks involved following the recommendations provided in this answer here:   This question is - if at all - a duplicate of THAT question just mentioned.

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I have some lit files I want to convert from Microsoft reader files to something my other devices can read. My friend says I should have clit, in   $ which clit /usr/bin/clit   but I cannot find it. I tried locate clit but the results are unrelated. So then I tried sudo apt-get install clit but it says package not found. Is clit a standard package? where can I find it?

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?


I made a regex to highlight keywords found in a text by another tool.  new RegExp(highlightedKeywords.map(v => `\\b${v}\\b`).join('|') || /.^/, 'gi'), match => `<mark>${match}</mark>`)   I would like to make this regex treat every whitespaces as the same because the tool who extract keywords from the text convert every whitespace as space, so for example I have a keyword "the cat" not found because the actual text is "the\ncat".  I don't want to ignore whitespaces because "the cat" should not match "thecat" but I would like to match "the\tcat" or even "the\n \tcat"

I need to match a space character in a PHP regular expression. Anyone got any ideas?  I mean like "gavin schulz", the space in between the two words. I am using a regular expression to make sure that I only allow letters, number and a space. But I'm not sure how to find the space. This is what I have right now:  $newtag = preg_replace("/[^a-zA-Z0-9s|]/", "", $tag);


This is my code:  def lists_to_dict(coded, plain):     '''     (list of str, list of str) -> dict of {str: str}     Return a dict in which the keys are the items in coded and     the values are the items in the same positions in plain. The     two parameters must have the same length.      >>> d = lists_to_dict(['a', 'b', 'c', 'e', 'd'],  ['f', 'u', 'n', 'd', 'y'])     >>> d == {'a': 'f', 'b': 'u', 'c': 'n', 'e': 'd', 'd': 'y'}     True     '''     dic = {}     dic = {key:value for key, value in zip(coded, plain)}     return dict(dic)   and my output:  >>> {'b': 'u', 'c': 'n', 'e': 'd', 'd': 'y', 'a': 'f'}   can someone please tell me where do I got wrong and help me out please!

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


Problem: Prove that $$ \binom{n}{1}F_1+\binom{n}{2}F_2+\binom{n}{3}F_3+\cdots+\binom{n}{n-1}F_{n-1}+F_n=F_{2n}, $$ where $F_n$ denotes the $n$th Fibonacci number.   I tried induction, but I didn't know what to do for $n=k+1$.

Can someone explain how to prove the following identity involving Fibonacci sequence  $F_n$  $F_{2n} = {n \choose 0} F_0 + {n\choose 1} F_1 + ... {n\choose n} F_n$ ?


Does someone know if SCII allow finally play trough LAN only ? (without internet) I know in the past (10 years ago : ) it's was not possible. is this has finally changed ?

I searched around the web, even in the official SCII com forums, but I could not get an exact answer on this question:  "Is LAN with SCII definitely not possible or is there a way to get the PCs inside the LAN connected even through the Battle.NET without connecting the computers via Internet?"  I heard about work-arounds, where you still use battle net but after connecting to the certain players you let the connection run over the local network.


I'm using Retina Macbook Pro running OS X 10.8 Mountain Lion. Is it possible to use QuickTime to capture both audio and screen ? If not, what are the free apps that can do it?  P.S. A lot of the times I see on Youtube that it possible to capture screen + audio + have a little window of yourself in the corner - how is that achived?

I'm trying to record both what's happening on screen and the audio being played by the applications. To my surprise, QuickTime did not record the sound. I believe it worked before in previous OS X releases, but that is not something that I use often so I have not bothered to try earlier.  What is the current situation on El Capitan ? Have I messed with something that prevents QuickTime from capturing the sound, or has it never worked ?  Here is my view of Quick Time  / New Screen Recording on a Mac Mini:   On my Macbook Pro, I have the option select None or Internal Microphone. Internal microphone actually records the speakers of the Mac Book as heard from its own microphone, which obviously sounds terrible.  This is a MacMini 7,1 (late 2014) and there is nothing in Input Sources.


Today I was told a tale by a Unix trainer where the root password got leaked to the students, and one of the fellas removed the execute permission from /usr/bin/chmod itself. How do you recover chmod in this case and make it executable again? Let's say getting it from an external source or recompiling it is not a preferable option, is there some smart hack that can recover this chmod itself?   Note that this happened a long time ago and I'm not looking for a solution for some current problem, just curious about what ways Unix provides us around such an issue.

And now I am unable to chmod it back.. or use any of my other system programs. Luckily this is on a VM I've been toying with, but is there any way to resolve this? The system is Ubuntu Server 12.10.   I have attempted to restart into recovery mode, unfortunately now I am unable to boot into the system at all due to permissions not granting some programs after init-bottom availability to run- the system just hangs. This is what I see:  Begin: Running /scripts/init-bottom ... done [   37.062059] init: Failed to spawn friendly-recovery pre-start process: unable to execute: Permission denied [   37.084744]  init: Failed to spawn friendly-recovery post-stop process: unable to execute: Permission denied [   37.101333] init: plymouth main process (220) killed by ABRT signal   After this the computer hangs.


In game theory, 'Guess 2/3 of the Average' is a game where n people are asked to choose a real number between 0 and 100 inclusive. The person with the closest answer to 2/3 of the average value wins. It can be shown that there is a unique pure strategy Nash equilibrium where everyone picks the number 0.  Now if we change the rule to be whoever's answer is closet to the average value wins, how do we develop a strategy, or a Nash equilibrium now? The original thought process is no longer applicable.

In game theory, 'Guess $\frac{2}3$ of the Average' is a game where $n$ people are asked to choose a real number between $0$ and $100$ inclusive. The person with the closest answer to $\frac{2}3$ of the average value wins. It can be shown that there is a unique pure strategy Nash equilibrium where everyone picks the number $0$.   (The reasoning is that the desired number can't be greater than $\frac{2}3 \cdot 100$ so everyone picks between $0$ and $\frac{2}3 \cdot 100$. Then iterate.)  Can we generalize this game. Specifically, say that you survey $n$ people who each pick a real number from a set $S \subset \mathbb{R}$. From their responses, you can form a vector $\vec{v}$ where the $i$ th entry is the $i$ th person's response.   Now suppose you have function $f : \mathbb{R}^n \rightarrow \mathbb{R}$ that is known to all of the $n$ people. The person whose value is closest to $f(\vec{v})$ is the winner. What strategy should each of the $n$ people employ?  Can we find essentially different functions and sets such that everyone ends up guessing the same number? For example, we could have chosen a different fraction $< 1$ rather than $\frac{2}3$ but in spirit, this is the same example. There are also examples of functions and sets where everyone does not end up picking the same answer. For example, if we restrict the people in our example above to choose only integers, then the strategy is pick $1$ or $0$ depending on what you think the majority of the people will pick.


My JQUERY can't see echo PHP.  Here is the php statement that I echo in an external PHP file -   `echo ("<a href='#' id='bb'>hello</a>");   Here is the JQUERY also in an external js file -   $('a').click(function() {     var linkId;     linkId = $(this).attr('id');     alert(linkId);`   And finally I have an HTML file with a <div> that my php is being sent to via ajax. Now my php echo statement above shows in the HTML file, but when I click it the JQUERY      doesn't see it. I tested it by adding an anchor tag in the html file and it works fine. Any help would be appreciated. Thanksenter code here

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.


Is the rank of a matrix equal to the # of non-zero eigenvalues of a diagonalizable matrix?

I am quite confused about this. I know that zero eigenvalue means that null space has non zero dimension. And that the rank of matrix is not the whole space. But is the number of distinct eigenvalues ( thus independent eigenvectos ) is the rank of matrix?


Is there a native js way to extend an object such that the original object is modified?  eg  const obj = {a: 1} const obj2 = {b: "bar"}   such that obj returns {a:1, b: "bar"}. Or is this impossible and an new object has to be created?

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I did an \arraystretch to get taller column vectors, but not the matrices are too small. How can I also stretch them horizontally so that the matrices become square-like again?  Here's the code I used:   \renewcommand*{\arraystretch}{1.8}

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


I am aware of questions/answers that address the question of space around the equal-sign (e.g.  or ). However, my question is related to a situation where I make use of \underbrace:      The text in \underbrace causes a shift to the right of everything outside of the braces. I do not want to introduce a linebreak in the text, nor do I want to extend the underbrace - I just do not like the large gap in the equation. I have tried  without significant effect. How do I move the portion to the right of the braces so that it is partially above the text? (Have I missed something in the ?)    This portion of code reproduces the equation above:    \begin{equation}   \underbrace{\left(\frac{\vec{\omega}\cdot\vec{v}}{\vec{v}\cdot\vec{v}}\right)}_%   {\text{projection of }\vec{\omega}\text{ on }\vec{v}}\vec{v}=%   \frac{\xi_{\text{s}}}{v_{\text{s}}}\vec{v} \end{equation}

Consider this:  \left( x-1 \right) \underbrace{ \left( ? \right) }_{ \text{what is this?} }   The label is longer than the braced portion, which causes unwanted space between the parentheses.  Is there a way around that, so that the parentheses "touch" as they would normally?  Please note that I just started on LaTeX, and I'm using TexMaths inside LibreOffice Writer.


So I was , but I'm not exactly the most knowledgeable in the realm of programming. So I figured I would filter the review list to get questions I could answer. So I tried to review javascript only and all seemed to be well:        Only , I think to myself as I read it, and then come to the tags at the bottom:          Yeah, definitely not javascript. What's going on here?

Just recently the . I've got  this morning which seems to be out of scope for my filtered list. I have filtered my list to only review VBA and Excel-VBA tags while the audit is tagged with perl http pipes which have nothing in common with VBA. I see a problem with the way the system currently works  Since I have a filtered list of tags, once I see a differently tagged question I already know it's an audit. Come on, that's too easy!  Can this please be fixed? update I have ran into  which I decided to edit - the question was tagged VBA and I thought it had nothing to do with VBA so I selected Edit which was the correct action. Now, once the first audit was clearly one to close - nothing to do with VBA and really easy to know that it actually was an audit - the second one was a very good audit. I am just thinking now if this is a proper bug or just a matter of malfunction in the system. I think the first one may have been made an audit for the wrong reason. Let's turn this into a discussion as I can't clearly work the system out.


I'm given the matrix $X = xx^{T}\in\mathbb{R}^{d \ x \ d}, x\in\mathbb{R}^{d}$. Does somebody know how to compute $\lambda_{max}(X)$ or $\lambda_{min}(X)$? I only want to know these two eigenvalues, the others are not really important.  I seem to be stuck.  I'm thankful for any answer.

Suppose $A=uv^T$ where $u$ and $v$ are non-zero column vectors in ${\mathbb R}^n$, $n\geq 3$. $\lambda=0$ is an eigenvalue of $A$ since $A$ is not of full rank. $\lambda=v^Tu$ is also an eigenvalue of $A$ since $$Au = (uv^T)u=u(v^Tu)=(v^Tu)u.$$  Here is my question:     Are there any other eigenvalues of $A$?   Added:  Thanks to Didier's comment and anon's answer, $A$ can not have other eigenvalues than $0$ and $v^Tu$. I would like to update the question:     Can $A$ be diagonalizable?


I'm trying to make my site as SEO optimized as possible and have a question.   Do I change the name of my "cart.php" and "checkout.php" pages to have keywords in them?  For example, here's the current names of all my pages:   index.php about-me.php portfolio.php news.php store.php item-details.php cart.php checkout.php terms-and-conditions.php   Let's say that my name is Bob Doe and what I'm trying to sell is paintings.   Here is what I plan on renaming them to.   index.php about-me.php -> about-bob-doe.php portfolio.php -> portfolio-bob-doe.php news.php -> news-bob-doe.php store.php -> store-buy-paintings.php item-details.php -> store-painting-info.php cart.php -> Should I rename this? checkout.php -> Should I rename this? terms-and-conditions.php   Am I doing the right thing here?   Should I be renaming my pages? Will renaming "cart" and "checkout" make a difference?

A coworker and I are locked in a debate over the value of SEO keywords in the URL of a page. She wants to change all the filenames of the HTML pages of a fencing company so they look like residential-home-chicago.html, contact-chicago-contractor.html, and so on. She is convinced that because Google highlights keywords in URLs in search results, that means that putting keywords here is more valuable.  My position is that these do not improve SEO, since Google doesn't seem to give keywords in the URL any more weight than keywords in the body of the page, and . In the meantime, they make it harder for me to find the pages I want when its time to edit them, and the site as a whole looks cheap and spammy.   suggests to me that yes, keywords in URLs are useful, but not superior, and that they are more useful for human readability than search engine rankings.  I'm looking for authoritative sources that support either position, not blog articles from SEO optimization companies trying to promote themselves.


That's my homework. I've been looking for "Taylor series" and trying to understand it. Seen some solutions but i think they're not that explanatory. Can you help me?

I have this problem I know I need to approximate the value with taylor polynomial and its error formula is $$|R_n(x)|\leq \frac{1}{(n+1)!}|x-a|^{n+1}$$ but i couldnt figured it out i should calculate up to which degree. Should I use radians? Can anyone help me about that


Can someone show me how to proof this ? $$\sqrt[p]{\sum_i {a_i}^p}\to \max a_i \quad\text{ if }p\to\infty.$$

If we are in a sequence space, then the $ l^{p} $-norm of the sequence $ \mathbf{x} = (x_{i})_{i \in \mathbb{N}} $ is $ \displaystyle \left( \sum_{i=1}^{\infty} |x_{i}|^{p} \right)^{1/p} $.  The $ l^{\infty} $-norm of $ \mathbf{x} $ is $ \displaystyle \sup_{i \in \mathbb{N}} |x_{i}| $.  Prove that the limit of the $ l^{p} $-norms is the $ l^{\infty} $-norm.  I saw an answer for $ L^{p} $-spaces, but I need one for $ l^{p} $-spaces. Besides, I didn’t really understand the $ L^{p} $-answer either.  Thanks for your help!


How can I apply the squeeze theorem to show $$\lim_{(x,y)\to (0,0)} \frac{xy^5}{x^4+y^6}=0$$

I have some trouble with this: Show that if $a, b \ge 0$, $c, d > 0$ and $\frac{a}{c} + \frac{b}{d} > 1$ then   $$\lim_{(x,y)\rightarrow (0,0)}\frac{\left|x\right|^a\left|y\right|^b}{\left|x\right|^c + \left|y\right|^d} = 0$$  we were not really shown how to evaluate multivariable limits other than trying different paths, which wouldn't work when the limit exists, or by applying the squeeze theorem which is my initial plan. Unfortunately I cannot find a proper bound for the denominator and so I am quite lost right now. Any help would be appreciated.


I like the new @username feature of comments. However, what syntax do I use when the username has spaces (or perhaps other weird characters) in it?

How do the comment replies (aka "pinging users") work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user?  Related:


Why does energy need to be quantized to explain black body radiation? Wouldn't the approximate normal distribution of the kinetic energy of particles at a certain temperature be sufficient, ie. few particles have high enough energy to oscillate at higher frequencies.

I don't understand why quantization makes a peak on the blackbody radiation curve (so there is no ) and the relationship between that peak and quantization concept.  When the blackbody is heated, it starts to glow. All atoms start to vibrate. Total heating energy must be divided and equally shared by all atoms of blackbody. Right?  But what happens next?  Do some atoms get much more energy to radiate at higher frequency and waste the energy? What happens at the atomic level, so quantization can explain it? What does classical physics claim, so it can not explain the radiation curve?


I am using Array.Sort() with the parameters shown in the code. I'm unable to get the required order for the following array  jONeS jones joNes jones aDaMs adams adaMS ADAMs   The program shown prints the following  adams aDaMs adaMS ADAMs jONeS jones joNes jones   Where as according to me the following order should be printed  aDaMs adams adaMS ADAMs jONeS jones joNes jones   Note the first two elements displayed wrongly. Where am I going wrong?  int N = Convert.ToInt32(Console.ReadLine()); string[] arr=new string[N]; for (int i = 0; i < N; ++i)     arr[i] = Console.ReadLine(); Array.Sort(arr, StringComparer.Create(new CultureInfo("en-US"),true)); Console.WriteLine(); for (int i = 0; i < N; ++i)     Console.WriteLine(arr[i]);

Is the sorting algorithm used by .NET's Array.Sort() method a  algorithm?


I am looking for a science fiction novel featuring a person who has had his memories erased and the orders for some task implanted in his mind.  The idea that intrigued me most was that this person's mind was being erased and newly reprogrammed after each assignment.  I thought it was by Peter F. Hamilton, but cannot identify the book by the descriptions I find online. Maybe it was written by a different author. I'm pretty sure it was published within the past five or so years.

I'm looking for a science fiction novel that I would've read from a library in the early 2010s. I'm fuzzy on the plot, but it was in a setting with space travel, and I believe the view shifted around to follow the separate characters.  I do recall two distinguishing characteristics in particular:  Some people use a brain upload/backup to restore themselves to a new body after an accidental death, maybe retrieving the recorder if possible to include memories immediately before death. However, this may not be an accessible service for everyone due to cost/coverage, and I think a large corporation handled it. People might've kept identical clones on hand or opted for a brand new body, but I think it meant very little fear of death. At least one character, maybe an investigator/reporter/mercenary, died in an explosion (?) and was restored midway through the book.  Some others chose the (less common) option of linking several bodies together to form a group consciousness, where a single unified mind inhabited all of the bodies at once. They could purchase more bodies to connect, and gained similar immortality since any body dying would not affect the whole.  I remember that at one point, a character entered a store and was irritated when the employees carried on a conversation as she moved to the right aisle, only to realize they were a group mind and thought she'd noticed. She entered into a relationship with them later and, at the end of the book, ended up buying more bodies to become a group herself.  I've googled around for this book for a while and looked through Wikipedia's  and , but I didn't recognize the plot anywhere. Hope a detail stands out to someone out there, I'll try to answer any more questions!


I'm trying to install Lite IDE from the Ubuntu Software Center but I cannot get past logging into Ubuntu One.  I have an Ubuntu One account. I have used it to log into one.ubuntu.com, Launchpad and this Stack Exchange. However, I cannot use it to install this snap.  I've generated and installed SSH keys.  I'm running 16.04 LTS    Am I missing something?  Or should I report a bug?

Apparantly, one needs an Ubuntu SSO account for installing Snaps in 16.04 through ubuntu software (see  link). That's fine with me, but it keeps telling me that my username or password is wrong although I've just changed my password (in fact, twice just to be sure).   So, what could I do to prevent Ubuntu software to tell me my password is wrong, please?


I have a Dialog A and I want it to load a second dialog B which is modeless and stays along side A throughout. Dialog A may then launch a modal dialog C. But when C is present I want B to be usable. I would have fixed this with pretranslate message in A in a C++ application but what is the approach in C#.

I hope I can explain this clearly enough. I have my main form (A) and it opens 1 child form (B) using form.Show() and a second child form (C) using form.Show(). Now I want child form B to open a form (D) using form.ShowDialog(). When I do this, it blocks form A and form C as well. Is there a way to open a modal dialog and only have it block the form that opened it?


I want to get date of the last day of week with a specific timezone.  I got this code that works good but it shows the computer timezone. i want to add a specific timezone like GMT-0500   {       var lastday = date.getDate() - (date.getDay() - 1) + 6;  return new Date(date.setDate(lastday));   } dt = new Date();  dt.setHours(23,59,59,999); document.getElementById("lastday").innerHTML = endOfWeek(dt).toString(); console.log(endOfWeek(dt).toString());   How can i change the timezone? please help.

I have a web page with three dropdowns for day, month and year. If I use the JavaScript Date constructor that takes numbers, then I get a Date object for my current timezone:  new Date(xiYear, xiMonth, xiDate)   Give the correct date, but it thinks that date is GMT+01:00 due to daylight savings time.  The problem here is that I then pass this Date to an Ajax method and when the date is deserialised on the server it has been converted to GMT and so lost an hour which moves the day back by one. Now I could just pass the day, month, and year individually into the Ajax method, but it seems that there ought to be a better way.  The accepted answer pointed me in the right direction, however just using setUTCHours() by itself changed:  Apr 5th 00:00 GMT+01:00    to  Apr 4th 23:00 GMT+01:00   I then also had to set the UTC date, month and year to end up with  Apr 5th 01:00 GMT+01:00   which is what I wanted.


Its 2018, I'm using Kubuntu 18.1 cosmic, looking for a GUI to BROWSE network (CIFS) shares on other machines. I'm running a linux desktop machine, (not a server) and don't want to run, or install a samba server. I am told that I don't need to run a samba server in order to access shares on another machine. The problem that I have is browsing the network from LINUX machines. Programs that I find require you to identify the remote server, I'm looking for something like network neighbourhood, which can find shares on other machines that I don't specify.

I have an Ubuntu server.  Accessing the server from Windows clients works fine.  But the server is not listed among the available PCs on Windows client's Network overview. For windows machines it would be the Network Discovery feature.  How can I make my Samba server visible on the network?  Windows version is Windows 7. The Workgroup in smb.conf is the same as in Windows.


First Problem: Let $\{f_k\}$ be a sequence on $L^p(\mathbb{R})$ for $p \in [1,\infty)$ of the form $f_k (x) = k^{1/p} g(kx)$ for a fixed $g \in L^p(\mathbb{R})$. Show that $f_k \to 0$ weakly but $f_k$ does not converge strongly.    Idea:  We want to show that $\int_{\mathbb{R}} k^{1/p} g(kx) \phi(x) dx \to 0$ as $k \to \infty$ where we can without loss of generality assume that $\phi$ is a continuous compactly supported function (by density of $C_0(\mathbb{R}) \subset L^q (\mathbb{R})$ where $\frac{1}{p} + \frac{1}{q} = 1$). Then we have  \begin{align*} \int_{\mathbb{R}} k^{1/p} g(kx) \phi(x) dx \leq k^{1/p} \max_{x \in \mathbb{R}} {[\phi(x)]} \int_{\mathbb{R}} g(kx) dx. \end{align*} Now I am unsure what to do. My guess is that since $g \in L^p(\mathbb{R}) \implies g \in L^1 (\mathbb{R})$, by the second fundamental theorem of calculus (for Lebesgue integrable functions) we can define \begin{align*} G(x) := \int_{[-\infty, x]} g(x) dx \end{align*} which is continuous and almost-everywhere differentiable with $G'(x) = g(x)$. In other words, we can compute the antiderivative of $g(kx)$ by using the reverse chain rule ($u$ substitution), which gives us \begin{align*} k^{1/p} \max_{x \in \mathbb{R}} {[\phi(x)]} \int_{\mathbb{R}} g(kx) dx = \frac{k^{1/p} \max_{x \in \mathbb{R}} {[\phi(x)]}}{k} \int_{\mathbb{R}} g(u) du \to 0 \text{ as } k \to \infty. \end{align*} My main concern is my integral  is over $\mathbb{R}$ instead of $[-\infty, x]$, but is this a big deal? It seems that one can just split $\int_{\mathbb{R}} = G_1(x) + G_2 (x)$ where $G_1(x) = G(x)$ and $G_2(x) = \int_{[x, + \infty]} g(x) dx$ with $G_2'(x) = g(x)$ by the fundamental theorem of calculus again.   To show that $f_k$ does not converge strongly,just set $g(x) = 1_{E}(x)$ for a measurable set $E$ so that $f_k(x) = k^{1/p} 1_{E}(x)$ does not go to zero as $k \to \infty$.    Second problem: Let $\{f_k\}$ be a sequence on $L^p(\mathbb{R})$ for $p \in [1,\infty)$ of the form $f_k (x) = g(k + x)$ for a fixed $g \in L^p(\mathbb{R})$. Show that $f_k \to 0$ weakly but $f_k$ does not converge strongly.    Idea: By the same logic as before,  \begin{align*} \int_{\mathbb{R}} g(k + x) \phi(x) dx \leq \max_{x \in \mathbb{R}}[\phi(x)] \int_{\mathbb{R}} g(k + x) dx, \end{align*} where $\phi$ is a continuous compactly supported function. The problem is doing $u$-substitution doesn't really do anything. My gut feeling tells me to approximate $g$ using continuous compactly supported functions, so that the shift sideways of g $g(k + x)$ goes to a place where $g = 0$.

Let $f\in L^p(\mathbb{R}^d)$, with $1<p<\infty$. Is it true that    $$\lambda^{\frac{d}{p}}f(\lambda x ) \rightharpoonup 0\quad \text{ weakly in }L^p\text{ as }\lambda\to+\infty?$$   One has the easy case for $f\in L^{p-\epsilon}\cap L^p$. This condition allows the use of Hölder's inequality as follows (here $\frac{1}{p}+\frac{1}{p'}=1$ and $\phi$ is a continuous function with compact support):  $$\begin{split}\left\lvert \int_{\mathbb{R}^d} \lambda^{\frac{d}{p}} f(\lambda x)\phi(x)\, dx\right\rvert& \le \lambda^{\frac{d}{p}}\lVert f(\lambda x)\rVert_{L^{p-\epsilon}}\lVert \phi\rVert_{L^{(p-\epsilon)'}} \\  &= \lambda ^{\frac{d}{p}- \frac{d}{p-\epsilon} } \lVert f\rVert_{L^{p-\epsilon}}\lVert\phi\rVert_{L^{(p-\epsilon)'}}\to 0. \end{split} $$ But what happens if that condition is removed? I carried out an explicit check on the standard example of a function $f$ that belongs to $L^2(\mathbb{R})$ and does not belong to $L^{2-\epsilon}(\mathbb{R})$ for any $\epsilon > 0$, namely  $$f(x)=\begin{cases} 0 , & x<2 \\ \frac{1}{\sqrt{x}\log x}, & x \ge 2\end{cases}.$$ Taking $\phi=\chi_{[a, b]}$ with $2<a<b$ one has  $$\left \lvert \int_{\mathbb{R}} \lambda^{\frac{1}{2}}f(\lambda x)\phi(x)\, dx \right\rvert  = \dfrac{  \int_{\lambda a }^{\lambda b} \frac{dy}{\sqrt{y}\log(y)} } {\lambda^{\frac{1}{2}}}, $$ and an application of l'Hôpital's rule shows that the right hand side tends to $0$ as $\lambda \to \infty$. This implies weak convergence to $0$ by a standard density argument.   This seems to point towards an affirmative answer to the question in the gray box.


This is part of an old preliminary exam in Analysis I am reviewing to prepare for my own prelim. $\lambda$ is the Lebesgue measure. $f_n\to f$ with respect to the $L^1-$norm.  I know that there exists at most a subsequence fulfilling the condition, since, e.g., we could have $f=0$ and $f_n=0$ except at $q_n$, with $q_n$ cycling through the rational numbers (with each rational number appearing infinitely often). Then $f_n\to f$ but it is not the case that $f_n(x)\to f(x)$ for almost every $x\in[0,1]$. It's obvious in this example that there will exist a subsequence fulfilling the condition, and I feel confident that there will always be such a subsequence. That is, I think the answer is to "prove", not "disprove". But I'm having difficulty seeing how to prove it.  This is a case where I feel like I understand the problem but can't quite figure out how to structure a proof. Every attempt I've made has become overly convoluted and I've become confused. Any help would be appreciated.

I have been reading Terry Tao's notes on Real Analysis and there's a part he just says, but does not really explain, so I am wondering if someone here would. The notes are  and my particular question is from Section 4, Corollary 3. It goes as follows,  Let $f_n \rightarrow f$ in $L^1$ then there exists a sub sequence $(f_{n_j}) \subset (f_n)$ such that $f_{n_j} \rightarrow f$ pointwise a.e. Moreover $(f_{n_j})$ converges almost uniformly to $f$.  The proof he gives is simply that since $\|f_n-f\|_1 \rightarrow 0$ as $n \rightarrow \infty$ we can pick a sub sequence such that $\|f_{n_j}-f\|_1<2^{-j}$ which is enough to show pointwise a.e and almost uniform convergence. But what allows you to pick such a sub sequence is it maybe some Cauchy property or is it some weird construction? Then how do you go from that to pointwise a.e and even almost uniform convergence. I am assuming that for almost uniform, you do something similar to Egorov's theorem without the assumption the domain of $f$ has finite measure. Also I am aware that if you get almost uniform, you immediately have pointwise a.e, but I'd like to see how to get to both. Thank you.


The  spell lets you create a permanent room 30 feet in any dimension as a separate plane, which would then be smaller than the Tarrasque.  On the other side I may polymorph a Tarrasque into a pot and transport it in my demiplane.  What could happen when, after one hour, the polymorph spell ends?  A typical ruling here could be to eject the creature to the nearest unoccupied space (maybe letting it take some damage, like a mishap when teleporting), but in this case there wouldn't be any "nearest space" where to put it!  Would then be a legitimate ruling to teleport it to the ethereal plane? Or should it just die? Or should I maybe just extend the duration of the polymorph? In other editions they say that when a creature would occupy an illegal position, it should be moved to the last legal position instead.  It is not clear to me where should I put the monster, or what would happen to him.

So in a 5e campaign I'm running, the party Druid has recently been doing some scouting of the local monster caves in spider form to avoid notice. I've also described how the goblins and kobolds who live in these caves use a variety of tunnels too small for Medium sized creatures in order to get around. Since the party doesn't have any halflings or gnomes, I didn't really think the party would ever get into those tunnels. But obviously if a goblin can fit, so can a spider, so there is the possibility that the Druid might try to scout them out.  But what if something goes wrong? What if the Spiderdruid were to get lost and run out of time in Wild Shape, or encounter a hungry lizard and drop to 0 Spiderhealth?  Is there anything in the rules to suggest what should happen when somebody tries to revert to their normal size in a space where they normally wouldn't fit?  With a space sized for a Small creature such as in my game, I might just rule that he's stuck unless he makes difficult Dexterity checks or waits to get his Wild Shape back. However, what if it was an even smaller space, such as a burrow or a pipe or a deep crack in the rock? Someplace where his human body literally won't fit?  If there aren't any rules for this, I'm open to suggestions on how it can best be handled.


I have a HTC One runing android 4.4. I was wondering if ubuntu phone works for my phone. I read very quick the how to guide on the web page but I'm not sure about doing it. Has anyone done? How does it work?

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


Let R be a ring and A,B,C ideals such that A+B=R and BC $\subset$ A, then C $\subset$ A.  My attempt:  Let x $\in$ C, and as C is an ideal of R, then x=a+b for some b $\in$ B and a $\in$ A. And we can have a'=bx=b(a+b).  I don't know how to prove the problem after that.  Any help will be much appreciated.

Let $A$ be a UFD. Assume that $a,b \in A$ are relatively prime, $c \in A$ and $a | bc$. To prove that $a|c$, is the following approach correct (or do you have to use some type of prime factorization argument)?  By the relatively prime assumption, $\gcd(a,b)$ is a unit. Call that unit $u \in A^{\times}$. Then we can write $u = ax + by$ for some $x,y \in A$. But then, $c = c \cdot u = c(ax+by)=cax+cby$. However, it is clear that $a|cax$ and the fact that $a|bc$ implies $a|cby$. Thus, $a|cax+cby=c$.


I'm trying to load the content of a Word document (Word 2007 with file extension .docx) into a JTextArea (txtLoadedText). I'm using a JFileChooser to select the Word document but when I select the document I get the following error:     Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/openxmlformats/schemas/wordprocessingml/x2006/main/DocumentDocument$Factory   I tried looking at this Stackoverflow question (), but it didn't make any difference.  How can I correct this?  The code I'm using is as follows:  JFileChooser chooser = new JFileChooser(); chooser.showOpenDialog(null); XWPFDocument doc = new XWPFDocument(new FileInputStream(chooser.getSelectedFile())); XWPFWordExtractor extract = new XWPFWordExtractor(doc); txtLoadedText.setText(extract.getText());    The jar files I have in place are:  poi-ooxml-3.8jar xmlbeans.jar poi-scratchpad-3.9.jar poi-3.9.jar dom4j.jar poi-ooxml-3.7-20101029.jar stax-api-1.0.1.jar xbean.jar

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I have a backup of my database as a TestDatabase.bak file but I am unable to restore it.  When I try to restore I receive the following error message in SSMS:      RESTORE could not start database 'FieldopsDevDynamic07042013'     The error log shows:     Database 'FieldopsDevDynamic07042013' cannot be started because some   of the database functionality is not available in the current edition   of SQL Server.     How can I restore this database?

I read that it's possible to restore a database in SQL Server as long as you're restoring from an older version to a newer version, for backwards compatibility reasons.  Does anyone know off hand if you can restore a database from a *.bak file for different editions of SQL Server?  We are moving a very large database via FTP that will take a couple days, so we'd rather only do this once. If nobody responds by the time we transfer the database via FTP, we will obviously try this out and see if it works by testing, and answer our own question.  Below is a query to get version details of SQL Server.  The productversion is in the format {major revision}.{minor revision}.{release revision}.{build number}.  In my case, the {release revision} has a value of 5500 for the source and 5512 for the target.  So that looks okay. However, the edition is different.  Query:  SELECT    SERVERPROPERTY('productversion'),    SERVERPROPERTY('productlevel'),    SERVERPROPERTY('edition')   Source database:  10.0.5500.0 SP3 Developer Edition (64-bit)   Target database:  10.0.5512.0 SP3 Enterprise Edition (64-bit)


I am using Windows 7 Pro, I have a 2GB micro SD card which I put a Arch Linux image (iso) on using win32diskimager. _ I no longer care about the iso image or any contents on this drive, I want it clean  Navigating to My Computer -> J:\ shows I have only 90MB of space available. I have tried formatting multiple times and also changing the filesystem but the result is the same.  I have opened the Disk Partition manager in Windows and can see the SD drive is partitioned into what appear to be 3 parts.  I was able to delete the middle partition visible in the screenshot I have posted below, however after doing this it just changed to "Free Space", I have also edited my image to show the result of the right click options available on each part of the drivespace.  Ideally I want my SD drive back to 1 single partition with all space available (usually around 1.86GB out of the total 2GB if I remember correctly)

I bought a 16G SD card to put Android on to put in my Nook Color.  I downloaded a Honeycomb distribution and wrote the disk image to it.  Then I found the Nook Color takes Micro-SD cards, and decided to use this SD card for casual file storage and sneakernet.  Right now, it reports its size as 117 MB.  Sticking it into a Windows 7 computer, I can reformat it in several different ways, including NTFS and FAT variations, but always 117 MB.  The reformat to default configuration shows 117 MB.  Is there something I can do to make this hold actual GB again?  Any ideas what happened?


As seen on Worldbuilding:    linked question:

Recently, the TeX.SE question  got onto the Hot Network Questions list.  Like many questions on TeX.SE, it contains some TeX markup in its title.  Unfortunately, on , this markup gets parsed and rendered as math:    I propose that either:   the entire Hot Network Questions sidebar should be excluded from MathJax parsing by styling it with the tex2jax_ignore class, or at least, any hot questions from TeX.SE should be so excluded from MathJax parsing.   Or I suppose we could always implement , which asks for all questions with TeX in the title to be excluded from Hot Network Questions entirely.  That might be throwing out the baby with the bathwater, though.    Ps. This issue is partially masked by , which causes MathJax not to be rendered in many elements that are hidden by default and revealed using jQuery .show(), such as all but the first five questions in the Hot Network Questions sidebar.  The  user script contains a generic fix for that bug, so users who have it installed will see this issue more frequently, but it occurs even without SOUP whenever a question with TeX markup in the title happens to show up among the top five hot questions that are always visible by default.


I have a spare (e.g. 'expendable') Netgear EX6130 WiFi Extender and I have put it in my garage so I can get internet when I'm working out there.  I've configured it the way I want and that all works apart from a very poor uplink WiFi connection to the ADSL router in the house.  For several reasons I'm not able to lay an Ethernet cable out to the garage.  The WiFi signal has a brick wall and a sheet steel garage door to get through.  It nearly works, but the signal drops out a lot and I think the garage door is the primary culprit, because the connection is about 40% better when the door is open.  I need to circumvent the door somehow!  The new WiFI hotspot provided by the extender is very strong and reaches everywhere I need it to get to.  It's just this bottleneck link back to the house I want to solve.  The Question: I am wondering if I could swap the Netgear's crappy built-in antennas for a pair of mag-mount WiFi antennas (with SMA connectors and 2 meter long coax cables).  This means I can run the coax through the wall of the garage and place the antennas a couple of meters apart on the roof of the garage (there's a magnetic steel strip on the roof that holds down the waterproof membrane) I can stick the antennas to that metal as a ground plane.  This would neatly side-step the steel door I believe.   +     I've already taken the device apart to see if it has U.FL antenna connectors (it does), and I have some U.FL to SMA connectors ready.  Is this a bad idea?  Is this likely to destroy the RF stage of the WiFi transceiver?  One one hand I know that antennas need to be compatible with a transceiver, but on the other hand the Netgear will have the cheapest possible antennas built-in and will probably not be the best way to get optimum WiFi signal.  I have no budget, I'm having to use parts at my immediate disposal.  I know I could just try it but I don't want to risk destroying a perfectly good device on a whim.  Any opinions welcome.

I'm trying to come up with a WiFi solution for an industrial building, 100 ft long by 50 ft wide, with 3 main areas. See image below  Concrete walls separate the rooms, and the one long room is a semi-corrosive wash-down area. Staff use mobile devices that require a strong, uninterrupted WiFi connection, and they are often moving throughout the building while using the devices. I don't want repeaters or extenders or any other mechanism that would result in multiple SSID or channel connections for a tablet to contend with (dropouts for reconnection, or failure to switch to a stronger signal, etc). I just want to use one access point, but just with better coverage. Instead of trying to buy the most powerful access point on the planet, using brute force to blast through those walls, I was thinking of using extension antennas. So I'd take a consumer-grade access point with 3 standard antennas, remove 2 of them and replace with coax extension cable (green in the image) and keep 1 original antenna (blue). Especially for the wash-down room, I was envisioning drilling a hole in the concrete wall and slipping the antenna cable through, so in the end, only an antenna would be exposed to the corrosive environment, and still provide good signal strength to staff in that room. My ultimate question is: will this work? Is there something I'm not aware of, like perhaps that access points with multiple antennas aren't designed to work with their antennas separated by 10-20 ft? Thanks


I have the following command in my crontab to copy a file named 'data' into an existing directory named 'Archive', with a date stamp appended to it.  When I run it on the command line manually, it works fine.  01 0  * * * cp /home/data /home/Archive/data.$(date +%F)   But when cron runs the above (under the same user), the file does not copy, and I get the following error:     cp: 0653-437  2018 is not a directory

I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:  0 * * * * echo hello >> ~/cron-logs/hourly/test`date "+%d"`.log   Unfortunately I get this message when that runs:  /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file   I have tried escaping the date part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this?


I'm a developer with virtually no "real" server experience, and I'm planning on building a web app that I'll need to bootstrap until I get enough paying customers to afford a proper devops person.  I've embraced docker, and feel like that provides some good initial workflow for me to manage dev, testing, and basic production (to VMs like digital ocean, vultr, etc).  Currently I do everything as a single node, but I've been starting to learn clusters (docker swarms).  It's a huge amount of information and I'm worried that I'm losing valuable dev time learning about ops -- especially since the plan is to hire an ops person asap.  I'm wondering where I might be able to get some guidance on what's practical to learn for someone like me when it comes to the ops side of things? Can a single hosted VM node be successful at launching a small start-up or do I need to learn how to deal with clusters from the start?

In the last month or two I've noticed my questions are becoming increasingly dev ops related and less related to server fault or stackoverflow. Examples include 0MQ compiling issues or problems in TCP.  The field of Dev Ops is ever increasing, and I know teams who have rewritten protocols and entire NGINX modules but their problems aren't necessarily software or hardware related. They can be hybrid problems or caused by a programming error that didn't respect a firewall keep-alive.  I think many users may be confused as to why they see some of these questions and simply say they're off-topic. But now that our economy is cloud-based and SaaS companies do not control the hardware, Dev Ops have high value in the field of software development.  Where do we put these off-topic questions?  Update: example  This question was about 0MQ and probably only someone working in Dev Ops would have a clue. It was multi-faceted and involved Java bindings, Visual Studio, and C compiling    This question was about redis which both requires networking, server and software expertise. It took some time to track the bug to the Scala client itself:


I am dealing with multiclass classification problem where I have 10 classes to predict. I came across Logistic regression model in scikit-learn which can be applied to multiclass settings as well. The parameter 'multi_class' in logistic regression function can take two values 'ovr' and 'multinomial'.   What's the difference between ovr (one vs rest ) and multinomial in terms of logistic regression. I am using logloss as my evaluation metric. I applied both 'ovr' and 'multinomial' to my problem, so far 'ovr' gives less logloss value. But I really want to know how both works.

Lets say we have a dependent variable $Y$ with few categories and set of independent variables.    What are the advantages of multinomial logistic regression over set of binary logistic regressions (i.e. )? By set of binary logistic regression I mean that for each category $y_{i} \in Y$ we build separate binary logistic regression model with target=1 when $Y=y_{i}$ and 0 otherwise.


I was wondering what the associated grammar with this sentence is:     "Disclaimers are a simple device used by sellers to avoid legal action should future problems arise".   Actually, I don't know why an inverse structure is used here.

As always, while reading through I found a sentence whose structure confused me.  What I want to know is whether the first sentence is the inversion form of the second sentence.      1. If the reason was to avoid bad publicity should his error be discovered, then . . .      2. If the reason was his error be discovered to avoid bad publicity, then . . .   If not, how should I interpret the first sentence?  Thanks.


For example, if I use AES-CTR and use key of 44 bytes. Will it be breakable or not and why? How to use AES-CTR correctly?

Out of curiosity why we can't implement AES 512 key size?    Please explain somehow i can understand! I'm not an expert.


I'm trying to use a framework implemented in python to use GA (Genetic algorithms) and other related algorithms . But I'm not sure about what framework to use, I've found two interesting options Pymoo and JmetalPy, the former it seems well documented it and the latter isn't looks like it (it's under construction), but the version in Java is very popular and well know. I need choose a framework to make a comparation with an algorithm made by me. For this reason a reliable framework is needed and with small learning curve. Do you have any good or  bad experience using it?, Do you know another framework? Pymoo:   JmetalPy:

I need to use a metaheuristic algorithm to solve an optimization problem on a Python codebase.  Metaheuristics usually need to be written in C++ or Java as they involve a lot of iterations, while Python is weak from this point of view.  Questions:   do any Python metaheuristic packages which wrap faster languages as C++/Java exist? do any Python metaheuristic packages based on maybe cython on numba exist? other solutions?


I have a Mac book pro (13 inch late 2013) and I have an old iMac (27 inch mid 2010).  I checked on apple website and it says that the 27 inch Mid 2010 model does support target display mode    It says that target display mode is supported but I need a "mini display to mini display cable"  but when I look at my MBP, it does have any mini display port. it has only 2 thunderbolt ports.  So will I be able to use the old iMac as a external display?

This has always been a big want for me. I love using multi-monitor setups but only want a single laptop. Does the 2011 MBP Thunderbolt support chaining multiple monitors together? I know that you can add a monitor and say, a few hard drives, but can you connect it to 2 27" monitors and your flat screen TV (for example)? Thanks!


I have a document with bold single lines before paragraphs, how do I prevent from having these line at the end of the page and the accompanying paragraph at the next page? I wish to have the bold single line together with the paragraph.

Fun times, I'm making a (manual) index of the lecture slides for class (which are nowhere near latex, ppt files yay) and of course Latex insists on placing pagebreaks willie nillie through my items. Why isn't there a "keep (paragraph) with next (paragraph)" option like there is in Word 2007 (and all others I think). Is Word really more powerful than Latex [when it comes to this specific attribute of paragraph flow]?  *full page before here* Knowledge in the \nopagebreak\\ \nopagebreak \nopagebreak - Head   Results in   *full page* Knowledge in the  ---8<--- Next page - Head ...    Yes, I know I can place a \newpage before the line to push it to the next page, but there has to [HAS TO] be a way to make Latex understand that this isn't what I want, these two lines are supposed to stick together!   Edit: Full context:   *empty line* Knowledge in the \\ - Head \slid{44, 69} - World \slid{5, \textbf{44}, 66, 69, 84} *empty line*   With slid being:   \newcommand{\slid}[1]{\dotfill #1 \nopagebreak\\}   It seems to be to be that the -World line is pulling down the -Head line, if I add an empty line between them, both Knowledge.. and -Head stay on the same page, with -World on the next one. But when I combine the two, only -Head gets pulled to a new page, and Knowledge... stays on the previous page.


I recently submitted my first  paper to a philosophy journal. After about a month,  the status switched from "Awaiting Reviewer Scores" to "Awaiting recommendation". Then a few days later it switched back to "Awaiting referee assignment" again. Thus, seemingly, the review process ended only for a second one to be initiated by the EA just days later.    Why would the system change back to "Awaiting referee assignment"? Does this mean that EA has sent the manuscript out for a second review? Why would the EA send the manuscript out for a second review? Is the EA unsatisfied with the referees' report, so he wants to get an additional review?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


Help me with this,  Question: factor $x^3y-x^3z+y^3z-xy^3+xz^3-yz^3$.  Solution: $$\begin{eqnarray}&=&x^3y-x^3z+y^3z-xy^3+xz^3-yz^3\\ &=&x\left(z^3-y^3\right)+y\left(x^3-z^3\right)+z\left(y^3-x^3\right)\\ &=&x\left[(z-y)\left(z^2+zy+y^2\right)\right]+y\left[(x-z)\left(x^2+xz+z^2\right)\right]+z\left[(y-x)\left(y^2+xy+x^2\right)\right]\end{eqnarray}$$  This expression is quite simple at first glance, but I stuck up again in that line. I appreciate any help.

I'm trying to factorise $$ x^3z - x^3y - y^3z + yz^3 + xy^3 - xz^3 $$ into four linear factors.  By plugging it into WolframAlpha I've learned that it's $$-(x-y)(x-z)(y-z)(x+y+z)$$  My question is: what are the steps involved in factorising the expression? Is there a method I don't know about that I'd have access to with my limited maths?  Really appreciate any help!


Hopefully straightforward; as a European citizen in possession of a full driving license and legal vehicle; how can one take that vehicle (or motorbike) to Iceland?   Assume that any departure point in Europe is cost-effective to reach/use.

I am considering going to Iceland and was wondering if it is feasible to take there my car with me. The only way to get there by ferry that I could find is described , which suggests getting to Denmark first (which is in the opposite direction), and then getting a slow ferry from there. Is there a better way?


I am new to python and I am using it for scripting.   I am trying to understand how glob works, also how is the star (*) related to glob and how does it work?   I have looked at many sources but i have been unable to find out what the star (*) means for glob

Does * have a special meaning in Python as it does in C? I saw a function like this in the Python Cookbook:  def get(self, *a, **kw)   Would you please explain it to me or point out where I can find an answer (Google interprets the * as wild card character and thus I cannot find a satisfactory answer).


I am using a Linux system. The X-Window will be closed if keyboard idles for 5 minutes. One way to avoid the closure of X-Window is to press the ENTER key within 5 minutes. My question: Is there an automatic way to "press" ENTER key from keyboard?  I tried the following command from a script but failed:  echo -ne "\r" > /dev/myTTY   or  echo -ne "\n" > /dev/myTTY   The newline or CR appears in the command line, but system did not seems to have received the command.

I just installed a fresh Ubuntu 12.04 (Precise Pangolin).   I noticed that, there is no screensaver settings, which is fine. I like to control the period of time after which the blank screen is shown,which automatically locks the screen.  I do not want to enable screensaver. I only wish to be able to change the idle time period required to lock the screen automatically. It seems to me, it is by default around 10-15 minutes.


This kind of confuses me... Taking a stone from a timeline disrupts the said timeline right? While getting a person FROM a timeline seems no repercusion (E.G Loki vanishes with the Tesseract(Space stone), 2014 Thanos comes to present)   Why can't they just get a Tony Stark from the past, maybe before the snap? Or maybe alter the whole History (Make Captain Marvel snap the gauntlet rather than Tony, she held the gauntlet for some time right?)  Just so that Stark can have his family and the whole movie wont have to have a sad ending.

Why can't the Avengers in Endgame go back in time to 2016 and bring Black Widow from 2016?  They can explain her about Infinity War and Endgame. I'm sure she can understand, considering the fact she knows everyone has superpowers and the explanation sounds reasonable.  This is similar to how Star-Lord is trying to find Gamora.


I am developing a plugin and i want to add my own button to the wordpress media upload interface (WP version 3.5). Right next to the standard 'insert into page' button, i want my button to be there, let's call it 'insert special image'.  Can anyone point me in the right direction, where should i look? which WP source files are defining the functionality of this button?  Basically my 'insert special image' button should do pretty much the same thing like the standard 'insert into page' button - take an attachment and insert it into post, only with some added data.

In my plugin, I would like to add two buttons to Media Manager (to the left of "Insert Into Post" in "media-toolbar-primary" section), and connect a jQuery action to it.   First one - The "Select All" button shoud allow to select all availabe images (only images), depending on option value selected (eg. All Media Items, Uploaded to This post etc). So if "All Media Items" is selected - all images available will be selected, if "Uploaded to This post" is selected - only images attached to current post will be selected. Second one - "Custom Insert Into Post" - will get images data for all selected images (full size image source, alt text, size etc that are available) and while allowing to wrap them in aditional html code - return code to tinymce editor.   Returned code for second button could look this way:

   As far as I understand, the only way is to use override appropriate Backbone view, but beside that, thats all I know for now.  Thanks for help.


Is there a possibility to send a email notification when gitlab backup is done? I run the backups automatically with a cronjob

The place I work at has commands that take a long time to execute.   Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a little sound.


I dynamically append some html code (contains input type checkbox) using jquery. the data showing perfectly with class and ids but when i tried to access those input tags (input type checkbox) by using jquery it is not happening. Why? and is there any solution?  My Html

   My Scripts

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.


While you're mounted, you have two options. You   can either control the mount or allow it to act   independently. Intelligent creatures, such as dragons,   act independently.      You can control a mount only if it has been trained   to accept a rider. Domesticated horses, donkeys, and   similar creatures are assumed to have such training.   The initiative of a controlled mount changes to match   yours when you mount it. It moves as you direct it, and   it has only three action options; Dash, Disengage, and   Dodge. A controlled mount can move and act even on   the turn that you mount it.   I own a horse and it is trained to come when I whistle.  At the start of combat I am unmounted and I whistle (not an action). On the horses turn it spends its action to disengage (avoiding OA) and spends all of its movement to come to my side. On my turn (in the same round of combat) I spend half my movement to mount the horse. The horses initiative changes to match mine.  Question: Can the horse spend movement and take an action immediately even if it already spent those resources?   This would allow a mount to have an extra action/movement every time it is mounted. Taken to the ridiculous extreme, it would also allow faster-than-light travel as the horse is mounted, moves, dismounted, and mounted again by another character in succession.  Note that the object of my question is NOT to find out if I can travel through time on my horse given enough help, but just to find out if my horse can re-use its move/actions after being mounted.  Inspired by  question.

N Medium humanoids have gathered on an arbitrarily long field, standing in a line with each creature 120 feet away from each of its neighbors. The creature at one end of the line is mounted on a horse with a speed of 60. The creatures are arranged in initiative order, such that all N creatures will act in the order of their position in a single melee round. The mounted creature acts first.  Each creature other than the mounted creature is holding a pike and has readied an action to Shove the next mounted creature that moves adjacent to it.  On its turn, the mounted creature commands its mount to move 60 feet towards the next creature, then drops prone (which is not stated as a condition for dismounting in the Mounted Combat section of the 5e PHB) and orders the horse to Dash and move 60 feet more, closing the distance. At this time, the next creature's readied Shove triggers, and it makes an attack on the rider. Assuming the attack hits (which is likely, given that the rider is prone, thus granting advantage, and for the sake of the example has no armor or dexterity bonus to AC) the rider will be pushed off of his mount and the mount leaves his control. At this time he has used his actions and the second creature's turn begins.  Creature 2 starts by mounting the now-adjacent horse, whose initiative changes to match his. However, the horse's turn ended when its first rider's turn did, and thus it is taking a new turn when its second rider mounts it. The second rider orders it to move 60 feet towards the third creature, drops prone, and orders it to Dash another 60 feet, triggering the third creature's readied Shove. This procedure continues until one of the Shove attacks fails, allowing the horse to move a theoretically infinite distance in a single 6-second round.  I am absolutely certain there is a flaw in this logic, but I can't find it – what error breaks this strategy?


I'm trying to solve this problem $(5.8)$ from Bass' Real Analysis for Graduate Students:     Show that if $f:\Bbb{R}\to\Bbb{R}$ is Lebesgue measurable and $$f(x+y)=f(x)+f(y)$$ for all $x,y\in\Bbb{R}$, then $f$ is continuous.   The first thing I note is that it suffices to show that $f$ is continuous at $0$, since if this is the case then for any $\epsilon>0$ and $x_0\in\Bbb R$, there exists $\delta>0$ such that $|x|<\delta$ implies $|f(x)|<\epsilon$; in particular, replacing $x$ with $x-x_0$, we see $|x-x_0|<\delta$ implies $|f(x)-f(x_0)|=|f(x-x_0)|<\epsilon$.  Now, what I need to show then is that $f^{-1}(-\epsilon,\epsilon)$ contains some interval at the origin. I know that this set is Lebesgue measurable because $(-\epsilon,\epsilon)$ is Borel measurable, and I know it contains $0$ since $f(0)=0$, but I'm not sure how to show it contains $(-\delta,\delta)$ for some $\delta$. I haven't used the fact that the set is Lebesgue measurable, so obviously theres some way I can use that but I'm not seeing it.  Any suggestions?  edit: because this has been tagged as a possible duplicate, I should point out that I'd prefer to figure out if the solution I am working on will work, rather than just copy a completely different solution outlined by some other user.

Let $g:\mathbb{R}\to\mathbb{R}$ be a measurable function such that    $$g(x+y) =g(x)+g(y).$$   How to prove that $g(x) = cx$ for some $c\in \mathbb{R}?$     The main thing to do here relies upon the fact that such function should be continuous and therefore by natural argument the answer will follow.  Using this    Therefore I found out that there is nothing missing in this question.


I am trying to implement my own vector data structure. The code works fine, but when I write my unit tests, there is a linkage error where inside my unit test, the code is not getting linked  Upon encountering this error, I tried accessing a public data member of the class. I also tried accessing the member function which was defined in the header file instead of the source file. These two methods seem to work successfully.  CODE SNIPPET FROM THE UNIT TEST     GIVEN("A vector with some items") {     MyVector<int> v(5);     REQUIRE(v.capacity_ == 5); //works     REQUIRE_NOTHROW(v.test()); //DOESN'T WORK     REQUIRE(v.size() == 5);    //DOESN't WORK    } }   CODE SIPPET FROM THE SOURCE FILE:  /***  * Size of MyVec  * @tparam T  * @return Type int  */ template<class T> int MyVector<T>::size() {   return this->size_; }  // Sample test function template <class T> void MyVector<T>::test() {   return; }   /tmp/ccgR8GPW.o: In function `____C_A_T_C_H____T_E_S_T____0()': tests_vector_impl.cpp:(.text+0x25ce2): undefined reference to MyVector<int>::test()  tests_vector_impl.cpp:(.text+0x25dbc): undefined reference to `MyVector<int>::size()' collect2: error: ld returned 1 exit status```

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


Let $G$ be a finite semigroup .Prove that there exist $x\in G $ such that $x^2=x$  How to approach this problem.i know i have to use that $G$ is finite set. but from where to start.  please  provide any hint where to start with ??

Let $(G,\cdot)$ be a non-empty finite . Is there any $a\in G$ such that: $$a^2=a$$ It seems to be true in view of theorem 2.2.1 page 97 of  book (I'm not sure).  But is there an elementary proof?  Theorem 2.2.1. [R. Ellis] Let $S$ be a compact right topological semigroup. Then there exists an idempotent in it.  This theorem is also known as .


A king has 1000 bottles of wine each of different brand. A man mixes poison in exactly one of these bottles and is caught and brought in front of the king.The man refuses to tell about the specific bottle. The king decides to use his men up(decides to make them drink) to find the poisoned bottle. The poison is such that even a drop of it causes instant death.How many of the king's men would have to be sacrificed before he finds out the bottle.

I just got out from my Math and Logic class with my friend.  During the lecture, a well-known math/logic puzzle was presented:  The King has $1000$ wines, $1$ of which is poisoned.  He needs to identify the poisoned wine as soon as possible, and with the least resources, so he hires the protagonist, a Mathematician.  The king offers you his expendable servants to help you test which wine is poisoned. The poisoned wine is very potent, so much that one molecule of the wine will cause anyone who drinks it to die.  However, it is slow-acting.  The nature of the slow-acting poison means that there is only time to test one "drink" per servant. (A drink may be a mixture of any number of wines)  (Assume that the King needs to know within an hour, and that any poison in the drink takes an hour to show any symptoms) What is the minimum amount of servants you would need to identify the poisoned wine?  With enough time and reasoning, one can eventually see that this requires at most ten ($10$) servants (in fact, you could test 24 more wines on top of that 1000 before requiring an eleventh servant).  The proof/procedure is left to the reader. My friend and I, however, was not content with resting upon this answer.  My friend added the question:  What would be different if there were $2$ wines that were poisoned out of the 1000?  What is the new minimum then?  We eventually generalized the problem to this:  Given $N$ bottles of wine ($N \gt 1$) and, of those, $k$ poisoned wines  ($0 \lt k \lt N$), what is the optimum method to identify the all of the poisoned wines, and how many servants are required ($s(N,k)$)?  After some mathsing, my friend and I managed to find some (possibly unhelpful) lower and upper bounds: $ log_2 {N \choose k} \le s(N,k) \le N-1 $ This is because $log_2 {N \choose k}$ is the minimum number of servants to uniquely identify the $N \choose k$ possible configurations of $k$ poisoned wines in $N$ total wines. Can anyone help us find an optimum strategy?  Besides the trivial one requiring $N-1$ servants.  How about a possible approach to start? Would this problem be any different if you were only required to find a strategy that would for sure find a wine that is not poisoned, instead of identifying all poisoned wines? (other than the slightly trivial solution of $k$ servants)