I have a presentation. I want to draw it in latex and put in on my slide. Some kind tell me where to begin or tell me the code

What I am up to is to write some exercises dealing with logical formulas for my students, like:     And the students should draw these formulas on . At the end of the lesson, I really would like to print the correct answer for them. I found a great resource on a forum thread at , which helped me a lot to make up some Venn diagrams with tikz, but have some problems with visualizing complements, like ~A.  A simple, modified version of the TeX file found on the forum linked above, can be seen below, which produces the following expression:    \documentclass{letter}   \usepackage{tikz}   \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}   \begin{document}     \begin{tikzpicture}       \begin{scope}     \clip \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \firstcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$A$};       \draw \secondcircle node [text=black,below left] {$B$};       \draw \thirdcircle node [text=black,below right] {$C$};     \end{tikzpicture}   \end{document}   Which looks like:    Could anyone please help me out plotting/defining some expressions dealing with complements? A nice example could be:    That should look like: (image from )    I do not insist on the red color :)  I would like to use the simplest possible solution, as I would like to mass generate the exercises with the help of . So any suggestion dealing with gnuplot, R or any other opensource packages is welcome. Thank you!    UPDATE (25/01/2011): added details based on answers.  Thank you @Leo Liu, you helped me a lot! I modified a bit the code you suggested to be able to color the area outside of the two circles also (in the H universe), but have no idea how to set a background to that polygon also. The code:  \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle (2,2)       (1,0) circle (1); \fill (0,0) circle (1); \endscope % right hand \scope \clip (-2,-2) rectangle (2,2)       (0,0) circle (1); \fill (1,0) circle (1); \endscope % outline \draw (0,0) circle (1) (0,1)  node [text=black,above] {$A$}       (1,0) circle (1) (1,1)  node [text=black,above] {$B$}       (-2,-2) rectangle (3,2) node [text=black,above] {$H$}; \end{tikzpicture}   And the image generated:    I will also look for even odd rule in the near future which does not make sense for me at the moment but looks really simple and promising!


I have a sorted list of integers. From this list, I would like to find intervals of numbers in which most of the numbers are concentrated.  I have used K-Means with R and played around with the k parameter to visually identify ranges, but I am not satisfied with the justification of this method as I'm not sure how to evaluate how good each clustering scheme is.  Would it be possible to use something like Kernel Density Estimation to get the ranges?

I have one-dimensional data. I want to find possible natural cutting points (strong slopes) within the data.  For instance, if the data is  1, 2, 3, 2, 2, 3, 4, 2, 80, 90, 80, 85, 91   there would be a cutting point between values (1-4) and (80-91)  I mapped a histogram which gives me an idea, but I'm curious whether a better method exists (especially for large amounts of data, 100k+).   If the distribution of the values in the example above was a function, it would have the highest slope right before 80.  If it helps, I am using R  PS: My data are not necessarily normally distributed, nor are they ordered.


Here's my question, it is rather straightforward: does $\sum_{n=0}^{\infty} \frac{(n+1)(n+2)}{2^n}=16$? First I tested if $\sum_{n=0}^{\infty} \frac{(n+1)(n+2)}{2^n}$ diverges to make sure it doesn't add to $\infty$. I found that taking the limit of the series as n approaches $\infty$ gives no information. Then I expanded the series to get $\frac{2}{1}+\frac{6}{2}+\frac{12}{4}+....$ and found no pattern. My goal is to evaluate the series and find out if it's equal to 16 or not. How should I do that? or is there another approach to the question?

Finding sum of series $\displaystyle \sum^{\infty}_{k=0}\frac{(k+1)(k+2)}{2^k}$   what i try  Let $\displaystyle x=\frac{1}{2},$ Then series sum is $\displaystyle \sum^{\infty}_{k=0}(k+1)(k+2)x^k$  $\displaystyle \sum^{\infty}_{k=0}x^k=\frac{1}{1-x}\Rightarrow \sum^{\infty}_{k=0}x^{k+1}=\frac{x}{1-x}=\frac{1-(1-x)}{1-x}$  differentiating both side  $\displaystyle \sum^{\infty}_{k=0}(k+1)x^{k}=+\frac{1}{(1-x)^2}$  How do i solve it help me please


