What is the purpose of delayed suspend (Ctrl-Y) in Bash?

The full portion of the Bash man page which is applicable only says:     If the operating system on which bash is running supports job control, bash contains          facilities to use it.  Typing the suspend character (typically ^Z, Control-Z)  while          a  process is running causes that process to be stopped and returns control to bash.          Typing the delayed suspend character (typically ^Y, Control-Y) causes the process to          be  stopped  when  it  attempts  to  read input from the terminal, and control to be          returned to bash.  The user may then manipulate the state of this job, using the bg          command to continue it in the background, the fg command to continue it in the foreground, or the kill command to kill it.  A ^Z takes effect immediately, and has  the          additional side effect of causing pending output and typeahead to be discarded.   I have never used Ctrl-Y; I only just learned about it.  I have done fine with Ctrl-Z (suspend) only.  I am trying to imagine what this option is for.  When would it be useful?  (Note that this feature doesn't exist on all Unix variants. It's present on  and OpenBSD but not on Linux or FreeBSD. The corresponding setting is stty dsusp.)  Perhaps less subjectively: Is there anything that can be accomplished with Ctrl-Y that cannot be accomplished just as easily with Ctrl-Z?


When I use the MouseUp event, I can get it to fire with a mouse right-click. But MouseLeftButtonUp won't fire with either click!  <Button MouseLeftButtonUp="btnNewConfig_MouseUp"  Name="btnNewConfig">     <StackPanel Orientation="Horizontal">         <Image Source="Icons\new.ico" Height="24" Width="24" Margin="5"/>         <TextBlock VerticalAlignment="Center">New</TextBlock>     </StackPanel> </Button>   I know this is most likely something simple. Thanks for the help!


Is every Noetherian module finitely generated?

I was just wondering whether the following statement is correct.  Let R be a ring and M a noetherian R module. Then M is finitely generated.


Apply formula to a numeric part of cell value

In a Google Spreadsheet, I have a column with values like T1, T2, T13 (i.e. all values starting with the same text prefix). I would like to use a formula on the numerical part of the values of these cells (for conditional formatting). Can I somehow apply it only to the numeric part of the value, i.e. 1, 2, 13? I would like to change the background colour for the cell containing the maximum numeric part of the value?  I know how to extract the numeric part. E.g., if the T-values are in column A, cell B3 can contain this equation:  =if(len(A3)>1,value(right(A3, len(A3)-1)),0)   However I fail to apply any further formula to this. E.g. this doesn't work:  =max(if(len(A2:A)>1,value(right(A2:A, len(A2:A)-1)),0))


How to extract content of html tags from a string using javascript or jquery?

Maybe this is very basic, but I am all confused.  I have a simple html page with many sections (div). I have a string containing html tags in javascript. The code is as follows:

     I want to extract content of the html tags (from the string in javascript) and display that content in my html page in desired sections.   i.e. I want "This is a heading1" displayed in
 and "This is a paragraph1." to be displayed in
 and same for the second pair of tags.  I need all of this to work only on the client side. I have tried to use HTML DOM getElementByTagName method and its getting too complicated. I know very little of jquery. And I am confused. I dont understand how to go about it. Can you guide me what to use - javascript or jquery and how to use it? Is there a way to identify the  from the string and iterate through it?   How to extract "This is heading1" (and similar contents enclosed in the html tags) from str1?? I don't know the index of these hence cannot use substr() or substring() function in javascript.


Color of active link on blue background Image here in Meta SE, makes it less visible

Today I signed up for Meta SE and first thing that made uneasy to use was the color of the active link on blue background image. Can it me improved or changed if someone else also think the same?


IS this an extreme copy of Stack Exchange?

I just came across   Not only is the UI similar to Stack Exchange, but they have identical badges and even diamond mods. (The biggest difference I see is that they have karma, whereas we have rep)   Is this , or a knock-off? If it is, indeed, a knock-off, will SE take legal action?


What is the Quickest way to eject a specific disk when I have multiple drives mounted? Right now I use spotlight to open Finder and manually search for the drive to unmount, is there an easier way to eject?


Image will look broken when using image texture

If you use the E key to apply the image texture to the increased mesh, the image becomes forced to increase width or height. Resizing the image or mesh deployment in the UV editor will not change anything.  As shown in the attached image, it doesn't matter to change the size of the mesh, but only if you expand it through E key, the texture is broken like that.


I need to deal with loads of code lines in verbatim mode and append them to the appendix. That is, I may not need to show them in a fancy way but I want them to occupy least amount of space. As you could see in the following figure, the text occupy a lot of space. I also need them to have a fix indent from right and left, so by keeping as many in a line, they indentation varies.


Show through induction that the product of n consecutive even integers is divisible by 2^n * n! Ex. 10 * 12 * 14 * 16 * 18 * 20 * 22 is divisible by 2^7 * 7! No pi (product) notation can be used in the proof


I am using a custom-built PC with an AMD FX 8350 CPU and an ASUS M5A78LM USB 3 motherboard and a AMD Radeon R9 280X graphics Card.  I am currently using Windows 10 and i want to install Ubuntu alongside it with dual boot.  I just wanted to know if my hardware is completely supported and safely runs Ubuntu and it wont damage my hardware. Also i would like to know if anyone with my hardware has successfully run Ubuntu without any issues.


My Galaxy Tab 3 will only charge from the wall adapter from Samsung

I'm going on holiday soon and we planned to take a USB hub to charge all of our devices rather than take several wall adapters, however when I checked that my 7" Samsung Galaxy Tab 3 would charge, I found that it didn't. After investigating, I found that my iPad charger wouldn't charge it either and in fact the only that would charge it was the USB wall adapter that came in the box with the tablet, even though the port on the USB hub and the iPad charger are rated at 2.1 A (5 V).  When I plug the tablet into to a non-Samsung adapter powered off however, the screen flashes lighter and darker but nothing else happens which seems odd behavior to me.  What is the reason it will not charge by any other means, and is there a solution?


Is there a theorem that gives this result?

Let $(c,\delta)\in\mathrm{K}^2\subset\mathbb{R}^2$ and $f,g:\mathrm{K}\to\mathbb{R}$ be $C^1$ $$f(c)=g(c),\,f'(x)\geq g'(x)\,\,\forall x\in[c,c+\delta]\implies f(x)\geq g(x)\,\,\forall x\in[c,c+\delta]$$


Does match sharing 952 cM indicate grandparent or great uncle?

My mother was adopted and we are trying to find the parents. I have a DNA match that is 952cM and 38 DNA segments.   What is the chance of this being my grandparent?   It says 1st cousin and we know through family it can't be that (age). Also falls in the great grandparent and we know that can't be the case. It says could be great uncle, which is slightly a possibility but the family doesn't think so. They think he is the grandfather.


Lasso features selection through Crossvalidation

I took a method to determine the best features for a classifier from somewhere and I wanted to ask if it is reliable or not:  I was trying to, very simply, select the best features for a Logistic Regression classifier.   Using Lasso().coef_ it turned out that everytime I switched the training and testing data indexs (with a random ShuffleSplit, so in a CrossValidation process), the 0 lasso coefs changed. So, to visualize it:   Loop1     random_seed=1 Lasso_coefs_obtained = [0,   0.9, 0,  0,   0.1]  Loop2 random_seed=2 Lasso_coefs_obtained = [0.3, 0,   0,  0.7, 0  ]  Loop3 random_seed=3 Lasso_coefs_obtained = [0.1, 0.8, 0,  0.2, 0.2]   In order to determine if a feature coefficient was really null, I would sum the three coefficients lists and determine the 0 elements (which must be those elements that are 0 in the three lists).  Sum_coefs = [0.4, 1.7, 0,  0.9, 0.3]   In my case, I did this method with 10 loops (I have 10 coefficients lists over 72 variables). After 10 loops, only 55 coefficients remain non-zero. So, I delated 17 features for the classifier.   Is this method reliable or I'm just making up an algorithm with no guarantees?


If $f(x–y)= f(x)·g (y)–f (y)·g(x)$ and $g(x – y)=g(x)·g(y)+f(x)·f(y)$ for all $x, y \in R$. Find following for the following given conditions.

If $f (x – y) = f (x) · g (y) – f (y) · g (x)$ and $g (x – y) = g (x) · g (y) + f (x) · f (y)$ for all $x, y \in R$. If right hand derivative at $x = 0$ exists for $f (x)$. Find derivative of $g (x)$ at $x = 0$.  My attempt is as follows:-  $$\lim_{h\to0^{+}}=\dfrac{f(h)-f(0)}{h}$$  Putting $x=0,y=0$ in the first functional equation  $$f(0)=f(0)g(0)-f(0)g(0)$$ $$f(0)=0$$  Putting $x=0,y=0$ in the second functional equation  $$g(0)=g^2(0)$$ $$g(0)=0 \text { or } g(0)=1$$  Case $1$: $g(0)=0$  Putting $x=h,y=0$ in the first equation  $$f(h)=f(h)g(0)-f(0)g(h)$$  $$f(h)=0$$  So $$\lim_{h\to0^{+}}=\dfrac{f(h)-f(0)}{h}=0=f'(0^+)$$  Putting $x=h,y=0$ in the second equation  $$g(h)=g(h)g(0)+f(h)f(0)$$ $$g(h)=0$$  $$g'(0)=\lim_{h\to0}=\dfrac{g(h)-g(0)}{h}=0$$  Case $2$: $g(0)=1$  Putting $x=0,y=h$ in the first equation  $$f(0-h)=f(0)g(h)-f(h)g(0)$$ $$f(-h)=-f(h)$$  $$g(0-h)=g(0)g(h)+f(0)f(h)$$ $$g(-h)=g(h)$$  $$\lim_{h\to 0}\dfrac{g(h)-g(0)}{h}$$  Put $x=\dfrac{h}{2},y=-\dfrac{h}{2}$ in the second functional equation  $$g(h)=g\left(\dfrac{h}{2}\right)g\left(-\dfrac{h}{2}\right)+f\left(\dfrac{h}{2}\right)f\left(-\dfrac{h}{2}\right)$$  $$g(h)=g\left(\dfrac{h}{2}\right)g\left(\dfrac{h}{2}\right)-f\left(\dfrac{h}{2}\right)f\left(\dfrac{h}{2}\right)\tag{1}$$  Putting $x=y$ in the second functional equation  $$g(0)=g(x)^2+f(x)^2$$  $$g(h)=1-f\left(\dfrac{h}{2}\right)f\left(\dfrac{h}{2}\right)-f\left(\dfrac{h}{2}\right)f\left(\dfrac{h}{2}\right)\tag{1}$$  $$\lim_{h\to 0}\dfrac{-2f^2\left(\dfrac{h}{2}\right)}{h}$$  $$\lim_{h\to 0}\dfrac{-2hf^2\left(\dfrac{h}{2}\right)}{4\left(\dfrac{h}{2}\right)^2}$$  $$\dfrac{-1}{2}\cdot\left(\lim_{h\to 0}h\right)\cdot\lim_{h\to 0}\dfrac{f^2\left(\dfrac{h}{2}\right)}{\left(\dfrac{h}{2}\right)^2}$$  $$\dfrac{-1}{2}\cdot\left(\lim_{h\to 0}h\right)\cdot f'(0)^2=0$$


