I'm currently in my final year of undergraduate study, and will be applying to physics PhD programs (for condensed matter theory) soon. Without going into details, I am convinced that deferring my admission for a year, i.e. taking a "gap year", would be beneficial for me personally, and it is my understanding that most schools permit a one-year deferral. I would most likely work in the tech industry for this time.   I am not worried about my physics/math abilities atrophying; I plan on actively keeping up with my studies independently during this time.   Assuming I am permitted to defer for a year, are there any negative perceptions related to time off before graduate school that might affect my future academic career, after the PhD?  Will some people in the community look down on me for taking time away from academia, or is this considered a fine thing to do? Could this hinder me in the future when applying for postdocs (both the year away from academia and the fact that I am probably finishing my PhD a year later than I otherwise would)?  I am asking about the general perception of a gap year as it pertains to and affects a career path, not about how a gap year impacts a PhD application (which is addressed in ).

I have a number of Arabic friends applying to graduate school and due to their situation, they tell me they intend to apply and then get a deferment for the next year. I am curious how common it is for grad schools to allow this.  I ask this because I am considering applying to PhD program in statistics and I'm starting a Master's program this fall. My GRE scores will expire at the end of the year and so I am considering applying to PhD programs this fall (with the expectation of deferring acceptance for the following year, which will be right after I get my Masters).  Most of the schools I look at seem to discourage deferment, and the only reason why I can think maybe the Arabic students don't run into difficulties is b/c they don't require any funding (they tend to be on the KSA scholarships).  Just curious if anyone can give me a realistic idea of how grad schools generally deal with deferments?  TIA, Matt


Is there a formula to calculate $1^1 + 2^2 + 3^3 + ... + n^n$  I searched but didn't find a formula for increasing powers

Is there a formula to calculate the sum of a number to the power of this same number, like:  $$1^1 + 2^2 + 3^3 + 4^4 + 5^5 + ... + n^n$$?  or   $$x^x + (x+1)^{(x+1)} + (x+2)^{(x+2)} + ... + (x+n)^{(x+n)}$$


If I have a grid of images, let's say political cartoons, that have differing aspect ratios and cannot be cropped, how can I display them in a grid or even linear fashion?  This is for a newspaper website, I have hundreds of political cartoons that cannot be cropped to a consistent aspect ratio due to content. I can display them linearly, top to bottom, but I would rather have a grid of some sort.  New cartoons will be added regularly, so the whole thing needs to be flexible.  Thoughts?

I nee help, your opinions and which options do I have to resolve my problem. Currently I'm working on a website that have a Thumb view and I'm not happy on how the items are displayed, I have something like this:    So, the real problem that I am facing, is that the images loaded inside each of the thumbs may vary their sizes, there are some images higher other wider, so I decided to center each of them inside the thumb, in this way:   The images whose height were major than the width I centered in the X axis The images whose height were minor that the width I centered in the Y axis   I made it in this way to show to the user the image correctly and not zoomed or cutted, but now the thumbs are really ugly, the view can for example look like this:    The size of the images are a thing that I can't handle as I get them dinamically from some services. To be more precise, it's a capture of the list in the site:    The upper and down space between the images is because the size of the thumb div, so it lets that space that I really don't like,  when the user hovers over the thumbs 2 buttons are displayed, so I need that the thumb be at least the enough higher to display them (this maybe could be more problematic with the images that are to wide). So, what are the recommendations to improve the UI/UX of this list? Thank you very much in advanced!


I've been writing some stuff to my English classes, and in between them, I found myself with a question. There are a lot of ways to divide a word, meaning for example at the end of the sentence - when the space is over, it is a well-known criteria to break-up the syllables, as in any dictionary.   However, I've always been taught that words in English could NOT be separated (as Spanish and Portuguese - my birth languages), and when I began reading and studying the language closer, I noticed that YES! They can be. So, in conclusion, my teachers always said I was never to divide them, which means I do not have a lot of knowledge about this.  Running through the question (which is the main point here), how do I break a word if it's a verb terminating in -ING?  For example:     She was talking.   Can I say the infinitive verb and follow it by a hyphen, allocating the -ing on the line under? E.g.,     She was talk-   ing.   Or am I supposed to don't do anything, and continue dealing with them as it is impossible to divide them?   (Making my test look a little bit messy and informal).  I hope some of you can help me, I really struggled to find this information on the internet.

What are the rules in English language to split words at the end of a line?   Where exactly must the hyphen split the word?


I dont know if this has already been asked.  How to prove this integral $$\int_0^{\infty}\frac{dx}{1+x^n}=\frac{\pi}{n}\csc\frac \pi n\ {?}$$ $n\ge 2$ is a positive integer   Frankly speaking i have no clue how to start someone please explain me.

Using residues, try the contour below with $R \rightarrow  \infty$ and  $$\lim_{R \rightarrow  \infty }  \int_0^R  \frac{1}{1+r^n}  dr \rightarrow \int_0^\infty  \frac{1}{1+x^n}  dx$$    I've attempted the residue summation, but my sum did not converge.


When I start a virtual machine, it appears the following message:    The question is, how to increase the swap file?   I am using VMware® Workstation 15 Pro 15.0.2 build-10952284  This is the actual size of swap:  swapon NAME      TYPE SIZE USED PRIO /swapfile file   2G  11M   -2

I have, by default, 250MB of swap space in Ubuntu, and I want to expand it to a larger size. I need 800MB, which I think will be enough to open several applications without having to hit the current limit of swap. I hope someone can help me.


Im making a kind of information terminal, is there a way to start my program instead windows 7 desktop? Not together but only my exe program.

I would like to re-map existing shortcuts, right-clicks, etc so Q-Dir is opened instead of default Windows Explorer.  short of renaming ``explorer.exe in Windows folder - are there any settings I need to look at?  maybe in Registry somewhere?


Often in java code I see people declaring arrays in 2 different ways.   Sometimes it is  Object[] someObjectArray = new Object[...];   And other times I see  Object someObjectArray[] = new Object[...];   I have always used the first one.  I have tried googling this, but I cant seem to word the question correctly, so is there any difference, and of so, how are the two used differently?

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


In my topology class we proved that $\mathbb{R}\times\mathbb{R}$ $\cong$ $\mathbb{R}^2$, when $\mathbb{R}$ and $\mathbb{R}^2$ has the metric topology and $\mathbb{R}\times\mathbb{R}$ has the standard topology. When we did the proof mye professor said that it was enough to show that if U$\times$V was open in $\mathbb{R}\times\mathbb{R}$ then U$\times$V is open in $\mathbb{R}^2$ as well. And then to show that if V was open in $\mathbb{R}^2$ then V was open in $\mathbb{R}\times\mathbb{R}$ as well. I do not understand how this is enough to show homeomrphism, how ever i'am guessing it might have something to do with the fact that a homeomorphism is a bijection where f(U) is open when U is open?  Also could you prove this by defining f: $\mathbb{R}^2$ $\rightarrow$ $\mathbb{R}\times\mathbb{R}$, f(a,b)$\rightarrow$ a$\times$b? and then showed that f$\circ$ $f^{-1}$ is the identety map?

I'm new to topology, and can't figure out why the metric and product topologies over $\mathbb{R}^n$ are equivalent.  Could someone please show me how to prove this?