I have multiple images of (let's say) a busy street. All taken with the exact same angle, and the people are moving around.   It stands to reason that if I could compare all images and get only "the part that is common to all images", I would have an image of an empty street.   Any thoughts on how this could be achieved?

I'm very excited about the new  for Android/iPhone. Let's say you're taking a picture of your friend in front of a landmark with several people walking by. The app allows you to remove the people from the photo, leaving only the background and your friend. The app isn't just doing a clone of the surrounding image to paint over unwanted subjects. It's actually taking multiple images, detecting which objects are moving, and letting you select them for removal. This sounds awesome! But I don't want to be limited to taking pictures with a smart phone.  I would like to take multiple photos of the same scene. (Maybe with a tripod, but it would be better if I didn't have to use a tripod.) Then I would somehow blend them together to remove unwanted elements. How do I do that? I know there are tons of photoshop tutorials out there, but all the ones I find just tell you how to use the clone tool.


When I attended a viva about the IC Applications, I was asked What is the use of NC pin in 741 opamp? so I answered as it just indicates no need of any connection to that pin in return I was asked then why this pin is placed? Unfortunately I didn't answer.  I researched about it and found that it is filler space from this .  Is there anything else I didn't reached in this case? and What is Filler space?

In case they have no use to the end users and have no function, why are they given as pins instead of being just closed? Some ICs have even 4-5 NC continuously (in accordance to their pin number).


I have a program required by work installed on a Debian Wheezy box. Previously I was using Mac OS X (switch details irrelevant). I have an SSH keypair at ~/.ssh/id_rsa{.pub}. That keypair has a password on it.  The program I run for work uses executes a loop. That loop invokes SSH multiple times. Each trip through, I'm asked for my password for the private key again. On OS X, this happened only once per boot, regardless of uptime.  I want to get this to where I can input my ssh key password ONCE and have it accepted immediately every single time the key is invoked for the remainder of the machine's uptime (like how it's done on OS X).  I am NOT using a gui. No xwin here. This is a server installation.  Multiple searches have turned up only garbage introducing people to the concept of SSH keys. This is a bit more unique. Please point me at the right command so I can read the man page.

Logging onto a machine over ssh typically requires a password to be entered before access is granted. Alternatively, a key/certificate (without a passphrase) can be installed onto the remote machine so that logging on no longer requires a password. This is particularly useful for automated or scripted solutions.  However, it is considered inadvisable and unsafe to create a key/certificate without a passphrase. Solutions involving ssh-add and ssh-agent are proposed as a means to enter a passphrase only once per session, but to still use a key/certificate with a passphrase.  What is the solution for automated connections between machines? How can a machine automatically update from a remote Bazaar repository (via bzr+ssh?) on a regular basis, as in a cron job? How can a machine automatically backup data from another machine (via rsync) as part of a cron job? rsyncd? This would not be  though, which is a major disadvantage. I haven't looked at Bazaar daemon/server options.


I am downloading ubuntu for the first time.  I am planning on installing it on a virtual machine.  Will I need to install it from a dvd copy, or will I be able to install it from my hard drive?

I would like to know if anyone can help me with installing Ubuntu on VirtualBox


I need a function to remove ) character from end of a string. for example, hello,world) should be converted to hello,world.  I have written this :  char *a="hello,world)"; int a_len=strlen(a); *(a+a_len-1)='\0'; printf("%s", a);   but nothing is shown in the output.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I am developing a web application using Python/Flask/SQLAlchemy on the server side.  I am using the  rich text editor to allow users to enter text with a very limited subset of HTML in it.  While wysihtml sanitizes the resulting HTML on the client side, some kind of server-side checking is required to ensure that only that subset of HTML is accepted.  To repeat, it not only should be valid HTML, I want it to only contain a very limited set of tags.  Furthermore, it doesn't have to be a complete HTML document.  Furthermore, I would like to know when non-compliant HTML is submitted, as it is either a bug in the client-side validation, or a (likely malicious) attempt to bypass it indicating an attack.    I could use  to sanitize the user supplied HTML, but that does not work as a validator (there is no easy way to tell whether the sanitized HTML has been substantively changed) , and the developer has made clear that he regards validation as outside the scope of his tool.    I have looked, but there doesn't appear to be a standard tool for doing validation in these circumstances.  I would prefer not to roll my own if I don't have to for two reasons: first, it will take extra time, and second, I don't want to run the risk of making rookie mistakes.  So can anybody point me to a standard method for doing this server-side in Python?  And, if not, why doesn't one exist?  Is the thinking behind my need for one misguided, and if so why?

What's the best way to go about validating that a document follows some version of HTML (prefereably that I can specify)? I'd like to be able to know where the failures occur, as in a web-based validator, except in a native Python app.


Let f be a convex function defined on a set I. If $x_1, x_2, ...,x_n \in I$, and $\lambda_1, \lambda_2 ,...,\lambda_n \in [0,1]$ with $\sum_{i=1}^n \lambda_i=1$ then prove that  $$ f\Bigg(\sum_{i=1}^n \lambda_i x_i\Bigg) \leq \sum_{i=1}^n \lambda_i f(x_i) $$   I have no idea where to start, except to use the definition of a convex function: $$ f(\lambda x+(1-\lambda)y) \leq \lambda f(x) + (1-\lambda)f(y) $$  Anyone any ideas of how to approach this problem?

I need to prove the following statement     Let $S \subset \mathbb{R}^n$ a nonempty convex set and $f: S \to \mathbb{R}$. Then $f$ is convex in $S$ if and only if $f\left( \sum_{i=1}^m\lambda_ix_i \right) \leq \sum_{i=1}^m\lambda_if(x_i)$ for al $m \in \mathbb{N}$, for all $x_1, \dots, x_m \in S$ and for al $\lambda_1, \dots, \lambda_m > 0$ such that $\sum_{i=1}^m\lambda_i=1$   My try: I think I managed to prove the backwads implication. Let $m=2$, and since $\lambda_1 + \lambda_2=1$ then $\lambda_2 = 1-\lambda_1$, so  $$f(\lambda_1x_1+\lambda_2x_2)=f(\lambda_1x_1+(1-\lambda_1)x_2) \leq \lambda_1f(x_1)+(1-\lambda_1)f(x_2)$$ since $f$ is convex in $S$ by assumption.  For the forward implication, I thought that induction might work. The case when $m=1$ is trivial. However, I'm struggling to prove the general case. Any help with that step will be highly appreciate. Thanks in advance!


I have two web browsers:  Chromium, and Mozilla Firefox. Firefox let see Flash videos but with Chromium, I can not see Flash videos. How may I add Flash playback ability to Chromium?

Now, that Adobe has stopped issuing new releases for Linux desktops, the only option for users is to use Google Chrome, for those who want to use the latest Flash updates. I use Chromium. Is there any way to get Chromium use the Flash from Google Chrome? The reason I as this question is that I have noticed both these browsers run in the background, so technically, the browsers' plugins are available to use.


Probably a USA paperback read 70s or 80s in English. (The tone of the story was probably light-hearted.)  Alien visiting the Solar System discovers primitive humanoid life on Earth (Chemical Rockets have only just allowed man to reach the moon) and Captures a man for study and testing. He sticks him in a MRI type machine to do a detailed study of his brain and body to determine the human intellect and capabilities. (I think it was looking for a race to use as cannon fodder in their wars? or to use as slave labor? or looking for races which might be a threat?)  I think it was going to take a while for the computers to process the data to produce a report.  Meanwhile the alien put the man in a chamber or contraption that was like an exercise machine. To test his physical capabilities. The alien would select a skill on the controls, and the machine would then start painfully - bending, flexing, contorting, and manipulating the mans body. After which the man was able to preform that skill with ease. For example from being able to just shuffle a deck of cards, to a master card manipulator able to do riffs, spreads, dealing 2nds, 1 hand cuts and shuffles, etc. in just a few minutes.  The alien also tries to teach/implant his language, so he can talk to him with out having to learn the primitive humans language. But the man fools him into thinking that the language implant failed. So he can only speak a bare minimum of the alien language (like baby talk) and that the advanced concepts of the language did not take. (that the human mind to simple to understand them)  I think the man might have been a conman or criminal. Someone good at hiding their reactions/fooling people.  I THINK the ships computer was controlled by voice, so when the alien went to sleep, the man activated the computer (he now knew the language) to teach him A LOT more. (ex. Fighting skills, alien ship operations, etc) and then returns to his cell when the alien wakes up. (This might have been repeated for a few nights)  The alien is now also studying Earth and learning its Technological levels, political climate, history, etc.  Suddenly the alien freezes, obviously very panicked, and ask the man something like, Your race only learned to fly powered heavier-than-air crafts only 70 years ago? You put men in orbit 10 years ago? You went from leaning to fly, to safely landing a man on your moon in less than 70 Earth years? Humans went from theory to a working Nuclear Fission reactor and a Nuclear Bomb in less than 5 years?  And then he activates the Nav systems and sets course to leave the Solar system and max speed, so he could get clear to either activate his FTL drive or transmit his research data back home. (All the while muttering the alien equivalent of "Oh My God, Oh My God, Oh My God")  He tells the man that his race took about 500-1000(?) years to go from flight to rockets, and 200-300(?) to develop nuclear fission and bombs. Most other races they have meet in their explorations have taken longer.   About this time the computer finishes its report and says the due to the accelerated tech advancement of humans they will surpass the aliens in 50-100(?) years.  He needs to report back home how dangerous the humans are and they need to be destroyed as soon as possible.  At which point the human takes full control of the ship. (He has learned the ins and outs of the ships control systems, whereas the alien is just a pilot, Not a tech, he knows what commands or buttons to press to operate the ship, but not how to manipulate the system to regain control.  This is all I remember of the story, I believe this was only about half of the book, and there was much more as the man (by himself?) turned the tables on the alien race.

I am trying to remember a novel I half read as a teen (1984-1986), I borrowed it from the library but had to take it back before finishing.  I believe it was in an omnibus/ compilation edition book with two or three SciFi stories by different authors.  The plot was an alien studying the mental capacity and ESP of the human race.  The alien abducts a low level criminal/ wise guy from America and takes him to a base in the Arctic (perhaps) for study.  He is subjected to a number of physical and mental tests to find out how dangerous or powerful the human race could become.  I got as far as the criminal overpowering the alien and escaping in his spaceship to explore the galaxy.  Unique things I remember;   The human is put in an exo-skeleton to test and improve his flexibility. The human manages to fool the alien ESP testing/ training equipment.   Escapes his cell at night to use it unsupervised to increase his ESP powers in order to gain the upperhand.  In his travel through the galaxy he meets a insectoid race, (butterfly like? or maybe bat)   The insectoid is amazed humans still dream, when he gets telepathically pulled into a dream the main character is having.  ESP powers the main character gains includes matter translation, like turning wood into a steak or hamburger. The main character doesn't understand the risks of overuse of ESP powers.


I have the following PHP query code:  $theirTable = $dbcon->query("SELECT * FROM dogbreed"); $theirRow = $theirTable->fetch_assoc();   I am trying to understand the correct method for displaying all records in my chosen table in a loop. My request is done like so:              <?php                 while ($fow = $theirRow){                     echo $fow['dogtype'];                 }             ?>    This code proves problematic, as it repeats the first response endlessly. So I end up getting a result like dobermandobermandobermandobermandobermancontinously. Not sure what my problem is from a logic standpoint.

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?


My brother brought me this same question, also on this .   $$\int_{0}^{x}f(t)dt = x+\int_{x}^{1}tf(t)dt \tag{1}$$  When I try to solve it, I also did same thing. Differentiation leads to  $$f(x) = 1-xf(x)\\  f(x) = \frac{1}{1+x} \\ \int_{0}^{1}f(x) dx = \ln 2 $$  But try putting $x = 1$ in original equation $(1)$,  $$\int_{0}^{1} f(t) dt = 1$$  so what has happened? We get two contradictory results.  Is it still true that $f(1) = 1/2$? Where is the mistake?

If $\int^x_0  f (t) dt =x+  \int^1_x  t f (t) dt$, find value of $f(1)$  solution:- $\int^x_0  f (t) dt =x+  \int^1_x  t f (t) dt$ $\int^x_0  f (t) dt =x+  \int^0_x  t f (t) dt$ +  $\int^1_0  t f (t) dt$ $\int^x_0  f (t) dt =x-  \int^x_0  t f (t) dt$ +  $\int^1_0  t f (t) dt$ $\int^x_0  f (t) dt + \int^x_0  t f (t) dt$ =$x  +  $$\int^1_0  t f (t) dt$  I think, I am not in the right track Help me to find the value of $f(1)$


Reports are back in the market! Business Intelligence is gaining market traction with products from Microsoft SSIS/SSRS, Oracle OBIEE, Microstrategy to QlikView. Having a dedicated Q&A site for it may even get industry giants' or expert technical advisors attention/support to BI community. E.g.  has been an active supporter to SO Java/C# community and SO as a whole reckon. There's one for Database Admins. What about BI? I checked on the :  Project Management Freelacing Quantitative Finance Bitcoin  Why isn't there a BI dedicated SO site? Is it too costly? or  How does SO decide which "area" of sites to be released? Or being a dedicated site perhaps increases the risk of losing attention to a beta site?

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


Will a body executing pure rolling on a rough surface stop, neglecting air drag and other heat losses but not friction? If yes, due to which friction it will stop, static or kinetic and how?

Will a disc or cylinder (rigid body) executing pure rolling on a rough surface stop, neglecting air drag and other heat losses and rolling friction but not static and kinetic friction? If yes, due to which friction it will stop, static or kinetic and how? Assume surface has no rolling friction.


I wish to completely remove the win10 OS from my computer & replace it with Ubuntu is this possible? and how do I do it?  please assume that I need step by step.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Prove that if $M$ is a connected, smooth manifold, then $\text{Diff}(M)$ acts transitively on $M$.   What I'm trying to do is to take an arbitrary $p\in M$ and show that the orbit of $p$   $$\mathcal{O}_p:=\{q\in M \mid \phi(q)=p \text{ for some }\phi\in\text{Diff}(M)\}$$  is both open and closed. Since $M$ is connected, $\mathcal{O}_p=M$ for any $p$, which proves the proposition.  But I'm having difficulty to prove $\mathcal{O}_p$ is open in the first place.   My initial idea was to take a chart $(U,\psi)$ about $p$ and, for any $q\in U$, take some $g\in\text{Diff}(\mathbb{R}^n)$ such that $g(\psi(q))=\psi(p)$ (that's possible because $\text{Diff}(\mathbb{R}^n)$ is transitive). Then   $$\phi:=\psi^{-1}\circ g\circ \psi \in \text{Diff}(U)$$  has the property that $\phi(q)=p$. But that is not enough, since we need $\phi\in\text{Diff}(M)$. I've tried to prove that there is an extension of $\phi\in\text{Diff}(U)$ to some $\bar{\phi}\in\text{Diff}(M)$, but I couldn't.  Besides, I have no idea how to prove $\mathcal{O}_p$ is closed.  Any ideas? Thanks!

Suppose $M$ be a connected manifold and $x, y \in M$ are two points. Then I'm trying to show that there is a diffeomeorphism $f$ of $M$ that takes $x$ to $y$.  Since the set of points for which there is a diffeomorphism of $M$ taking $x$ to that point is clopen and $M$ is connected, I think it should be enough to consider the case when both $x$ and $y$ lie in the same chart. But how do I proceed from here? I think I should somehow take a vector field and consider flows, but I'm not really sure.   Can someone please provide a solution? Thanks in advance.


I would say: "How's that related to my question ?" Please answer for both formal and informal cases

When some one is asked a question, sometimes if they are trying to avoid answering the question, they respond with something unrelated. What is the word for that response?  Eg. A: Why were you late?     B: This bagel tastes good.  What I am looking for is the name of that response, not the action.


I'm not talking about the library. That part is covered fairly extensive. What I want to do is generate the javascript based on PHP. But I can't, for example, do this:  $o = '<script> $data = ['; for ($i = 0 ; $i < 10; $i++) {     $o .= $i.', '; } $o .= ']; </script>';      $form['mainText'] = array (         '#type' => 'markup',         '#markup' => $o,     );  return $form;   How am I supposed to do this correctly?  And if you are wondering, the reason I am doing this is because I want to generate javascript that is to be used to plot points on a graph.

I stand on the following tricky situation:  I have a node with geofield coordinates attached. I am constructing an array of points. Something like:  Array ( [86] => Array     (         [0] => Array             (                 [lat] => 39.1641410477                 [lon] => -2.633972168             )          [1] => Array             (                 [lat] => 41.0420738489                 [lon] => -2.633972168             )          [2] => Array             (                 [lat] => 41.0420738489                 [lon] => 1.2524414063             )          [3] => Array             (                 [lat] => 39.1641410477                 [lon] => 1.2524414063             )         [4] => Array             (                 [lat] => 39.1641410477                 [lon] => -2.633972168             )     )  [85] => Array     (         [0] => Array             (                 [lat] => 39.1641410477                 [lon] => -2.633972168             )          [1] => Array             (                 [lat] => 41.0420738489                 [lon] => -2.633972168             )          [2] => Array             (                 [lat] => 41.0420738489                 [lon] => 1.2524414063             )          [3] => Array             (                 [lat] => 39.1641410477                 [lon] => 1.2524414063             )         [4] => Array             (                 [lat] => 39.1641410477                 [lon] => -2.633972168             )     ) )   I want to pass this to my-googlemaps.js in order to be used by google's init map Google map is defined as:  my-map:   header: true js:   js/my-googlemaps.js: { }   https://maps.googleapis.com/maps/api/js?key=my_key&callback=initMap: {type: external, attributes: {defer: true,async: true}} dependencies:   - core/drupal   - core/drupalSettings  my-googlemaps.js:   console.log(Drupal.settings);   function initMap() {}   This way I get Drupal.settings undefined, which makes sense I guess. On the other hanve if I place initMap into a behavior It can not be seen as a callback as defined in googleapis.com before.  Has anyone stumbled with this before? Any idea how to attack the problem?


I have the following navbar using bootstrap  I have created it using the following code snippet (Here I'm using bootstrap version 3.3.5)

                     <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">                         Toggle navigation                                                                                </button>                     Home

About

           But I wanted center this navbar to the center of the page like below  I need to know how to do this using additional css styling .

How can I horizontally center a
 within another
 using CSS?

Foo foo


Let $M$ be Noetherian $R$-module(where $R$ contains $1$) and $\phi:M \to M$ be $R$ -module homomorphism . Suppose $\phi$ is surjective, how do I show that $\phi$ is injective ?   Hints will suffice, thank you.

1) How can I show that any one to one endomorphism of an Artinian module is an automorphism.   2) I also want to show that any onto endomorphism of a Noetherian module is an automorphism.   I need counterexamples for modules without chain conditions.


I've been trying to wrap my head around the concept of compactness and get an intuitive understand of what it is. The definition used in my text book is the finite subcover definition.     A subset $K$ of a metric space $X$ is said to be compact if every open cover of $K$ contains a finite subcover. More explicitly, the requirement is that if {$G_{\alpha}$} is an open cover of $K$, then there are finitely many indices $\alpha_1,...,\alpha_n$ such that $$K\subset G_{\alpha_{1}}\cup\, ...\cup \, G_{\alpha_{n}}.$$   This definition is not very accessible to me so I've been looking around trying to find something to help me understand it.   So far, I haven't really wrapped my head around the idea yet, but I have learned the following:   Compactness is a kind of limited-ness. Compactness is one of the two properties of finiteness, the other being discreteness. (I saw this in the explanation about foos, the creatures that are red and short, and the word foo has come to mean something both red and short.)  In $R^k$, compactness is equivalent to being closed and bound.    So I guess my question is, what is it about compactness that led mathematicians to call it "compact"? What exactly is compact about it? What does this have to do with the definition (that is, where does the definition come from)? Furthermore, what does it mean to be discrete? I think it would help if you could give me an example of metric spaces that are:   Compact and discrete Compact but not discrete Discrete but not compact Neither discrete or compact   I've already read this question:   The answers on this post explain very well why it is difficult to understand compactness, but I was hoping for something more concrete to help me understand.

I have a question that may be regarded by many as duplicate since there's a  one at MathOverflow. The point is that I think I'm not really getting the idea on compactness. I mean, in $\mathbb{R}^n$ the compact sets are those that are closed and bounded, however the guy who answered this question and had his answer accepted says that compactness is some analogue of finiteness. That's the first problem: In my intuitive view of finiteness, only boundedness would suffice to say that a certain subset of $\mathbb{R}^n$ is in some sense "finite". On the other hand there's the other definition of compactness (in terms of covers) which is the one I really need to work with and I cannot see how that definition implies this intuition on finiteness. Also, I feel it's pretty strange the covers people use when they want to deal with compact sets. To prove a set is compact I know they must show that for every open cover there's a finite subcover; the problem is that I can't see intuitively how one could show this for every cover. Also when trying to disprove compactness the books I've read start presenting strange covers that I would have never thought about. I think my real problem is that I didn't yet get the intuition on compactness. So, what intuition should we have about compact sets in general and how should we really put this definition to use? Can someone provide some reference that shows how to understand the process of proving (and disproving) compactness?


I got my Mac 2 days ago and installed a few softwares, Xcode, Android Studio and stuff. Today I noticed my Storage as this:    17GB of Apps might be there but I dont have any Audio/Photos! Where is this 2GB going? And whats this 13Gb other?  Is there an app that can locate these files taking this space?

I have a strange discrepancy in the amount of free disk space that's being reported. The finder says:  My iStat Menus says:  Which is the same as df -h reports: remco@Prosperpine ~  $ df -h Filesystem                          Size   Used  Avail Capacity  iused   ifree %iused  Mounted on /dev/disk0s2                       148Gi  127Gi   21Gi    87% 33479179 5383643   86%   / devfs                              187Ki  187Ki    0Bi   100%      646       0  100%   /dev map -hosts                           0Bi    0Bi    0Bi   100%        0       0  100%   /net map auto_home                        0Bi    0Bi    0Bi   100%        0       0  100%   /home  Why would such a large difference occur? I've checked the disk using the disk utility and it does not report having any issues. Specs: Late 2011 MacBook Pro 17", non-Apple Intel 160GB SSD, OSX Mountain Lion 10.8.2


i have little php site. I add to header this;  <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   but still site doesn't show some UTF-8 characters here is example         altb�l�m   what can i do ?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have a dataset with a number of records. For any record $i$, I have: $(T_i, X_i^{fixed}, X_i^{vary})$ representing an event time $T_i$, a set of features $X_i^{fixed}$ that are time-invariant and a set of features $X_i^{vary}$ that are time-series, reported every minute for every record. Note that I do not have any censoring in the data, every single record has a known event time. I want to model the event time, conditioned on the features I have. Accelerated failure time models are the most popular in my application, and reading up on these, the authors typically use a set of fixed features to model the log of the event times. That is: $log(T) = \mu + \beta'X^{fixed} + \epsilon$. They choose some distribution for $\epsilon$ and then fit the model via optimizing the log-likelihood function. My question is, are there known methods to incorporate the time-varying features into this framework? I see a lot of discussion of time-varying covariates for cox-models, but not so for accelerated failure time models. The simplest thing I can think to do is just treat this as a standard regression problem (due to no censoring) and at some time $t$, given $X_i^{fixed}$ and the time-series $X_i^{vary}$ up-to $t$, try to predict the remaining time until $T_i$. But, this means each event is present multiple times in the data, so I am unsure if independence among observations is then true. Any pointers on how to address time-varying AFT models, or other helpful advise on this situation is greatly appreciated.

I am trying to run a survival model using the Weibull approach, but the wrinkle is that I have time-varying covariates. I am using the survival package in R. My call is:   output <- survreg(Surv(start, stop, fail) ~ gdppc + [...] + cluster(name), data = mydata, dist="weibull")   which yields the following error:  Error in survreg(Surv(start, stop, fail) ~ gdppclag + :    Invalid survival type   The coxph procedure works fine, but I want to use the weibull.   My first question is: can the Weibull approach account for time-variant covariates? I've looked around at some texts, and I see that the Cox PH approach can be extended to time-variant covariates. It's less clear if the Weibull approach can do it.  Second, if indeed the Weibull can work, what are the packages in R that can process it?


So I think the problem reduces to 3^1000 mod 100. So I used the Eulers Totient to find phi(100)= 40. Then 3^1000 = (3^40)^25 = 1 mod 100. Is something wrong?

I'm thinking of modulo, but really don't know how to start? A hint would be sufficient.     Thanks, Chan


I am struggling with a basic matrix calculus question.   Suppose you had $f(\textbf{x}) = (\textbf{a} - \textbf{Bx})^T(\textbf{a} - \textbf{Bx})$  where $\textbf{a}$ and $\textbf{B}$ are a vector and matrix of constants respectively. I am interested in finding the gradient of $f$ with respect to $\textbf{x}$. I would appreciate it if someone could write down the steps needed to compute this gradient.  I know that $d(\textbf{a} - \textbf{Bx})/d\textbf{x} = -\textbf{B}^T$, but I don't know how to apply the derivative operator to the product of $(\textbf{a} - \textbf{Bx})$ with itself.  EDIT: the gradient and the derivative are not the same thing. I am interested only in the gradient.

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


I don't remember where, but I read that it is not recommended to write, in a article, something like     [...], as detailed in [1].   Instead, we should write     [...], as detailed by Someone [1].   In other words, reference numbers should not be treated as nouns. Why is it so? I see nothing disturbing with the first form.

Though I read this style quite often, I was recently told unambiguously by a reviewer that I was NOT supposed to use citations "as if they are objects in a sentence."  The following sentence is an example of what the reviewer considered unacceptable:       We analyzed the data using the Wilmerding method, guided by [12].   The references section might include the following:      [12] Smith, D., Marshawn, J., & Devenshaw, A. 2011. Techniques and   Procedures for Applying the Wilmerding Method.  Prince Publications,   Inc, New York, NY.   The Wilmerding method1 is not a step-by-step algorithm that can be precisely followed as if by a machine, and thus [12] does not provide a step-by-step algorithmic description but rather guidance for using  the method. [12] is a relatively slim but authoritative textbook about how to use the Wilmerding method.  Within this question, for the purpose of discussion, I have intentionally put [12] in grammatical positions where it's an important element of the sentence and the sentence would make less sense without the reference.  Sometimes that seems to be the most efficient way to communicate the intended message.  Is using a reference as a grammatical sentence element like this OK?   Why might this not be considered acceptable?   Should I be rewording those sentences?  Is it enough of a violation to be worth passing the note on to authors of papers I review?   I considered posting this on  but it seems more specific to academia than general English usage, and the comment came from a content reviewer rather than a copy editor.   is related but it seems to be more about when to put authors names' in vs. outside of the parentheses in an APA-like style.   The numbered citation style (as opposed to following APA, for example) is required by the venue.  1: Fictionalized for the purpose of this discussion


I want to create a SSH tunnel but I dont know how to identify my Windows 7 machine.  In the command below, what do I have to put replace me@win7_machine with in order for it to work? Is it my username@IP_address? username@pcname?    ssh -R 12345:localhost:3306 me@win7_machine -N

I have the following configuration and want to establish a tunnel on a tunnel. I read already the following topic:   My configuration:  Notebook --> Linux Server A --> Linux Server B   Notebook: Windows XP with putty Linux Server A and B: Ubuntu 10.10  I have a ssh connection with a tunnel from my notebook via putty to Server A. Now I want to establish a tunnel from Server A to B, so that I can connect with an IDE directly to my jboss on Server B.  This is the command I tried on Server A to establish a tunnel:  ssh -t -L 8080:localhost:8080 Server B -p 8822   This won't work.  Anybody an idea how to establish a working tunnel?


I am in my first steps in PyQt5. I intend to create a plugin within QGis 3.0. I would like to convert the file resources.qrc into py file, by running windows shell commands with python. However, when I execute:  pyrcc4 resources.qrc -o resources.py   The code of resources.qrc is as follow:  <RCC>  <qresource prefix="/">   <file>://Program Files/QGIS3.2/apps/qgis/python/plugins/testPlugin/icon.png</file>  </qresource> </RCC>   The code of testPlugin.py is as follow:  from PyQt5.QtCore import * from PyQt5.QtGui import * import resources  class TestPlugin:  def __init__(self, iface):    self.iface = iface   def initGui(self):    self.action = QAction("Run", self.iface.mainWindow())    QObject.connect(self.action, SIGNAL("triggered()"),self.onRun)    self.iface.addPluginToMenu("Test Plugin", self.action)   def unload(self):    self.iface.removePluginMenu("Test Plugin", self.action)   def onRun(self):    QMessageBox.information(self.iface.mainWindow(), "debug","Running")    I receive the following message error: invalid syntax. I verify the path files, but without success.   When I execude the code from Windows commande, pyrcc4 is not recognized as internal or external command, executal program or command file.    Any help is welcome.

I installed QGIS 3.0 on Windows 10. I get this error everytime i run the pyrcc4 or pyrcc5 command:  'pyrcc4' is not recognized as an internal or external command  Even if I find a place with a pyrcc4.exe file or a place with apyrcc5.bat file and add the path to the environment variables I get the same error. In the previous installation of osgeo4w i had a pyqtdev folder or something similar appear I think it was on C/. Was there supposed to be such a folder, do I need to download pyqt separately?


I have a Jenkins batch command step, which makes query to MSSQL DB and return a result:  cd "C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn"  SQLQUERY="C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.exe" -S "test-sqlsrv.database.windows.net" -U "someuser" -P "somepass" -d "somedb" -W -Q "SELECT tt.Name FROM Transport.Topic tt, Transport.Root tr, Transport.DDS dds WHERE tr.Id = tt.TransportId AND dds.TransportId = tr.Id AND dds.QOSProfile = 'Asset_Profile' group by tt.Name order by tt.Name">test.txt   Result in test.txt:  Name ---- value1 DigitalIO value2 J1939 SKF15 value3 VIMS  (7 rows affected)    Is there any way, either by transform test.txt result, or by remaking sql query on previous step, to receive following output in file or variable:      value1;DigitalIO;value2;J1939;SKF15;value3;VIMS

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


Today I ran sudo chmod -R a-wrx /. Now nothing is working. Can anyone help me recover my system?

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


I got Yakkety installed, finally, and it booted, but I don't have a clue how to get it to a usable state. The screen is blank. When it was installing I ticked the choice to require a password but there's no prompt to enter it. The answer is probably obvious but not to me.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


So, somehow over the weekend, my 1GB USB flash drive has managed to become write-protected.  There is no switch on the stick, so I'm concluding that something has corrupted at some point.  Obviously I can't format it or remove.  The output from dmesg | tail is:  Buffer I/O error on device sdb1, logical block 328168 lost page write due to I/O error on sdb1 sd 73:0:0:0: [sdb] Unhandled sense code sd 73:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 73:0:0:0: [sdb] Sense Key : Data Protect [current] Info fld=0x0 sd 73:0:0:0: [sdb] Add. Sense: Write protected sd 73:0:0:0: [sdb] CDB: Write(10): 2a 00 00 05 08 00 00 00 01 00 Buffer I/O error on device sdb1, logical block 328200 lost page write due to I/O error on sdb1   I think the second and final lines are a giveaway to corruption, but I don't know how to interpret this output.  Could someone help to see if this output gives any indication?  I usually eject the drive before removing it, but I may have been lax once or twice.  The data isn't critical, it's just bugging me.  Any suggestions on how to fix it (if the drive even can be) would be greatly appreciated.

My flash disk encountered an error saying that it has been write protected, so of course I can't even copy files or even format my flash drive.   What happened to my flash drive to cause this?   And is there a way I can I fix this?


I was initially trying to use getpid() in my kernel module for OS X/macOS, is there a way to get the PID (process ID) of the process in whose context my kext is running in the kernel? Is there an existing function or variable that I can use ?

Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa…


I want to go from Manaus, Brazil to Leticia, Colombia. Are there certain days the boat from Manaus goes to Leticia or is there a boat going everyday?

I've heard of and met a few people who have done this route, and I hope to do it at the end of this year or early next year.  However, the descriptions were mostly sketchy, and I'm wondering if it's a regularly scheduled service, or more ad-hoc.  So I guess the question is, how can I find out which boats go from Manaus to Leticia, and when they go?  Ideally this wouldn't be a tour, but a 'locals' boat.


Round trip tickets seem much cheaper than setting up multicity one way in and one way out from a different city...  It is looking like it is cheaper to buy round trip tickets going to/from my final exit city, then bail out onto another plane on the layover in the same country, much closer to the first city I want to go to, then end up in my exit city, taking the exit flight out.  Has anyone done this before?  Would having a flight arranged in the layover city attract any unwanted attention?  Edit:  I want to enter Beijing and leave out of Hong Kong.  It looks cheaper to round trip it to Hong Kong and bail out in Shanghai on the layover.  Both tickets would be used, this is not a duplicate as suggested.  I just didn't want to finish the entire first leg of the journey.   Since the return flight would be canceled as in the answer I guess it won't work.

At this link about   what does the author mean by this?   Back to back and hidden city ticketing. Sometimes airlines will charge far more for tickets to that do not include a Saturday night stay, on the assumption that those passengers are business travelers who aren’t flexible and can afford to pay more. Yet those who commute between cities eventually realize that they can purchase one round-trip ticket that covers their first outbound and last return, followed by round-trip tickets to return home on the weekends.


How can I change my login email address for Stack Overflow?   I tried editing from my account, but that didn't work if I used that email during login.

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


I have read in an introduction to quaternions that it had been proven before that one can not structure the Euclidian $\mathbb{R}^3$ as a field.   Where can one find a proof thereof?  For which n, could we bestow $\mathbb{R}^n$ with a field structure?

I am trying to solve the following exercise:     Prove that complex multiplication does not extend to a multiplication   on $\mathbb R^3$ so as to make $\mathbb R^3$ into a real division   algebra.   I am aware of Frobenius' theorem that there are only three finite dimensional real associative division algebras. But the exercise would be pointless if the theorem was assumed.   Let $x,y \in \mathbb R^3$. Since $x y$ has to extend the complex multiplication:  $$xy = (x_1y_1-x_2y_2, x_1y_2 + x_2 y_1, ?)$$  I have no idea how I can proceed from here. Could someone tell me how to do this? It should be easy as the other exercises I did so far were also easy.


I have an app that I want to distribute to my friends - what do I use?  I have an 'Awesome new app' - And I want to distribute to a huge number of people - for testing purposes.

How can you beta test an iPhone app?  I can get it on my own device, and anyone that gives me a device, I can run it on theirs, but is there a way to do a limited release via the app store for beta testing?  Related: Also, see  on getting your app onto phones without using the App Store.


The  is helpful, especially for new moderators. It contains information that mods need (and a warning not to copy stuff out).  One of the most commonly asked things in the TL is how to redact posts.    . It's not intuitive at all. So, what could be a better thing to put in the mod help center than something that lots of mods have trouble with?

Some of us were trying to figure out how to use the redaction tool correctly, as it can be a little , when somebody pointed out the documentation in the .  That was, in fact, just what we needed -- but, 11 months later, I for one didn't remember that it was there.    Moderators see an additional section in the Help Center for moderator tools.  Could we add the information about this tool there?  I think of the newsletter as a place for announcements, but I look for help in the Help Center.  The instructions are already written; a cut/paste (or link) would do the job.  In general, when a new tool is announced in the newsletter, could you please review the documentation you've already written to see if it also belongs in the help somewhere?  I know this does happen sometimes; I don't know how systematic the process is.


I want to know if its "legal" to run Mac OS X in non apple hardware.   If not, what is the point of having to run Mac OS X in a apple hardware, when apple hardware is running Mac OS X already.

As we all know Mac OS X Mavericks is now free of charge officially! Does this mean that it is now legal to use Mavericks on non-Apple hardware?


I'm looking for a term that are like a palindrome but for whole set of words and not just letters  Examples:  Set 1   You do? Do you?   Set 2   Venture Capital Capital Venture   Set 3    List Item Item List   I've searched through the old questions and also googled quite a bit, but couldn't get a definitive answer. "Chiasmus" was a close one, but I'm not sure if it is the correct answer.  Also, thank you in advance since the comments form suggest that I avoid telling thanks in comments.

Is there a word for sentences that make sense when read normally or backwards (not necessarily by reversing the words)? Example:     "Are you as bored as I am?"


How do I detect players being on a block without pressure plates or tripwires? Preferably with command blocks. This is on Minecraft: Java Edition.

If I do:  /testfor @p[x=,y=,z=,r=]   It says:     The entity UUID is in an invalid format.


I have a sequence: $ a_{n}=\sqrt{3+ \sqrt{3 + ... \sqrt { 3} } } $ , it repeats $n$-times.  and i have to prove that it is a Cauchy's sequence.  So i did this: As one theorem says that every convergent sequence is also Cauchy, so i proved that it's bounded between $ \sqrt{3}$  and $ 3 $ (with this one i am not sure, please check if i am right with this one.)And also i proved tat this sequence is monotonic. (with induction i proved this: $ a_{n} \leq a_{n+1} $  so if it's bounded and monotonic, therefore it is convergent and Cauchy. I am just wondering if this already proved it or not? And also if the upper boundary - supremum if you wish - is chosen correctly.  I appreciate all the help i get.

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


I am very new at the development. I finish writing the Trigger but have no idea with the test code. I trying to write the test code but get 0% of code coverage.  Here is my Trigger and test code. Hoping someone can help me. Thank you!  Trigger      trigger UpdateQuoteStatus on QuoteLineItem (after insert, after update) {     List<Quote> quoteList = new List<Quote>();      for(QuoteLineItem q : Trigger.New)     {         if(q.UnitPrice != q.Apex_price__c)         {            quoteList.add(new Quote(Id = q.QuoteId, Status = 'Needs Review', Sales_Price_not_List_Price__c = 'Yes', RecordTypeId = '0126F000001KDtwQAG'));         }        if(q.Discount != 0 && q.Discount != null)         {           quoteList.add(new Quote(Id = q.QuoteId, Status = 'Needs Review', Discount_not_0__c = 'Yes', RecordTypeId = '0126F000001KDtwQAG'));         }     }     map<Id,Quote> accmap = new map<Id,Quote>();     accmap.putall(quoteList );     if(accmap.size()>0){     update accmap.values();     } }   Test Code  @isTest private class TestUpdateQuoteStatus {     @isTest static void TestUpdateQuoteStatusWithPrice() {         QuoteLineItem  acct = new QuoteLineItem (UnitPrice =8.11,Discount=0);         PricebookEntry PbE = new PricebookEntry(UnitPrice =8.11);        Test.startTest();        try{             insert acct;         }         catch(Exception e){             Test.stopTest();         }         }  }

How do I write a unit-test / test class for a trigger?  What are my options?   Inline with the trigger?  New Class?


The pronunciation of blood is  \'bləd\ while words such as moon and spoon (with double 'o') are pronounced as \ˈmün\ and \ˈspün.   Why isn't blood pronounced like \ˈblüd\ ?

I mean, why isn't it pronounced "blue-d" rather than "blud". And this applies to "flood" too, but not "glood" or "clood" I imagine.


public class Test {     public char[] reverse(String list) {                    char[] ch=list.toCharArray() ;            for (int i = 0, j = list.length() - 1; i < j; i++, j--) {               char temp=ch[i];               ch[i]=ch[j];               ch[j]=temp;            }            return ch;         }     public static void main(String args[]) {       Test test = new Test();       String a="HELLo";       char[] b=test.reverse(a);                 System.out.println(a);       System.out.println(b);       System.out.println(a+b);    } }   Output: HELLo oLLEH HELLo[C@38462f90  In last s.o.p output is reference while for same vairable b in second s.o.p is string value. Please explain reason

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I have a treeview like below,  tables --table1   --tab1   --tab2 --table2   --tab2   --tab2   I am giving a text "tab" and using  treeViewMenu.SelectedNode = txtbox1.Text, it selects the very first match (i.e node: table1)  I want all the nodes having "tab" in its name to be selected. (i.e table1 and table2)  I have tried passing an array to treeViewMenu.SelectedNode =array[], but this is not working.

I'm stuck in .NET 2.0 Windows Forms.  It doesn't look like the ability to select multiple nodes exists in the standard TreeView control.  I'm trying to do this for a context menu selection.  So check boxes aren't an acceptable UI paradigm here.  What's the best way to provide that very necessary functionality?


Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I'd like to reduce the charging current of my phone, because  It gets too hot I am charging it overnight so it's more beneficial to charge it slowly.  Is it even possible from a hardware perspective to regulate the charging power (e.g. reduce it from say 2000mA to 1000mA)? I tried to search on google but not only that I didn't find any apps that would be able to accomplish it - I didn't even find anyone discussing it anywhere.

Answers to this question  explain how charging while phone is in use does both - charging the battery and powering the on going activities.  My question is different — Can I stop charging the battery but use the connected power for ongoing activities?  Why do I want to do this?    I want to charge the battery within ideal limits (see )    and    at the same time use the charging power to keep running the phone without any heat stress on battery, thus extending battery life.  Also the battery is not drained, enabling me to use the phone for longer time without charging   Edit : I am not looking for dedicated cables or hardware that can possibly do this


Due to problems with login loops I tried the following fix on my pc that required mokutil:  sudo mokutil --disable-validate   The fix didn't work, but it did add an extra startup screen to my boot sequence. Booting works fine, I can still reach GRUB and windows. But it is really annoying so I tried the following, to get rid of it:  sudo mokutil --enable-validate   This did not work. So my question is simple: how do I get my same old startup sequence back?

My Ubuntu 14.04 is stuck when trying to login my desktop. The screen goes black and soon after that the login screen comes back.   I followed all steps in  but the issue was not solved.


Can someone help me, I'm trying to recreate the effect in the image on other photos. It has a dark transparent layer over the image. Can seem to create this same effect.

There are 3 overlay effects available in Photoshop as layer styles: Color, Gradient and Pattern. The problem: these effects come in a strictly fixed order!  Is it possible to make a translucent Gradient Overlay over a Color Overlay using only layer styles? Or a Multiply Pattern and Color Overlays?


As noted below in the comments, this question specifically addresses how the functionality delivered to "complete" the  question is not sufficient, and requests a CHANGE to .   TL;DR I want to be able to quickly vote to keep good questions open WITHOUT having to go click through the review queue. Currently, we cannot easily vote for questions to be left open when they have existing close votes on them - the only way to do this is to go to the review queue and click through until you find the question you want to vote to keep open. This discourages the use of "Leave Open" votes by making them difficult to cast.    There have been numerous good questions that are descriptive, on-topic, and informative for IT professionals that still manage to get several close votes. It is quite difficult for us to go into the review queue and slog through all the other questions and hope we don't burn through our close vote quota before we get to the question needing a helping hand.  And if we've already used up our close quota, we can't do anything at all until Midnight GMT to help a question out. (Note: it's possible that Leave Open uses up one of those votes. I don't know.)  I'm requesting that a 'Leave Open' button be provided in the Close Vote dialog that pops up on the questions page.  This will enhance our ability us to improve the quality of ServerFault questions in a positive and qualitative manner.

My request is simple: Many times, there will be a question where some people feel like it should be closed. At the same time, I'll feel like it's a perfectly legit question, and it should therefore NOT be closed. Right now, I have to wait till it gets enough close votes (which it always does for some reason, as soon as 1 or 2 people vote to close, e/o else decides to vote as well) and then vote to re-open. How about, as soon as there's one vote to close, there should be an option to counter the close vote, something like "vote not to close" or whatever. This would then bring the "Vote to close" number down by one. Only when the vote to close outnumbers the vote not to close by 5, that's when a question is indeed closed. Any thoughts?


I'm writing a pthon script to install several setups and configs. but before installing that i want to check if the dpkg frontend is locked or not. sample if(checkfordpkg() == true):  print("dpkg frontend is locked") else:  installconfigs()  can someone help me out with this part. I cannot think of a way to check the dpkg frontend lock using python.

How do I check whether a file exists or not, without using the  statement?


So I'm using a CentOS 8 system (just installed CentOS 8 minimal to reproduce on, so my application can't be an issue). If I turn off ntp, and set the time to several years ago, things are as expected. (This particular date is part of testing for our DST handling). timedatectl set-ntp off timedatectl set-time "2017-03-11 19:55:00" timedatectl                 Local time: Sat 2017-03-11 19:55:11 EST            Universal time: Sun 2017-03-12 00:55:11 UTC                  RTC time: Sun 2017-03-12 00:55:11                 Time zone: America/New_York (EST, -0500) System clock synchronized: no               NTP service: inactive           RTC in local TZ: no  If I then reboot, the system time is now absurdly wrong (more than a year later). Note that the RTC is correct, it's just the system's idea of time that's off the rails. reboot timedatectl                Local time: Fri 2018-06-22 07:13:26 EDT            Universal time: Fri 2018-06-22 11:13:26 UTC                  RTC time: Sun 2017-03-12 00:57:22                 Time zone: America/New_York (EDT, -0400) System clock synchronized: no               NTP service: inactive           RTC in local TZ: no  Now at that point I got the idea that /etc/adjtime was involved and tried deleting it. rm -f /etc/adjtime reboot ls -al /etc/adjtime ls: cannot access '/etc/adjtime': No such file or directory timedatectl                Local time: Fri 2018-06-22 07:18:54 EDT            Universal time: Fri 2018-06-22 11:18:54 UTC                  RTC time: Sun 2017-03-12 01:02:50                 Time zone: America/New_York (EDT, -0400) System clock synchronized: no               NTP service: inactive           RTC in local TZ: no  No effect. RTC is still fine, system time is bogus. I would like to know what is going on here and (if possible) how to make it stop. In the cases where we turn off ntp sync (our system operates without a network quite frequently), we need to know that our customers can at least set the TIME and have it do what they want. Additional information: This is running on real hardware (two completely different systems, in fact). The C8 system was shut down after my original posting and I just rebooted it now, 2 days later. The RTC time has moved along as you'd expect, but the system time is back where it was on the previous tests, as if something has a 'minimum' time that it'll set, as opposed to some kind of offset. timedatectl                Local time: Fri 2018-06-22 07:12:46 EDT            Universal time: Fri 2018-06-22 11:12:46 UTC                  RTC time: Tue 2017-03-14 12:20:20                 Time zone: America/New_York (EDT, -0400) System clock synchronized: no               NTP service: inactive           RTC in local TZ: no

I'm running Debian Stretch and Linux kernel version 4.9.110-3+deb9u4, with a modified config. I'm observing the following weird behaviour   Set the hardware clock to 2016-01-01 00:00:00 UTC Reboot dmesg reports reading the hardware clock similar to what was set previously date reports 2016-11-03 17:16:42 UTC   The above behaviour is observed with any date before 2016-11-03 17:00:00 UTC. I haven't narrowed down any further than that.  The kernel source code has not been changed, nor am I running any custom kernel modules. I have also observed this with using the 4.9.168 kernel from the Debian repos, as well as the 4.19.37 kernel from stretch-backports. I have also been able to reproduce this on a DigitalOcean droplet running Stretch and 4.9.168.  I have not seen this problem occur when I set a date after 2016-11-03. It doesn't seem likely, but it seems like the kernel is forcing some minimum date.  Does anybody have a clue on this?  Logs from my VM:  root@debian-vm:~# timedatectl        Local time: Thu 2016-11-03 17:17:02 UTC   Universal time: Thu 2016-11-03 17:17:02 UTC         RTC time: Fri 2016-01-01 00:29:00        Time zone: Etc/UTC (UTC, +0000)  Network time on: yes NTP synchronized: no  RTC in local TZ: no root@debian-vm:~# dmesg | grep rtc [    0.985653] rtc_cmos 00:01: registered as rtc0 [    0.985670] rtc_cmos 00:01: alarms up to one month, y3k, 114 bytes nvram, hpet irqs [    1.032409] rtc_cmos 00:01: setting system clock to 2016-01-01 00:28:37 UTC (1451608117)   Logs from a DigitalOcean droplet:  root@debian-s-1vcpu-1gb-sfo2-01:~# timedatectl                                                                                Local time: Thu 2016-11-03 17:17:05 UTC   Universal time: Thu 2016-11-03 17:17:05 UTC         RTC time: Fri 2016-01-01 00:00:46        Time zone: Etc/UTC (UTC, +0000)  Network time on: yes NTP synchronized: no  RTC in local TZ: no


I am creating a program that simulates Rock, Paper, Scissors, and I need the user to input either "Rock","Paper", or "Scissors". My Code is:      Scanner input = new Scanner(System.in);     String userIn = null;      while ((userIn != "Rock") || (userIn != "Paper") || (userIn != "Scissors")) {         System.out.println("Please Type either: Rock, Paper or Scissors");         userIn = input.next();      }   I created a scanner for the input and set the initial input to null. When the program runs, since the input is not either "Rock","Paper", or "Scissors", it will prompt the user to enter one of those three, the problem is even when I enter "Rock","Paper", or "Scissors" correctly, it still reprompts me to "Please Type either: Rock, Paper or Scissors".  what am I doing wrong?

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


In the BibDesk wiki (BibDesk Tips and Tricks) there is some information on customizing BibDesk for biblatex, including a link to a TypeInfo file that can be used to create all of the biblatex fields automatically.  The has to be saved as ~/Library/Application Support/BibDesk/TypeInfo.plist.  Im using texmaker, bibDesk under osx 10.9.5. The folder doesn't exist so I created it. Didn't help.  Does anybody know where to copy the "TypeInfo.plist" file?   Alan Munn refers to this in that Question:

I’m currently in the process of reconsidering how I do bibliography management. It seems to be most sensible to use biblatex with biber. I’d like to know what tools are available on which I can build a solution that works for me. I’m interested in everything from full-blown bibliography management suites to pretty-printers for .bib files; both as traditional programs and online services.  Tools in question should fulfill the following criteria:   Unicode support. Support for the additional entry types and fields that biblatex supports. Support for biber’s improved cross-referencing.


Recently, my state has declared graduate students as employees giving them the right to unionize. The students in the Engineering School are very well compensated. The benefits that we get are   Minimum stipend of 29k$ (which was increased ~3 years ago).  Top tier health insurance plan fully paid for by the University and Engineering School Deans that largely respect student needs and actively address current issues Plethora of funding for student lead activities  Free services like legal council, psychiatrist, campus clinique, campus shuttle buses, etc. TA opportunities are always available for those that need them.    Additionally, my department has a very high standard set forth for us. We have nice offices, the Chair actively addresses our concerns and complaints, funds for student activities and community building, computational resources, and more. The quality of life for students in my department (Applied Math) is quite high.   Lately, we've had outside people dropping by to advise us to join a union. The humanities students are largely in support of this movement since they are not compensated as well as the engineering students. In my point of view, there are very few reasons why I can see joining a union will benefit the Applied Math graduate students. Given how well we, the graduate students in my department, are currently treated, what are the advantages and disadvantages of unionization?   Edit: There is a similar question , however, does not specifically address STEM students.   I am a naive graduate student and will like to be better informed about the advantages and repercussions of joining a union. Whenever administrative University personnel have approached us to dissuade the effort, their tone has been extremely diplomatic and ambiguous about why they are advising against unionizing.  A brief summary of the responses is as follows.   Advantages of unionizing   Security of current benefits Bargaining power to timely address current, new, and growing needs of the entire bargaining unit  Guaranteed minimum pay  Improving circumstances of students in other schools who are not as well compensated Human resources like representation for students facing abuse, harassment, or other adversities from their advisors  Disadvantages of unionizing    Partisan representation  Clarifying the distinction between student and employee (though some may argue that this is an advantage) Paying dues (though contracts usually negotiate higher stipends to offset this amount) Deterioration of student/administrative relationship    Additional STEM specific points that I'd like to add are   Advantages   Incentives to address issues such as a single student having to monitor experiments running for 8+ hours For international students, alleviating fears of not being able to find an advisor which prevents them for settling to the 1st person that says yes regardless of their interest  Some departments in the Engineering school offer things like funds for all students in their 3rd year to purchase a new laptop. Adapting this or similar policies universally would be appreciated. Guaranteed funding beyond X years as set forth by the School, especially when the average is just slightly below X.   Disadvantages    As funds are rerouted into increased stipends, there may be    Decreased support for professional development (conferences, workshops, etc.) Decreased supplemental resources (rented compute nodes and hours, new lab equipment, etc.) Fewer graduate student and postdoc hires     Thank you all for your comments; it is all very much insightful. I'll continue to look out for new responses.

The graduate students at my university (a relatively large state school in the US) are considering joining a union. To help decide whether to sign a union card in support of joining the union, I'm interested in more information about how unions have helped graduate students at other universities. What are some improvements to graduate life gained by graduate students at other universities upon joining a union?  I'm also interested in information about how unions have hurt graduate students at other universities. What are some detriments to graduate life caused by graduate students joining a union?  I'm primarily interested in student-body-wide benefits/detriments, instead of student-specific or faculty/administrator-specific claims (e.g. "my advisor treated me better with the union behind me" or "my students have stopped working since they joined a union" is not what I'm looking for).


Does setting and getting an object attribute using reflection (java.lang.reflect.Field get and set functions) rather than calling the set and get of the object itself, result in any significant performance differences?

Does creating an object using reflection rather than calling the class constructor result in any significant performance differences?


I am familiar with the gauusian integral $$\int_{-\infty}^\infty e^{-\alpha x^2+\beta x}dx=\sqrt{\frac{\pi}{\alpha}}e^{\beta^2/(4\alpha)}$$ Could anyone help me to find out the value of the following? $$\int_{-\infty}^\infty xe^{-\alpha x^2+\beta x}dx$$ Integration by parts turns out to contain error function which I am not familiar with.

I took ${-x^2-x{\tau}} = k $ on differentiating it $dk=(-2x-\tau)dx$ but this substitution doesn't work how can i proceed further .


We're going to host a large SQL Server 2012 under a VMware virtualization and we need it to be highly available.  These are the three options I found supported, but couldn't find a lot of info and comparison on who's better and why (and mostly - what's the disadvantages):   VMware HA - pro: cheap and easy to use and configure, just let the VM team deal with it. con: no HA for system upgrades, e.g. SQL upgrades, Windows services-packs\KBs etc. SQL Server Failover Cluster (FCS) - pro: well known, supported, saves space (compared to AlwaysOn Availability Group), HA for system upgrades. con: I haven't heard of successful clusters over VM, or at least good ones. Heard it's a mess and to "stay away from it". A bit harder to admin, some problems may take days to figure out (no-one with a lot of knowledge). SQL Server AlwaysOn Availability Group - pro: HA for everything! system, DB etc. con: New, added administering and hard to confiugre, new problems to deal with, double the space(!), "no strings attached" (to other servers).   That's pretty much it.  I would appreciate any info you may have about this, and would appreciate even more recommendations (hopefully based on test cases).  ~Thanks.


Let $s_n=1+\frac{1}{\sqrt2}+\cdots +\frac{1}{\sqrt n}$. This sequence is definitely increasing, and I tried to show that it is not bounded above, by induction. However if $s_n\leq2$, then $s_{n+1}\leq2+\frac{1}{\sqrt n}\nleq2$. So I thought this is not bounded above.  Now, the second sequence is $s_n=\frac{1}{1^2}+\frac{1}{2^2}+\cdots+\frac{1}{n^2}$. The problem requires to prove that this one is bounded above by $2$.  I tried to apply the same method as before: if $s_n\leq2$, then $s_{n+1}\leq2+\frac{1}{(n+1)^2}\nleq2$. But, this is bounded above by $2$.  What is wrong with my logic?

$$\dfrac{1}{\sqrt 1}+\dfrac{1}{\sqrt 2}+\dfrac{1}{\sqrt 3}+\cdots+\dfrac{1}{\sqrt n}\geq \sqrt n$$ I want to prove this by Induction  $$n=1 \checkmark\\ n=k \to \dfrac{1}{\sqrt 1}+\dfrac{1}{\sqrt 2}+\dfrac{1}{\sqrt 3}+\cdots+\dfrac{1}{\sqrt k}\geq \sqrt k\\ n=k+1 \to \dfrac{1}{\sqrt 1}+\dfrac{1}{\sqrt 2}+\dfrac{1}{\sqrt 3}+\cdots+\dfrac{1}{\sqrt {k+1}}\geq \sqrt {k+1}$$ so $$\dfrac{1}{\sqrt 1}+\dfrac{1}{\sqrt 2}+\dfrac{1}{\sqrt 3}+\cdots+\dfrac{1}{\sqrt k}+\dfrac{1}{\sqrt {k+1}}\geq \sqrt k+\dfrac{1}{\sqrt {k+1}}$$now we prove that $$\sqrt k+\dfrac{1}{\sqrt {k+1}} >\sqrt{k+1} \\\sqrt{k(k+1)}+1 \geq k+1 \\ k(k+1) \geq k^2 \\k+1 \geq k \checkmark$$ and the second method like below ,   and I want to know is there more Idia to show this proof  ? forexample  combinatorics proofs  , or using integrals ,or fourier series ,....    Is there a close form for this summation ?  any help will be appreciated .


If it doesn't allow for transmitting of any information, what was/is "spooky" about it? Is there anything spooky about it at all in the end?

From everything I've read about quantum mechanics and quantum entanglement phenomena, it's not obvious to me why quantum entanglement is considered to be an active link. That is, it's stated every time that measurement of one particle affects the other.  In my head, there is a less magic explanation: the entangling measurement affects both particles in a way which makes their states identical, though unknown. In this case measuring one particle will reveal information about state of the other, but without a magical instant modification of remote entangled particle.  Obviously, I'm not the only one who had this idea. What are the problems associated with this view, and why is the magic view preferred?


I'm currently working on 3D project (C++) and I have now come to writing the collision detection systems.  Basically my question is regarding how to architect it.  All the collisions are either between AABB-AABB or AABB-circle.  I'm perfectly aware how to detect whether any two objects are colliding, but I don't know where to do the checks.  Currently I am trying to make a CollisioManager class that contains a list of all the AABBs in the level and then the player object makes a call to the CollisionManager to ask whether it is currently colliding with any (then acts accordingly).  I think I can do it this way but are there any other ways of organizing it as it feels a bit messy and not the cleanest of solutions.

I am developing a small 2D game engine. The characters have a paint method which currently does the following:   Calculate the new position of the character as per its speed, etc. Update the collision grid cell ** Draw the character at the new position   ** I have created a collision grid to reduce the number of intersection checks  Now the basic algorithm which I have thought for detecting collision is:   For Each Character     Check intersection with characters in surrounding 8 cells   I can simply place this code in the paint method. But here is the problem I anticipate.  Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.  But I have an idea that when A detects that it has collided with B, it should inform B that it has collided with A. This would save lot of comparisons when there are more than 2 actors colliding. But I am not sure how to handle this. I think instead of every character checking for its collision, I should check for the collision inside the game loop.   Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic?


For example, I have two arrays:  String [] arr1 ={"You", "book"}; String [] arr2 ={"Do", "You", "like","book" };   I want to check if arr1 match the arr2 in terms of the same order. If arr1 is {"book", "You"}, then arr1 does not match arr2.  Alright, I think that my code is wrong, but anyway:  for (int i = 0; i<arr1.length; i++){   for (int j=0; j<arr2.length; j++){     if (arr1[i] != arr2[j]){       return null;     }   } }   But when I run it, it always return null even my arr1 does match arr2.


I want to compare different methods such as SVM and PCA to classify the data correctly. But I don't know how to calculate accuracy of PCA in R.  Following the article "Genetic classification of populations using supervised learning" (2011), I want to classify different populations using machine learning and PCA.  For SVM, I calculate accuracy with confusionmatrix(table,test[,1]). But for PCA I have a problem.

How to check classification accuracy for principal component analysis (PCA)? In order to compare it with different methods, for example with random forest classification, how can I compute accuracy?  E.g. for random forest the accuracy can be computed as follows:   pred1 <- predict(iris.rf,x,type="response") pr<-table(pred1,testset[,1]) confusionMatrix(pr)   But what about PCA?


What does the green on the questions title mean?     and why is 180 not green even though -3 is green?  Does the green mean it has many views?

I am member of SO from 4 months. I visit SO when I have problem or when I wanted to solve problems. I would like to see questions which are not got solved and help OP, like everyone on SO. But when I visit question and question has already accepted answers then I feel it was waste of time.   This feature is implemented in . We can see two different questions. 1st question has 1 answer which is accepted one. And 2nd question had 3 answers but no accepted answer at all. So it will save time of people to see questions and getting concentration more on unsolved problems. One more benefit will be when I had same problem and there are 3-4 similar questions. But one question having accepted answer. Then my priority will be to that question to see solution for my problem.     Why there is not any distinction between accepted answers and not accepted answers on SO and MSO?


I'm relatively new to Java programming and here is some code where it should draw a background Image:  public class Board extends JPanel{ private static final long serialVersionUID = 4759318639631503071L; public String room = "menu"; public Image backgroundImage;  public Image getBackgroundImage() throws IOException{     if (room == "menu") {          backgroundImage = ImageIO.read(new File("assets/background_title.png"));      }     return backgroundImage; }   @Override  public void paintComponent(Graphics g) {      super.paintComponent(g);      g.drawImage(backgroundImage, 0, 0, this);  }  }   I used System.out.println and realized that backgroundImage was null, what have I done wrong here?

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


Let $\lambda_{\min}$ be the smallest eigenvalue of the positive definite matrix $\mathbf{S}$, and $\|\mathbf{a}\|=r$. Then  $$ \mathbf{a}^T \mathbf{S}\mathbf{a} > \frac{1}{2}\lambda_{\min} r^2  $$  What properties of matrices were used to obtain the result? Thanks!

I got a positive definite matrix $B,$ that is, $V(x) = x^TBx > 0$ for any vector $ x \neq 0.$  I want to show that $ \lambda_\min \|x\|_2^2 \leq V(x) \leq \lambda_\max \|x\|_2^2$ for any $x \neq 0,$ where $\lambda_\min$ and $ \lambda_\max$ are defined by $$ \lambda_\min = \min \lbrace | \lambda|: \lambda \text{ is an eigenvalue of } B \rbrace$$ and  $$ \lambda_\max = \max \lbrace | \lambda|: \lambda \text{ is an eigenvalue of } B  \rbrace$$  Any hint please?


I recently gave an online JS test, the questions was below, I couldn't understand and solve that, but now I want how that can be done. Please help me understand that.  write a wrap function that takes the execute function as an argument and returns a modified function so that the following requirements are met:   any result returned by the function execute should be returned from the modified function unchanged. if the function execute throws a error, the modified function should return null. after the function execute has thrown an error, its future executions should be prevented and null should be returned multiple modified functions can co-exist   The execute function doesnt take any argument.  function wrap (execute) {   // Return modified function }  var errorExec = wrap(function () {   throw new Error('Error'); }); var resultExec = wrap(function () {   return "Result"; }); console.log(errorExec && errorExec()); // Should output null console.log(errorExec && resultExec()); // Should output "Result"

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


What's more correct when talking about 1.5 things?  Should we consider them as singular or plural?   For example:       singular form:  One and half week     plural form: One and half weeks

I still can't wrap my head around this one and have to consult references every time I want to be safe:   Is it "0.4 point" or "0.4 points"?   Is it "1.0 point" or "1.0 points"?   I know that I can work around that by using four tenths of a point or one point instead, but sometimes writing 0.4 point/points or 1.0 point/points is called for, especially in technical documents.  I gathered that this mostly goes by the style guide I choose to (or have to) use, and it's quite possible that there is no universally accepted convention for this. Then again, in light of potential benefits for learners here, I think it's worth asking, and I hope that we can lay out some rules of thumb, something that can be used as a general guideline, especially on writing tests and exams.  Addendum: another case that's worth mentioning in answers, for completeness, is "0.0 point" or "0.0 points"? In my humble opinion, it's safe to assume that most learners on our site know what to use when the quantity falls out of the range between -1.0 and 1.0.


If the answers to  are anything to go by, time stop seems to be a surprisingly nuanced spell, but one basic disagreement that's appeared in the comments has been that one camp thinks time stop applies an effect only on the caster, whereas the other thinks it also applies a magical effect to everyone else, too.  Granted, time stop applies a magical effect on the caster - of that, I have no question. But does it also apply a magical effect on everyone else in the multiverse as well?  Why does time stop NOT apply a magical effect on other creatures  Here are the points I've understood for the side that thinks time stop applies only to the caster:   It has a range of Self, meaning that it only applies a magical effect on the caster. There is no spell in D&D that applies an effect to every single creature in the multiverse, except maybe for wish.   Why DOES time stop apply a magical effect on other creatures  Here are the points from the side that thinks time stop applies a magical effect to everyone as well (I'm a member of this camp):   Spells with a range of Self can still apply magical effects to other creatures, such as detect thoughts, dream, magic jar, and spirit guardians. The spell's first sentence says: "You briefly stop the flow of time for everyone but yourself," and that wording seems to directly state that everyone but the caster experiences a magical effect where the flow of time stops for them.   Consequences, implications  There are consequences for choosing one side over the other, which is the motivation for asking this question.  Consequences: Time stop does NOT apply a magical effect to other creatures  Going with the first camp, you can side step the confusion that comes with zones of antimagic and time stop. But, it doesn't strictly follow the wording of the spell by ignoring the sentence "You briefly stop the flow of time for everyone but yourself."  In addition, by claiming that spells with a range of Self do not impose a magical effect on other creatures, that same logic can be applied to, say, magic jar, where a humanoid inside a zone of antimagic can still be possessed because the spell has a range of Self, so it affects only the caster, and therefore the possession of other creatures is not a magical effect of the spell. The same logic can be applied to many other spells with a range of Self, some of which are listed above.  Consequences: Time stop DOES apply a magical effect to other creatures  Going with the second camp, yes, you can more closely follow the spell's text as written. However, you also open the doors to the aforementioned confusion between zones of antimagic and time stop.  If time stop creates a magical effect on every other creature in the multiverse, across planes of existence (which seems to be the valid interpretation of "everyone but yourself" - and take note, this is a 9th level spell on par with wish), then being immune to it in any way (whether you're inside a zone of antimagic, you are immune via the wish spell, or you're one of the gods of the multiverse) will allow you to observe as everyone suddenly freezes in time whenever someone casts time stop.  It also fails to offer a resolution to the linked question, where initiative order between someone inside an antimagic field and a caster of time stop is not well defined.  The Question  With all the above in context, the question is as the title says: does Time Stop apply a magical effect on only the caster, or does it affect everyone else too?

Time stop is a spell that stops time for other creatures, allowing one creature to take multiple turns in a row. It says:     You briefly stop the flow of time for everyone but yourself. No time passes for other creatures, while you take 1d4 + 1 turns in a row, during which you can use actions and move as normal.   Certainly, this is a magical effect. The spell causes the flow of time to stop for other creatures, and while you are taking multiple turns, no time flows for them. I imagine antimagic field can defeat it. The relevant text says:     Spells. Any active spell or other magical effect on a creature or an object in the sphere is suppressed while the creature or object is in it.   So, imagine combat between Annie, Tim, and Charlie. Ordinarily, initiative might look something like this:     Annie → Charlie → Tim   Suppose Annie casts time stop and rolled a 1 on their d4. Thus, they take 2 turns in a row. Initiative would look like this:     Annie → Annie → Charlie → Tim   Now imagine that Tim cast antimagic field, and following their turn, Annie casts time stop. Suppose they rolled a 1 on their d4 so that they can take 2 turns in a row. What would the initiative order look like?  Here are some possible resolutions I can think of, but none satisfy me totally:   Time stop defeats antimagic field. The initiative order is: Annie → Annie → Charlie → Tim. The reason this is unsatisfactory is that time stop shouldn't seem to prevail because it's a spell, and antimagic field defeats spells. Time stop cannot be cast while there is an active antimagic field, because there exists some creatures you can't stop time for. The reason this is unsatisfactory is there is no rule that prevents these two spells from being active at the same time. Also, since things like beholders exist, it's not unreasonable to say there is almost always an active area of antimagic somewhere in the world, and that means time stop can almost never be used. The caster of time stop and antimagic field take their turns as normal while everyone else is frozen in time. Thematically and narratively, this seems the most logical. So we go through the turn order, treating every turn Alice would have taken as one full round. For this scenario, since Alice takes two turns in a row, then we can imagine two rounds going by. Ordinarily, everyone but Alice takes a turn, but now we unfreeze anyone inside an area of antimagic. So initiative would be: Annie (time stop starts) → Charlie (frozen in time) → Tim (unfrozen) → Annie (time stop ends) → Charlie → Tim. The reason this is unsatisfactory is because we're advancing the "round count" now, which feasibly triggers things like lair actions that activate on a certain initiative count. It does have the side effect of allowing Tim to act normally though, affecting other creatures if he wants, because he isn't bound by time stop and Annie isn't the one doing the violations of the rules of the spell. There is no answer to this question, and this is solidly in the zone of DM adjudication. This is unsatisfactory because, well, all questions answered that way tend to be unsatisfactory.   So which is it? Or is it an option I haven't listed here? Can Tim take turns as normal while inside an antimagic field if Annie casts time stop?


On my Archlinux, /dev/pts is mounted by the devpts, so who created the  /dev/pts/ptmx device node? What's the purpose of this node?  it's the same (Major=5 Minor=2) device node same as /dev/ptmx/, but with different access mode, for what?

says     On Linux, using devpts, there is no master device file. The process on the master end uses a file descriptor, which it gets by opening ptmx, but there’s no corresponding device node.   Did the author refer to /dev/ptmx or /dev/pts/ptmx?    Why are /dev/ptmx and /dev/pts/ptmx not device files? What types of files are they?  What is the difference between /dev/ptmx and /dev/pts/ptmx?  Thanks.  On Lubuntu 18.04  $ file /dev/ptmx  /dev/ptmx: character special (5/2) $ file /dev/pts/ptmx  /dev/pts/ptmx: character special (5/2)  $ sudo su  # stat -L /dev/fd/3 3<> /dev/pts/ptmx   File: /dev/fd/3   Size: 0           Blocks: 0          IO Block: 1024   character special file Device: 15h/21d Inode: 2           Links: 1     Device type: 5,2 Access: (0000/c---------)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2018-11-21 13:39:10.544000218 -0500 Modify: 2018-11-21 13:39:10.544000218 -0500 Change: 2018-11-21 13:39:10.544000218 -0500  Birth: -  # stat -L /dev/fd/3 3<> /dev/ptmx   File: /dev/fd/3   Size: 0           Blocks: 0          IO Block: 4096   character special file Device: 6h/6d   Inode: 87          Links: 1     Device type: 5,2 Access: (0666/crw-rw-rw-)  Uid: (    0/    root)   Gid: (    5/     tty) Access: 2019-01-06 07:19:54.372098540 -0500 Modify: 2019-01-06 07:19:54.372098540 -0500 Change: 2018-11-21 13:39:30.372098540 -0500  Birth: -


This is kind of tricky  I have a folder, and inside this folder are several subfolders, each subfolder contains one subfolder of it's own (subsubfolder), I want to move these 'subsubfolders' to the original folder.  This is what it looks like right now:  Archives/ │ ├── Records_A/ │   └── Folder_1/ |       └── Item_1.png │ ├── Records_B/ │   └── Folder_2/ |       └── Item_2.png │ ├── Records_C/ │   └── Folder_3/ |       └── Item_3.png │ ├── Records_D/ │   └── Folder_4/ |       └── Item_4.png │ ├── Records_E/ │   └── Folder_5/ |       └── Item_5.png  ...   I want to move all the subsubfolders so that it looks like this:  Archives/ │ ├── Folder_1/ │   └── Item_1.png │ ├── Folder_2/ │   └── Item_2.png │ ├── Folder_3/ │   └── Item_3.png │ ├── Folder_4/ │   └── Item_4.png │ ├── Folder_5/ │   └── Item_5.png │ ├── Records_A/ │ ├── Records_B/ │ ├── Records_C/ │ ├── Records_D/ │ ├── Records_E/  ...   Is there anyway to do this in bash?   I am not looking to move any files here, only folders  Note that the names of the subfolders don't always start with 'Record_' And The names of the subsubfolders don't always start with'Folder_', I'm looking for a general solution based on the directory structure rather than the names.  EDIT: I found a solution if anyone else has the same problem:  mv -v ./Records_*/* ./   just replace the "Records_" with whatever prefix the folders' names begin with (or just leave * for everything).

How do I delete all Folders with a specific name (e.g. 128Kbps_Songs) without deleting its files  For example if I have directory "MP3_SONGS" with subdirectories "A", "B", "C" and each subdirectory has MANY directory Contains Film Name "FILM_NAME1", "FILM_NAME2", "FILM_NAME3" in it, In That Each Film NAme I have specific Folder NAme (128Kbps_Songs) in this "128Kbps_Songs" Folder I have That Film mp3 Songs Files  how can I remove the Folder "128Kbps_Songs", in Each Film_Name directory and Have to get these mp3 songs in that FILM_NAME..   ( Have to Delete 128Kbps_Songs Folder in all FILM_NAME without deleting the mp3 Songs in it, have to get the mp3 in FILM_NAME Directory..  MP3_SONGS (Parent Directory) ------ A , B, C  A (Sub Directory1) ------ FILM_NAME1 , FILM_NAME2 B (Sub Directory2) ------ FILM_NAME3 , FILM_NAME4 c (Sub Directory3) ------ FILM_NAME5 , FILM_NAME6  FILM_NAME1 (Directory) ---- 128Kbps_Songs (Directory) ------ FILM_NAME1 (MP3 Files) FILM_NAME2 (Directory) ---- 128Kbps_Songs (Directory) ------ FILM_NAME2 (MP3 Files)  FILM_NAME3 (Directory) ---- 128Kbps_Songs (Directory) ------ FILM_NAME3 (MP3 Files) FILM_NAME4 (Directory) ---- 128Kbps_Songs (Directory) ------ FILM_NAME4 (MP3 Files)  FILM_NAME5 (Directory) ---- 128Kbps_Songs (Directory) ------ FILM_NAME5 (MP3 Files) FILM_NAME6 (Directory) ---- 128Kbps_Songs (Directory) ------ FILM_NAME6 (MP3 Files)  Need Files in: FILM_NAME1 (Directory)  ------ FILM_NAME1 (MP3 Files) FILM_NAME2 (Directory)  ------ FILM_NAME2 (MP3 Files)  FILM_NAME3 (Directory)  ------ FILM_NAME3 (MP3 Files) FILM_NAME4 (Directory)  ------ FILM_NAME4 (MP3 Files)  FILM_NAME5 (Directory)  ------ FILM_NAME5 (MP3 Files) FILM_NAME6 (Directory)  ------ FILM_NAME6 (MP3 Files)


I am a new user, and posted my first question.  Judging by the speed from which the post was put on hold and the snide comments, the post was not given a fair chance.  Even though the comments where snide, I did not take offense and I accept that my question was too complex and needed to be dumbed downed.  So, I completely rewrote it, asking a very targeted question.  And its still on hold, which make me believe more was placed on hold quite hastily and without thought.    As a new user, what am I supposed to do to get answer I need?  Getting the right granularity can be hard, my post looks condemned and not going to get a fair change.  Keep posting different various of the question until someone for the off change someone might have time to answer it before its held?    Edit -- New Info I took my question elsewhere, and gotten a helpful answer right off the bat.  I really think "it's not a good question" is just a convenient excuse to justify the hostility.  Still my original question is on hold, with an additional hostile comment.

I've noticed a distressing tendency for questions that seem basic or overly short to be immediately closed and downvoted into oblivion.  Case in point:   Within a minute of being asked, this question received 12 downvotes and was closed as "not a real question".  That particular question is a very real, non-trivial question, but it had somewhat poor grammar and looked a little like a much simpler question.  Can we try to be a little more accepting?