How to reset randomly moved chunks in a Minecraft world?

I logged onto my 1.15.2 world one day, and all of the chunks in were out of place. I am aware that you can fix it by manually editing all the chunks back in place. But is there an alternative way to do that? Preferably via the code or one that's not so time consuming? I DO NOT want to RESET the chunks, just rearrange them back to where they are supposed to be.


How can I verify a Lion FileVault recovery key?

I have a volume that is encrypted with OS X Lion's full-disk FileVault. When I enabled FileVault I was given a recovery key, which I wrote down. I'd like to verify that the recovery key that I wrote down is correct before I store it somewhere safe.  How can I verify that a FileVault recovery key is correct?


I got a perfect orange! I heard I can plant this to grow 3 more perfect oranges, but if I shake the tree it might die. How does this work exactly? Does each perfect tree only grow 3 fruits, does it grow 3 fruits every day until it dies or what?  Can I grow perfect fruits only of my native fruit? I planted a perfect of a friend's fruit but it didn't grow. I'm unsure if that was bad luck or if they won't actually grow.


Example of a convergent sequence that does not satisfy the condition

Given a sequence $(a_n)$ and there exists a number $c\in \mathbb{R}$ such that for all  $n\in \mathbb{N}$ satisfy the condition :  $|a_2 -a_1| +|a_3-a_2| +... +|a_n-a_{n-1}|<c$.   Are there any examples for a convergent sequence $a_n$ that does not satisfy the above condition?   I proved that for that condition, $(a_n)$ converges by Cauchy, but can't see how to find those examples.   Thank you.


What HTML tags are allowed on Stack Exchange sites?

Stack Exchange sites use  for questions and answers. Per the Markdown specification, intermixing HTML and Markdown tags is allowed, but not all the HTML tags are allowed, to avoid . Which HTML tags are allowed on Stack Exchange sites?