So, I am fairly new to programming and I started learning about Math.random. I am trying to code a program that will print values in between 4 - 12 but i can't seem to print only the values inside that range. It prints 13 which i don't want to   My Code:   public class MathRandom{     public static void main(String[] args){          for(int x = 0; x < 10; x++){ //Just to test what numbers are displayed         System.out.println((int) (Math.random() * 10) + 4);          }     } }   Did I miss something? thanks in advance for the help

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


I have installed Ubuntu 14.04 version along side with windows 7. Ubuntu freezes randomly I am unable to use any keys on keyboard since they are not working even mouse is not working.the only solution to get off from this freeze is restarting my computer.I have ATi/AMD graphic card but I removed it before installing Ubuntu 14.04.I have run memory test no problem with ram.please give some solution to get rid of this abnormal freeze. thanks in advance. system configuration  CPU=Intel core 2 duo e7500 2.93ghz  motherboard=Intel dg41wv  hard disk=Seagate 500gb  ram=4gb I dual booted windows 7 and 12.04 LTS version.in 12.04 I am getting freezes frequently so reinstalled by formatting whole computer and installing windows 7 and Ubuntu 12.04 but still freezes are frequently occurring.then I formatted whole system again installed windows 7 and Ubuntu 14.04 still I am getting random freezes..I am using GCC compiler,vim editor and Firefox no other applications

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


How can we remove or reset Windows passwords in Windows 8, without logging in to windows first?  In Windows 7, I used Hirens but it is not working for Windows 8.    I am talking about local user account password not Microsoft online accounts like @hotmail.com or domain accounts those can be reset.   The scenario is a computer running Windows 8 with a local only user and the client forgot the password to the only active account. Is there a way to remove or reset that password?

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


When creating a new xml file, how does one go about structuring the file correctly or the best possible way. By structure, which may not be the best word in this case, I mean how does one choose between making something an element or an attribute of an element.  For example, if I create a Person.xml file which contains a list of Persons, is it better to do something like:  <Person>     <FirstName>John</FirstName>     <LastName>Doe</LastName>     <Age>23</Age> </Person>   or is it better to do something like this or does it even matter?  <Person FirstName="John" LastName="Doe" Age="23"></Person>

At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file.   The sample I came up with is essentially something like:  <INVENTORY>    <ITEM serialNumber="something" location="something" barcode="something">       <TYPE modelNumber="something" vendor="something"/>     </ITEM> </INVENTORY>   The other team said that this was not industry standard and that attributes should only be used for meta data. They suggested:  <INVENTORY>    <ITEM>       <SERIALNUMBER>something</SERIALNUMBER>       <LOCATION>something</LOCATION>       <BARCODE>something</BARCODE>       <TYPE>          <MODELNUMBER>something</MODELNUMBER>          <VENDOR>something</VENDOR>       </TYPE>    </ITEM> </INVENTORY>   The reason I suggested the first is that the size of the file created is much smaller. There will be roughly 80000 items that will be in the file during transfer. Their suggestion in reality turns out to be three times larger than the one I suggested. I searched for the mysterious "Industry Standard" that was mentioned, but the closest I could find was that XML attributes should only be used for meta data, but said the debate was about what was actually meta data.  After the long winded explanation (sorry) how do you determine what is meta data, and when designing the structure of an XML document how should you decide when to use an attribute or an element?


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

I am looking for an online course, something similar to the Berkely and Stanford Courses that covers Linux systems programming. A course which could use Stevens ( with some supplemental material covering  linux idiosyncracies ) as the text ( observe: could use not does use ).    Purpose: I've read through a large chunk of Stevens--somewhere between 1/3 and 2/3. Essentially I would like to plug in the gaps as easily as possible. A set of video lectures seems the best way. But not some youtube dweeb trying to show he can tie his Linux shoelaces. [1]  [1] Not all youtube entries are like that, but you will have to wade through a lot to get to the worthwhile ones. Unless you get lucky.


i want to disable google play store auto updates. I am not talking about auto update applications. I don't want to update my google play store version. Please help me.

How can I stop Google play from automatically updating to the latest version? I tried deleting my hosts file but it's not being deleted. My phone is rooted.


I have like 15 Layers, and a other one with light. I need to render the 15 layers separate but still keeping the light from the apart layer. And i need to leave the computer rendering in the weekend doing the full work, how can i render different 15 layers on different 15 folders?  edit: I'm using Cycles.  Thanks in regards.

I am having an issue with EXR file export that I did not encounter in previous versions of Blender. I used to be able to render a render layer with all its passes and get all the passes included with the render layer with the EXR export; the problem I am finding now is that I am not able to "pack" the passes with the EXR file (see graphic below). I am working with "standard" EXR, as I understand that the EXR multilayer is for multiple file handling (packing all the image files into a single container), but I may be wrong.    In the screenshot, the graphic is an EXR saved from the rendered layer; you can see in the screenshot how the "extra" passes from the render layer has been ignored by the graphic and only shows the standard image, z and alpha passes. I found this issue for the first time with Blender 2.71; and maybe with Cycles; in the past I have never had an issue with EXR export.  Am I missing something? I hope EXRs still work with Blender, I wouldn't know how to composite without such invaluable aid. Sorry if this question has already been answered somewhere; I have really searched the site for information on EXR but I could not find an answer to my issue.


I have two versions of software, one is an old beta version,  one a new distributable version. I need both as they each include specific capabilities. However, the old version refuses to install when a newer version is pre-installed, the newer one auto-deletes the old version upon install. This all in a Windows 10 environment. The software is specific purpose software to fit hearing aids (PhonakTarget).  edit: To emphasize the difference with the previous question I'll elaborate on the situation:  The thing is both software packages use one and the same local database and it would be great when both versions can access that data base. This makes a virtual machine a lesser favorable option. I may be able to work around it (copy the database to the VM or the reverse) but that will increase the chance of making human errors. Best would be to find a solution such that both versions can run on the same Windows install. They do not need to run simultaneously, however.   Stuff I tried but did not work:   installing both versions in a different folder resulted in the same behaviors as detailed above; generating another user in Windows didn't help, because both users have access to the same C:/ components.    Hence, I am stuck. Two options provided under this  I tried above, and generating a virtual disk has the drawback of the split local databases. There is no database on a server or anything; all must be dealt with locally due to safety restrictions in my company (laptops can't access the intranet).

I manage phone systems for multiple clients. Each system uses the same administrator software, but it runs on different versions depending on what version of firmware is installed on the system controller.   The software is downloaded directly from the system controller so it's the right version. For example, if the controller runs on version 5.0.2, you have to run version 5.0.2 of the administrator software. You can't administrate a 5.0.2 controller with a later versions of administrator software.   Bottom line, you have to have the right version of software to log into the controller. The software is not executable on its own, you have to install it. So every time I want to log into a different controller, I have to reinstall the right software.   Any way to get around this?   I'm running Windows 7 Enterprise x86.


How to prove the convexity of   $$f (W) = \operatorname{Tr}(WLW^T)$$  where $L$ is a (positive semidefinite) Laplacian matrix?  I need to prove this to build a convex function for optimization in a machine learning method.

Is the function $\mbox{tr}(XAX')$ convex, where $A$ is a positive semidefinite (PSD) matrix? I know that for a general $A$, the above trace function is not convex. But for a PSD $A$, is the function convex?


I'm using classicthesis and the geometry package for the margins. The page numbers are top outer, but should be within ALL of the margins. I've successfully got the page numbers within the top and bottom margins,   What I've tried that doesn't work: 1) I've tried includeall and includeemp in the geometry package -- it shifts the page number successfully but then reduces the text width as if making room for margin notes 2) I tried \marginparwidth 0pt, \marginparsep 0pt to remove space for margin notes and that didn't work either.  Here's a working example:  \documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude, footinclude=true,cleardoublepage=empty,dottedtoc, BCOR=5mm,paper=a4,fontsize=11pt, fontsize=11pt, ngerman,american, ]{scrreprt}   \input{classicthesis-config} \usepackage[inner=3.5cm, outer=2.5cm, top=2.5cm, bottom=2.5cm,includefoot,includehead]{geometry}   \deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark}{} \pagestyle{pgnumbottomcenter} \deftripstyle{pgnumtopouter}{}{}{\pagemark}{}{}{} \renewcommand{\chapterpagestyle}{pgnumtopouter}   \begin{document}  \pagestyle{scrheadings}  \pagenumbering{roman}   \section{hello} \newpage \section{what's up}  \end{document}   And a screenshot of the second page, showing what I'd like to achieve:

How to edit the margin of Page numbers to fill within the type area (Figure Below)?   Some page numbers are placed in the footer (Figure below). How to keep all pagination in the header only?


Let $(a_n)_{n \geq 1}$ be a sequence of positive numbers such that $a_{n+m} \leq a_n + a_m$ for all $m,n \geq 1$. (So the sequence is not necessarily monotonic, but from $a_n$ to $a_{n+1}$, it can increase by at most $a_1$). Let \begin{equation*}I = \inf\left\{\frac{a_n}{n}: n \geq 1\right\}\end{equation*} It is to be shown that in fact \begin{equation*}\lim_{n \to \infty}\frac{a_n}{n} = I\end{equation*} I attempted to show that the sequence $\left(\frac{a_n}{n}\right)$ is monotonically decreasing, which would imply the result, but this in fact seems to be false in the general case. So any suggestions would be appreciated.

Let $\{a_n\}_{n=1}^\infty$ be a positive sequence of real numbers such that $a_{n+m} \leq a_n + a_m.$  Prove that $\lim_{n\to\infty} \frac{a_n}{n}$ exists by showing that $\lim_{n\to\infty} \frac{a_n}{n} = \inf_{n \geq 1} \frac{a_n}{n}.$   A similar question has been posted previously, see  , and I have found that this is the general result of "Fekete's Subadditive Lemma" for sequences, but I am unhappy with the few proofs I've seen.  Perhaps the clearest one I have found is  , but this seems a bit tricky for what is expected on this qualifier question.  We are given a hint "treat $\liminf$ and $\limsup$ separately".  Does anyone know of a more direct way to show that this limit exists?


For my java class, I am suppose to create a SlotMachine class that generates 3 arrays of 3 random numbers and checks if all of the numbers match, if so they are declared a winner. I also have to create a another program to run 1000 slot machines and count the winners. The problem is every time I run the SlotMachine class and the main method, I get an exception error that I can't figure out how to fix.   The exception error:   Exception in thread "main" java.lang.NullPointerException     at SlotMachine.isWinner(SlotMachine.java:41)     at Play1000SlotMachines.main(Play1000SlotMachines.java:14)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)   The SlotMachine class:  // import statements import java.util.Random;  public class SlotMachine {   // fields private int[] row1; private int[] row2; private int[] row3;  // methods public SlotMachine(){     playMachine(); }  public void playMachine(){      Random random = new Random();      int row1[] = new int[3];     int row2[] = new int[3];     int row3[] = new int[3];       for (int i = 0; i < 3; i++) {         row1[i] = random.nextInt(10);     }      for (int i = 0; i < 3; i++) {         row2[i] = random.nextInt(10);     }      for (int i = 0; i < 3; i++) {         row3[i] = random.nextInt(10);     } }  public boolean isWinner(){      if (row1[0] == row1[1]){         if (row1[0] == row1[2]){             return true;         }      }      if (row2[0] == row2[1]){         if (row2[0] == row2[2]){             return true;         }     }      if (row3[0] == row3[1]){         if (row3[0] == row3[2]){             return true;         }     }     return false; } }   The main method:  public class Play1000SlotMachines{  public static void main(String[] args){      // comment     SlotMachine slotMachine = new SlotMachine();      // comment     int count = 0;      // comment     for (int i = 0; i < 1000; i++){         slotMachine.playMachine();         if (slotMachine.isWinner())             count++;     }      // comment     System.out.println("From 1000 slot machines, " + count + " were winners"); } }

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


Let $f:I\to\mathbb{R}$, $f''(x)=a$ for all $x \in I$. Show the existance of $b,c \in \mathbb{R}$ such that $f(x)= {a \over 2}x^2 + bx + c $.    So, it's actually just taking the derivative twice. Isn't it? $f'(x) = ax + b$ $f''(x) = a$    Show the statement isn't necessarily true if $f:A \to \mathbb{R}, f''(x)=a$ for all $x \in A$ when $A$ isn't an interval.    Can you direct me? I suspect I should give an example such that the derivative doesn't exist. Right?

Let $f:I\to\mathbb R$ where $I$ is an interval, $f''(x)=a \ \ \forall x\in I$.  Prove that there exsits such numbers $b,c\in \mathbb R$ such that: $f(x)=\frac a2x^2+bx+c ,\ \forall x\in I$.  Show that the above statement is not necessarily true if $f:A\to\mathbb R$ and $f''(x)=a \ \ \forall x\in A$ where $A$ is not an interval.    I'm not sure I know how to prove 1, it's probably isn't enough to just derive $f(x)$ twice  and we can't integrate... About 2. it means that the function isn't continuous but we see that it's still derivable so how can I find the relation between $b,c$ and $f$ ?


There are multiple, huge spoilers for the latest Avengers film in the Hot Network Questions bar. This bar cannot be hidden, and I cannot install plugins at work to "hack" a fix. Nor should I need to. I come to SO for programming help, not to see spoilers for the latest blockbuster film/TV show. And let's not even get started on the often NSFW topics that are discussed across the various subforums.  Please make the HNQ bar hideable, and stop allowing spoilers to be posted as questions.

While the hot network questions list can be entertaining, there are a few situations in which it harms the experience of using SE sites, especially when you use SE sites at work.  I know that variations of this have been asked before, but I think the way the SE network changed in the meantime does merit a new discussion about this. We have far more sites that are more entertainment than professional now, and the mix of entertainment and professional topics makes the HNQ list problematic in some cases.  There are a few situations I can think of where the presence of the HNQ list has a negative effect:   the appearance of pretty much random questions about all kinds of topic can be a bit annoying in a work setting. The other people looking at your screen might not see that you're only trying to solve a programming issue, when there is some inappropriate content in the sidebar. it exposes you to spoilers or information about recent TV series, movies, books, etc. While titles are usually written to avoid major spoilers, this is not always the case, and it's still at least a distraction. in any case, the hot network questions are a distraction. It's pretty much their purpose, but sometimes I don't want to be distracted.   I know this can be solved by a user script, but that is not a real solution and has several drawbacks. It's seriously annoying when you use multiple devices, it only solves the problem for a tiny amount of users. User scripts are a workaround, not a solution.  We don't have any control over the HNQ list, especially on work computers where the workarounds can be disallowed. We can choose which SE site to visit, but the HNQ list is always there, mixing professional and unprofessional content.   What I'd propose is to make the HNQ sidebar collapsible, and remember the collapsed state for the user session (or forever for that user). A single click would collapse the list to only the title, and a second one would expand it again to the full list. This would make it easy to hide the HNQ list for a short time, e.g. mondays when Game of Thrones is running, or essentially permanently as well, if you simply don't care about them at all.


I need help with this.  I have these 2 tables. I need to print the firstname from the corresponding id. It's for something like a buddy app where people get matched so for example i need it to print 'Charlotte and Sam are now buddies'.  users:       id  /  firstname  /  lastname     --------/-------------/------------      1  /  charlotte  /  jeuris      2  /  sam        /  verdaet      3  /  hilde      /  hayen   matched:    user1  /  user2 ---------/----------    2     /    3    1     /    3    what i have now is:    $statement = $conn->prepare("     SELECT users.id      FROM users      LEFT JOIN matched ON users.id=matched.user1      and LEFT JOIN matched ON users.id=matched.user2");   but at this point i really don't have a clue anymore what's wrong or right..  Thanks!

I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).  the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains table.  Simple.  Now I need to actually display both domain names on the webpage. I know how to display one or the other, via the LEFT JOIN domains ON reviews.rev_dom_for = domains.dom_url query, and then you echo out the dom_url, which would echo out the domain name in the rev_dom_for column.  But how would I make it echo out the 2nd domain name, in the dom_rev_from column?


Shouldn't the square root of a number have both a negative and positive root? According to Barron's, $\displaystyle \sqrt{x^2} = |x|$. I don't understand how.

Lets say I have a function defined as $f(x) = \sqrt {x^2}$. Common knowledge of square roots tells you to simplify to $f(x) = x$ (we'll call that $g(x)$) which may be the same problem, but it isn't the same equation. For example, say I put $-1$ into them:  $\begin{align} f(x) &= \sqrt {x^2} \\ f(-1) &= \sqrt {(-1)^2} \\ f(-1) &= \sqrt {1} \\ f(-1) &= 1 \end{align}$  $\begin{align} g(x) &= x \\ g(-1) &= -1 \end{align}$  thereby, we conclude that $f(x)$ and $g(x)$ do not produce the same results even though they are mathematically the same. This is also shown when we try to graph the functions:  :    :    :    From this, we can see that given $f(x) = \sqrt {x^2}$, when simplified is not the same as $f(x) = x$. So, is there any way to prove that $y = \sqrt {x^2}$ is not the same as $y = x$ for negative values, but is infact the same as $y = \mid x \mid$?


I am currently trying to grab the map extent of each page in my QGIS atlas. My python function uses the line:   iface.mapCanvas().extent().toString()   which prints the extent just fine. The only problem is the numbers don't match the extent shown in the item properties under 'Extents'. When I draw the polygon from these coordinates the area it covers is huge. The labelled extent does not even update when I switch pages. I have already tried several code snipppets among that the one from:  which does not work with my QGIS 2.99 nor does it actually solve my problem.    Do I need to specify in my function that it should only grab the extent of the @currentfeature or is there something else wrong ?

In answering a labeling question:  I found myself wondering if there was a way to programmatically get the extent of a composer map so it could be displayed in labels and used in expressions.  So the question arose: Is there a way to find the extent of a specific map on a specific composer programmatically in a way that could be used in the expression engine? I've come up with a solution (I'm posting as an answer below) But I'd be happy if there was a more efficient solution. If you have a better one let me know.


I wish to make a generic extension method :  public static IList<ValidationResult> ValidateMany<T>(this IValidator validator, IList objectsToValidate) {     var results = new List<ValidationResult>();     foreach (var obj in objectsToValidate)     {         var validationResult = validator.Validate((T) obj);         results.Add(validationResult);     }     return results; }   I would like T to be passed in. That may seem easy by adding a template param, but then from the calling code I would like to do :  // calling code var typeOfT = WorkOutTypeFromObjects(objectsToValidate); var objectsToValidate = RowsToObjectsFactory.Create(typeName, tableRows); var results = validator.ValidateMany<typeOfT>(objectsToValidate);   the top line there is the critical part that is hard to get, I need some dynamic way of working out the type and passing it in the T param. Or is there a good alternative?

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I have two multiline strings (in memory, not from files). How can I calculate a unified diff?  One solution would be to save the strings to temporary files, do a system call to diff -u and capture the output, but I'd rather do this in pure .NET. Happy to use NuGet package if it's not in standard library.

Requirements:   free, preferably open-source implemented in one of the .NET managed langs   Google found these:    on codeproject   by Joshua Tauberer   EDIT:  No apps please, only libraries.


I have a tif file containing 36 bands. After I applied raster calculation on the file the bands aggregate into one single band which I don't want because I need them for further calculation. People say that I can apply raster calculation on each band. I can do that but it is too troublesome .Is there any better way to keep all the bands as well as performing calculations on them?

I have a series of landsat wanting to process in raster calculator, but after doing the tool it happened these output images only contain one single band. They used to be RGB 3-band images.  It is on arcmap 10.3. I was using raster calculator to remove a certain value in my 3-band landsat image. After I type in the conditional statement to remove all 0 value from the inpur RGB image, it only returns an image of 1band, black and white. How can I preserve the RGB value in output.


If $R$ is a non-Noetherian ring, $M$ is a finitely presented $R$-module, and $N$ is a finitely generated $R$-module, does it hold that Hom$_R(M,N)$ is a finitely generated $R$-module?   We tried applying the Hom$(-,N)$ functor to the sequence $R^n \rightarrow R^m \rightarrow M \rightarrow 0$ and using the fact that $N$ f.g. implies Hom$(R^m,N)$ are f.g., but we have no clue how to proceed.

Assume that $M$ and $N$ are two finitely generated $R$-modules. Then $\operatorname{Hom}_{R}(M,N)$ is a finitely generated $\mathbb Z$-module and/or $R$-module (in this case, assume that $R$ is commutative)?   Note that $R$ is not Noetherian ring. Is there any counterexample (for any cases)?


What is the use of             #pragma section   directive in C language ?

What are some uses of #pragma in C, with examples?


I don't know why network strength is too low on wifi signal display though my hotspot device is beside my laptop, whereas it shows full network strength on my mobile which is comparatively far away from my hotspot device!    08:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd.  RTL8723BE PCIe Wireless Network Adapter [10ec:b723] DeviceName: Realtek RTL8723BE 802.11b/g/n 1x1Wi-Fi + BT4.0 Combo Adapter    Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:804c]   Kernel driver in use: rtl8723be   Kernel modules: rtl8723be

I have a HP 14-AN001NA laptop. It came with Windows 10 installed on which the Wi-Fi worked fine anywhere in the house.   However I removed Windows 10 and installed Ubuntu 16.04 instead and since I have had terrible Wi-Fi anywhere aside from about three foot away from the router. I don't know if it's relevant but my Wi-Fi is not called wlan0 but wlo1 for some reason (I didn't change it).  When running lspci -knn | grep Net -A3     I get the following output:  05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723] DeviceName:   Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:81c1] Kernel driver in use: rtl8723be Kernel modules: wl, rtl8723be


im having little trouble with my application. Its sending emails normaly but its going directly to spam. Im passing the message by parameter to the function. When i write the message directly in the method it works fine, let me show: if(isset($_POST["enviarEmail"])){ $title = $_POST["titulo"]; $message = $_POST["mensagem"]; Mailer::send($title, $message);  }             $mail->msgHTML($message);

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I currently hold a US F1 visa on my Iranian passport, and I've booked a flight from NYC to Tehran. The problem is that the trip is from JFK (US) to ZRH (Switzerland), from ZRH to FRA (Germany), and then from FRA to IKA (Iran). I'm wondering if I can stay in the international area of the airport for the domestic flight (ZRH to FRA) because I don't have a Schengen visa. If not, do I need a transit Schengen or another kind? I'm not sure if getting the visa would be easier/cheaper than canceling/rebooking the flight.  edit: turns out that even a transit visa wouldn't work for 2 layovers, so I contacted the booking website and canceled the flight, fortunately with a full refund.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I want to get the data within BBOX and form the CQL query URL as following:  http://[localhost]:8080/geoserver/mymap/ows?service=WFS&version=1.0.0&request=GetFeatur e&typeName=layer:layername&outputFormat=json&BBOX=-70.95699,50.89799,-71.17946,52.04493,EPSG:4326&cql_filter=(name+like+%27%25h%25%27%29

I need to filter an OpenLayers layer using a CQL filter to an specific Bounding Box. Is it possible?  Something like this isn't working:  igh > 5000 AND bbox(igh,20786691,22051867,-305577260,-306370356)


I am trying to show that  (R/I)/(J/I) is isomorphic to R/J  I and J are both ideals of the ring R, and I is a subset of J.  How do I begin this proof?

I'm trying to prove the third Isomorphism theorem as stated below  Theorem. Let $G$ be a group, $K$ and $N$ are normal subgroups of $G$ with $K⊆N$. Then $$(G⁄K)⁄(N⁄K)≅G⁄N.$$  I look up for some answered on google, but I don't understand any of those. I wonder if any one can show me this proof step by step. I don't want to get it done, I want to understand why this theorem is true.


I am using GNU Screen and I added mousetrack on to my ~/.screenrc so that I could select a window pane by clicking on it.  Unfortunately, since I enabled that setting, I can no longer use middle-click paste in any screen windows. Is there a way to enable mousetrack and still have middle-click paste?  I am using GNU Screen v4.03.01 in GNOME Terminal v3.18.3 on Ubuntu Desktop (Unity) v16.04.   is similar, but related to tmux. My question is about GNU Screen.

I've tried to set -g mouse on, and it works pretty well, but standard mouse behaviour (select, copy & paste) is disabled. But, it enables if I press "Shift" button, and while I hold it, I can select, copy & paste text from/to terminal. Can I inverse this behaviour? I want to use mouse inside tmux (for example to select panes or resize them) only with shift pressed.


99% of the time I'm using my trackpoint, but sometimes its nice to use the trackpad. I'm running libinput as my driver, and found out that libinput-gestures should be able to give me multi-touch configurations. I have everything installed but how do i configure libinput-gestures to give me a MacBook like experience.  I would like to atleast enable 1 finger click, 2 finger right click, 2 swipe finger left to go back in the browser, and 4 finger swipe up to show all applications. Any other gesture would be nice too.  If there is another way of doing this, I'm all ears... or all eyes haha

Is it possible to make multitouch gestures on Ubuntu Xenial Xerus? For example with TouchEgg? I tried already but without success.


I'm trying to pass stdout from a specific pipe to two other pipe, so that they run at the same time... It's essentially similar to what  post suggest: somecommand | xargs -I% tee >(firstcommand "%" | secondcommand | thirdcommand) >(anothercommand)  Now this works if I don't care about the position of the argument/string being passed through stdout of the first pipe... (as used on the second pipe in tee above) But if i do, then the use of xargs (which become needed here), doesn't work (except for the second pipe in the tee command). By "doesn't work", I do mean that % doesn't get evaluated/changed to the passed string as it should. I did try with the "default" ones ({}) without any success too. Any feedback/answers appreciated. Don't mind any POSIX or Shell oriented solutions. P.S.: I prefer to not use parallel if possible.

The statement below should print afc abc but it prints abc abc instead. I tried many times but every time same result Don't know why this happens could anyone explain and help me?  echo abc|xargs -i{} echo $(echo {}|sed 's/b/f/g') {}


I am given this table  (Iterações = Iterations; Erro absoluto = Absolute Error) The question is:  Determine the order of convergence of the method from the values of the table and justify.  I got as far a $$|\alpha - x_{k+1}| \le C|\alpha - x_k|^p \Leftrightarrow \\ \frac{|e(x_{k+1}|}{C} \le |e(x_k)|^p \Leftrightarrow \\ \frac{\log(\frac{|e(x_{k+1}|}{C})}{\log(e(x_k))} \le p$$ That fraction with the logs doesn't look right. How do I know the log on the right hand side isn't negative (thus inverting the sign)? I don't know how to find C. Help?

I was studying about the Newton's method (and other root-finding methods) and apparently Newton's method converges quadratically (or more) when it does.     Suppose that the sequence $\{x_k \}$ converges to the number $L$. We say that this sequence converges linearly to $L$, if $\exists$ a number $\mu \in (0, 1)$, such that $$\lim_{k \to \infty} \frac{|x_{k+1} - L|}{|x_{k} - L|} = \mu$$      and $\mu$ is called the rate of convergence.        Similarly, it would converge quadratically to $L$ if       $$\lim_{k \to \infty} \frac{|x_{k+1} - L|}{|x_{k} - L|^2} = \mu$$      where $\mu > 0$.   Why is that?  How can I see in practice if a sequence of iterations of the Newton's method is converging or not quadratically?  I guess I need to check for all $x_k$ that the second limit above is $\mu$ for some $\mu$ greater than $zero$...but how would I check this practically for a real concrete example?


I'm trying to solve a problem from the combinatorics book. Prove or disprove for $ \forall n \in \mathbb{N}, \exists x,y,z \in \mathbb{N} $ ($0 \leq x < y < z$) such that $$ n = \binom{x}{1} + \binom{y}{2} + \binom{z}{3}$$  I was trying to substitute binomial coefficients with:  $$ n = \binom{x}{1} + \binom{y}{2} + \binom{z}{3} = x + \frac{y*(y-1)}{2} + \frac{z*(z-1)*(z-2)}{3}$$  However, I've stucked after that. I know that any binomial coefficient is integer-valued. So, it's likely equation hold.

Prove that for any nonnegative integer $n$ $\exists x,y,z \in \mathbb{N}$ and $0\leq x<y<z$ so $$n=\binom{x}{1}+\binom{y}{2}+\binom{z}{3}$$  Please give me a hint, I don't have any idea.


Hi have dataframe with large categorical values over 1600 categories is there any way I can find alternatives so that I don't have over 1600 columns.  I found this below interesting link    But they are converting to class/object which I don't want. I want my final output as a dataframe so that I can test with different machine learning models?  Is there anyway I can implement ?

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model?    Consider a variable like  (discipline chosen by an undergraduate student). It is unordered and categorical, but it can potentially have dozens of distinct levels. Let's say I want to use major as a predictor in a regression model.  Using these levels as-is for modeling leads to all sorts of issues because there are just so many. A lot of statistical precision would be thrown away to use them, and the results are hard to interpret. We're rarely interested in specific majors -- we're much more likely to be interested in broad categories (subgroups) of majors. But it isn't always clear how to divide up the levels into such higher-level categories, or even how many higher-level categories to use.  For typical data I would be happy to use factor analysis, matrix factorization, or a discrete latent modeling technique. But majors are mutually exclusive categories, so I'm hesitant to exploit their covariance for anything.  Furthermore I don't care about the major categories on their own. I care about producing higher-level categories that are coherent with respect to my regression outcome. In the binary outcome case, that suggests to me something like linear discriminant analysis (LDA) to generate higher-level categories that maximize discriminative performance. But LDA is a limited technique and that feels like dirty data dredging to me. Moreover any continuous solution will be hard to interpret.  Meanwhile something based on covariances, like multiple correspondence analysis (MCA), seems suspect to me in this case because of the inherent dependence among mutually exclusive dummy variables -- they're better suited for studying multiple categorical variables, rather than multiple categories of the same variable.  edit: to be clear, this is about collapsing categories (not selecting them), and the categories are predictors or independent variables. In hindsight, this problem seems like an appropriate time to "regularize 'em all and let God sort 'em out". Glad to see this question is interesting to so many people!


I want to write a value of the Send Data Extension into a further DE to log certain values by using the update contact function in the journey builder. Is there a possibilty?

I'm looking for a way to use fields from a data extension (that is the entry source for a journey) in the "Update Contact" activity.  I want to create a sort of log in a different data extension. Let's say I have a sourceDEthat is used by the journey and a journeylogDE where I would like to write the email of contact that's currently in the journey.  What should I write in the value field to get a value from the currently used record in the sourceDE?  I tried {{Contact.Attribute.sourceDE.email}}, but it did not return any values.   I would appreciate it if you could give me any tips how to fix this issue.


How to update the following regular expression /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ to accept the "+" in the email address.  Now:   abc@gmail.com // true  abc+100@gmail.com // false  What I need   abc@gmail.com // true  abc+100@gmail.com // true  My Code:   export const handleEmailValidation = (email) => {   const validEmailAddress = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;   const containAt = /^((?!@).)*$/;   const lastAt = /^[a-z|A-Z|0-9]+[^@]\s?@{1}$/;   if (containAt.test(String(email).toLowerCase())) {     return 'An email address must contain a single @ ';   }   if (lastAt.test(String(email).toLowerCase())) {     return 'Please enter a valid value after the @ ';   }   if (!validEmailAddress.test(String(email).toLowerCase())) {     return 'Please enter a valid email address';   }   return ''; };

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


All objects reflect some of the colours and then our eyes are able to see object of different colours. But when we see mirage in a desert then it seems that the sand of the desert is acting as a mirror. So what makes the sand a mirror in this case? Is this because the light reflected from an object when falls on the sand is also reflected back to our eyes from the sand ? What makes the sand to behave like a mirror? I know about total internal reflection but then what makes the sand to reflect so clear image of an object?

Often, I'll be driving down the road on a summer day, and as I look ahead toward the horizon, I notice that the road looks like there's a puddle of water on it, or that it was somehow wet. Of course, as I get closer, the effect disappears.  I know that it is some kind of atmospheric effect. What is it called, and how does it work?


When I saw my edits statistics there was written that I have 111 edits approved.     Why I didn't receive "Strunk & White" badge if required value is 80 edited post and I have 111 edits?

The descriptions for the editing badges are:     Editor:    Strunk & White:    Copy Editor:    Does "posts" include your own questions/answers, or are these badges just for edits to other people's stuff?  Other questions about how editor badge works:   What if I edit only a question's tags, but not its body? What if I edit both a question's tags and its body? Do edits to Community Wiki posts count? Do edits to answers count? Do edits to tag wiki pages count? Do edits to comments count? (Moderators can edit other users' comments, even outside of the usual five minute window.)


Im working a small "search engine", and im trying to improve it to prevent mysql injection, but im new to php and I don't know how :/ any ideas.  I already look some tutorial on google but not with a luck :/  require("../login/connect.php"); $search = $_GET['query'];  $search = "%".$search."%";  $query = "SELECT * FROM mobiles WHERE (`name` LIKE :search) or (`type` LIKE :search)";   $query_params = array(':search' => "%".$search."%");  try {   $stmt = $db->prepare($query);   $result = $stmt->execute($query_params); } catch(PDOException $ex) {   die("Failed to run query: " . $ex->getMessage()); }  $rows = $stmt->fetchAll(); $count = $stmt->rowCount();  $min_length = 3; if(strlen($query) >= $min_length) {   echo "
";    echo "
           Mobile Name	           Mobile Type
";   if ($count > 0)    {     foreach($rows as $row):     {        echo "
               ". $row['name'] ."	 ".$row['type']."
" ;     }     endforeach;    }  else   {      echo "
Sorry..No results for $search
";      echo "
";     } }

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


I needed to prove that     $\prod_{i=1}^n\frac{2i-1}{2i}$ $<$ $\frac{1}{\sqrt{2n+1}}$,  $\forall n \geq 1$ .      I've atempted by induction.     I proved the case for $n=1$ and assumed it holds for some $n$. The left-side of the n+1 case is $\frac{1}{2}.\frac{3}{4}. ...  .\frac{2n-1}{2n}.\frac{2n+2-1}{2n+2}$.     Using the inductive hypothesis, i could reach the result that   $\frac{1}{2}.\frac{3}{4}. ...  .\frac{2n-1}{2n}.\frac{2n+2-1}{2n+2} <\frac{2n+1}{\sqrt{2n+1}(2n+2)}=\frac{\sqrt{2n+1}}{(2n+2)}$.      Now, i'm wondering how should i connect it to my goal :     $\frac{1}{\sqrt{2n+2+1}}=\frac{1}{\sqrt{2n+3}} $      I know one way to prove that   $\frac{\sqrt{2n+1}}{(2n+2)}<\frac{1}{\sqrt{2n+3}}  $     We just square things, then eventually reach     $ (n+1).(n+3)<(n+2)^2$     Which is easily provable because  $3<4$ ....  But I was wondering if there was another way to show that ... perharps a more direct way to show that last bit ... a way that was not so direct and brute as to involve squaring both sides.  A way of gradually manipulating the left-side until reaching the inequality with the right side.     Thanks in advance.

Problem statement: Prove that $\frac{1*3*5*...*(2n-1)}{2*4*6*...(2n)}\leq \frac{1}{\sqrt{2n+1}}$ and that there exists a limit when $n \to \infty $. , $n\in \mathbb{N}$   My progress  LHS is equivalent to $\frac{(2n-1)!}{(2n)!}=\frac{(2n-1)(2n-2)(2n-3)\cdot ....}{(2n)(2n-1)(2n-2)\cdot ....}=\frac{1}{2n}$ So we can rewrite our inequality as:  $\frac{1}{2n}\leq \frac{1}{\sqrt{2n+1}}$ Let's use induction:  For $n=1$ it is obviously true. Assume $n=k$ is correct and show that $n=k+1$ holds.  $\frac{1}{2k+2}\leq \frac{1}{\sqrt{2k+3}}\Leftrightarrow 2k+2\geq\sqrt{2k+3}\Leftrightarrow 4(k+\frac{3}{4})^2-\frac{5}{4}$ after squaring and completing the square. And this does not hold for all $n$  About convergence: Is it not enough to check that $\lim_{n \to \infty}\frac{1}{2n}=\infty$ and conclude that it does not converge?


I know the relationships between the ministers in the below problem can be represented by a $K_n$ graph since each one of the n ministers has connections to the n-1 other ministers/ministries they represent. However, I can't seem to figure out where to go next. Here is the problem:  In a certain government there are n cabinet ministers. Each of these has a senior aide. Exactly k of these n aides leak important information to the press. None of the ministers know whether their own aide leaks information or not. However,because of interdepartmental rivalries, every minister has many sources in the other ministries, and thus is aware of all the leaks outside of her ministry. There is an unspoken law in this government that as soon as any minister has irrefutable proof that their aide leaked information, they must re the aide at their first press conference. Every ministry has one press conference per day at exactly 8:00 A.M. For a long time no one is fired, because no minister is aware of the leaks, if any, made by their own aide. One afternoon a newspaper runs a story, and announces that news are leaked by some of the top aides. Exactly k days later, all the guilty aides are fired. What happened?

To be honest, I have no idea how to even start this problem. I'm sorry I don't have any work to show, but I'm just at a blank. Help?  Chapter 2: Problem 27:  University B, once boasted $17$ tenured professors of mathematics. Tradition prescribed that at their weekly luncheon meeting, faithfully attended by all $17$, any members who had discovered an error in their published work should make an announcement of this fact, and promptly resign. Such an announcement had never actually been made, because no professor was aware of any errors in her or his work. This is not to say that no errors existed, however. In fact, over the years, in the work of every member of the department at least one error had been found, by some other member of the department. This error had been mentioned to all other members of the department, but the actual author of the error had been kept ignorant of the fact, to forestall any resignations. One fateful year, the department was augmented by a visitor from another university, one Prof. X, who had come with hopes of being offered a permanent position at the end of the academic year. Naturally, he was apprised, by various members of the department, of the published errors which had been discovered. When the hoped-for appointment failed to materialize, Prof. X obtained his revenge at the last luncheon of the year. "I have enjoyed my visit here very much", he said, "but I feel that there is one thing that I have to tell you. At least one of you has published an incorrect result, which has been discovered by others in the department." What happened the next year?"   Chapter 2: Problem 28:  After figuring out, or looking up, the answer to Problem 27, consider the following: Each member of the department already knew that Prof.X asserted, so how could his saying it change anything?


How can I get a uniformly distributed random number from the interval [0, 1]?  I am currently using the following code, but it is in C and I would like to know how one does things in C++ instead.  double RND() {     return ((double)rand()/RAND_MAX); }

I need to generate random numbers within a specified interval, [max;min].  Also, the random numbers should be uniformly distributed over the interval, not located to a particular point.  Currenly I am generating as:  for(int i=0; i<6; i++) {     DWORD random = rand()%(max-min+1) + min; }   From my tests, random numbers are generated around one point only.  Example min = 3604607; max = 7654607;   Random numbers generated:  3631594 3609293 3630000 3628441 3636376 3621404   From answers below: OK, RAND_MAX is 32767. I am on C++ Windows platform. Is there any other method to generate random numbers with a uniform distribution?


When I run sudo apt-get update it returns:    What should I do?

N: Ignoring file 'yandex-browser.list.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'yandex-browser.list.save.2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension E: Type 'andex.ru/yandex-browser/deb' is not known on line 1 in source list /etc/apt/sources.list.d/yandex-browser.list E: The list of sources could not be read.   How can I fix this?


I have two normal distributions. Say for example, one with a mean of .76 and one with a mean of .62. Both standard deviations = .05. How do I find which point on the x-axis is where the two distributions cross? In other words, x-coordinate at the deepest part of the valley in between the two distributions?  P.S. I am using R, but non-R related answers would be welcome and appreciated too.

I have two normal distributions defined by their averages and standard deviations.  Sample 1: Mean=5.28; SD=0.91  Sample 2: Mean=8.45; SD=1.36  You can see how they look like in the next image:    How can I get the probability to obtain an individual from the overlapping area (green)? Is the probability the same as the area?


I've done this before, but I have forgotten how to do it. I tried every command but nothing is working, and I was trying to be quick. Is there a way to do this in Minecraft 1.16?

I want people to only be able to place TNT on only Quartz Blocks and I've see this done before where you can only place blocks on certain other blocks but I'm not sure of the command used to do that.  Does anyone know?


I am trying to reverse a linked list in Java. Here is my code.  class Node{      int value; Node next;      Node(int value){ this.value = value; }  }   class LinkedList{   Node head;   void push(int value){         Node new_node = new Node(value);         new_node.next = head;         head = new_node;         System.out.println("new head is"+head.value);     }  void reverseList(Node node){         Node iter = node;         Node prev = null;         while(iter!=null){             Node currentNext = iter.next;             iter.next = prev;             prev = iter;             iter = currentNext;         }         node = prev;     } // To print the list referred by this node. void printList(Node node){         Node iter = node;         while(iter!=null){             System.out.print(" "+iter.value);             iter = iter.next;         }         System.out.println("");     } }   In main(),  LinkedList list = new LinkedList(); list.push(3); list.push(2); list.push(1);  list.printList();// linked list is 1->2->3 list.reverseList(list.head); list.printList(list.head); // Output is 1   Why is the list not printing in the correct orde (3->2->1) after reversing the list?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I bought "Quick 'n Easy Web Builder" in Ubuntu Software Center on 15 march, 2013 and it worked OK after unlocking it with my license key.   Now I have replaced my computer (with Ubuntu 12.04LTS) but I cannot download the program anymore: when I try to start the download in Ubuntu Software Center I invariably get the message:  "Condizioni d'uso - Unable to load page - Problem occurred while loading the URL https://apps.ubuntu.com/cat/tos/plain/ - Cannot resolve proxy hostname()".   The same problem seem to happen with all paid programs, while I can download free ones without problems.   Thank you! Paolo

Banshee has stopped connecting to the amazon mp3 store. It used to work fine but now I get the following error message from Banshee:  Unable to load page Cannot resolve proxy hostname ()   This problem occurred while loading the URL   I'm running Banshee 2.4.1 and 12.04LTS. My internet connection is fine (I'm using it to post this). Amazon say there's nothing wrong with their server - it seems to be me...Any ideas?


when I install ubuntu on my old laptop dell inspiron 2200 tells me this kernel requires the Following features not present on the cpu pae  unable to boot please identify a kernel for your CPU approprieate

After burning Ubuntu 12.04 to a CD, I tried booting and got the message:  This kernel requires the following features not present on the CPU: pae  Unable to boot - please use a kernel appropriate for your CPU.   What does this mean?


Assume $G$ is a group and $p,q \in \mathbb{N}$ and $(p,q)=1$. If $$a^pb^p=b^pa^p\hspace{.5cm} \  \text{and}\hspace{.5cm} \  a^qb^q=b^qa^q \hspace{1cm}\forall a,b\in G$$ Is it true that $G$ is Abelian? Can anyone give me a hint?

Let $(G,.)$ be a group and $m,n \in\mathbb Z$ such that $\gcd(m,n)=1$. Assume that $$ \forall a,b \in G, \,a^mb^m=b^ma^m,$$ $$\forall a,b \in G, \, a^nb^n=b^na^n.$$  Then how prove $G$ is an abelian group?  Some context: Some of these commutation relations often imply that $G$ is abelian, for example , or . This looks like another example of this phenomenon, but the same techniques do not apply.


in my program, i have capkTable Java class which is a String. In another class, i want to get a data, so i can use appState.capkTable.setCapki(data[i+3]). knowing fully well that (data[i+3]) is a byte.  How can i convert it to String?  what i did is this :  byte[] testing = new byte [(data[i+3])]; int tagDataLength = 0; appState.capkTable.setCapki(StringUtil.toString(AppUtil.removeTailF(ByteUtil.bcdToAscii(testing,  0, tagDataLength))));   i don't know if i am doing it the right way..cos, instead of getting a value, it's returning java.lang.NullPointerException

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


here is what I need to do: Receive an entity name as a string, and then return the database content of that specific table. 1- Receive entity name from the get request         [HttpGet]         [Route("/api/[controller]/GetByEntity")]         public IActionResult GetAll(string entity)         {             try             {                 Type type = Type.GetType(entity);                 return Ok(Unit.BasicRegisterRepository.GetByEntity<type>());             }             catch(Exception e)             {                 return BadRequest(e);             }         }  2- Return the data         public List<T> GetByEntity<T>() where T : class         {             var query = this.DbContext.Set<T>();             var result = query.ToList();             return result;         }   The problem: when passing the type as parameter to the GetByEntity<type> function, I get the following error: type is a variable but used as a type What am I doing wrong? Thanks!

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I have just seen an article in FT with the title      Iran’s Mahan airline defies sanctions in shadowy aircraft deal   It seems to me that an article is missing in this sentence. Namely, it should be "in a shadowy deal". Is this correct? If yes, why the article is missing here?

Are there any rules as to an article before a noun in the singular in headlines please, i.e. lack of an article?       Description of Type of Investment


I have a python code that uses modules installed in a virtual environment. The modules are absent outside the venv. How do I make a Linux app out of the code? Do I have to install all those packages outside too?

How can I distribute a standalone Python application in Linux?  I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, python cryptographic toolkit, reportlab, and so on.  Is there a working Linux counterpart to, say, py2exe (which, by the way, I have never tried)? Is there a free, opensource one?


I run a proxy server with squid and I've just got a report that a user of mine tried a ddos using my proxy. I can I block such requests? Ex: Allow just max 5 requests on the same domain on the same minute?  LATER EDIT max 5 requests per minute for the same URL

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


How does one pile two lines under a union or intersection symbol in display mode? For example $\bigcup_{a,b \in \mathbb{R}; a+b=x} ... $ displays everything in one line, as it should, but I would like to put those two statements one above the other. I'm sure it's been asked before and I apologise, but I just don't know what to look for.

I have the following equation, where there is a lot of stuff under the sum symbol:  \begin{equation} d(\vec{x},\vec{y})=   \sum_{Z_{xy}\in\vec{Z}_{xy},\forall x\in\vec{x},\forall y\in\vec{y}}      f(Z_{xy}) \end{equation}   In the resulting document, I find it kind of hard to read. Is there a way to write the equation to make the result more readable, e.g. putting the stuff under the sum symbol on different lines?


I'm currently sitting with the following number theory problem:  Prove that for all $X \geq 1$, $$\sum_{1 \leq n \leq X} \mu(n) \left[\frac{X}{n}\right] = 1.$$  A few ideas I have tried: Using that $[x]=x - \{x\}$ which I couldn't make out to bring anything. Switching around on the summation variables, like $$\sum_{d \leq N} \mu(d) f\left( \frac{n}{d} \right) = \sum_{d \leq N} \mu \left( \frac{d}{n} \right) f(d)$$ but that didn't seem to bring anything.  I tried writing out the first few terms, which give $$\mu(1) [X] - \left[\frac{X}{2}\right] - \left[\frac{X}{3}\right] - \left[\frac{X}{5}\right] + \left[\frac{X}{6}\right] - \left[\frac{X}{7}\right] - \left[\frac{X}{8}\right]$$ but I can't seem to find a system where it simply reduces to one!  What do you think?

I am trying to show $$\sum_{d \leq x} \mu(d)\left\lfloor \frac{x}{d} \right\rfloor = 1 \;\;\;\; \forall \; x \in \mathbb{R}, \; x \geq 1 $$ I know that the sum over the divisors $d$ of $n$ is zero if $n \neq 1$. So we can rule out integers that are divisors of $x$ (if $x > 1$). I am not sure if I am on the right track to prove this. Any hints would be helpful. This is homework.


Yesterday one of my friends asked me if there is some torrent client that runs on the command-line.  I had no answer for him, but I think that you have some.

I want to deploy it on my VPS server to download resources quickly.  This could save me a lot of time since some resources are in a foreign country,


I am having trouble remembering how find the generators of a field.   Let's say I have $\Bbb{F}_5$ adjoined $\sqrt{2}$, and I want to show that $2+\sqrt{2}$ is a generator in F^x. So it's order is 34 and |F|=25. For some reason I was thinking I raise $2+\sqrt{2}$ to every power that is not co-prime to $24$, and if it not equal to $1$, it is a generator. But that is going to be awful, and there must be an easier way to accomplish this.

Suppose $\alpha \in \mathbb{F}_{25}$ is an element with $\alpha^2 = 2$, I need to prove that $2+\alpha  \in \mathbb{F}_{25}$ is a primitive root (that is: a generator of the cyclic group $\mathbb{F}_{25}^\ast$ of order 24).  So far, I have tried the following.  Since $\mathbb{F}_{25} = \mathbb{F}_{5^2}$, consider $f = X^2+X+2 \in \mathbb{F}_5[X]$. This is irreducible since it has no roots in $\mathbb{F}_5$. Furthermore we have $$ f(2+\alpha) = (2+\alpha)^2+(2+\alpha)+2 = \alpha^2 + 4\alpha + 4 + 2 + \alpha + 2  = \alpha^2 + 3 = 5 = 0.  $$ So it follows that $f$ is the minimum polynomial of $2+\alpha \in \mathbb{F}_{25}$, hence $$ \mathbb{F}_{5}(2+\alpha) \cong \mathbb{F}_5[X]/(X^2+X+2) \cong \mathbb{F}_{25}.  $$ How to proceed from here though?


If like 99% of Saurons' lifeforce was in the ring then why could Sauron not sense the ring wherever it were even if no one did wear it? Or how could he not sense it when Frodo was right in front of Saurons' eye in mordor? If more part of is lifeforce was in that ring then he should be able to sense it even if no one wore it, right?

When Frodo put on the One Ring, both the Nazgul and Sauron himself found Frodo. However when Bilbo had the ring and possibly used it many times, Sauron sought Gollum to get a hint on where to look for the ring and send the Nazgul after it.   Sauron sought Gollum before Bilbo wore the ring at his birthday party, slightly after that time, he was very effective at locating Frodo when Frodo put on the ring. So I guess it's not a matter of Sauron gaining any extra powers with time.  Also Bilbo seemed to use the ring without it bothering him at any point, unlike Frodo who seemed to be very troubled when using the ring. How is that possible?


Simplify $$0 \binom{n}{0} + 2 \binom{n}{2} + 4 \binom{n}{4} + 6 \binom{n}{6} + \cdots,$$ where $n \ge 2.$  I think we can write this as the summation $\displaystyle\sum_{i=0}^{n} 2i\binom{n}{2i},$ which simplifies to $\boxed{n\cdot2^{n-2}}.$ Am I on the right track?

How do I prove $2 \binom n2 + 4 \binom n4 + 6 \binom n6 + \cdots = n 2^{n-2}$  I thought about using known $\sum k\binom nk = n2^{n-1} $ and then just dividing it by 2. But is it possible you can help me with writing the full solution, because for the first known theorem you need to derivate $(a+b)^n $and also $a=1, b=x$. But for this one it won't work. maybe I can just prove that known theorem I presented, prove it, and then just divide it by 2. because the known theorem is  $1 \binom n2 + 2 \binom n4 + 3 \binom n6 + \cdots$ (co efficients are divided by two than the presented question)  Edit: I posted a solution.


I'm getting interested in special relativity and almost all people and explanations about the subject I found on the internet seem to think that when A and B would be in relative motion, they would both observe the other's clock tick slower than their own. However what I found about this is following, in § 4. (Physical Meaning of the Equations Obtained in Respect to Moving Rigid Bodies and Moving Clocks) of Einstein's On the electrodynamics of moving bodies (1905):       From this there ensues the following peculiar consequence. If at the points A and B of K there are stationary clocks which, viewed in the stationary system, are synchronous; and if the clock at A is moved with the velocity $v$ along the line AB to B, then on its arrival at B the two clocks no longer synchronize, but the clock moved from A to B lags behind the other which has remained at B by $\frac{1}{2}tv^2/c^2$ (up to magnitudes of fourth and higher order), $t$ being the time occupied in the journey from A to B.   This sounds like complete opposite to what everyone seems to think.  Now this time discrepancy doesn't have anything to do with Doppler effects or isn't just some observers illusion. This is supposed to be physical fact, after stopping the traveler has physically aged less than the rest of the world.    The question: Why should the stationary clock seem slower to the traveller?    The quote i provided explicitly says that his own clock will have experienced less time. Please note that A and B can be arbitrarily close and there can be an infinite amount of such points for which the quote applies. Also the train need not stop to witness this effect   Therefore it seems to me certain that the traveller would observe the stationary clocks move faster.

Suppose we have two twins travelling away from each other, each twin moving at some speed $v$:    Twin $A$ observes twin $B$’s time to be dilated so his clock runs faster than twin $B$’s clock. But twin $B$ observes twin $A$’s time to be dilated so his clock runs faster than twin $A$’s clock. Each twin thinks their clock is running faster. How can this be? Isn’t this a paradox?


All, I have a lot of PDF files. Does there exist a way to apply to all PDFs in folder and sub-folders at one time?  Example, I have:   /pdf/test/pdfa.pdf /pdf/example/aa/test.pdf   I'd like to apply this command on each file:  $ convert -density 200x200 -quality 60 \     -compress jpeg filename.pdf filename_compress.pdf   Can anyone help me?

This is pretty basic, I have a folder with several subfolders of JS files and i want to run Google's Clojure compiler on all of the files in those folders. The command to process a single file is as follows:  java -jar compiler.jar --js filename.js --js_output_file newfilename.js   How do I modify this to run on every JS file in my directory structure?


Questions that do not fit the scope of the respective sites get voted to close, if 5 people voted to close it (and unless 3 voted against), the question get closed. Once it it closed, the OP can edit his/her question, and that bring the question on the reopen queue.  This is all fine on a site like SO, or here on meta, where there are many users and finding 5-7 reviewers does not take too much time.  On a less frequented site, the review process of a question may take some time. It can be several minutes, to several hours. The OP, noting that there are some VTC is incited to edit his/her question immediately without waiting for the question to be completely closed.  But then the earlier people who voted to close have a vote still there, which does not correspond to the edited question. When there are several successive edits, we might have the case that the review process is made with each reviewer having voted for a different version of the question.  Wouldn't it make sense to ask reviewers to re-evaluate their vote after a question got edited, and before it actually get closed? Or at least authorize them to change their vote?

Sometimes you vote to close something and the OP then changes it to fix the issue or issues. You can't take a close vote back though. It would be nice if you could.    With the new Duplicate close changes and the review queues, it's even more important to be able to remove accidental or erroneous close votes: close votes now place a banner on the question (for dupes) or put the question into a queue for other users to look over.  An easy "undo" button could save a bunch of people some time and grief for these accidental/no longer desired close votes.


My project consists of making analog to digital conversion from 10 sensors ( and ) with a Raspberry Pi4. The analog to digital conversion chips are . I need to power them with the bipolar mode +2.5V/-2.5V. I have 2 choices: two 9V batteris or a power bank 5V 3A. How can I know if the two 9V batteries can support powering all the system (sensors,RPI4,ADS1299?) What must I calculate to choose the optimal power supply system?

I have 2 ADS1299 analog to digital converters(). I need to give them bipolar mode supplying but I must use a powerbank of 5V 3A. I wonder how can I create a bipolar supply of +2.5v -2.5v as mention in the datasheet from the 5V of the powerbank. I am new in this field. Thank you


I have to forecast demand for company based on the past four years. I have data starting from 2017 to 2020 but in the data of 2020 the demand for the months april and may is 0 due to lockdown imposed in our country. Can I totally exclude the year 2020 in the process of forecasting as the demand for rest of the months is very less as compared with previous years data. Or should I include 2020 then how should i treat the demand for April and May being 0.

How are you dealing with the  in your machine learning models? Let's say you used to predict the number of sales each month. The virus affected your results last year and it will affect for at least a couple of months. So your model, I guess, is missing a lot. What are some approaches we can use to fix our models?


I am looking for a proverb, quote or phrase describing the  processes (or structures or ideas) which are supposed to bring in efficiency, enhance the gaps and increases in-efficiencies, but instead prove to be the reason for the decline of a system. Explanation with example  Big external agencies were hired in order to define the efficient way to improve the system. However, these agencies do not understand the system and do all sorts of trial and error methods to innovate the process for years, yet not only do they waste company resources but are paid a ton of money so as to fix what can be done internally.

I thought there was a word for this. Where you take a basic problem that exists and the best solution already exists and any effort we put into solving the problem would actually cause more work for us thus becoming a bigger problem.


I found somewhere here in the forum that I could use the commands sudo apt-get clean and sudo apt-get autoremove to get rid of things I don´t use and my laptop does not need.  Why is it that every time I use either of these commands Ubuntu starts acting up?  By "acting up" I mean that:   All hot corner functions and Window Snapping functions on my desktop stop working. After entering either of the two commands, the corners I selected as Window Spread will not do/show anything. The Unity icon on the launcher disappears.   In the end I solved things by reinstalling Ubuntu, Spotify, Skype, Chrome and so on... I don´t really mind. It is only an hour of my time, it is fun and I always learn something.

I accidentally removed all the packages starting with the name jpeg with:  sudo apt-get remove jpeg*   This screwed up a lot of things, removed Unity, Firefox, Flash player etc.  I somehow managed to recover the desktop and unity but then a lot of things are still buggy. For example .rpm files and .tag.gz just won't open up at all.  What I want is a way to fix everything that's amiss. Something that is the equivalent of a 'repair installation' with a windows disc.  Any tips, anyone?


Let $M$ be an $R$-module. I want to show only using the definition of noetherian that if $N$ is a noetherian submodule of $M$ such that $M/N$ is noetherian, then $M$ is noetherian.    I know that if $M_1 \subset M_2 \subset \cdots$ is a chain of submodules in $M$, then since $N$ and $M/N$ are noetherian, the chains $$M_1 \cap N \subset M_2 \cap N \subset \cdots,$$ and $$M_1 + N \subset M_2 + N \subset \cdots$$ stabilize. I feel like this should imply that $M_1 \subset M_2 \subset \cdots$ stabilizes too, but I'm not sure how to show this. Any hints? Thanks.

Let $0 \to M' \xrightarrow{\alpha} M \xrightarrow{\beta} M'' \to 0$ be an exact sequence of $A$-modules. Then $M$ is Noetherian is equivalent to $M'$ and $M''$ are Noetherian.  For the ''$\Leftarrow$'' case:  I guess if we let $(L_n)_{n\geq 1}$ be an ascending chain of submodules of $M$, then $(\alpha ^{-1}(L_n))_{n\geq 1}$ is a chain in $M'$, and $(\beta(L_n))_{n\geq 1}$ is a chain in  $M''$. For large $n$ both these chains are stationary. Then why we know the chain $(L_n)$ is stationary?   Thanks!


I will try to convert the xmltex supporting files like (xmltex.tex, xmltex.xmt, xmltex.cfg, .sty, .cls) to binary file format like (.fmt) format conversion.  I already posted my question with MWE for the following link:   I use the following latex package options like `mylatexformat.sty'' and also try the below mentioned command lines:  latex -ini -jobname="filename" "&latex filename.cls\dump"  etex -initialize -save-size=20000 -stack-size=20000 -jobname="filename" "&latex" mylatexformat.ltx """filename.cls"""   But (.xmt, xmltex.tex, .cfg) files are not supporting this (fmt) file font conversions.  How to acheive the successful FMT transformation on xmltex support files. It's possible to convert those file format (.xmt, .cfg, xmltex.tex) to fmt format. Could you please anyone advice on this.

I have a base xml-tex setup file like .xmt, .cfg, .tex, customized .sty files and cls.   I will try to convert the fmt file by using the below command.  latex -ini -jobname="fmt-file-name" "&latex" mylatexformat.ltx """filename*.*"""   But the XMLTeX commands are not supported for FMT file creation . For Example \XMLelments, \UnicodeCharacter is not supported. The undefined control sequence error is thrown.  I would like to protect xmltex set-up source files like "sample.cfg, sample-entity.sty, sample.xmt files except sample.tex and sample.xml. So, i would like to convert those files into FMT format similar to exe format.   I hope that the source file is converted into FMT file format that format is useful to avoid any unknown person editing those files. But, i can't convert those files.  I have provided my MWE below.  %%Sample.tex%% \def\xmlfile{sample.xml} \input xmltex  %%Sample.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article SYSTEM "JATS-journalpublishing1.dtd">
 <front>
 <title-group>
The sample title
 </title-group>
 </front>  <sec id="j_nanoph-2018-0214_s_001"> <title>Introduction</title>
The <bold>Sample.cfg, Sample.xmt, Sample-entity.sty</bold> files needs to be converted into unreadable format &#x00C1; &#x00E1;.

  %%Sample.xmt%%  \XMLentity{TeX}{\TeX} \XMLentity{LaTeX}{\LaTeX}  %%%%Main Root Tag%%%% \XMLelement{article}%     {}%     {\documentclass{article}%     \begin{document}}%     {\end{document}}% %%%%  \XMLelement{bold}{}{\xmlgrab}{\textbf{#1}}   %%%%Front Matter Tags%%%% \XMLelement{front}{}{}{%   \date{}   \maketitle% }% %%%%  \XMLelement{article-title}{}{\xmlgrab}{\title{#1}}  \XMLelement{title}{}{\xmlgrab}{\section*{#1}}  \XMLelement{p}{}{}{\par}%  %%%%%%%%%%%%%%%%%%%%%%     Output:   So, could you please advice how to convert those files in FMT file format.


Consider the following code:  \documentclass[tikz]{standalone}  \begin{document}   \begin{tikzpicture}[corner/.pic = {     \path[pic actions] (0,0) -- (1,0) -- (0,1) --cycle;   }]    \pic[draw] {corner} ++(1,0) node{hi};   \end{tikzpicture} \end{document}   This generates the following error:     I do not know the key '/tikz/pics/hi' and I am going to ignore it. Perhaps you misspelled it. \pic[draw] {corner} ++(1,0) node{hi}   It seems that TikZ interprets the node as a pic, and as a consequence tries to find the definition of a pic called hi instead of using hi as the text inside of the node.  By contrast, \node{hi} ++(1,0) pic[draw] {corner}; works as expected.  Why is this? How can I fix it?

Why the shape (sB) is unknown in the following code ? How to avoid this ?  \documentclass[]{standalone} \usepackage{tikz,xparse} \usetikzlibrary{calc}  \tikzset{pics/.cd,     % Marque croix     Cross/.style args={#1 and #2}{%         code = {%         \draw[#2,rotate=45,scale=1.4] (0,#1 pt) -- (0,-#1 pt) ;         \draw[#2,rotate=-45,scale=1.4] (0,#1 pt) -- (0,-#1 pt) ;         }     },     Cross/.default={2 and black} }  \NewDocumentCommand{\Segment}{mO{}}{%     \begin{scope}[#2]     \path    (0,0) coordinate (sA) pic {Cross={1.5 and gray}}         -- (#1,0) coordinate (sB) pic {Cross={1.5 and gray}} ;     \draw (sA)--(sB) ; % Can't reuse (sB)     \end{scope} }   \begin{document}     \begin{tikzpicture}     \Segment{1.5}     \end{tikzpicture} \end{document}


I think the question says it all. I was looking at Marinated Soft Boiled Egg recipes for ramen and while trying them out I found it annoying to have a pot of boiling water for the eggs as well as a pot of simmering broth for the soup.  So would cooking CIFA Grade A Eggs in the broth impact the resulting flavor? I know eggs are slightly porous so I'm guessing some broth would get inside the egg. I'm also wondering (not too worried about it though) if it's a good idea to eat the broth afterwards since it might've absorbed the chemicals used to clean the eggshell ).

If i had 2 eggs. 1 i boil in plain water. The other i boil in say a curry sauce. After boiling and peeling, would they taste different to one another?   Do the shells let any flavour through?


Currently I am using Cook's distance to detect outliers in multivariate data. Is there any better approach than Cook's distance for the same?

Suppose I have a large set of multivariate data with at least three variables. How can I find the outliers? Pairwise scatterplots won't work as it is possible for an outlier to exist in 3 dimensions that is not an outlier in any of the 2 dimensional subspaces.  I am not thinking of a regression problem, but of true multivariate data. So answers involving robust regression or computing leverage are not helpful.  One possibility would be to compute the principal component scores and look for an outlier in the bivariate scatterplot of the first two scores. Would that be guaranteed to work? Are there better approaches?


My problem is that when i double click a .bat file it doesn't get opened by cmd and i get this error message:   "Windows cannot find 'C:\users\ (my name)\Desktop\test.bat'. Make sure you typed the name correctly, and then try again". They can still be executed with run as administrator, but it's annoying.  I already looked around and many posts says it's a problem of environment variables, but some things I already tried didn't help. Some said it was a problem of registry keys, i tried this .reg file to fix up:  Windows Registry Editor Version 5.00  [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat] [-HKEY_CURRENT_USER\Software\Classes\.bat] [-HKEY_CURRENT_USER\SOFTWARE\Classes\batfile]  [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bat] @="batfile"  [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command] @="\"%1\" %*"   but the error still appears.  I had to change the env.variables to install some things and i do think i might have messed up, but I can't understand if now they are correct again or not, so if you could tell me...here are the current values of ComSpec and PATH:  ComSpec  C:\Windows\System32\cmd.exe;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;  PATH:  C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\1. altro\Git\cmd;D:\1. altro\APACHE-MAVEN\bin;

What do I set the 'Opens with...' property to in order to get the system to run .bat files again (when they are double-clicked)?  Somehow my boss convinced his workstation that the handler for .bat files was supposed to be Word. Now, when double-clicking .bat files, they're opened up in Word.


For the past year and a half, I've been running Vanilla Forums on my WordPress-based site  My favourite feature of Vanilla is that it integrates comments from the blog's front page into the forums, giving users the continuity of a single sign-on.  The downsides are that Vanilla loads slowly, performs rather poorly on iPads (a source of irony given my site's subject matter), randomly logs users out with some frequency, and generally annoys the forum regulars.  I would like to replace Vanilla with different forums software. Ideally, this new solution would:   Integrate with blog comments and Import our 1.5 years' worth of data from Vanilla.   Is there anything out there that would fit my needs?

This is a general, community wiki  question to address "I need a forum script that does x, y, and z..." questions.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on the .    I have a list of features that I want for my website's forum script: where can I find a (free or paid) script that includes all of them?


I know I should "let them have fun" or something, but the game isn't really working. I'm GMing a pathfinder campaign, but this isn't system-dependent. My players aren't roleplaying at all. Ok, they don't metagame (also because I try to keep all the information that the player shouldn't know for me), but they just "play" the game. We sit around the table for 3 hours rolling dice but no one is actually roleplaying. It's fun, but it would be a lot better if they roleplayed correctly. How, as a GM, help them to improve their RPing skills without ruining their fun?  Even if I haven't directly told them the problem yet (I thought It could be unpolite or something) I've tried to add a lot of details to my games, a lot of interesting NPCs, a lot of rp encounters and I always describe the enemies attacks during combat (so I don't just roll, but they won't do it as well). But they always do the minimum roleplay possible. They talk to the NPCs without roleplaying at all.

The context for this question is the same as , but I am looking for sufficiently different advice so I thought it warranted its own question.  I've been with the group for 15 years. We enjoy roleplaying but have a hard time finding opportunities to do so. My group has been running the same set of characters for about 4 years now, going through the main line of published 4th edition modules (H1-E3) which are obviously extremely combat-heavy and are basically dungeon crawls. The characters are epic-level now.   I'm taking over as GM soon, and will be spending a few sessions in town. Previous GMs have fast-forwarded through the between-quest downtime, basically narrating what happens in town so we can get on with the next adventure. I want the characters to spend some real time there, and make the town an actual place that the characters are invested in instead of just a vending machine to buy magic items. I've talked to the players about this and they're unanimous in wanting more of a roleplaying experience in town.  How do I help the players make this transition when they have been so combat-focused for so long? How can I signal to them that this is a time to roleplay, to explore and seek out opportunities instead of just waiting for me to tell them exactly what happens?  Since I am GMing for the first time in about 10 years I am looking for tips to help foster those opportunities without handing them out on a silver platter. I want the players to shape their own world, not just color inside the lines that I've drawn ahead of time.


This is a hypothetical question, and if this is not the place to ask it, i have zero problem in deleting it, but as i have asked some question in the similar "field" and always got interesting answers, i'm going to ask it anyway. So, if we had an machine, or whatever, capable of calculating every single possible force in the universe, everything that affects matter or energy, would we be able to predict the future ? since we would know where every particle would be in any point in time, because we know what would affect that particle and how it would affect it. One of the problems that i can think of, is life itself, because some of our particles behave unpredictably because of the capability of thinking. (A little more philosophical now) would the machine become the Universe ? Sorry if this is just an stupid question, but thanks anyway!

I'm not sure if this is the right place to ask this question. I realise that this maybe a borderline philosophical question at this point in time, therefore feel free to close this question if you think that this is a duplicate or inappropriate for this forum. Anyway, I'm an electrical engineer and I have some basic knowledge of quantum mechanics. I know that Schrödinger's equation is deterministic. However, quantum mechanics is much deeper than that and I would like to learn more. If this question is not clearly answerable at this point than can anyone point out some recognized sources that try to answer this question. I would appreciate it if the source is scientific and more specifically, is related to quantum theory.


How many random integers from (1-n) must I produce to get all n integers Assume a perfect random Because of duplicates it will be more than n      I understand there will be variance but is there an upper bound?  From this program it is about (5 to 6) * n random to get n unique    It is same as the dice question.  If I have an n sided dice how many rolls to get all n.  private static int Guesses() {     Random rand = new Random();     int sample = 100;     int sum = 0;     HashSet<int> hs = new HashSet<int>();     for (int j = 0; j < sample * sample; j++)     {         hs.Clear();         do         {             hs.Add(rand.Next(sample));             sum++;         }  while (hs.Count < sample);     }     Debug.WriteLine(sum / sample / sample);     return (sum / sample / sample / sample); }

I've just played a game with my kids that basically boils down to: whoever rolls every number at least once on a 6-sided die wins.  I won, eventually, and the others finished 1-2 turns later. Now I'm wondering: what is the expectation of the length of the game?  I know that the expectation of the number of rolls till you hit a specific number is  $\sum_{n=1}^\infty n\frac{1}{6}(\frac{5}{6})^{n-1}=6$.  However, I have two questions:   How many times to you have to roll a six-sided die until you get every number at least once?  Among four independent trials (i.e. with four players), what is the expectation of the maximum number of rolls needed? [note: it's maximum, not minimum, because at their age, it's more about finishing than about getting there first for my kids]   I can simulate the result, but I wonder how I would go about calculating it analytically.    Here's a Monte Carlo simulation in Matlab  mx=zeros(1000000,1); for i=1:1000000,    %# assume it's never going to take us >100 rolls    r=randi(6,100,1);    %# since R2013a, unique returns the first occurrence    %# for earlier versions, take the minimum of x    %# and subtract it from the total array length    [~,x]=unique(r);     mx(i,1)=max(x); end  %# make sure we haven't violated an assumption assert(numel(x)==6)  %# find the expected value for the coupon collector problem expectationForOneRun = mean(mx)  %# find the expected number of rolls as a maximum of four independent players maxExpectationForFourRuns = mean( max( reshape( mx, 4, []), [], 1) )  expectationForOneRun =    14.7014 (SEM 0.006)  maxExpectationForFourRuns =    21.4815 (SEM 0.01)