I want to make a temporary scratch layer permanent but it shows  Could not make temporary scratch layer permanent. Error: Creation of field addr:street_1 failed (OGR error: Can't create field addr_str_4 in Shape DBF file, reason unknown.) How can I fix this error?  This is my attribute table.


My family and I are travelling from Australia in about a month.  We would like to hire a car from Dublin airport, drive north to Belfast, take it over to Scotland ( via ferry - no other way) and then back to Dublin airport over a period of a month.    Are there any car hire companies that will allow us to take the car from Ireland to the UK? (My research suggests not). Are there any additional steps that I have to take beyond normal renting of a car?


Converting string of numbers to tuple of numbers


How to move "Show Applications" button from bottom to top in launcher?

I want to move that button from bottom to top in launcher as was in unity. How can I do so?


Is there a way to load every label data and every SObject description data in Lightning Web Component using only Javascript without any Apex?

Is there a way to load every label data and every SObject description data using only Javascript without any Apex Server-side code?  How do I import * from @salesforce/schema or @salesforce/label?  I am looking for a way to get all labels or all SObject describe information details to retrieve in LWC at once.  I can see that such syntax is provided by ES6 and is used widely by Salesforce itself, however, it is not possible to use the following syntax in LWC:   import * as schema from '@salesforce/schema'   import * as label from '@salesforce/label'   or this syntax  import {label, schema} from '@salesforce';   since both versions generate error     LWC1512: Missing resource value for @salesforce"   or      LWC1512: Missing resource value for @salesforce/label   Is there a way to load every label data and every SObject description data using only Javascript without any Apex Server-side code?  By the way, if we look as Salesforce Playground we could notice that   the same syntax is used to import everything from lwc  import * as Engine from 'lwc';   however, if we try to insert such line into any of Lightning Web Component, we would receive the following error     LWC1001: Invalid import. Namespace imports are not allowed on "lwc",   instead use named imports "import { LightningElement } from 'lwc'"   or   LWC1517: Invalid LWC import


Should Spanish SO ( and all the similar variants) be closed?

Area51 has .   Shouldn't this proposal be killed immediately? I mean, if this proposal were allowed to be flourished, then in no time you will see Hindi SO, Hebrew SO, Chinese SO, Dutch SO, Malay SO, Arabic SO and all the same SOes with the same set of content and same target audience except different languages.  In fact this is already happening, just see how the , ,  proposals littered over Area51 and you will get a sense of how serious the situation is. All these are huge duplication of work and contribute to a great fragmentation of audience, this is of course something SO doesn't encourage.   The longer you allow it to gain steam or even to let it gain supporters, the harder it is to kill it later. So why the mods are not taking action now and kill the proposal immediately?


F-tests can be two-tailed (to test that $s_1^2 \ne s_2^2$) or one-tailed (to test that $s_1^2 > s_2^2$).  How can I modify Levene/Brown-Forsythe to be "one-tailed", that is, to test $s_1^2 > s_2^2$ instead of $s_1^2 \ne s_2^2$?  Here is a demo:    The image shows normally distributed training data (n=1000) and a model. An F-test is used to compare the variance of one point's residuals (n=2) to the variance of all of the residuals (n=2000), so the point is an outlier if its residual variance is "too large." The points are colored by p-value, where light points fit the model and dark points are outliers, and you can see that the two-tailed Brown-Forsythe rejects points that are too close to the model as well as too far.  Note: A different non-parametric, one-sided variance test would be fine as well.    Glen_b gave the information I needed, but I thought I would leave some implementation details (using scipy).  #basic F-test F = var(a) / var(b) Fp = stats.f.sf(F, df1, df2)  #Brown Forsythe BF, BFp = stats.levene(a, b, center='median')  #two tailed t-test on transformed data za = abs(a-median(a)) zb = abs(b-median(b)) t, tp_two_tailed = stats.ttest_ind(za, zb)  #the two tailed t test recapitulates the BF test assert(t**2 == BF) assert(p_BF == p_two_tailed)  #one tailed t test p value tp = stats.t.sf(t, df)     Above shows scatter plots of the p values from the one-tailed $F$-test and two-tailed BF-test (left), and the one-tailed $t$ tests (right). Red points are "too close" ($s_1^2 < s_2^2$).


Are mirror lenses good for wildlife photography in daylight?

I've recently seen these Rokinon/Opteka mirror lens with whooping focal length (like 500mm, 600mm, 800mm, 1000mm) at a cheap price. And I have seen some of their same pictures in Flickr and vendor sites. But the only thing is that they usually starts from smaller aperture (f/5.6 and upwards)   Now what I was wondering, as they are cheap with quite good IQ - are they good for any bird photography or wild life photography in proper daylight?


Can I book a tatkal ticket in Indian Railways online?

Can I book a tatkal ticket in Indian Railways online ?  Is yes when can it be booked?  Or is it that only premium tatkal tickets can be booked online?  Please help .Its urgent


Linux ps command, what are meaning of different styles for thread priority?

I find this confusion when I try to examine Linux process/thread priority. Here are 3 different ps commands to list current bash shell process: # ps -l -p $$ F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD 4 S     0 14531 14530  0  80   0 -  4599 -      pts/5    00:00:00 bash  # ps l -p $$ F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND 4     0 14531 14530  20   0  18396  7464 -      S    pts/5      0:00 -bash  # ps -o pid,spid,class,psr,pri,ni,rtprio,comm -p $$   PID  SPID CLS PSR PRI  NI RTPRIO COMMAND 14531 14531 TS    1  19   0      - bash  As you can see, it list "PRI" with different values, 80, 20 and 19. Then I queried man page of ps command, in "STANDARD FORMAT SPECIFIERS" section, it says:    pri         PRI       priority of the process.  Higher number means lower priority.  Obviously it doesn't explain how it would return different values for same process. I also notice that ps command output has different style for UNIX-style and BSD-style, it seems "-l" and "l" option make the difference. But still don't understand why "-opri" output another different value. Could somebody help explain what exact meaning of the 3 "PRI" values? And how to control ps command to output priority with a given style? Thanks.


Linear algebra - find all possible positions of the third corner?

An equilateral triangle lies in the plane $x + y - z = 1$ and corners in points $(1, 1, 1)$ and $(2, 1, 2)$. Determine all possible positions of the third corner?


Chat is an offshoot of the main site, and using it is  during their time here.  Chat is our place for:        Real-time collaboration   Meeting fellow members of the community   Less structured, casual (but still roughly on-topic) conversation      Our chat system exists to serve the main site; users of each site can gather and commune with each other.  When in chat, we expect all users to abide by our  policy, which means that we expect community members to treat each other with respect.    While it is a place where the community can go to interact on a more casual level, chat still needs to be moderated by the community and there are tools in place to help with the moderation. This raises a few questions, that are addressed here:


How do I make a transparent material display in the 3D view?

How do I make a transparent material always display? I have turned the transparency on but its clearly not showing in the 3D view.


Would moon fall if Earth was not rotating?

Would moon fall to Earth if Earth wasnt rotating ? And if rotating at what height moon would have to be to ignor orbiting and fall ?


What really is mathematical rigor? How can I be more rigorous?

I'm an undergraduate mathematics student who has received some constructive feedback from two instructors at the end of my exams. Namely, that I am a bit hand-wavey and not always very rigorous. While I greatly appreciate this feedback since I intend to apply to graduate school, I worry because when I hand in assignment, I generally feel the proofs are rigorous already, and I'm not sure what I'm missing. Obviously I will be engaging in a dialogue with my professors about what I can do to be more rigorous, but I'm hoping the experts on this forum can provide some examples or distinctions between rigorous arguments and arguments that are close, but maybe gloss over important details so I can more clearly see the difference.  It is worth noting that I have taken a course in mathematical reasoning and logic and did very well in it. Something has happened in the last year or so to reduce the quality of my arguments, or rather, the expectation has gone up and my level of rigor has not matched it.  I think another aspect of what makes this a troublesome problem for me is that i typically do really well on homework problem sets. 90% consistently, sometimes with little mistakes. I feel like I am getting mixed signals from some of my classes when I am consistently told I am doing well, but am given this advice. All of this is said without spite or malice, I just sometimes feel confused about my own level of understanding.  So if anyone has any general advice, or useful examples of arguments that look rigorous but need to be patched up, that would be greatly appreciated. I want to get a sense for what a really solid proof looks like compared to a less polished argument that looks passable to someone still with naivete in them.  Edit: Here is an example of one such question in which I struggled for a long while to produce the proof posted, and even then I was missing something to be fully rigorous.


Confusion about the dimension of a Hilbert Space in Quantum Mechanics

In Quantum Mechanics, the quantum state of the physical system lives in an infinite-dimensional Hilbert space and can be written in terms of two different bases, the position basis (uncountably infinite) and the energy basis (countably infinite). Apparently, the two bases are of different cardinalities, which violates a theorem in Linear Algebra that all bases of a vector space must be of the same cardinality. How to explain this confusion?


How do I photograph a wedding in the rain?

I've shot weddings before, but being in Minnesota they almost always have an indoor venue available due to the long cold winters that we have. I am coming up on a wedding that I will likely be shooting outdoors and in the rain. I'm not as worried about my equipment, I am more concerned with how to capture the shots that I need such as b&g alone, the wedding party, family posed portraits, etc while potentially being stuck in poor weather.   Should I come prepared with 10 umbrellas? Should I make all possible attempts to find a sheltered area for the posed portraits? Do I have an assistant hold an umbrella out of the frame to protect the b&g during alone shots? Just some ideas I've had, but I've never actually shot an outdoor ceremony during the rain.


When to use shutter priority instead of aperture priority?

Under what circumstances would you use aperture priority vs. shutter priority and vice-versa?  I typically don’t use shutter priority (ever) and favor aperture priority to try to get a max aperture with the thinking that I’ll get more light and a better low light shot. But after getting almost all my shots being blurry and the help of a couple questions posted here I learned I should use faster shutter speeds to get clear shots.  What my question boils down to is me trying to get a firmer understanding when to use one over the other, and why.  Thanks all.


I'm trying to increase the frame rate of my game from 60FPS to 100 FPS because of reasons. But i can't seem to get it higher than 60 frames.  is the count I'm using. I can slow down the frame rate by setting TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 16);   to a higher value, but settings it lower won't increase the frame rate, according to the counter. Anyone have any idea what's going on?


I have a Canon 7D.  Suddenly my camera says "Card cannot be accessed. Reinsert/change the card or format card with camera".  This is a card I have been using for about 6 months.  How can I retrieve the photos on the card?  This is the second time this has happened with my 7D.  What am I doing wrong?


Hero that can solo Roshan at an early level aside from Ursa

Aside from Ursa, is there any hero that can solo Roshan at an early level, like level 6 or at least below level 10?


Write inside a socket open by another process in Linux

Is it possible on Linux for a process to write inside a socket open by another one?  Let's say I open a connection to google.com using netcat:  myuser@linux:~$ nc google.com 80   Now I can lookup for the process pid and open its file descriptor folder:  myuser@linux:~$ ls -la /proc/24105/fd totale 0 dr-x------ 2 myuser myuser  0 2012-03-10 19:01 . dr-xr-xr-x 7 myuser myuser  0 2012-03-10 19:01 .. lrwx------ 1 myuser myuser 64 2012-03-10 19:02 0 -> /dev/pts/12 lrwx------ 1 myuser myuser 64 2012-03-10 19:02 1 -> /dev/pts/12 lrwx------ 1 myuser myuser 64 2012-03-10 19:01 2 -> /dev/pts/12 lrwx------ 1 myuser myuser 64 2012-03-10 19:02 3 -> socket:[3947162]   So now I would like to make the HTTP request using an echo inside that socket:  myuser@linux:~$ echo "GET / HTTP/1.1" >> /proc/24285/fd/3 bash: /proc/24285/fd/3: no such device or address   Doing it as root doesn't change the result.  I can't write inside the socket but I can write inside the stdin:  myuser@linux:~$ echo "GET / HTTP/1.1" >> /proc/24285/fd/0 myuser@linux:~$   But it's not what I want to do.  I was thinking: a Linux socket should be treated like a file, isn't it? One or more processes can use the same socket, so why can't I do this?


I use Ubuntu and TeXLive. When asking a question one is requested to provide an MWE. Sometimes an MWE needs to include an image, which should then be available to anyone who wants to process the MWE. I do not want to make some of my images generally available, e.g., for copyright reasons. By searching back through old questions I found that an image called example-image seemed to be generally available in TeXLive. I also recall seeing a tiger image somewhere or other (try texdoc tiger) but when I tried to include it in a draft MWE I got an error saying file not found. Is there any list/catalogue of images that could be used in an MWE that any TeXLive (or other) distribution would provide.  What I, and I assume others, would like to do is:  \includegraphics[...]{IMAGE}   where IMAGE is generally available, but could be one of a variety of images. My latest MWE would ideally include 12 different images but only uses one.


Software center disappeared after installing exelearning

I have installed Ubuntu today and everything worked pefectly. But I must have done something wrong because I cannot find or install the Software Center. I tried to install the authoring programm exelearning. There was a problem in the installation and now, when I search in the dashboard for software center the icon and name of exelearning appears. I have tried this command in the terminal:  sudo apt-get install software-center   And this is what I got:  beatriz@beatriz-LIFEBOOK-A512:~$ apt-get install software-center E: No se pudo abrir el fichero de bloqueo «/var/lib/dpkg/lock» - open (13: Permiso denegado) E: No se encontró un archivo de réplica «/var/lib/dpkg/»   Any help? Since I have only installed some applications until now, I could also re-install Ubuntu and start from zero again. But I would like to solve this problem and specially to know what I did wrong to avoid it in the future.  Thanks, Beatriz.    @enedil: sorry for the misuse of comments/answer question. I'm new here. Won't happen again. @enedil, @Leon95: Thanks for your efforts and help. Nothing worked, possibly because I have some lacks of knowledge. I have reinstalled Ubuntu 10.4 again, I had just started to intall programms and it is the faster solution. I have realized also the Bluetooth icon and the applications Gimp and VLC and maybe others disappeared. I start from zero again.


matlab2tikz imagesc TikZ/pgfplots equivalent

I'm using matlab2tikz to export imagesc figures into TikZ/pgfplots code. This process gives me a TikZ file and a rasterized png version of the image with colours matching the colourbar at the time of execution.  The file produced by matlab2tikz is as follows:  \begin{tikzpicture}   \begin{axis}[     axis on top,     xmin=75,     xmax=575,     xlabel={$x$},     y dir=reverse,     ymin=-0.045,     ymax=0.955,     ylabel={$y$},     colorbar,     point meta min=0,     point meta max=80000000]    \addplot graphics [xmin=75,xmax=575,ymin=-0.045,ymax=0.955] {p.png};   \end{axis} \end{tikzpicture}%   The problem is that because I'm doing this for multiple figures, I need to be able to switch the colourbar upper and lower bounds. Therefore, the rasterized png images do not match the modified colourbar.  The output I'd like to get is:    I was wondering whether it is possible to produce the exact same figure (ticks centered on the square etc.) with TikZ/pgfplots, while retaining the ability to change the colour of each square to match the colourbar --- ideally, the colour will be determined by the value loaded from a text file and the colourbar ranges.  Edit: Sample data can be found . First two columns are the x and y axes and the fourth column (or third) will be what decides the colour of the square.


CUDA rendering on Linux Mint or Ubuntu variants

I know that nobody likes duplicate questions, but I haven't found my answer on any of the other questions with this topic.  I built a computer with a  (made by Gigabyte).  It supposedly has 512 CUDA cores.  I followed  tutorial, (which enabled the Nvidia proprietary drivers) and was able to enable dual monitors and all the desktop graphics that are needed.  Unfortunetly, the GPU processing option still doesn't show up in Blender.  I've tried installing nvidia-cuda-toolkit, and that didn't make a difference.  I also tried to update my drivers from nvidia-346 to nvidia-349, and this had no apparent effect either.  What can I do to enable GPU rendering?  (I've tried both blender installed and just downloaded from the site).


How to print a string at random from a given choices of strings in python

I have given three strings 'aaa','bbb','ccc' and i want to print any one of these at random, how to do it?


I am trying to create the following citation for my bibliography using the apacite package.     International Monetary Fund (2014). International Monetary Fund,   Annual Report on Exchange Arrangements and Exchange Restrictions   (Washington, October 2014).   When using the apacite package, I find that rather than appearing as "International Monetary Fund" it appears as "Fund, I.M." as the package assumes that it is a name.   Is there any way in which I can overcome this please?


Flag to close dialog should have freeform off topic reason

See  meta post too   Currently, users with <3k reputation, while flagging to close as off topic are presented with the custom close reasons and "belongs elsewhere" close reason.  However, the removal of the default off topic and Too Localized has left behind a void that is not completely filled by custom off topic reasons. For >3k users, the freeform "" close reason works pretty well (though it ). However, <3k users do not have any valid flag options. In such cases they are force to custom flag (or pick a random close reason), which doesn't push the question into the queue.  The freeform close reason leaves a comment and creates a temporary entry in the VTC Off Topic dialog that is present only on that particular question. The close banner used is the efault off topic one (This question does not appear to be about $Topic, within the scope defined in the help center.). I don't see much scope for abuse if flaggers are allowed to use this. The most that can happen is that flaggers can  populate the dialog with nonsense close reasons will, but since it's only for that particular question I don't see much harm in this.


I have a question - is it acceptable to write a sentence "If I would have won lottery, I would buy a car!"? Is it even correct? Thank you very much!


How to grant certain apps root permission through ADB?

I have an Android TV box (4.4.2, armv7), and I can login the device as root by ADB (local network). What I want to do is to give certain apps root permission. How can I do it?


The group is a product of its connected component and a discrete subgroup

Let $G$ be a Lie group and let $G^0$ be the identity component. It is known that $G^0$ is open and closed in $G$ and that $G/G^0$ is discrete. My question: Is it true that $G=G^0\times G/G^0$? Or equivalently, is the principal bundle $G\to G/G^0$  trivial?


Push notifications - App crash when app is in foreground

I'm receiving notifications correctly when the app is on background or closed. But when the app its in foreground, and I send a push notification by firebase, it crashes without no error. Even I receive the object with the notification, I can see it in the console.  My Error code is  08-02 09:17:23.251 13843-27245/com.faraksoch.sagar.cdproutine E/AndroidRuntime: FATAL EXCEPTION: pool-7-thread-1     Process: com.faraksoch.sagar.cdproutine, PID: 13843     java.lang.NullPointerException         at libcore.net.UriCodec.decode(UriCodec.java:153)         at java.net.URLDecoder.decode(URLDecoder.java:60)         at com.faraksoch.sagar.cdproutine.fcm.MyFirebaseMessagingService.sendNotification(MyFirebaseMessagingService.java:66)         at com.faraksoch.sagar.cdproutine.fcm.MyFirebaseMessagingService.onMessageReceived(MyFirebaseMessagingService.java:44)         at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(Unknown Source)         at com.google.firebase.iid.zzc.run(Unknown Source)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)         at java.lang.Thread.run(Thread.java:841)   and here is my FirebaseMessagingservice  public class MyFirebaseMessagingService extends FirebaseMessagingService {  private static final String TAG = "MyGcmListenerService";  @Override public void onMessageReceived(RemoteMessage message) {      String image = message.getNotification().getIcon();     String title = message.getNotification().getTitle();     String text = message.getNotification().getBody();     String sound = message.getNotification().getSound();      int id = 0;     Object obj = message.getData().get("id");     if (obj != null) {         id = Integer.valueOf(obj.toString());     }      this.sendNotification(new NotificationData(image, id, title, text, sound)); }  /**  * Create and show a simple notification containing the received GCM message.  *  * @param notificationData GCM message received.  */ private void sendNotification(NotificationData notificationData) {      Intent intent = new Intent(this, MainActivity.class);     intent.putExtra(NotificationData.TEXT, notificationData.getTextMessage());      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);     PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,             PendingIntent.FLAG_ONE_SHOT);      NotificationCompat.Builder notificationBuilder = null;     try {          notificationBuilder = new NotificationCompat.Builder(this)                 .setSmallIcon(R.mipmap.ic_launcher)                 .setContentTitle(URLDecoder.decode(notificationData.getTitle(), "UTF-8"))                 .setContentText(URLDecoder.decode(notificationData.getTextMessage(), "UTF-8"))                 .setAutoCancel(true)                 .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))                 .setContentIntent(pendingIntent);      } catch (UnsupportedEncodingException e) {         e.printStackTrace();     }      if (notificationBuilder != null) {         NotificationManager notificationManager =                 (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);         notificationManager.notify(notificationData.getId(), notificationBuilder.build());     } else {         Log.d(TAG, "Não foi possível criar objeto notificationBuilder");     } }   }  I'm totally new to Android Studio and don't know how to solve this. Any help would be much appreciated.


How to view list of downloaded programs on ubuntu?

Is there any way to see a list of downloaded programs like in the Windows 7 control panel?   The downloads section of My Files doesn't appear to hold anything even though I successfully downloaded youtube-dl (and would like to remove it) through the terminal.   Very new to Linux and compsci in general, any help is greatly appreciated. Thanks


Can someone please explain to me the purpose of the asterisk in Python?

For instance, can someone please explain to me the purpose of the asterisk in line 2 below?   m = Basemap(projection='merc', llcrnrlon=lon.min(), urcrnrlon=lon.max(), llcrnrlat=lat.min(), urcrnrlat=lat.max()) x, y = m(*np.meshgrid(lat,lon))


How to install ubuntu on a chromebook without developer mode? Or enter developer mode without wiping system information (wifi)?

In advance i'd like to thank you for your help. First off, I have installed Ubuntu (Linux) on my chromebook but the problem is it wipes the data and I need the wifi to stay and not forget the network because I need it to remember my school wifi password. So I did it and then he turned developer mode back on without realising so now I can't access it. So, I don't want to go back to him for the wifi password ever again. Anyways, I want to know if there is a way to install it without developer mode of without wiping the wifi password and more. I have also thought of installing ubuntu on a bootable flash drive but again I don't think it's possible yet to boot the chromebook from the flash drive without entering developer mode. You'd think there would be a way to do it by now but I've searched so much and haven't found anything so PLEASE give me a way to do this!  Thanks,  -Josh


Question of an isomorphism of $\epsilon_ 0$ and a subset of the rationals.

I don't know if this question is appropriated for this site. Anyway, I'm searching for an isomorphism of order $f:K \longrightarrow \epsilon_o $, such that $(K, \leq)$ is a subset(proper or not) of $(\mathbb{Q}, \leq)$ and $\epsilon_o = \sup\{\omega, \omega^{\omega}, \omega^{\omega^{\omega}}, ... \}$. Actually,  I'm not finding neither an isomorphism between $K$ and $\omega^{\omega}$.  Thanks in advanced.


How to delete backed up windows files on drive

I have a drive that has windows directory on it. Its NOT my existing windows instance but a backup. I'm trying to delete it but keep running into permissions issues. I've tried to take ownership of the files and it appears to work. However, when I try to delete the files, I get an error saying I don't have permissions, sometimes even saying I need permissions from  which is an admin.  Any ideas?


Let $A: \mathbb C^4 \to \mathbb C^4$ be a linear operator and let $f(x)$ be a polynomial with complex coefficents. If $c$ is an eigenvalue for $f(A)$, does there exists a eigenvalue $a$ of $A$ such that $f(a) = c$?  Please, explain why this is true or false.


How to make duplicated object be colored independently?

I have a blender object. I applied a diffuse color to the object. Then I duplicated it. Now I want to apply a different color to the duplicated object, however, the original object also changed to the new color.   How can I make the two objects have different colors?


Should you get your masters degree from a different school then the one your received your bachelors from

I received an associates degree in computer science from a junior college and then transfered to an university to pursue my bachelors degree. I am almost finished with that and I plan on continuing towards a masters degree. A lot of classmates tell me that you should get your masters degree from a different school then the one your received your bachelors from. Is this true? Why? Should you get your PhD from the same school your got your masters?    EDIT: Thank you all! This helps me a lot!


I'm trying to use a multi valued string in a Store Procedure, but the IN operator is only accepting the values in Hard Coded mode.  Like, if I write the values directly in the Code it works, but if the value is retrieved from the SELECT command, it return nothing...   Anyone can help on this?  For testing:  DECLARE @AUX nvarchar(255);  SET @AUX = (SELECT GROUP FROM FRUITS WHERE FRUIT = 'APPLES');  PRINT @AUX;  SELECT *  FROM FRUITS  WHERE FRUIT IN (@AUX);   This returns nothing. But the value inside @AUX is retrieved, and contains something like 'Red','Green','Starkling' .  If I use that Select command only it works.  And if I hard core inside the IN the Values it works also.  SELECT *  FROM FRUITS  WHERE FRUIT IN ('Red', 'Green', 'Starkling');   This works.  I tried to output the value inside the variable @AUX and is correct... So why the IN doesn't read the values?  TIA


Keras del stuck with constant loss and accuracy

I am trying to train a keras CNN against the Street View House Numbers Dataset. You can find the project . The problem is that during training neither loss nor accuracy change over time. I have tried with 1 Channel (Gray Scale) images, with RGB (3 channels) images, with wider (50,50) and smaller (28,28) images, with more or less filters in the convolutional layers, with wider and smaller patches in the pooling layers, with and without dropout, with bigger and smaller batches, with smaller and bigger learning step for the optimizers, with different optimizers, ...  Still the training gets stuck to constant loss and accuracy


TL;DR: If you have to decrypt a cipher for example, and you don't know which encryption method(s) have been used.... Where do you start? Or "do you just start"? Or are there certain questions you have to ask yourself first to determine a certain strategy (to be as efficient and productive as possible)?  Let's assume I receive some kind of cipher in the form of a file or just a string text. I would like to determine the actually content, so I'll start trying to determine the encryption method used. The first thing I can think of, in case I might already know the cipher contains readable text, is looking for the most common letters and assume those are e and a, and trying to figure out the pattern (so brute force)  But I guess that method is quite useless with modern encryption methods. So how do you choose the right strategy to use? Where to start? Those courses and books about cryptography are great, but with all those information it's still hard for me to determine and choose a logic strategy, before just start trying to decrypt the cipher with the first thing that crosses my mind.  Do you guys know some valuable content (book or website) where I can learn more about actually applying my decryption knowledge in real-life cases? So I'll learn to choose the right approach to start with.  My thinking, first determime what kind of software is used and try to reverse engineer them. But if you really don't know, are there good ways to fallback on?


How to delete questions with answers and comments

Is it possible that I can delete questions in SO which have 3 answers and some comments? Due to privacy concern, I definitely need to delete that.


How to find $\lim_{n\to\infty}\sqrt n \int_0^1 \frac{1}{(1+x^2)^n}$

I am trying to find the following limit.  $\lim_{n\to\infty}\sqrt n \int_0^1 \frac{1}{(1+x^2)^n}dx$  I have tried methods like Taylor Expansion and Reduction formula to solve the inner integral but that is not working. I also tried L'Hospital Rule. I just multiplied and divided by $\sqrt \frac1n$ and because both the numerator and denominator are of the form 0 I thought it will be alright to apply the rule. Am I wrong in doing that? Also it didn't work out as after taking derivative the term still seems to be of the form $\frac00$.   I am also not sure as the question asks for a range for the limit and the answer given is $\frac12 < L < 2$. How can I approach this problem?


What is the best way to create a dict from two other dicts (very big one and small one)?  We have:      big_dict = {     'key1':325,     'key2':326,     'key3':327,     ...     }      small_dict = {     325:0.698,     326:0.684,     327:0.668     }   Needs to get a dict for data in small_dict, but we should use keys from big_dict:      comb_dict = {     'key1':0.698,     'key2':0.684,     'key3':0.668     }


combining raw strings with non raw string

I want to combine a raw string with a non raw one which should be a user input (direct input or config file extracted variable), in order to combine them into a regular expression;  import re input = "user_input" regex = re.compile(r"^line:{}.\s(group_to_be_captured)".format(input)   The problem is that user_input contains parenthesis then     regex.pattern   is equal to     '^line:userinputpart1(userinputpart2).\\s(group_to_be_captured)'   so \s has its slash escaped normally, but the parentheses in userinput are not escaped which is thus inconvenient since are recognized as groups to retrieve and not as characters. I know that I indeed can replace them by escaped parentheses using re.sub or str.replace but it made me wonder if there is a simple mean to combine raw strings with non raw ones or if there is some format parameter I am missing ?


I've always struggled to define what makes Hufflepuff a unique house, they seem to share a lot of traits with Gryffindor. I've always considered them to be poorly defined as a house. Going by this  it says this about the houses:  Gryffindor values courage, bravery, loyalty, nerve and chivalry Hufflepuff values hard work, tolerance, loyalty, and fair play  I've highlighted what I believe to be shared traits (Fair-play and Tolerance, to be a subsumed by chivalry) As well as this I can't see any instances of a Hufflepuff working harder than a Gryffindor. What makes Hufflepuff stand out as a house?


Show $\sum\limits_{d|n}\phi(d) = n$.   Example : $\sum\limits_{d|4}\phi(d) = \phi(1) + \phi(2) + \phi(4) = 1 + 1 + 2 = 4$  I was told this has a simple proof. Problem is, I can not think of a way to show this in a very simple and straightforward way.


mkdir says that file exists when it doesn't

When I run   mkdir ~/.ipython/extensions/   I get   mkdir: cannot create directory ‘/home/droudy/.ipython/extensions/’: File exists   However when I navigate to /home/droudy, there is no .ipython folder or anything resembling that


Sorry about asking such an elementary question, but I have been wondering about this exact definition for a while. What power of $n$ is $\log(n)$. I know that it is $n^\epsilon$ for a very small $\epsilon$, but what value is $\epsilon$ exactly?


How do I beat Uprising on Legendary difficulty?

The achievement "Distinguished Service" requires that you beat Uprising on the regular gamemode on Legendary difficulty.  This means we can't pick our usual huge DPS heroes like Bastion and Orisa, and are stuck with Torbjorn, Reinhardt, Mercy, and Tracer.  The phases are as follows:   Hack all 3 terminals Defend the Payload until it's ready Escort the Payload until the gate Destroy all 4 Orisas.   So I ask this after having failed Uprising on Legendary dozens of times.   How do I beat Uprising on all 4 phases?   Specifically asking for the latter 3 phases.    Defending the payload is hard when it gets to the Bastions that drop in because Reinhardt's shield gets melted very quickly and Torbjorn has little to no DPS.  Tracer must be relied on but it seems there is no way to stop the perfect aim of Bastion as strafing around does nothing.  If and when we actually do manage to defend it, we're stuck on escorting, which is even harder thanks to the tank mode Bastions.  And finally, even if we do make it to the final fight, which has only happened once, the fight is so tough that even if we slowly inch ourselves closer to the end we run out of time.  The previous question I asked was different because Uprising (All Heroes) allows you to pick any 4 heroes to form your squad, but the original gamemode will not let you pick. Also, the achievement requires you to play the original mode -- Uprising (All Heroes) on Legendary does not reward players with the achievement.


Using Boolean parameters in Python Script Tool of ArcPy?

I'm using ArcGIS for Desktop 10.3.0.4322 I have a script tool which requires a parameter (folder path to a gdB, via GetParameterAsText) so that a later process can be saved there. The thing I want to do is make an Optional Boolean parameter, that when checked, automatically fills in the folder path gdB parameter. The Boolean text asks the user, "Use default workspace?", to which if they check the box (boolean == True), then the folder path parameter will be automatically defaulted (saving the user a small amount of time). I have already created the Boolean parameter in the script tool, I am however unaware of how to "fill in" the required parameter based on the user's Boolean. Code Snippet: # Ask user to select the Geodatabase workspace to use for data output userWorkspace = arcpy.GetParameterAsText(0)  # Ask user if they want to use default workspace (boolean) useDefault = arcpy.GetParameterAsText(1)  # If user wants default workspace, then give it to the required parameter (0) if useDefault == True:  arcpy.env.workspace = path else:  # Set workspace environment based upon user's choice  arcpy.env.workspace = userWorkspace


Difference between output of `ls -sh` and `ls -lsh`

$ ls -lsh file.qcow2 204K -rw-r--r-- 1 root root 193K Jul 19 15:18 file.qcow2`  $ ls -sh file.qcow2                                                                                204K file.qcow2`   What is the significance of 193K in the output of ls -lsh <file>?


Which Disney Princesses did not make the cut?

We know from the answers here  that some princess dont make it onto the Official list. Which Princesses in Disney movies are NOT official Disney Princesses, and are there reasons why?


I need windows 10 1909 ISO file becasue MS only offers 20H2

I had a running windows 10 17xx, which I installed from the ISO downloaded from MS, more than a year ago. Windows 10 tried to update to Windows 20H2 (October 2020), but after rebooting, it got stuck on the windows logo, for more than a day. I thought that it was a updating problem, because the older Windows 10 installed without problems, so I downloaded the 20H2 ISO from microsoft, formatted the partitions with a linux live CD, and installed Windows 20H2, but the installer, again hangs for more than a day on the windows icon immediately after booting. I believe that maybe my old hardware is not compatible with 20H2 (despite MS saying nothing about incompatibility. I have an Asus P6T motherboard, with an i7 920, which is like 10 years old (but performs similar to a new CPU). Maybe it doesn't supports some new instruction, like AVX or the non UEFI BIOS is incompatible with 20H2. So, I need to install an older version of Windows 10, and the last one was Win 10 1909, but MS does not offer to download it. It only lets to download 20H2. There is any way I can get the 1909 ISO (or the 18xx) from Microsoft? I need the most updated working version, because Win 10 tries to update right to 20H2, so I will be forced to block the updates. I need to run some software which does not installs on older than 18xx. If I cannot get an 18xx or newer W10, I will be forced to go back to W7, where my W7 versions work.


is "from within you ", two successive prepositions possible?

forgetting about those subjective misgivings that arise from within   you   I was reading an passage and that phrase was in there. I couldn't understand exact meaning because of that "from" and "within".   What do they mean and which case can two prepositions be natural?


How can I search for a keyword with special characters in Google Search?

I want to search for what += means, but Google won't return any documents.  Also when I come across some PHP code I don't understand I can't search for the keywords as written.  How can I search for these special characters or include these special characters in a search.


I just added my user to the sudoers file:  $ grep username /etc/sudoers   username ALL=(ALL) NOPASSWD: ALL  $ sudo -l    User can run on localhost following commands (translated by myself):   (ALL) NOPASSWD: ALL   (ALL : ALL) ALL   However when using sudo it still asks for my password. What am I missing?


Gambler's fallacy and the Law of large numbers

Can someone explain me, how the Law of large numbers and the Gambler's Fallacy do not contradict.  The  says, that there is no memory in randomness and any sequence of events has the same probability as any other sequence.  However, the  says, that given enough repetitions a certain event will likely happen.  To my understanding, these two kinda contradict each other because one says that you can not predict any random event but the other one says so (given enough repetitions of course).  For example imagine a series of coin tosses where the coin comes up heads a million times. The Gambler's fallacy says that the chance for the next toss to be tails is still 1/2. However the law of large numbers says, that since enough repetitions of tosses have come up heads, the next toss is more likely to be tails. (Which is definitely wrong?)


When to use inline versus displayed equations in a publication?

On a publication (thesis, paper, other), when should I write an equation inline and when should it be separated and numbered from the text?  I've seen publications containing both styles, but I don't know if there is a rule to choose among them. My field is applied computer science.


Does the Resurrection Stone *really* bring people's spirits back, or just duplicates thereof?

In the Harry Potter world, we see many forms of continuation beyond death -- ghosts, portraits, and even newspaper clippings appear to retain some part of the personality of the original person. However, they all appear to be mere echoes of the original.  Despite this, ghosts and portraits continue to learn and act as the original, and thus may be considered indistringuishable from the outside.  Enter the Resurrection Stone. This Hallow supposedly brings back the souls of the dead, allowing discussion (and tearful moments for our hero, who then... purposefully loses it in a forest).  However realistic these spirits are, they don't appear to have any special features that differentiate them from the other magical constructs, so how does one know that they are the actual, unique soul of the original person? Granted the nature of the Hallows -- being either unique artifacts of unique power, or merely super well enchanted items with standard powers, it would be fitting for the "spirits" to merely be duplicates, as in the case of paintings and ghosts.  Is there any proof (via word of god, most likely) that the Resurrection Stone actually brings back the actual spirit of the person called?


What kind of SQL injection would a SQL statement be vulnerable to if it only escapes single quotes instead of actually using SQL parameters?

Obviously this SQL statement is vulnerable:  Dim sql As String = "select * from person where fname = '" & fname & "'"   But what of this?  Dim sql as string = "select * from person where fname = '" & fname.Replace("'", "''") & "'"   Ideally we'd use SQL parameters but I'm wondering if the latter style of SQL statement is still safe or if I need to fix these as well...


Is not an Integer variable a reference type?

public static void main(String[] args) {     // TODO Auto-generated method stub     int a = 1;     Integer b = new Integer("1");     Integer c = a;     int result = b + a;     int[] f = new int[1];       System.out.println(result);     check(b);     check1(f);     Integer K = new Integer(10);     int J = K.intValue();     System.out.println(b + " " + f[0] );     if(b.equals(a))          System.out.println(a); }  static void check(Integer d) {     d = 20; }  static int[] check1(int[] a) {     a[0] = 20;      return a; }   first I'm curious to use primitive variable and reference variable.  let me know how to show      System.out.println(b)      output       20   array is reference type, and int is primitive type.  and Integer is reference type. but It is not changed from 1 to 2


Can I use lenses from a Canon Rebel XS on a Canon EOS 80D?

So I’m thinking to buy a Canon EOS 80D camera. I already have some lenses for the Canon that I have, and I’m not sure if the lenses that I own will fit the Canon EOS 80D. Will they fit or not? The Canon that I have now is a Canon Rebel XS.


How can I clear items with a custom name using a command block? (using to "lock/unlock doors)

I'm in Minecraft Pocket Edition. My command block is set to repeating and always active. I have it attached to a comparator that runs into a block with an iron door on top. The command input I have is  /clear @p[x=~0,y=~0,z=~-2,r=2] tripwire_hook 0 0 {display:{Name:”key”}}  The IDEA is to set off the command block whenever the tripwire hook is within 2 blocks of the door. This works fine UNTIL I try adding the custom name. The Previous Output box keeps saying:  Syntax error: Unexpected “{“: at “_hook 0 0 >>{<  any ideas on how to fix this syntax error? If you don't, do you have any other ways to lock a door and open it when you have a custom names item?


n^2 = n + n + n ... (n times)  derivative of n^2 = derivative of n + n + n + n .. (n times)  thus, 2n = 1 + 1 + ... (n times)  thus, 2n = n   and 2 = 1  now i know that the mistake lies in taking the derivative of both sides, because all other steps are correct. So I tried the same thing with n^3, where i wrote n^3 = n^2 into n. Following the same steps as above i got 3 = 2.  derivative of n^3 = derivative of n^2 + n^2 + .. (n times)  thus, 3n^2 = 2n + 2n + .... (n times)  thus, 3n^2 = 2n^2  anyway thats why i think its incorrect to take the derivative like that? but why? is it cause by writing 'n times' is basically just mulitplication and should be written in the correct way? or is it cause when we say n times we are treating n as a constant, when its actually a variable and can assume the value we want? can someone please help Im really confused


How can I delete single URL search auto complete entry in Chrome?

I use Chrome by typing directly into the URL text box to search for things. I program in C# and one day I made the awful mistake of pressing / instead of shift and the search became “C/#.” From that day on out most of my searches are “C/# blah blah blah’ which is invalid because of the / so I have to go back and edit it.  This cannot be removed by doing shift+delete for some reason, unlike many other auto completed URLs. The icon for it is different as well. It looks like a new file icon.  I am using Windows. I do not want to remove all of my history.


Sync +- 70 000 records from CSV into drupal

I have a CSV file with approx. 70.000 records that I want to import into Drupal 7. Once this is done the client will provide a new CSV file on a daily base that has to sync the updated rows to Drupal.   I wrote a import with  and the  module, but in both cases it takes like forever to import the 70.000 rows. Is there any other solution to import the data faster in Drupal 7?


Post-merge accounts I do not receive reputation

I recently made a request to merge my account and it just went through -- my posts and reputation from my old account has been merged with my current one. However, I do not receive any reputation for anything I have done. I have answered a few questions and received quite a few up votes -- it does not show +10 (like it should) for each upvote on my reputation tab, it's just blank.  How can this be fixed?  An example of this is I answered a question  and I have not received any of the reputation for my answer and the corresponding up votes.


Which is the better way of initializing elements in a page object?

I know that elements in page objects can be initialized and used in both the following ways     Option 1:   public class LoginPage  {    WebDriver driver;    By usernameLocator = By.id("username");    By passwordLocator = By.id("password");    By loginButton = By.className("radius");   public LoginPage(WebDriver driver)  {     this.driver=driver;  }  public void with(String username,String password)  {     driver.findElement(usernameLocator).sendKeys(username);     driver.findElement(passwordLocator).sendKeys(password);     driver.findElement(loginButton).click();  } }   and also using PageFactory concept     Option 2:   public class LoginPage  {   WebDriver driver;   @FindBy(how=How.ID, using="username")  public WebElement usernameLocator;   @FindBy(how=How.ID, using="password")  public WebElement passwordLocator;   @FindBy(how=How.CLASS_NAME, using="radius")  public WebElement loginButton;   public LoginPage(WebDriver driver)  {      this.driver=driver;          //Initialize elements     PageFactory.initElements(driver, this);  }   public void with(String username, String password)  {     usernameLocator.sendKeys(username);     passwordLocator.sendKeys(password);     loginButton.click();  } }      In the above two options:    Which among the both options is a better choice? What are the trade-off's between both the following options?   Please explain


I'm researching RC4 and I am trying to recreate a condition where RC4 is crackable. However I can't quite find the article/resource I need to find the weakness for an implementation like this (python):   from Crypto.Cipher import ARC4 f = open('key.txt') key = f.readline().strip()  o = open('output.txt','w') f = open('input.txt') for line in f:     cipher = ARC4.new(key)     print >>o, cipher.encrypt(line).encode('hex')   I know the weakness is that the same key is used to encrypt the traffic, however I need a hint as to how this might impact the security of the algorithm.


as of 4/2015 OS X Kindle App: Where are the books located?

After I updated my Kindle for Mac app 2 mos. ago I can no longer find the azw book files on my Mac to convert them so I can read them on my KOBO ereader. I use to find them in a My Kindle Content file but that has disappeared. I have Ult. DRM & Calibre but they won't work without the azw files, and I can't find them on my mac anymore. Can anyone help me? The answers on this site about this are years old & do not apply to my problem.


Rendering of objects visible in viewport only!

how do I render the objects visible in the viewport only ie. only the objects with the open eye 👁 in the object outliner. Thank you


Android - My arraylist is crashing my app

I built a method that returns a specific value, and this value is taken from a arraylist.  This value is being printed on my listview, so I'm calling the method on my listview adapter.  But sometimes (not always), my app crashes, because something happens with the arraylist.  Its really weird because this issue only happens sometimes.  Could you guys please tell what do I need to change on my code to run properly?   Errors:     java.util.ConcurrentModificationException                                                                                at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)  at com.example.*****.getCountry(MySQLReceiver.java:124)   My code  public int getCountry(int receiveUserId){      for (Users user : getAllUsers()) {          if (receiveUserId == user.getUserId()) {              userCountry = user.getUserCountry();          }      }      return userCountry;  }   Thank you.


Residue of $f(z)$ using Laurent Series at $z=-2$

Calculate the residue of:  $$f(z) = \frac{\psi(-z)}{(z+1)(z+2)^3} \space \text{at} \space z=-2$$  Where $\psi(z)$ is the digamma function, and $\zeta(z)$ is the Riemann-zeta function (below).  The answer given is: $\displaystyle \mathrm{Res}_{z=-2} f(z) = \frac{\pi^2}{6} +\zeta(3) - 3 +\gamma$   Using the Laurent Series. Obviously we must find, the coefficient of $\frac{1}{z+2}$ in  the series expansion.  Using the series definition of $\psi(-z)$ zeta definition  $$\psi(-z) = 1-\gamma + \sum_{k=1}^{\infty} (1-\zeta(k+1)) (z+2)^k$$  Or  $$\psi(-z) = -\gamma + \sum_{n=0}^{\infty} \frac{z + 1}{(n+1)(z-n)}$$  How can I approach this?  Thanks!


XmlSerialize a custom collection with an Attribute

I've got a simple class that inherits from Collection and adds a couple of properties. I need to serialize this class to XML, but the XMLSerializer ignores my additional properties.  I assume this is because of the special treatment that XMLSerializer gives ICollection and IEnumerable objects. What's the best way around this?  Here's some sample code:  using System.Collections.ObjectModel; using System.IO; using System.Xml.Serialization;  namespace SerialiseCollection {     class Program     {         static void Main(string[] args)         {             var c = new MyCollection();             c.Add("Hello");             c.Add("Goodbye");              var serializer = new XmlSerializer(typeof(MyCollection));             using (var writer = new StreamWriter("test.xml"))                 serializer.Serialize(writer, c);         }     }      [XmlRoot("MyCollection")]     public class MyCollection : Collection<string>     {         [XmlAttribute()]         public string MyAttribute { get; set; }          public MyCollection()         {             this.MyAttribute = "SerializeThis";         }     } }   This outputs the following XML (note MyAttribute is missing in the MyCollection element):  <?xml version="1.0" encoding="utf-8"?> <MyCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">     <string>Hello</string>     <string>Goodbye</string> </MyCollection>   What I want is  <MyCollection MyAttribute="SerializeThis"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xmlns:xsd="http://www.w3.org/2001/XMLSchema">     <string>Hello</string>     <string>Goodbye</string> </MyCollection>   Any ideas? The simpler the better. Thanks.


How to keep an SSD in shape on Yosemite?

As of OS X 10.10, Apple uses kext signing. Ever since it has become  to manually activate TRIM for third-party SSDs on OS X. That means users with non-Apple SSDs will sooner or later see degrading write speeds.   So I am wondering what are my options to avoid this situation. Some approaches I could think of imply additional problems:   Are you aware of any alternative approach, that does not require disabling kext signing?  Are there tools or tricks to manually clean up a SSD (i.e. issue a TRIM command)? If I decided to temporarily use a tool like TRIM Enabler how long would it need to be activated, in order to clean the disk?   To summarize: No TRIM on Yosemite. What can I do?


If I leave a comment, then delete it, does a person still get notified?

Sometimes I leave a comment, then think better of it -- perhaps I decide to answer instead.  If I delete the comment, does the user still get notified that new comments are available or does the notification take this into account?  Are the comments hard-deleted or soft-deleted?


Why {0} assignation works but not {5} for an array

I tried the following code:  int a[4] = {0}; int b[4] = {5}; int c[4]; printf("%d %d %d %d %d %d\n", a[0], a[3] , b[0], b[3], c[0], c[3]);   And got the following result:  0 0 5 0 random random   While I get why I got random values for the c array, I don't understand why the assignation {5} does not work as {0} and only initialize the first element of the array.  Is there a way to initialize array b elements to the same value different from 0? (without using a memset, or a for loop)


Why can't I suggest edits on SE meta sites?

When you click "edit" on a meta site as a non-edit-privileged user, the error message appears:  Suggested edits are not allowed on non-tag-wiki posts on meta sites.  Right as I was going to post this as a possible bug, I finally found  which says that per-site Metas don't have suggested edits by-design because it's "not needed". However, I've been participating a lot over at  where there is a lot still to be figured out in terms of site guidelines.  The Meta is one of the most active I've seen and a lot of the questions are really trying to gather community-built suggestions.  So maybe more of those need to be Community Wiki, but it still brings me to ask why don't per-site-metas "need" suggested edits? Adding bounty: The more betas I participate in, the more I don't get this.


Understanding $() (and for-loops) in bash

I have a directory with git inside and git branch gives me the following output:  $ git branch   branch1 * branch2   master   The * marks the current branch. I would like to use this output in a script. So I loop over the lines like this:  $ for line in $(git branch); do echo "${line}"; done; branch1 README.txt branch2 master   Questions:  What happened to the * and why do I see README.txt[1]?  How can I loop over the lines returned by a normal git branch exactly as they are, with * and a space?  P.S.: I am on a Mac right now.  [1] (or any other file in the repository but this one only has one file "README.txt")


What is file system of linux? How does it work?

I am a new computer user and my computer is having 20 folders in the file system. They are bin, boot, cdrom, dev, etc, home, lib, lib64, media, mnt, opt, proc, root, run, sbin, srv, sys, tmp, usr, var, swamfile. What are these folders for and how do they work? I am not able to understand these folders. Many of them are having many other files and folders within them. They are many different types of files and folders like , ,  and so on.


If I play Lucio, can I heal the teammates located at a different height? (roof, upstairs, hovering Pharah... )  In other word is that aura strictly horizontal? Or does it work more like a bubble like Winston's barrier?  If it's horizontal, does it require Line Of Sight or not? (will I heal a nearby ally right behind a wall?)


Microphone  spec    sheets  specify a   microphone’s    sensitivity by  displaying  the voltage at  the output  of  the microphone  when    1   Pa  is  applied to  the diaphragm.      If  a   microphone  has an  output  voltage of  2.5mV   @   1Pa,    what    would   its output  voltage be  when    98dB    SPL is  applied to  the diaphragm?


Lorentz invariance of the Heaviside function

Consider the Heaviside function $\Theta(k^{0})$.  This function is Lorentz invariant if $\text{sign}\ (k^{0})$ is invariant under a Lorentz transformation.  I have been told that only orthochronous Lorentz transformations preserve $\text{sign}\ (k^{0})$ under the condition that $k$ is a time-like vector.  I would like to prove this explicitly, to convince myself of the fact. How do I start?  N.B.:  contains a sketch of the proof but it does not contain the complete proof in explicit steps, though.


I want to travel to Canada on a valid B1 (Business visitor)

I have a B1 Business visitor visa for Canada and I visited Canada on this visa for my company's business. Now I want to visit Canada. Can I travel for tourism on this business visitor visa?


Is there anyone who can tell me by looking at some setting from my laptop if I have spywear installed or being remotely controlled what do I have to check for please advise how I find out if I am being remotely controlled or monitered TIA ps please expline in simpelist terms any help or answer im not very good or technical on this sort of subject its driving me crazy will be very gratefull for any help thank you also how I set up surface pro to be complete admin and max security


Find the value of $\int_{-\infty}^\infty \int_{-\infty}^\infty e^{-(x^2+xy+y^2)} \, dx\,dy$

Given that $\int_{-\infty}^\infty e^{-x^2} \, dx=\sqrt{\pi}$. Find the value of $$\int_{-\infty}^\infty\int_{-\infty}^\infty e^{-(x^2+xy+y^2)} \, dx\,dy$$  I don't understand how I find this double integral by using the given data. Please help.


How to do line optical illusion art effects?

I was wondering how I can do this type of optical illusion. Is it done manually or is there a quicker way to do it. Thanks ahead of time.


We just realized that our garage refrigerator/freezer was not on. The eggs are still cold to the touch but the vegetables, rice w/shrimp and meatballs in the freezer are not frozen but still cold. The ice cream is mostly melted. This tells us that the frig hasn't been off for a long time but we don't know for how long. Should we throww all the frozen foods away? Or would it be safe to cook everything instead.


I have heard about PDF  PDF/A (for archival) and PDF/X (for printing). How to generate LaTeX documents like that?  I'm also interested in answers with plain TeX and ConTeXt, and hopefully with both pdfTeX and XeTeX engines.


"new" blog link in header pointed to a view without the new post

Clicking the blog link in the header on any meta currently takes you to https://blog.stackoverflow.com/?blt=1  which didn't display the new blog post for a non-trivial amount of time. You had to remove the blt parameter to actually see . Assuming it was a caching issue, shouldn't the cache for both routes be refreshed when a new blog entry is posted? Likewise, links to new posts in the Community Bulletin can have a similar problem, leading to erroneous 404s like the one shown below:


I'm not quite sure why, but I was stuck with a Captcha when asking a new question on Arqade.  That's normally fine, but I'm not sure how I can submit it.  I typed in the needed text, and copy-pasted the string, but I don't really see a submit button or anything.  Here's a helpful pic:    Is something supposed to happen? How do I finish this Captcha?


I need a program like Microsoft silverlight?

I'm new to using Ubuntu and I've never really heard of the program so I know nothing about it. I had regular windows when I bought this computer, but had a major file corruption and my boyfriend's uncle completely wiped my software replacing it with Ubuntu. All that aside, I really need a program that works just as well as Microsoft Silverlight for work so I can get my schedule to show up through Dayforce. I've googled somethings hoping to help, but it seemed very complicated and I am not very knowledgeable about this stuff. Can anyone explain what to look for and how do I need to install it?


Word Count isn't a ranking factor, is there any case study or proof?

According to many information like  and  word count isn't a ranking factor.  But I have never seen that 300-word article (even 500 words) is on the first page for at least 500 search volume(monthly) keyword.  Is there any case study or an example to prove that "Word Count isn't a ranking factor"?


This  has seem a whole stack of very small edits.  In particular the last 4 edits were all < 6 characters.  Is there some mechanism to discourage such repeated small edits aside from CW which doesn't kick in after a very long timeThe user has a history of doing this, see for example:?  It is possible that the author may just be doing repeated edits to ensure that the post is always near the top of the "active" list.  For another example by the same user see .


Probability puzzle on three people rolling a die

Given three players A, B, C, taking turns to roll a fair die in the order A B C A B C A B ....  What's the probability of that the occurrence of second 6 is in A's turn? My approach was  Let $F_6$ and $S_6$ be the r.v's for the first and second occurrences of 6 respectively.  $$\begin{align}P(S_6 = A) &= P(S_6 = A \cap F_6 = A)  + P(S_6 = A \cap F_6 = B)   + P(S_6 = A \cap F_6 = C)\\  &= P(F_6=A)P(S_6=A | F_6=A) +P(F_6=B)P(S_6=A | F_6=B)\\ &+P(F_6=C)P(S_6=A | F_6=C)\\ &= 3(\frac{5}{6} P(F_6 = A))^2 \end{align}\\$$  Here I am using the following relations   $$\begin{align}P(F_6=B) &= \frac{5}{6}P(F_6=A),\\ P(F_6=C)&=(\frac{5}{6})^2P(F_6=A),\\\text{and}\quad P(S_6=A | F_6=A)&=(\frac{5}{6})^2P(F_6=A)\\P(S_6=A | F_6=B)&=\frac{5}{6}P(F_6=A)\\P(S_6=A | F_6=C)&=P(F_6=A)\end{align}$$  My reasoning for the first relation is that  $P(\text{first occurrence of B in seq ABCABC...}) = P(\text{A doesnt throw 6}) P(\text{first occurrence of B in seq BCABCABC...})$\  By symmetry $P(\text{first occurrence of B in seq BCABCABC...})=P(\text{first occurrence of A in seq ABCABCAB...})$  I am unsure if my method is correct. Please help me verify this. Thanks in advance.


I have a problem, someone help me, I'm on UBUNTU 20.04 and I get this error when putting apt-get update in the terminal

W: Error de GPG: http://old-releases.ubuntu.com/ubuntu maverick Release: Las siguientes firmas no fueron válidas: 630239CC130E1A7FD81A27B140976EAF437D05B5 E: El repositorio «http://old-releases.ubuntu.com/ubuntu maverick Release» no está firmado.


Create filter in Gmail for forwarded emails

I have two Gmail accounts, one personal and one given by my university. I have set email forwarding so that all mails that come to my university address are forwarded to my personal account. I wish to create a filter so that all messages forwarded from my university address are moved to a separate folder. How do I do this?


I am trying to add in a tabbed activity the app icon to the app bar and the answer is: method may produce 'java.lang.NullPointerException'. I have read and tried all the answers here and none of them it's working for me. I thought I solve it with the assert getSupportActionBar() != null; the error dissapears in MainActivity.java but then app still crashes with   FATAL EXCEPTION: main                                                                       Process: com.gadgetcatch.test, PID: 25826                                                                       java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gadgetcatch.test/com.gadgetcatch.test.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setLogo(int)' on a null object reference    I'm a beginner in Java and I would really like to understand why this happens.  Here is the MainActivity.java text      package com.gadgetcatch.test;  import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView;      public class MainActivity extends AppCompatActivity {          /**          * The {@link android.support.v4.view.PagerAdapter} that will provide          * fragments for each of the sections. We use a          * {@link FragmentPagerAdapter} derivative, which will keep every          * loaded fragment in memory. If this becomes too memory intensive, it          * may be best to switch to a          * {@link android.support.v4.app.FragmentStatePagerAdapter}.          */         private SectionsPagerAdapter mSectionsPagerAdapter;          /**          * The {@link ViewPager} that will host the section contents.          */         private ViewPager mViewPager;          @Override         protected void onCreate(Bundle savedInstanceState) {             super.onCreate(savedInstanceState);             setContentView(R.layout.activity_main);              assert getSupportActionBar() != null;             android.support.v7.app.ActionBar ab = getSupportActionBar();             ab.setLogo(R.drawable.babyicon);              ab.setDisplayUseLogoEnabled(true);             ab.setDisplayShowHomeEnabled(true);              Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);             setSupportActionBar(toolbar);              // Create the adapter that will return a fragment for each of the three             // primary sections of the activity.             mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());              // Set up the ViewPager with the sections adapter.             mViewPager = (ViewPager) findViewById(R.id.container);             mViewPager.setAdapter(mSectionsPagerAdapter);            }      }   I added here only the part that concerns my question.


Don't use alternative section title in \tableofcontents

My document uses titles like the following all over the place.  \section[short]{longlonglong}   The short title is used in page headers and the table of contents. The longlonglong title is only used at the section title itself.  How can I use the longlonglong title in the table of contents? I'd like to keep the page headers in thier current form.  Thank you!  Update:  \documentclass[12pt,a4paper]{report}  %\usepackage{../sty/reportpage}  \begin{document} \pagestyle{reportpage} \pagenumbering{roman} \setcounter{page}{1}  \cleardoublepage \renewcommand{\baselinestretch}{1.25} \small\normalsize  \tableofcontents  \renewcommand{\baselinestretch}{1} \small\normalsize  \cleardoublepage  \pagenumbering{arabic} \setcounter{page}{1}  \chapter[First Chapter]{The first chapter has a long title that only is shown as the chapters headline} Some irelevant text.  \cleardoublepage  more irelevant text.  \end{document}


Choosing the right data from a table using SQL

Lets say I have this table name "Stuff"  ╔════╦═════╗ ║ ID ║ VAL ║ ╠════╬═════╣ ║  1 ║ A   ║ ║  2 ║ B   ║ ║  3 ║ C   ║ ║  4 ║ C   ║ ║  5 ║ C   ║ ║  6 ║ D   ║ ║  7 ║ B   ║ ║  8 ║ E   ║ ╚════╩═════╝   I would like a query which can give me an output of where in the numbers the letters are repeating. Feel free to use any column name for the table.  Basically I want something that says "C" is reapeating on number 3, 4, and 5. "B" is repeating on number 2, and 7.   On my work I have thousand of rows. The example I gave you is very granular. If you need more information please let me know.


Frequency or Wavenlenght; which changes when light is passing from rarer to denser medium?

what changes; Frequency or Wavelength when light passes from a rarer to a denser medium?And Why?


Display the original author's avatar on Community Wiki posts

I think that avatars on stackoverflow are really cool and I think that it is a fun way to express myself. That being said, when one of my posts becomes a Community Wiki post,  I'm a little sad that my avatar goes away.  Its nice that CW posts keep my name, but avatars make stackoverflow more interesting.  So how about it SO, can we keep our avatars when we create epic CW posts?


I have an installation of Postfix & Dovecot on a Centos 7 server. While being logged into the server via ssh I am able to use telnet and openssl to connect to localhost like  openssl s_client -starttls smtp -crlf -connect localhost:25   authenticate myself, and send an email. However, when I try to connect to the server from my local Computer, replacing localhost with the server name, I get the error message  connect: Connection refused connect:errno=61   Using telnet I get the error  Trying XXX.XXX.XXX.XXX... telnet: connect to address XXX.XXX.XXX.XXX: Connection refused telnet: Unable to connect to remote host   The file /etc/postfix/master.cfcontains the lines  smtp      inet  n   -   n   -   -   smtpd submission inet n   -   -   -   -   smtpd   The command netstat -tpnl | grep :25 results in  tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      10327/master         tcp6       0      0 :::25                   :::*                    LISTEN      10327/master    Calling systemctl status iptables.service on the server yields  ● iptables.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)   Entering my mail server at mrtoolbox.com results in the message  Connecting to XXX.XXX.XXX.XXX 1/20/2016 3:43:42 PM Connection attempt #1 - Unable to connect after 15 seconds. [15.01 sec]  PWS3v2 15193ms   Can you give me some hints what I might have missed or how to check what is going wrong, here?


NullPointerException while running jar file

It's been like 8-10 hours since I encounter that problem and it really bugs me. So hopefully someone would give me a hint what I'm doing wrong.  Issue I'm using maven shaded plugin to pack my maven app to jar file, the problem which I encounter is that in Eclipse when I'm running my app all is sound, but when I try to run my app as jar file:  java -jar <my-file>   I get:   Exception in thread 'main' java.lang.NullPointerException at start.my.App.main<App.java:60>   My application works as filter and processor for files within directory from which my app is started. Traverse method simply returns list of files within directory in which my jar file is located:   @Override public List<File> traverse(String directory) {   File directory = new File(directory);   List<File> resultList = new ArrayList<File>();   File[] fList = directory.listFiles();   resultList.addAll(Arrays.asList(fList));   for (File file : fList) {     if (file.isDirectory()) {        resultList.addAll(traverse(file.getAbsolutePath()));     }   }    return resultList;  }   The line in which this problem occurs:  WalkerResult walkerResult =     walker.traverse(ClassLoader.getSystemClassLoader()                            .getResource(".")                            .getPath());   What's inside traverse method should return path to my jar file which I'm running, I think I'm doing something wrong as when I pass as path to traverse method which looks like:  WalkerResult walkerResult =     walker.traverse("C:\\Users\\Downloads");   all is fine in IDE and as in jar application.  Thanks for any hints in advance.


What's a good website for logging cycling trip data?

Whenever I go cycling I reset my bike computer (measures distance, speed, time, and various statistics based on these quantities, such as average speed) and set up my Polar training computer (measures heart rate, time, and various statistics based on these quantities, such as average heart rate).  When I get back I log basic statistics---date, duration, route, average speed, max speed, heart rate info, and a short description---into an HTML file that has gotten rather large.  I've been wondering whether there's a site, with nice user interface, that would allow me to log these data online? Ideally one would be able to see the aggregate distance and aggregate duration within various time periods, etc.; it would also be good to be able to log routes on a Google maps-like map which one could then share with others.  I realize this question is only tangentially related to cycling; still, this seems to be a relevant place to ask the question.


Sending in comma delimited values to WHERE clause in oracle stored procedure

I'm sending in a comma delimited parameter value to a stored procedure in Oracle. The parameter goes to a WHERE clause, I'm trying to achieve something like this:  valuestring = "ABC123, ABC456, ABC789"    SELECT *    FROM Tbl1    WHERE column IN (valuestring)   Problem is the select statement does not recognize the commas in between the values, it takes it as a single string so when the stored procedure is executed it returns no values.  Any help would be appreciated.


How can I change the contents of grub loader?

I have Ubuntu installed alongside of Windows and in bootloader (grub) these operating systems as all of yours are with long names! How can I change the names in grub? for example I want to change the 4th one to "my fathers OS" and when I choose it in the grub it will go to the Windows.


$$ y' = \frac{y}{\sin x} + \tan \frac {x}{2} $$  So from the beginning I do  $$y' - \frac{y}{\sin x} = \tan \frac {x}{2} $$ Now I should equal it to 0, shouldn't I? $$y' - \frac{y}{\sin x} = 0 $$ $$\frac{dx}{dy}   = \frac{y}{\sin x} $$ $$ dx\sin x=ydy$$ $$ \cos x=\frac{y^2}{2} $$ $$y=\sqrt{2\cos x}$$ And now i have problem with that derivative, is there any short way to do it?


Solving SAT by converting to disjunctive normal form

The first well-known $NPC$ problem is the  which has a proof of being $NPC$ done by Cook (Cook-Levin Theorem).  The problem can easily be described the following way:     In complexity theory, the satisfiability problem (SAT) is a decision problem, whose instance is a Boolean expression written using only AND, OR, NOT, variables, and parentheses. So, we should give an answer 'yes' if there is a set of boolean variables which yield 'TRUE' for the given for the corresponding expression.   However, I have a question. The wikipedia article states the following:     SAT is easier if the formulas are restricted to those in disjunctive normal form, that is, they are disjunction (OR) of terms, where each term is a conjunction (AND) of literals (possibly negated variables). Such a formula is indeed satisfiable if and only if at least one of its terms is satisfiable, and a term is satisfiable if and only if it does not contain both x and NOT x for some variable x. This can be checked in polynomial time.   So, basically, if the expression is written in the DNF, this problem is not $NPC$, but simply $P$.  However, as far as I know, there is a $O(p(n))$ algorithm to transform any given boolean expression into DNF and DNF exists for any boolean expression.  What am I missing or misinterpreting? There is obviously an error in my logic, because it resulted in making the SAT problem $P$, but not $NP$.  Thank you!


I am looking at Griffiths introduction to Electrodynamics 3rd ED.  Problem 2.10 asks for the flux of $E$ through the right face of the cube, when a charge $q$ is in the back left corner of the cube.  The solution manual says it should be $\frac q {24\epsilon _0}$ but I think it should be $\frac q {6\epsilon _0}$ because each side should experience the same flux, and the face of the cube represents 1/6th of the cube.


Having trouble understanding function arguments in Python

I don't understand how the variables being passed aren't changing when I run the function. The values are initially set to None, as I hope for them to change once I run the function but nothing happens. So I'm obviously doing something wrong. I'm fairly new to Python and would love some help.  def askUser(number_STRING, digits, array_NUM, chars):    print ("NOTE: Program can only convert mm, cm, m, and km")   number_STRING = raw_input("Type the number (9KM, 30M exactly like    that) you would like to convert to centimeters.")   digits = int(filter(str.isdigit, number_STRING))   array_NUM = len([c for c in number_STRING if c.isdigit()])   chars = str(number_STRING[array_NUM:])  def main():    number_STRING = None   digits = None   array_NUM = None   chars = None    askUser(number_STRING, digits, array_NUM, chars)    print chars   print array_NUM   print digits  main()


I’m looking to install a capacitor in a circuit which runs at 12V and <10A, and I want it to discharge in about 3 seconds.   The discharge voltage isn’t too important, but it’s probably best if it is as high as possible (not higher than 12V if that is even possible) for those 3 seconds.  The discharge time can be longer but probably should have an absolute minimum of 1.5 seconds.   Sorry if this sounds like gibberish. If I'm not giving enough info, please let me know what else i need to provide. I’m not an electrical guy; just working on a project and have no clue what I'm doing.


$\mathbb Z[i]/ \langle 1+2i \rangle \cong \mathbb Z_5$

I am trying to prove that $\mathbb Z[i]/ \langle 1+2i \rangle$ is isomorphic to  $\mathbb  Z_5$.   The only thing that came to my mind was trying to apply the first isomorphism theorem using an appropiate function. If I consider the euclidean function $N: Z[i] \setminus \{0 \}  \to  \mathbb N$ defined as $N(a+bi)=a^2+b^2$, then I can express any element $z$ in $\mathbb Z[i]$ as $z=(1+2i)q+r$ with $N(r)=1,2,3,4$ or $r=0$.   If I define $f:\mathbb Z[i] \to \mathbb  Z_5$ as $f(x=(1+2i)q_x+r_x)=\overline{r_x}$, then it is clear that $f(x)=0$ if and only if $x \in  \langle 1+2i \rangle$. The problem with this function is that it doesn't satisfy $f(x+y)=f(x)+f(y)$ and it is not surjective for if $r_x=f(x)=3 (5)$, then if $r_x=a+bi$, we have $a^2+b^2=3$, which is absurd.  I don't know what else to do, any suggestions would be appreciated.


Empirical relationship between mean, median and mode

For a unimodal distribution that is moderately skewed, we have the following empirical relationship between the mean, median and mode: $$   \text{(Mean - Mode)}\sim  3\,\text{(Mean - Median)} $$ How was this relationship derived?   Did Karl Pearson plot thousands of these relationships before forming this conclusion, or is there a logical line of reasoning behind this relationship?


How do I install the ubuntu-restricted-extras package?

I would like to install the restricted extras package, which I didn't select during the install. How can I do that?        is a meta-package that installs:         Support for MP3 and unencrypted DVD playback   Microsoft TrueType core fonts   Flash plugin   codecs for common audio and video files


Variation of inverse trigonometric function with intervals

How can I prove this property   $2\sin^{-1}x =  \begin{cases}\sin^{-1}(2x \sqrt{1-x^2})&\text{for }-\frac1{\sqrt2}<x<\frac1{\sqrt2} \\ \pi- \sin^{-1}(2x\sqrt{1-x^2})&\text{for }\frac1{\sqrt2}<x<1 \\ -\pi-\sin^{-1}(2x\sqrt{1-x^2})&\text{for }-1<x<-\frac1{\sqrt2}\end{cases}$   The first one is quite easy but how to proceed with other two


delete all sub-directories recursively except several ones

The main_directory includes 0001 0102 0203 ... sub-directories. The sub-directories include lots of directories.  I need to delete all sub-directories except several ones whose names are "abc", "bcd" and "123", for example.  How can do this deleting processing using command?


Varied Activation Functions in Neural Networks

I have been told by a professor that it is not possible to combine different activation functions within a neural network.  And I can't find any examples of anyone doing this.  However, I cannot find any good explanation why.   Conceptually, it seems to make sense:  suppose I have a set of data on some population.  Imagine the population is divided into two types of people, A and B, but I don't actually have that categorical variable in my data.  We could imagine a logistic model that maps my population data into the categorical variable.  Now suppose I'm training a neural net with one hidden layer.  It seems to me that it makes perfect sense for one node in that hidden layer to have a sigmoid function as input representing the transformation of the input variables to this latent categorical variable (now as a probability, of course).  Meanwhile, all the other nodes have a linear activation function.  And then output would be a linear function of all the nodes in the hidden layer.    I have no reason to assume this would improve prediction error.  This is what I want to know:  is it possible to estimate such a model using standard approaches?


Confusing the order of two product of permutations

Let $\sigma$ and $\tau$ be distinct(means relative prime) permutations of order $m$ and $n$, respectively(need not be $\gcd(m,n)=1$) in certain symmetric group.  Now, suppose that $\sigma\circ\tau=\tau\circ\sigma$.  Then, which one is true?:  (i) the order of $\sigma\circ\tau$ is $\textrm{lcm}(m,n)$.  (ii) the order of $\sigma\circ\tau$ divides $mn$.  (iii) the order of $\sigma\circ\tau$ divides $\textrm{lcm}(m,n)$.  Can anyone help me? Thank you!


How to write pseudocode similar to code presented in "Beautiful Code" by J. R. Heard

I came across an astonishing piece of text, which is called . I was wondering if there is a package or something that allows me to present my code similar to how J. R. Heard presented his code.  I would like line numbering though, but I figured first I need to find what he used to create a formatting like this. Note: the code is Haskell, but I would like to use it for pseudocode.  PS: it would be ideal if line numbering can be done after the vertical line. But I was also wondering whether it is possible to literally fix the width of the left column.  An example from his amazing work is shown below:   Thanks for your time and effort to help me!


How can convert latex to MS word document

How can I translate my Latex job into an MS Word document? I search youtube but I don't found a solution to my enquiry


Permissions problems with /var/www/html and my own home directory for a website document root

I'm trying to not give 777 permission in my /var/www/html folder, but I want to edit my files without sudo. So I though in create a symlink of a folder in my home directory within /var/www/html. I created it using sudo ln -sT /home/andre/www/moodle/ moodle , and the ls -la output is this:  andre@andre-270E5G:/var/www/html$ ls -la total 8 drwxr-xr-x 2 root root 4096 Mai  4 10:20 . drwxr-xr-x 4 root root 4096 Abr 29 14:29 .. lrwxrwxrwx 1 root root   23 Mai  4 10:20 moodle -> /home/andre/www/moodle/   So, my moodle folder has read, write and execute permissions for everyone, and thats not what I want. I used the command sudo chmod -R 775 moodle/ trying to change it, but it stayed with read, write and execute permissions to all. I tried the same with the moodle folder in /home/andre/www/moodle, but it stayed the same. The output of ls -la in /home/andre/www/ is:  andre@andre-270E5G:~/www$ ls -la total 28 drwxrwxr-x  3 andre andre  4096 Mai  4 10:02 . drwx------ 49 andre andre 20480 Mai  4 10:01 .. drwxrwxr-x 41 andre andre  4096 Mai  4 10:02 moodle   So the folder moodle in /home/andre/www/ has the permissions I want.  As an additional problem, when I access localhost/moodle I get 403 Forbidden error.  What am I doing wrong here?