People have run into this issue before :       but they weren't looking for an unattended solution.  Windows 7 + Virtual Box 4.2.16 + Vagrant 1.2.2  I'm creating an unattended Vagrant install/upgrade for precise64 (Ubuntu 12.04 LTS Server 64 ).  My Vagrantfile specifies to install precise64 image and then kick-off boostrap.sh  bootstrap.sh  apt-get update -y apt-get upgrade -y   Things proceed along swimmingly until apt-get upgrade -y eventually pops-up this GRUP dialog :  The GRUB boot loader was previously installed to a disk that is no longer present, ...    Based on the forum posts referenced above, I know this to be a bogus warning and even if /dev/sda is selected for GRUB install device , the only way out of the dialog is to specify that GRUB not be installed.  However, I need a way to blow through this dialog for an unattended Ubuntu install/update/upgrade.  Any ideas ?

Per   I did the following:  ec2run ami-3c994355 --region us-east-1 -n 1 -t m1.large -z us-east-1d   On the machine:  sudo apt-get update sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade   I still get a prompt asking me which config file I want to use. These are the lines that come before the prompt:  Setting up grub-pc (1.99-21ubuntu3.1) ...   then:                           ┌───────────────────────────────────────────────────────┤ Configuring grub-pc ├───────────────────────────────────────────────────────┐                                                        │ A new version of configuration file /etc/default/grub is available, but the version installed currently has been locally modified.  │                                                        │                                                                                │                                                        │ What do you want to do about modified configuration file grub?                                                                      │                                                        │                                                                                │                                                        │                                     install the package maintainer's version                                                        │


Suppose we throw $n$ indistinguishable balls in $n$ bins at random. The throws are independent. What is the expected number of empty bins? What is the expected number of bins with one ball.   Using indicator random variables, expectations, some sloppy math and some questionable logic, I arrive at the conclusion that both are approximately $n/e$. I'm not able to find simple formulas. It also sounds very counter-intuitive to me.  Worse, I wrote a small Ruby program to simulate it and the results appear to be (approximately) correct.  Can anybody show me a good solution?

I've seen many variations of this problem but I can't find a good, thorough explanation on how to solve it. I'm not just looking for a solution, but a step-by-step explanation on how to derive the solution.  So the problem at hand is:   You have m balls and n bins. Consider throwing each ball into a bin uniformly and at random.    What is the expected number of bins that are empty, in terms of m and n? What is the expected number of bins that contain exactly 1 ball, in terms of m and n?   How would I approach solving this problem?  Thanks!


Occasionally I need to use a custom icon for something - a launcher created with alacarte, a custom .desktop file, or just a particular folder viewed in Nautilus.  I know there are LOADS of cool icons installed on my system at /usr/share/icons but browsing them is really awkward. Everything is scattered around, duplicated in different sizes (or symlinked to .svg) etc.  So, say I'm looking for a text file icon, or a purple folder or such, searching is a faff, and then when you do find results you need to work out what the best quality one is.  Made me think that someone might have written an app for this?

When making a custom launcher, it is nice to have a matching icon for it from the default usr ubuntu directories. The problem that is: Ubuntu seems to store icons in about 50 or more folders. Browsing all of them in nautilus takes ages.  So my question is: Is there some kind of icon browser that shows an overview of all icons in /usr/share/icons/*?


I want to know if proving the existence of something by using only logic is possible.

I was thinking of the sentence  "I think therefore I am",  which I had for a long time considered indisputable because it's self-evident.   Then I considered the hypothetical situation where my thoughts are illogical – and of course I can't be aware that they are – and so to a logical outsider I am not saying something that is actually indisputable and self-evident, but in fact may be total nonsense. Perhaps there is a hypothetical evil demon altering my ability to reason. However convincing it seems to me that I MUST exist since, in whatever since "I" or "exist" is, there is the ability to question whether I do, the conclusion can't actually be trusted without doubt since I cannot know if I am in fact reasoning logically.  Even what I consider to be trivial tautologies require this assumption of sanity, and therefore there is no true conclusion without assumption – an assumption about the nature of my own reasoning. The only absolute truth I have is unspeakable subjective experience, and any articulation (and I realize the apparent circular reasoning I've cornered myself into here...) is necessarily uncertain.  I realize that perhaps this doesn't even make sense, but was just curious if anyone had entertained this line of thought and come to some satisfying resolution.


I'm trying to install Android Studio but I found this error. Can someone help me?  If I write on terminal  sudo apt-get install android-studio  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package android-studio

Please tell me the full process of installing Android Studio and its necessary dependencies.


I've just installed a Fedora 19 on VMware workstation 9. The default network device is "ens33" instead of "eth0" on RHEL.  The reason I have to use "eth0" is that the license component of one of our products has be to be linked with "eth0".  There are some posts discussing about similar issues, most of which are for older OS. I haven't found one that exactly match my situation.

We have a RHEL 5.5 box with 8 interfaces. And the eth interface naming is flip flopping. Sometimes eth0 comes up on physical port 7th, and sometimes on another physical port.   We want the naming to be as per the sequence of PCI BUS. I did the research and found that   cat /sys/devices/pci0000\:00/0000\:00\:1e.0/0000\:07\:07.0/net\:eth0/address\   This locations have the mac address of the eth devices. So If I get "address" in sequence from this pci bus locations and put them in ifconfig-eth0 to ifconfig-eth7 in order of PCI BUS location, my eth naming will be stable.  I tried:  find /sys/devices/ -name "address"   but it does not bring any results. I don't know why…   Any help here?


I want to know the reason why i am getting so many decimal points while doing this sum of double numbers   System.out.println(Double.parseDouble(".56")); double dvalue=1.12+Double.parseDouble(".56"); System.out.println(dvalue);   output is as follows  0.56 and  1.6800000000000002  why second summation is adding those decimals it  should simply  1.68


I went out last night and places several Pokemon on gyms. Now it is the morning and only one remains where I placed them, but I can't remember which gym I put this Pokemon on. Is there a way to get the game to tell me?

I captured a gym today just before the servers went down. I am wondering if I lost my progress. Is there a way to see if I own a gym or not?


I am trying to figure out how to only get the source code of the body of the function. Let's say I have: def simple_function(b = 5):     a = 5     print("here")     return a + b  I would want to get (up to indentation): """      a = 5     print("here")     return a + b """  While it's easy in the case above, I want it to be agnostic of decorators/function headers, etc. However, still include inline comments. So for example: @decorator1 @decorator2 def simple_function(b: int = 5):     """ Very sophisticated docs     """     a = 5     # Comment on top     print("here")  # And in line     return a + b  Would result in: """      a = 5     # Comment on top     print("here")  # And in line     return a + b """  I was not able to find any utility and have been trying to play with  for few hours now, but with no luck. Any help appreciated! Why is it different from  This question asks for a whole function source code, which includes both decorators, docs, def, and body itself. I'm interested in only the body of the function. I just love the fact that despite repeating it's not a duplicate, it still got marked as one <3

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


I'm trying to remember a good book, maybe divided by three volumes, about a future human society.  I remember that it starts with the first human mission to Mars, where the astronauts land just to discover two guys in their 20-ish just built some kind of portal and managed to get on Mars from their garage.  I know that after this there is a huge universe, and a lot of things going on, including a character buying and living in its own asteroid, later used to help a endangered species?  I believe later in the story we follow the two portal builders, one became incredibly rich as the CEO of the company selling portals, while the other decided to step down from it.   Later in the story, in the second book maybe, the second guy decides to explore a planet with hiking trails that are supposed to make people disappear, and he ends up traveling through several planets, one very cold and covered in snow.  I read that book about 4 years ago I think, but it was not new. I'd say it could be from the late 2000's.

I got the storyline of this book series (I believe it was a series) told to me by a colleague at a former workplace but I can't remember the name of the author or of any of the books in the series. The first book is about a couple of college students who find a way to relatively easily open portals to pretty much wherever they want to go. One day, NASA(?) finally succeeds in sending astronauts to Mars(?). When they have just left the spaceship, one of them suddenly gets a tap on the shoulder, and when he/she turns around, these college students stand there in their homemade space suits, chuckling. I believe these students later also start a company that helps other organizations establish themselves on other planets, or perhaps even "conquers" and sells planets to other organizations. A later book in the series also describes a system that lets people upload their minds to the cloud. Some people choose to live solely in the cloud as virtual creatures, only deciding to "descend" into a "flesh" body when they need to perform some task that requires them to be in physical form. Some people also choose to live in physical form but as several entities, or clones, and sync their mind between the clones through this system, basically allowing them to, for example, run a one-man company with several "instances" of the same human who all share their knowledge and all know exactly what all other clones know in the same moment, effectively creating a super-efficient team of workers.


Hello Stack Overflow community,  I have taken up the project of making an installer/launcher for a game I am working on, and I have currently run into an issue, I want the installer to open in the center of the screen resolution, with the base UI, which looks like:    The Label in the center named "MainText" is preconfigured to say "Configuring", there is also a hidden label in the corner named "label1" for debugging purposes.  The code I currently have inside of the MainForm.cs so far is below, the "programpath" refers to current directory in which the application is inside of.  public MainForm()     {         //Open Window         InitializeComponent();         //placeholder song         System.Media.SoundPlayer player = new System.Media.SoundPlayer(programpath+"\\GTA 4 Loading Screen Normalized No intro.wav");         player.PlayLooping();         //newLaunch();         }          void newLaunch(){         File.Create(programpath+"\\FirstLaunch.lic");              MainText.Visible=true;             MainText.Text="Configuring Machine....\nInstalling DirectX";                 Process.Start(programpath+"\\dxwebsetup.exe");             label1.Text=programpath+"\\dxwebsetup.exe";         }   However, if I uncomment "newLaunch()", the dxwebsetup application opens, then the actual UI opens with the MainText stating "Configuring Machine....Installing DirectX", and label1 saying the location of the installer.  How do I make the UI for the application itself appear then start running the code after....similar to an actual installer, however still being completely autonomous, and installing everything on it's own.

In .NET, Windows Forms have an event that fires before the Form is loaded (Form.Load), but there is no corresponding event that is fired AFTER the form has loaded.  I would like to execute some logic after the form has loaded.  Can anyone advise on a solution?


How to draw red wavy line under words in RichTextBox c# winform as normally seen in spelling errors( as in MS Word)? I don't want to use underline feature of RichTextBox

How can we produce the effect of the red line under a bad spelling word like the image below :    Update  I do not want to use Google or whatever spell program. I would like to know how to create the effect of the red line.


Is it possible to install Ubuntu on tablets and mobile phones by yourself? Just as you can with computers ?  I'd be interested in having a go because then I could integrate all my stuff.  Thanks for any replies.

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


We have a random variable $X$ that is distributed according to the Poisson distribution with $ \lambda$, such that $P[X=k]=e^{-\lambda}\frac{ \lambda^k}{k!}$ for $k=0,1,\dots$.  We want to show that probability that $X$ takes on an even value is $\frac{1+e^{-2\lambda}}{2}$.  I am thinking that the identities $e^{t}=\sum_{k=0}^{\infty}\frac{t^k}{k!}$ and $e^{-t}=\sum_{k=0}^{\infty}\frac{-t^{k}}{k!}$ could be used, namely through a system of equations, but I need help figuring out how to productively do this.

The probability $P(X=n)$ that an event X takes place $n$ times in a fixed period of time follows the Poisson distribution with parameter $\lambda$ i.e.  $$ P(X = n) = e^{-\lambda} \frac{\lambda ^ n}{n!}$$  I have to evaluate the probability that the event $X$ takes place an even number of times. I know that:   $$ P(X \text{ is even} ) = e^{-\lambda} \cdot \sum_{k=0}^{+\infty} \frac{\lambda^{2k}}{(2k)!}$$  but I can't solve the series.  I guess that I have to use the fact that $e^\lambda = \sum_{n = 0}^{+\infty} \lambda^n/n!$, but I got stuck.  How can I evaluate $P(X \text{ is even})$ (alternative solutions appreciated).


Suppose a moderator has politically incorrect "inclinations" as observed (fairly often) in, say, a chat room. In the event that a couple of users take offence at this, can another moderator possibly "deal with" (and not remove) the offending moderator?  By "deal with", I mean chat kicks, bans and such. Also, can this be done single-handedly or would it require the broad consensus of other moderators (who belong to the SE site the offending moderator is from) as well?  Additionally, in a such an event, can the kicked/banned moderator appeal this "verdict". If so, how would he go about it?    Note: This has nothing to do with any actual moderator out there. I'm (relatively) new to SE, so it's just a curiosity question.  The kind of "offending" moderator that I have in mind, is one who performs his duty pretty diligently, doesn't slack, and is fairly active... but can be a pain in the butt sometimes during chat. Opinions he expresses in chat aren't outright offensive, but they do tend to cause a stir. Hence this wouldn't warrant a removal, merely a kick or a chat ban.

This discussion informed our process for seven years, but eventually required updates and augmentation. For discussion regarding the successors to this process, please see:    Stack Exchange has some of the best Moderators around — seriously — and that is due in no small part to the communities who scrutinize and vote in our Moderator elections.  We have a rather formal process for electing moderators, but up until now  has been quite informal. On those rare, rare occasion when things just aren't working out, you can see why it becomes such a sticky business to remove someone from a democratically elected position. Our current process is one of "we've got your back." The Community Team routinely monitors moderator activities, so if a moderator violates the  or fails to uphold the , we can and do intervene. If the disputes and problems persist without resolution, eventually we can ask someone to step down. That's not good enough. We need a much more transparent and prescribed process for when — and more importantly how — to intervene when on-going problems are going unresolved. In urgent situations, we'll step in to protect a site, but ideally the process should be impartial and not subject to accusations of Stack Exchange simply applying undue influence over a community when the whim strikes. The Question: Before we start bouncing around ideas internally, I'd like to hear what you think. What process should be in place to add some checks and balances to deal with higher issues like possible impeachment of a moderator? When and how would such a process come into play? How should such situations be resolved? How do we keep it from being abused? Have at it. This is a round table vetting of ideas.


that severe multicollinearity is a problem because it can increase the variance of the coefficient estimates and make the estimates very sensitive to minor changes in the model. The result is that the coefficient estimates are unstable and difficult to interpret. What are the mathematical reasons for that phenomenon?

The wiki discusses the problems that arise when  is an issue in linear regression. The basic problem is multicollinearity results in unstable parameter estimates which makes it very difficult to assess the effect of independent variables on dependent variables.  I understand the technical reasons behind the problems (may not be able to invert $X' X$, ill-conditioned $X' X$ etc) but I am searching for a more intuitive (perhaps geometric?) explanation for this issue.  Is there a geometric or perhaps some other form of easily understandable explanation as to why multicollinearity is problematic in the context of linear regression?


I downgraded from 18.10 to 18.04 - and I got the same error as in this question     When I login it says:   Error found when loading /etc/profile: etc/profile.d/01-locale-fix.sh: line 2:/usr/bin/locale-check: no such file or directory  As a result the session will not be configured correctly.  You should fix the problem as soon as feasible.    The file is indeed not there. I can't apply the same solution because I do not have another Ubuntu laptop.   How/where can I find the missing file?   Thank you

After downgrading my Ubuntu from 18.10 to 18.04 when ever trying to login I am getting the following error:    And opening the terminal following error displays      bash: /usr/bin/locale-check: No such file or directory   How can I fix this error?


What is the reason behind hot water gets Freezes faster than normal water when we keep both the hot and normal water together in freezer ?

There is this puzzling thing that is called : paradoxically, warm (35°C) water freezes faster than cold (5°C) water.  As a physisist, I've been asked about it several times already. And I have no definite answer to that, apart from the standard: "there are many things that can influence it".  So, does anyone knows about the status or progress on that effect? Any recent reviews, publications or other references?


I need to find if set $I$ of all injective functions $\mathbb{N} \rightarrow \mathbb{N}$ is equinumerous to $\mathbb{R}$. Still, I have no idea how to work with set of functions, it's something new to me since I have only encountered sets of numbers before.

I learned that the set of all one-to-one mappings of $\mathbb{N}$ onto $\mathbb{N}$ has cardinality $|\mathbb{R}|$.  What about surjective functions and bijective functions?


I am trying to find titles and author of 1950s era short stories about a family of hillbillies with supernatural powers. One family member was called Cousin Lemuel. This is categorically NOT Ray Bradbury's Elliot Family.    These stories appeared in sci-fi pulp collections, possibly Amazing Stories, in the late 1950s and early 1960s. Any help greatly appreciated.

I'm trying to recall a story I read in the 1960s or 1970s, but which I suspect was older than that.  It was about a quasi-immortal family in the twentieth century who lived in a rural area and kept a low profile. It was a stand-alone story and only the family, and perhaps distant relatives, had unusual powers. I don't think they were aliens, just some offshoot of humanity.   They were of varying ages, ranging from relatively young to thousands of years old. They had lived in Europe before immigrating to the American colonies. Each person had a distinctive set of psi powers, ranging from the grandpa, pa, ma and son. I believe the youngest, just called Baby, was the most powerful and least human looking, and lived in the attic. He slept most of the time.  Nothing remains in my memory of the plot.  As I recall, the story had a Theodore Sturgeon feeling to it, with a humorous, ironic touch, but it probably wasn't his. I haven't been able to identify it from looking at a list of his works.  I probably read it in an anthology, but I might have seen it in an old magazine. I'm just not sure.  If anyone can help me identify it, I'd be grateful. Then I can scratch that mental itch.


Consider the piece of code.  \documentclass{article}  \newcommand{\hello}{Hello world!\vspace{12pt}Hello again!}  \begin{document}  \hello  \end{document}   This produces the following output.    Hopefully it is clear from the code that this is not the intended result.  Is there a way to permit \newcommands to add vertical spacing, or if not, is there another way to achieve the desired result?

I noticed an unexpected different line spacing of the titlepage what drives me crazy. The left page is the MWE, the right page without the \\ in front of Name.  \documentclass{scrartcl}  \begin{document}  \centering \Huge \textbf{UUUUUUUU UUUUUUUUU UUUUUUUUUUUUU UUUUUUUUUUUUU} \vspace{\baselineskip}\\ \textbf{UUUUUUUU UUUUUUUUU UUUUUUUUUUUUU UUUUUUUUUUUUU} {\rmfamily\Large \vspace{5\baselineskip}\\Name}  \end{document}     Any idea what causes this? Thanks alot!  Cheers, Stephan


I made two Leche Flan the night before last, each calling for 10 egg yolks...so, I was left with about 20 egg whites. I've stored them in the fridge in a tupperware container. How long are they good for? What can I make with them (other than scrambled egg whites and frosting)?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I'm wondering why this evaluates to True.  x = 1 if x is 1:     print "Does x and 1 point to the same object?"     print "Does this mean python doesn't store redundant values?"   It doesn't work for this case as I expect.  x = range(10) y = range(10) if not x is y:     print "I expect this"   My understanding is that is checks to see if two names are pointing to the same object.  Does this imply that python has a mechanism to avoid creating redundant values?

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


My child poured some water in my computer. The computer did not blow up or anything like that, it just lost connection with monitor. I shuted it down. I opened it, cleaned it without taking apart and dried some water I saw around.  I managed to start the computer for once but soon the windows screen broke into little squares like the graphics is breaking down or something. then it fell into blue screen and shut down.  Now it has problem to start. Whenever I start it, it runs for few seconds and then restarts itself, runs for few seconds and restarts itself and it restarts like this forever. When its starting, all the fans are running and the motherboard lights are up.  I took the components apart. I took the graphics out first to try if it would start without it, but it did the same thing. Now I guess some components are dead or faulty, but I dont know which. My best guess is motherboard, RAM and/or graphics, because I found some water on them or around them. But could it also be CPU? though it did not blow up and no water got close to CPU?  How can I determine which components are dead, which to replace?

I'd love some advice in repairing a water-damaged laptop.  My girlfriend spilled a glass of water on her Sony Vaio and now it doesn't turn on...at all...dead! What steps should I go through to work out where the problem is and which part(s) I'll need to replace?  I can't seem to find out what has happened by just looking at the circuit boards. I'm new to electronics but could buy relevant volt-meters etc. I'm just looking for a decent trouble-shooting guide.


I am creating a website for submissions. I want the users to register only with "abc.def@mycompany.com". I want to avoid e-mail ids such as @gmail, @yahoo, @hotmail etc during registration.  True: email should be @mycompany  False: email with @gmail, @yahoo, @hotmail  What should I do to achieve the result?  Thanks in advance

Hi I am working on a website for a student organization of my college.  In order to prevent spams, I have been looking for ways to limit account applicants only with email addresses from the college but haven't figure out how


Im facing the following issue on a new desktop machine:   I installed Win 10 Insider Preview made a fat32 Partition on a USB stick, extracted x64 ubuntu iso to it and set boot flag one ssd where win10 and ubuntu should be installed on (of course separate partitions)   Starting this USB stick in uefi works fine, but on Installation there is no option to install Ubuntu next to Windows. Even when I choose "something else" on Installation the whole ssd is displayed as "unallocated" although there is a windows partition which takes roughly half of the size of the ssd. The rest of the ssd is of course unallocated - so I started Disk Management on Win10 and made a NTFS Partition to make it visible for the installer.  But still Ubuntu does not even recognise one of the partitions.  (250GB SSD): and  (sorry can't post images directly here because of missing reputation)  C is my Windows system Partition and D is the new NTFs Partition I created of unallocated space with disk Management tool.  How can I access a Partition to install Ubuntu on without formatting the whole SSD? Any help is appreciated thanks in advance!

I'm having a problem installing Ubuntu, and Kali as well. I downloaded the iso from the official site & tried installing using USB. I also tried desktop installation, but the problem is same.  It shows a single drive i.e. my total Hard Disk and if I select it, it asks me to create a new partition & shows total space as FREE.  It's with all Ubuntu I downloaded, 11.10 Server, 12.10 and 13.04. I also tried to install BackTrack's new version Kali Linux but again I got the same problem.  I hope I meet thier system requirements. Here's my system details for your ease:   OS: Windows 7 Ultimate Processor: Intel P4 2.80 GHz RAM: 3GB Hard Disk: 320GB No of Local Drives: 4 (1 Primary, 3 Logical) Free Space: 195GB (about) Motherboard: G31 Cache: 1MB Help me, please.


I uninstalled my MiKTeX and now after re-installing the software, my scripts in the environment of the MiKTeX are not shown by colors.  I use TexWorks IDE.  for example, when you write \usepackage{} it is shown fully black while it used to be shown in blue color.  Entire the text is black. As another example, comments used to be shown in Green.  Which package should I install or which settings should I change in Texworks to do so?

any latex code I want to view in TexWorks 0.4.5 r.1280 (Miktex 2.9) won't show the syntax highlighting. It compiles just fine but everything line is written in black. On very long documents the highlighting shows for several seconds then the program freezes for short and the highlighting disappears again. Windows compatibility modes did not improve the situation. Does anyone have an idea what's going wrong here?


I am reading Hartshorne's Algebraic Geometry and on p. 5, in the proof of Proposition 1.5, there suddenly appeared the symbol $Z=(Y-Y_1)^-$ in the second paragraph. What does the symbol mean? This is supposed to make $Z=Y_2\cup\cdots\cup Y_r$ hold.

Hartshorne Algebraic Geometry Proposition 1.5 (page5) In a notherian topological space $X$, every nomempty closed subset $Y$ can be expressed as a finite union $Y=Y_1 \cup \cdots \cup Y_r$ of irreducible closed subsets $Y_i$. If we require that $Y_i \nsupseteq Y_j$ for $i \neq j$, then the $Y_i$ are uniquely determined. They are called the irreducible components of $Y$.    I understood the existence of such a representation. But I can't understand a sentence in  the uniqueness part, which I highlighted: Let $Y=Y_1 \cup \cdots \cup Y_r$ and $Y=Y'_1 \cup \cdots \cup Y'_s$ be two such representation. Then we can deduce that $Y_1=Y'_1$ (the details are in the textbook). Now let $Z=(Y-Y_1)^-$, then $Z=Y_2 \cup \cdots \cup Y_r$ and also $Z=Y'_2 \cup \cdots \cup Y'_s$.  What is the operator $^-$? I understood it as a closure, is it right? But then how can I deduce that $Z$ is represented as $Z=Y_2 \cup \cdots \cup Y_r=Y'_2 \cup \cdots \cup Y'_s$?


I'm using PostgreSQL 9.2.32, installed on CentOS 7 with Plesk, with a very small amount of tables (the tables are small too) and Vapor 3 as backend.  After a few hours, my server is out of memory, because PostgreSQL is eating it like pacman and i have no idea why and how to analyze this behavior.  Additionally, PostgreSQL has a very high cpu load.    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                4192 postgres  20   0  434784   9956   1176 S 400.0  0.2 262:06.80 pgsrv                                                                                2641 postgres  20   0  226292   9080   7976 S   0.0  0.1   0:00.12 postgres                                                                                2642 postgres  20   0  192604   1524    440 S   0.0  0.0   0:00.00 postgres                                                                                2644 postgres  20   0  226392   2952   1824 S   0.0  0.0   0:00.00 postgres                                                                                2645 postgres  20   0  226292   1968    856 S   0.0  0.0   0:00.03 postgres                                                                                2646 postgres  20   0  226292   1896    784 S   0.0  0.0   0:00.03 postgres                                                                                2647 postgres  20   0  227120   2996   1216 S   0.0  0.0   0:00.06 postgres                                                                                2648 postgres  20   0  194856   1796    588 S   0.0  0.0   0:00.10 postgres                                                                                3881 postgres  20   0  227612   5896   3624 S   0.0  0.1   0:00.00 postgres                                                                                3897 postgres  20   0  228260   7980   5428 S   0.0  0.1   0:00.05 postgres     Heres the line a few minutes before the server stopped working:  postgres  20   0 8488060   2,9g   2588 S   0,3 47,9   1:42.40 ps3351955702   Would be great if someone has an idea to solve this issue.  Edit: output of pg_stat_activity  1   16458   test_lmmaps 3881    16460   lmmaps      139.xx.xx.xx    null    49526   2018-07-10T10:37:10.999Z    null    2018-07-10T10:37:11.246Z    2018-07-10T10:37:11.246Z    false   idle    SELECT * FROM "fluent" WHERE ("fluent"."name" = $1) LIMIT 1 OFFSET 0 2   16458   test_lmmaps 3897    16460   lmmaps      139.xx.xx.xx    null    49542   2018-07-10T10:38:51.000Z    null    2018-07-10T12:08:51.078Z    2018-07-10T12:08:51.080Z    false   idle    INSERT INTO "locations" ("longitude", "id", "createdAt", "latitude", "tourID", "loadno", … 3   12924   postgres    6900    16460   lmmaps      46.xx.xx.xx     null    56518   2018-07-10T12:14:21.512Z    null    2018-07-10T12:14:23.465Z    2018-07-10T12:14:23.466Z    false   idle    EXPLAIN SELECT * FROM pg_stat_activity ; 4   12924   postgres    6901    16460   lmmaps      46.xx.xx.xx     null    56519   2018-07-10T12:14:24.745Z    2018-07-10T12:14:24.796Z    2018-07-10T12:14:24.796Z    2018-07-10T12:14:24.796Z    false   active  SELECT * FROM pg_stat_activity

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I want to create a new ubuntu iso, with extra packages like mysql, pip, etc  I want to install ubuntu on all computers of our computer lab(around 300 computers). for various courses, a set of packages need to be installed. The lab has very slow Internet connection. So i'm looking for a way to create a new ubuntu iso with extra packages?

I would like to customize Ubuntu live CD by installing some additional packages. I have followed   but it doesn't seems to work. Can anyone provide clear instructions?   Note: I do not prefer Remastersys, manual way will be appreciated.  Customization  Packages that I want to install:   Thunderbird    Samba    SSH       Changes that I need:   Remove Games menu from the Application menu Firefox shortcut on Desktop Radiance as the default Theme Different default Ubuntu Wallpaper   Configuration file changes   I want the panel to be placed at the bottom I want to paste my Samba configuration file instead of default Samba configuration I have few Firefox shortcuts and folders I would like to show that in Desktop Also it will be nice if you say me how to change the icon sets   Recent Updates   I have customized Ubuntu 10.10 with Firefox shortcuts and few folders on desktops. Everything went smooth. But the installer gets crashes after choosing the timezone. How do i fix this issue? Also setting wallpaper affects the login screen. The wallpaper which i set is displayed on the login screen also. I just want the default one for the login screen.


Where can i find a vanilla version of that file, i find it really odd that in dosent come up when you search it on google and such  The link in the answer for a similar question does not exist ("")

I'm using Ubuntu Gnome 16.04.1 and want to resize the icons in the dash. Therefore I wanted to edit the file /usr/share/gnome-shell/themes/gnome-shell.css  This file does not exist, but rather the file "gnome-shell.css.save", which I can't open. Any ideas?  And is this even the right file to change the icon size? I am not talking about the desktop icons, but the icons the the dash.  I know there have been lots of similar questions, but I googled all night and couldnt find the right answer.  Thanks a lot.


So, as the title suggests, I want to fill JUST inbetween the inner and outer circles, but whenever I fill them in, it'll fill in that inner circle, something I don't want, I've tried different selections of vertices and edges, but it still fills everything in. Any help is appreciated

There's a way to fill with faces only the area between the larger circle and the the smaller one? I mean.. It's a wheel and I'm trying to fill the rubber part of it.  Using the fill function F it fills everything inside the bigger circle.


Let $S$:$V$→$W$ and $T$:$V$→$W$ be linear transformations. Given a in  ℝ, define functions $(S+T):V→W$ and (a$T$):$V→W$ by $(S+T)$(v)=S(v)+T(v) and (a$T$)(v)=a$T$(v) for all v in $V$. Show that $S+T$ and a$T$ are linear transformations.

Let  $S:  V \to W$ and $T: V \to W$ be linear transformations. Given $a$ in $\mathbb{R}$, define functions $(S+T): V \to W$ and $(aT): V \to W$ by $(S+T)(v)=S(v) + T(v)$ and $(aT)(v)= aT(v)$ for all $v$ in $V$. Show that $S+T$ and $aT$ are linear transformations.


Many times people share their email to another user in the chat room, for personal purposes and even for community purposes, for instance: translation coordination (all this happens at least in Stack Overflow en Español chat room).  I would like to have a option that allow me to send my email address to a specific user, something like Share email with....   This would be useful in order to prevent my email being recorded in the room or published via RSS.   It would be a private way to share my real private email address that Stack Overflow already has in my profile.     It is different of the duplicate-candidate question because: I just want send my email, not private messages. I understand that private messages is never going to be implemented here and that is the main reason why I am asking this feature: to send just the email without need to send a private message that Stack Overflow already knows.

(As discussed ) Despite Jeff being against it, I suspect that people are going to carry on asking for private/direct messaging. The main reason invoked that I have seen is being able to send other people 'private' contact details. I think that if you satisfy that need, it might remove some of the strength of the demand. Idea: people could enter their contact details once in their profile, then you'd have a special syntax/button for making them visible to a specific user. (This is more of a feature-suggestion than a feature-request, but I didn't want to create another tag)


Is it possible that the published app is not signed by its developer andd if yes, How can we find out who is the app developer?

The latest update of Google Maps is unavailable in my country, so I downloaded a version by googling for "Google Maps 5.4.0 apk".  I did in fact find it, but now I wonder how I can tell if this is in fact the same version as in the market.  How can I be sure that it hasn't been tampered with? Are apps signed in any way? Is there any way of checking the signatures?


I have a simple program to test exit codes:  int main() {      return 2000; }   In the terminal if I run the program then type:  echo $?   the terminal replies with 208. What? Why would it do that?

If yes, on which operating system, shell or whatever?  Consider the following java program (I'm using java just as an example, any language would be good for this question, which is more about operation systems):  public class ExitCode {     public static void main(String args[]) {         System.exit(Integer.parseInt(args[0]));     } }   Running it on Linux and bash, it returns always values less equal 255, e.g. (echo $? prints the exit code of the previous executed command)  > java ExitCode 2; echo $? 2  > java ExitCode 128; echo $? 128  > java ExitCode 255; echo $? 255  > java ExitCode 256; echo $? 0  > java ExitCode 65536; echo $? 0     EDITED: the (only, so far) answer below fully  explain what happens on UNIXes. I'm still wondering about other OSes.


We are looking for suggestions on which hosting and server to use for our app that allows us to upload content (images/videos) which is viewed by our users on their smartphones. The videos are in MP4 format and 10 seconds on average to a minute long.   This is the first time we've done something like this and we need suggestions on a which hosting to use and also which dedicated server   We are planning on using a CDN like Amazon Cloudfront to deliver the multimedia so we dont have to worry about using a lot of server resources streaming the videos or images.   The server will be mainly used to   Upload and store images and videos  Host a mysql database Be used as a backend (PHP) Upload the content to the CDN as required    I'm thinking of this set up for the server    Ubuntu nginx  PHP 7 Mysql 5.7   I have a $150/month budget for a server. This is the first time I've done something like this so suggestions are welcome and apperciated.   We had a beta test that had thousands of users download our app so we believe we will initially have about 25,000 users and double that by month two.   Most of our users are from North America and Europe

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


Was lent a book a few years ago.  May have been part 1 of 2 or 3.   Humans identify a star system which is quarantined; surrounded by some sort of shield or force field. Within the shield boron fusion-powered spaceships operate.  The central character from early on in the book is an alien life form which is formed of four (I think) individuals who grow together / combine to form a compound intelligence but lack the ability to move; they have unintelligent drone lifeforms which can move and obey commands.  They're implacably hostile to all other life forms, hence the quarantine; it wasn't to keep others out but to keep this race in.  The compound life form continues to grow by assimilation; can't remember its name but it includes "Mountain".  A human exploratory team is captured and dissected by the drones as "Mountain whatever" tries to work out the nature of the threat.

Desperate to locate and re-read exceptional book/series, but cannot remember the title. The high concept: The U.S. has just sent the first successful expedition to Mars, and it has just landed. As the astronauts make their initial exploration outside their ship, a tear in the fabric of space opens up right in front of them, and they look through to the insides of a laboratory (at a California university?) and two students who just figured out how to create arbitrary portals between two points in the Universe. The rest of the novel/series is a consequence of this breakthrough. But I can't remember the author and title(s). Surely someone reading this forum will remember it well! TIA.  (Reposted .)


I have a list a:  a = [45,2, ... ,123,98]   How can I convert all numbers to three-digit numbers by adding zeros in front of one or two-digit numbers? This would create a new list like:  b = [045,002, ... , 123,098]

Given: a = 1 b = 10 c = 100  How do I display a leading zero for all numbers with less than two digits? This is the output I'm expecting: 01 10 100


Backstory: I'll start this off by saying my reputation is at 1 for a reason.  Not disputing that.  My main concern is the manner in which this happened.  It's readily apparent that at least two users were involved in deliberately lowering the total number of reputation on my accounts across unrelated questions.  The users in question deliberately down voted several questions/answers of mine which were asked/answered years ago.  This was done across multiple boards on the same day in hours.  Proposal: If the same approach were used with a larger group of people on a member who they wanted to target, would the approach work on a target with significantly higher reputation then the group in total?  Obviously the amount of damage that can be inflicted on the target increases as their number of interactions with the community increases.  Mathematically would this vector of attack be feasible?  And if so how can such an attack be prevented?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


If I have an object:      w = {'A'}   how do I test if this is a set or not?

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


I am new to ubuntu.Frequent password authentication while downloading any software in ubuntu is frustrating.Is there any way to remove it ? thanks in advance.

I'd like Software Center, Update Manager and some other system management applications to work without asking for password (like sudo does if configured with NOPASSWD) but only asking for a confirmation instead, or even without any confirmation. At the same time I wouldn't like to use no user password at all. Is this reachable?


I have the following code:   \documentclass{book} \usepackage{tikz} \begin{document} \begin{tikzpicture}  \draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm); \draw [color=white,fill=white,fill opacity=1.0] (-0.66,1.71) circle (1.92cm); \draw [shift={(-0.05,2.21)},color=red]  plot[domain=2.01:4.03,variable=\t]({1.*1.40*cos(\t r)+0.*1.40*sin(\t r)},{0.*1.40*cos(\t r)+1.*1.40*sin(\t r)}); \draw [shift={(-1.60,0.27)},color=red]  plot[domain=-0.48:0.92,variable=\t]({1.*1.08*cos(\t r)+0.*1.08*sin(\t r)},{0.*1.08*cos(\t r)+1.*1.08*sin(\t r)}); \draw [shift={(-1.26,1.06)},color=red]  plot[domain=-1.12:0.68,variable=\t]({1.*1.43*cos(\t r)+0.*1.43*sin(\t r)},{0.*1.43*cos(\t r)+1.*1.43*sin(\t r)}); \draw [shift={(0.42,3.0)},color=red] plot[domain=2.72:4.215,variable=\t]({1.*1.18*cos(\t r)+0.*1.18*sin(\t r)},{0.*1.18*cos(\t r)+1.*1.18*sin(\t r)});   \end{tikzpicture} \end{document}   And I want to color red the thing in center. I've read  and do:   \documentclass{book} \usepackage{tikz}  \tikzset{ saveuse path/.code 2 args={     \pgfkeysalso{#1/.style={insert path={#2}}}%     \global\expandafter\let\csname pgfk@\pgfkeyscurrentpath/.@cmd\expandafter\endcsname     % not optimal as it is now global through out the document     \csname pgfk@\pgfkeyscurrentpath/.@cmd\endcsname     \pgfkeysalso{#1}}, /pgf/math set seed/.code=\pgfmathsetseed{#1}}  \begin{document}         \begin{tikzpicture}         \begin{scope}                \clip [saveuse path={plot path}{plot[smooth, samples=100, domain=2.01:4.03,variable=\t]({1.*1.40*cos(\t r)+0.*1.40*sin(\t r)},{0.*1.40*cos(\t r)+1.*1.40*sin(\t r)}) }]-- (0,0) --(0,2) -- cycle;          \clip [saveuse path={plot path}{plot[smooth, samples=100, domain=-0.48:0.92,variable=\t]({1.*1.08*cos(\t r)+0.*1.08*sin(\t r)},{0.*1.08*cos(\t r)+1.*1.08*sin(\t r)}) }]-- (0,0) --(0,-1.5) -- cycle;          \clip [saveuse path={plot path}{plot[smooth, samples=100, domain=-1.12:0.68,variable=\t]({1.*1.43*cos(\t r)+0.*1.43*sin(\t r)},{0.*1.43*cos(\t r)+1.*1.43*sin(\t r)}) }]-- (0,0) --(0,-1.5) -- cycle;          \clip [saveuse path={plot path}{plot[smooth, samples=100, domain=2.72:4.215,variable=\t]({1.*1.18*cos(\t r)+0.*1.18*sin(\t r)},{0.*1.18*cos(\t r)+1.*1.18*sin(\t r)}) }]-- (0,0) --(0,2) -- cycle;            \end{scope}         \draw [plot path];         \end{tikzpicture}             \end{document}   But it don't work. How can I solve this? *Please not xelatex

I'm writing a manual for a class, and I never liked add images as files in my tex, so I'm drawning the logo with this code:   \documentclass{article} \usepackage{tikz} \begin{document} \definecolor{xdxdff}{rgb}{0.5,0.5,1.} \definecolor{qqqqff}{rgb}{0.,0.,1.} \definecolor{cqcqcq}{rgb}{0.75,0.75,0.75} \begin{tikzpicture} \clip(-4.42,-1.90) rectangle (8.03,4.69); \draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm); \draw [color=white,fill=white,fill opacity=1.0] (-0.66,1.71) circle (1.92cm); \draw [shift={(-0.05,2.21)},color=red]  plot[domain=2.01:4.03,variable=\t]({1.*1.40*cos(\t r)+0.*1.40*sin(\t r)},{0.*1.40*cos(\t r)+1.*1.40*sin(\t r)}); \draw [shift={(-1.60,0.27)},color=red]  plot[domain=-0.48:0.92,variable=\t]({1.*1.08*cos(\t r)+0.*1.08*sin(\t r)},{0.*1.08*cos(\t r)+1.*1.08*sin(\t r)}); \draw [shift={(-1.26,1.06)},color=red]  plot[domain=-1.12:0.68,variable=\t]({1.*1.43*cos(\t r)+0.*1.43*sin(\t r)},{0.*1.43*cos(\t r)+1.*1.43*sin(\t r)}); \draw [shift={(0.42,3.0)},color=red] plot[domain=2.72:4.22,variable=\t]({1.*1.18*cos(\t r)+0.*1.18*sin(\t r)},{0.*1.18*cos(\t r)+1.*1.18*sin(\t r)}); \end{tikzpicture} \end{document}   which gives me this image   How can I color red the thing in middle?


# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package.  # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022  # if running bash if [ -n "$BASH_VERSION" ]; then     # include .bashrc if it exists     if [ -f "$HOME/.bashrc" ]; then     . "$HOME/.bashrc"     fi fi  # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then     PATH="$HOME/bin:$PATH" fi   Can anyone explain the contents of the ~/.profile file? So when you enter into the ~/.profile file what does all the writing mean?

On a server when I login as root I see .bashrc (Ubuntu 10.10).  On my Mac I have a .bash_profile  Does Ubuntu always have only a .bashrc file and not .bash_profile? (I'm just confused, so asking, I realize they are different o/s's but maybe there is a relationship somehow?)  On my server, I want to create an alias, should I put it in .bashrc?  What if I want this alias to be applied so all users can use it?


I would like to automate a script that regularly runs rsync, and rsync prompts for my ssh key password each time I run it.  I don't mind typing the password once at the beginning of the script. I can't be prompted each time it runs an rsync command in a loop.  Is there a clean, safe way to prompt for the password once and continue using it?  My assumed solution would be to prompt for the password somehow (not sure how to do that off the top of my head) and store it in an environment variable, then use expect to make use of it. But I feel like there might be an easier approach that I'm not aware of.

I got a bash script to synchronize data between two computers. It works fine but I have to type my password every time the rsync command is called.   #!/bin/bash  sourceIP="192.168.178.128" sourceUser="user1" destinationUser="user2"  function sync() {      rsync --archive --progress -v -e "ssh -l $sourceUser " $sourceIP:/home/$sourceUser/$1/ /home/$destinationUser/$1 }  sync Pictures sync Music sync Videos sync Documents   How to store the password (via prompt) in a variable and pass it to rsync/ssh?


Im not asking how to install windows 7 I just wanna know if you could install windows first while ubuntu in your system before deleting ubuntu

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I installed Windows 8 and Linux dual boot on UEFI system. Windows 8 recognizes Linux (btrfs) partitions as unformatted D: and E: and offers to format them when I accidentally click on them. I'm used to that Windows doesn't see Linux partitions, at all.  Windows 8 doesn't recognize Linux ext4 pattitions on my laptop with (MSDOS table and MBR boot mode). Is it the partition table or the boot mode or why is that happenig?

I installed Linux Mint in 2 partitions: / and /home  Windows 8 is under UEFI boot mode.  How to hide those linux partitions in Explorer?    When I click on them:


I'm new to linux world, and I'm trying to set up a computer for a small office on a quite old computer.  I setup Lubuntu with some office apps (LibreOffice, ...) and it's working.  I'm now trying to setup a remote access for administrative support and/or user assistance.  SSH is setup and is working. I'd like also a remote GUI access. My bet is that VNC is the answer. But it's not as easy as windows to allow remote access (a single checkbox!). So my question are:   I installed tightvncserver, but there are plenty of vnc server software. Which one is suited? now I've setup tightvncserver, I also created an /etc/init.d/vncserver script to always run tightvncserver. This is working, I can remotely access the computer. However, I can no more login to the computer locally :(. Each time I try to log, the screen blink, some text scroll and the login prompt reappears. when accessing remotely, I only have the vnc password to type. I don't have the user's prompt.   Basically, I'd like to mimic the behavior of teamviewer. I'd like to replicate the screen, whether or not a user is loggued in. And it's where I'm stuck.  Thx for any help

Is it possible to remotely (via ssh) make a login to GDM? I'll explain a situation in which I'd need this: I'm on my laptop and connect to my desktop via ssh. I realize there are some updates available. I install them all, but I need to reboot the computer. The problem is that once the desktop has rebooted, there will be no GDM session available, since it's necessary to log in. Can I somehow perform the GDM login remotely from my laptop?  Edit: I can't find FreeNX for Maverick, and I haven't been able to configure x11vnc + vncviewer to work. Isn't there an easy way?


Show that if $f,g:\Bbb{N}\to \Bbb{C}$ are multiplicative, then so is $f*g(n)=\sum_{d|n}{f(d)g({n\over d})}$.   What I did is: Let $m$ and $n$ be co-primes. $m's$ divisors=$\{1,m_1,...,m_s,m\}$, $n's$ divisors=$\{1,n_1,...,n_r,n\}$, therefore:  $f*g(mn)=f(1)g(mn)+f(m_1)g({mn\over m_1})+...+f(m_s)g({mn\over m_s})+f(m)g({n})+f(n_1)g({mn\over n_1})+...+f(n_r)g({mn\over n_r})+f(n)g({m})$.   Denoting ${m\over m_i}=m_i'$ and given $f,g$ are multiplicative:  $f*g(mn)=f(1)g(m)g(n)+f(m_1)g(m_1')g(n)+...+f(m_1)g(m_s')g(n)+f(m)g({n})+f(n_1)g(n_1')g(m)+...+f(n_r)g(n_r')g(m)+f(n)g({m})$.  Now, the problem is when I try to calculate $(f*g(m))\cdot (f*g(n))$: there are many factors of which I can't get rid!  I would appreciate your help a lot.

Prove that if $f$ and $g$ are multiplicative, then so is  $$F(n) = \sum_{d|n} f(d)g\left(\frac nd\right) $$  I have an understanding of how to prove it for a single function, but 2 functions and a summation added in confused me.


There was a  on Stack Overflow that I was following because I was trying to troubleshoot the issue and was interested to know the answer.   The question seemed perfectly fine to me (and there were no downvotes either), and there were a few others along with me trying to figure out the problem. However, all of a sudden the OP decides to remove the question.   Now I am deprived of the opportunity to find out the answer, and I cannot recreate the problem and try to solve it myself.   So I'm just wondering if there is/should be any policy on OPs deleting their posted questions in such circumstances.

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


How many reflexive relation are there on a set with n elements ?

Problem:  If a set $A$ has $n$ elements in it, how many reflexive relations can be defined on it?  My solution  Is the answer  summation of (n^2 - n)C(i)  for i=0 to n^2 -n  $$\sum_{i=0}^{n^2-n} C(n^2-n,i) = \sum_{i=0}^{n^2-n} \binom{n^2-n}i$$  How? well if i make a matrix $n\times n$  now the diagonal elements have to be selected,out of remaining $n^2-n$ any number of elements can be selected.


I'm writing this question because I love Stack Exchange, but I'm a little discouraged from what is happening recently :( I'm making very useful questions and the answers the people give to me are amazing. But... The problem is (for me) that for the past two months I haven't received any upvote; conversely those who respond have three upvotes easily... My questions are full of images and even GIF images to try to explain where my problem lies. I always try to make sure that they understand where the problem lies without having to make an effort to read my mind. But it seems that everything is useless, because no one gives me an upvote. Ok, I'm happy because I have an answer, ...but if you answer the question, couldn't you also give me an upvote maybe?  So what could I do to have some upvotes? What changes have you made to make your questions more meaningful and pleasing to the answering audience?  All ideas are welcome. Also only to find out if you too are having this problem or not... Thanks for the attention.

Most users seem to vote mostly on answers. How can users be encouraged to vote on the questions as well? (This was discussed in podcast 62.)


Component.set is throwing an error when attempting to set an array of sObjects to a named attribute.    Markup  <aura:component controller="QuoteLineAuraController" implements="flexipage:availableForAllPageTypes,force:hasRecordId">      <!-- Event Handlers -->     <aura:handler name="init" value="{!this}" action="{!c.initAction}" />      <!-- Attributes -->     <aura:attribute name="recordId" type="Id"/>      <aura:attribute name="masterContracts" type="MasterContract__c[]"/>  </aura:component>   Javascript Controller  ({     initAction : function(component, event, helper) {         helper.getMasterContracts(component);     } })   Javascript Helper  ({     getMasterContracts : function(component){          var apexMethodCall = component.get("c.getMCs");          apexMethodCall.setCallback(component, function(apexMethodResult){             component.set("v.masterContracts", apexMethodResult.getReturnValue());         });          $A.enqueueAction(apexMethodCall);     } })   Apex Class  public class QuoteLineAuraController {      @AuraEnabled     public static MasterContract__c[] getMCs(){         return [select Id, Name from MasterContract__c limit 10];     } }

i'm trying to set a list of string to an aura:attribute and i get this error:     Uncaught rerender threw an error in 'markup://aura:expression'   [info.$component$.$isValid$ is not a function]   that's the attribute:  <aura:attribute name="parents" type="String[]"/>   i call this function in js:  test: function(component){     var action = component.get("c.test");         //Set up the callback         var self = this;         action.setCallback(this, function(actionResult) {                   debugger;             component.set("v.parents", actionResult.getReturnValue());         });                 $A.enqueueAction(action);    }   and thats the function:  @AuraEnabled public static List<String> test(){     String[] a = new String[]{};     a.add('1');     a.add('2');     return a; }   please help Thanks


We know that the $v-t$ graph for constant acceleration is a straight line. But when the speed becomes comparable to $c$, the speed of light, relativistic effects come into play. Suppose if a rocket on earth starts from rest (A) with constant acceleration or (B) with increasing acceleration. Since, there is acceleration in both the cases speed will increase but it will never reach $c$ which means that acceleration has to decrease from somewhere. Then the graphs looks like these:    I tried to obtain an expression for the acceleration by using the inverse Lorentz transformation equations in STR.In STR the $v$ in $\gamma=\frac{1}{\sqrt{1-\frac{v^2}{c^2}}}$ is constant. But in this rocket example this $v$ is itself changing and so I treated it as a variable. Let the rocket be $S'$ and the earth be $S$ and $S'$ be moving along $x$-direction. Now to see from $S$ how $S'$ is accelerating, I took a fixed position in $x'$-axis. For simplicity, I took its origin i.e., $x'=0$ so that $x=vt'\gamma$. Then I differentiated $x$ with respect to $t$, substituted $t'$, substituted $\frac{dt'}{dt}$ and tried to get an expression for $\frac{dv}{dt}$. But the result I got does not make sense.I am not familiar with GR so I thought this must be explained in GR and I searched in the Internet if there is any such formula but did not find any. Is it the wrong way I am going? If it is there in GR to which I am not familiar, I seek a brief explanation of how acceleration is understood in GR, if possible.

A question has recently come up that goes beyond my knowledge of special relativity.  Suppose a pilot has his foot on the gas pedal of a rocket ship and keeps it applied to achieve a constant acceleration, and he has a magical engine that can maintain the thrust needed to accomplish such acceleration even as the vehicle acquires mass.  He measures his acceleration at periodic intervals and sums it up as he goes.  Observers perceive the rocket to increase in speed and gradually approach the speed of light (but never reach it). Two possibilities are being debated for what the pilot observes, and my preference is for the first:   Time dilation gives him the impression that the summation of his readings are approaching light speed at a constant rate, but there is an asymptote involved here even in the inertial frame such that he never actually perceives himself to reach, let alone exceed, $c$, because time slows down to a crawl (as seen from the reference frame) before this can happen. Although to observers he is only approaching $c$, it is possible for the summation of the measurements on his accelerometer to indicate that he has surpassed $c$ and is now traveling faster than light.  From the reference frame he is approaching $c$ and his instruments in the inertial frame tell him that he has surpassed it.   I assume (1) is true beyond a doubt?  If so, is there a straightforward explanation for this?


Sorry for my english I'm french :D,  Okay, i use pdo for my connexion with MySQL, but i have one error with PDO prepare statement.  I try to include my table name into the prepare request but i have an error :  Error : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''NbClient' LIMIT 2) as sr' at line 1 Error Code : 42000   My code :   <html>     <head>     </head>      <body>     <?php      const HOST='localhost';     const DBNAME='GameWave';     const USER='';     const PASSWORD='';     const TABLE='NbClient';      echo GetNbClientByHour(2);       function GetNbClientByHour($nb_heure)     {                $hookConstTable = TABLE;           try         {             $pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;             $connexion = new PDO('mysql:host='.HOST.';dbname='.DBNAME, USER, PASSWORD, $pdo_options);              $prepare=$connexion->prepare('select SUM(record) from (select v_tot as record from :tab LIMIT :nb_heure) as sr;');             $prepare->bindParam(':tab', $hookConstTable, PDO::PARAM_STR);             $prepare->bindParam(':nb_heure', $nb_heure, PDO::PARAM_INT);             $prepare->execute();              $resultat = $prepare->fetch();             $prepare->closeCursor();              return $resultat[0];         }                     catch(Exception $e)         {             echo 'Error : '.$e->getMessage().'<br />';             echo 'Error Code : '.$e->getCode();         }     }     ?>     </body> </html>   But if i try to write table name in request, its work ...  $prepare=$connexion->prepare('select SUM(record) from (select v_tot as record from NbClient LIMIT :nb_heure) as sr;'); $prepare->bindParam(':nb_heure', $nb_heure, PDO::PARAM_INT);   Could you help me please ?

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


The RHEL7 supplied tomcat package supports multiple instances through the creation of directories and symlinks. Once such a multiple instance is created and packaged as an RPM, the extra instances fail to start due to selinux failures.  The solution is configure selinux correctly in the RPM packaging, however I am struggling to find a canonical description of how to do this.  Where does the selinux configuration come from when tomcat is installed in RHEL7?  Edit: the question at , had anyone bothered to actually read it, referred to the obsolete RHEL4 and RHEL5 distributions, and is 7 years old. As clearly stated in this question, this refers to RHEL7 in 2018. The answer to the 7 year old question, and the answer to this one are very different from one another.

I am trying to build an RPM that targets RHEL4 and 5. Right now I call chcon from %post but multiple Google entries say "that's not how you are supposed to do it" with very limited help on the right way. I've also noticed that fixfiles -R mypackage check says the files are wrong when they are right (as expected; the RPM DB doesn't realize what I want)..   I specifically say RHEL4 because it does not have semanage which seems to be one of the proper ways to do it. (Add a new policy and then run restorecon on your directories in %post.)   I also don't need my own context, just httpd_cache_t on a non-standard directory.  I have also seen "let cpio take care of it" - but then I have a new problem that a non-root RPM building user cannot run chcon on the build directories. I cheated and had sudo in the spec file but that didn't seem to matter anyway.


i am asked for the password for root to edit my account settings,upgrade,especially for authentication,but i am not a sudo user.so i don't know how to solve this password asking problem  if i enter any sudo command,it gives the following as result  deepak@deepak-Inspiron-3542:~$ sudo aplay -l [sudo] password for deepak:  deepak is not in the sudoers file.  This incident will be reported. deepak@deepak-Inspiron-3542:~$ sudo -l [sudo] password for deepak:  Sorry, user deepak may not run sudo on deepak-Inspiron-3542. deepak@deepak-Inspiron-3542:~$   this are the results when i run sudo commands.in such a situation i don't know how to tackle this password problem.so i need help to find out the password for root.

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox.  This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command:  sudo usermod -G vboxusers stephane   This is a problem.  I now see what I should have run instead is:  sudo usermod -aG vboxusers stephane   The end result is I'm no longer in the groups I should be in.  Including whatever group is required to run "sudo".  When I run any command as sudo now, I get the following:  $ sudo ls [sudo] password for stephane:  stephane is not in the sudoers file.  This incident will be reported.   Is there a way to fix this, or do I need to re-install from scratch again?


While the time to wait makes sense when something is wrong with the content of the question, it makes no sense when more than five tags were used. I mean, no one will need 50 seconds to delete a few tags.   App version: 1.0.85

Waiting 60 seconds every time I make a mistake when posting a question with the Android app is a pain. Couldn't this delay be lowered to some more user-friendly delay?        (mistake = e.g. forgetting a compulsory tag)


I have created a couple of Fluid Apps to run Google Calendar and Gmail.  These work fine except that web links launched from them also launch in Fluid itself, rather than in my default browser, which is Chrome.  This is a problem as a lot of the G-Suite stuff doesn't work well in the fluid browser (e.g. google doc links give javascript errors).  How can I get my Fluid gmail app to open links in the system default browser rather than in the Fluid browser?

My default browser is Safari. I would like to open all Google Meet links (e.g. https://meet.google.com/xxx-xxxx-xxx) to open in Google Chrome. I open these links from a calendar event in Apple's Calendar app.  How can I make these kinds of links open in Chrome instead of Safari?


I'm trying to merge together two parts (the ones in the images) of a model using a boolean (union) modifier, but I get an error saying "Unable to execute boolean modifier". I browsed around a little but couldn't really find an answer which worked in my case, so I'm wondering how I can get the boolean modifier to work ~

I'm trying to model an , but it's not going so well when it comes to the magazine of the weapon.   Next to the magazine is a mesh. I want to cut holes in the mag with that mesh. But the magazine just goes invisible or connects with the mesh when trying to execute the Boolean Modifier. I have tested to invert the normals and some other stuff, but it isn't working.


It is true that under equilibrium condition, no matter what pivot point one choose, the resulting net torque will always be zero. I wonder if this principle apply to non-equilibrium scenarios as well, namely, the net torque of the system being the same regardless of choice of pivot point? For example, if we put a sphere on a inclined smooth ramp, we would expect the sphere to slip down the ramp without rolling. However, if we choose the point of contact between the sphere and the surface of the ramp as the pivot point, we will have a torque due to gravity. Apparently this contradicts our assumption. What's the mistake here?

I've heard it from two teachers and saw a task with a solution based on this assumption:     If the net torque is zero when measured from one frame of reference, it is equal to zero   in all other frames of reference   This actually seems clear, especially if you put it to simple words like:     If a body doesn't rotate from one point of view, it won't start rotating if you look at it    from another point of view   Still, I wanted to test it and made such an image:   I calculated the net torque measured from point A (I'll skip the designations such as $m_1, r_1, m_2$ etc. and get to the value):  $$1m\cdot1N + 5m\cdot1N - 4m\cdot1.5N = 0$$  Now, let's calculate the net torque from B:  $$-2m\cdot1N + 2m\cdot1N - 1m\cdot1.5N = -1.5Nm$$  From this it seems, that the body doesn't rotate around an axis in A, but does around the axis in B.


So from the title itself. I have an initialize object like say  "travellerDetails": {         "traveller_1": {                "Full Name": "",                "Gender": "",      }, "traveller_2": {               "Full Name": "",               "Gender": "",     }, "traveller_3": {                "Full Name": "",                "Gender": ""     }  }   However, when I load my data object from an Ajax call  "travellerDetails": {             "traveller_1": {                    "Full Name": "John Doe",                    "Gender": "M",          }, "traveller_2": {                   "Full Name": "Jane Doe",                   "Gender": "F",         }     },    I get an error when I try to store the loaded data to an initialize object.  bookingForm.travellerDetails = data.travellerDetails;   I was expecting that traveller_3 will be set as "" considering that I only have 2 travellers when loaded. But when the initialize object is the same size as the one I loaded from an ajax call my code runs perfectly. So how do I copy the loaded object to the initialize one with different sizes?  Thanks!

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


I am very much a software person and a rookie in electronics.   I am trying to understand why do we need Diode D1 in the diagram explained in this post:     I understand the need to the transistor to protect the GPIO pin; however, do we actually need D1? Is it a nice to have or if I don't use it, I damage my PI?  Thank you,

In most electrical circuits with a relay, a diode is connected in parallel to the coil of the relay. Why? Is it always a good practice?


The brand new 16.04 final does not boot from USB stick:  Missing parameter in configuration file. Keyword: path gfxboot.c32: not a COM32R image boot :   I made a boot stick with Startup Disk Creator on 14.04 LTS on a Lenovo laptop.  I repeated this process on another computer (Gigabyte Brix) with a another 16.04 image (downloaded from another location) and a different USB stick. Also this computer didn't boot.   Upgrading from 14.04 LTS to 16.04 LTS is probably the most common scenario. How on earth did this get through beta testing??   Edit: in 14.04 LTS there was a similar issue:

I downloaded Ubuntu 14.04 (64 bit) lts. I made a bootable usb stick. But I keep receiving this error message upon booting:  SYSLINUX 4.04 EDD 20110518 Copyright (C) 1994-2011 H. Peter Anvin et al Unknown keyword in configuration file: gfxboot.c32: not a COM32R image


I am adding #show_data button dynamically, but not able to use jQuery on that button. Hi! data is never logged How do I add Scripts to dynamic elements?        <button id="show_fields">Show Fields</button>

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


What's a simple/easy way to access the system clock using Java, so that I can calculate the elapsed time of an event?

How do I get a method's execution time?   Is there a Timer utility class for things like timing how long a task takes, etc?     Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.


I came across a question on brilliant.org where it had been mentioned that $X, X + 2, X + 4$ are all prime numbers for $X = 3$. So is there any other $X$ for which $X, X + 2, X + 4$ are all primes and the answer was no.  So, can we say that there cannot be infinite number of prime triplets separated by $2$.   Please explain why?

I need help with this question: There are infinitely many prime numbers $p$ for which $p + 2$ and $p + 4$ are also primes.  Where should I start? what proof techniques will be useful?  Any input will be very useful to me.


I own a small web design company and most of our backlinks come from having a link on our client sites, I am just wondering what is the best method of including a link on each clients website.  Currently we tend to use:  Web Design by Company Name  and link on the company name. Occasionally we mix this up a little by doing something like:  Property Website by Company Name  and link on the whole sentence. We always do sitewide links at the moment.  Is this a good method? Should we only be linking on one page maybe? (homepage?) any thoughts are much appreciated.  Edit: I know similar has been asked before in this thread:  but as SEO has changed a lot in the last year I think it's valid to ask this again.

We're a web design company that have created several websites for clients, all of which have a back link to our own website. I was just wondering the best strategy for this:   Should the keywords be in the title, alt and link text? E.g Keyword? Should we make the keyword the same on all the client web sites? Should we incorporate our company name as the link text?   Are there any other general things I should follow?  UPDATE: Currently we have "designed & built by ". Are we better off having something like ""?


I’m wondering if I could run Ubuntu on hp spectre x360 13t with a i7-1065g7 CPU, with 16gb of ram and a 1tb ssd

I just bought the new hp spectre x360 dual-core i7, 8 GB ram and 256 SSD. Will Ubuntu run on this computer without issue or is it not yet supported?


I have the impression that Firefox 20 is heavier (on an older computer with 1 GB of RAM running Ubuntu-Xfce) than v. 19. There may be small features that change the way it interacts with that system; anyway, subjectively I see a difference that I do not like. (On a newer system with 4GB I see no difference.) But I want to be up-to-date, so I will try to disable the most obvious difference: the way downloads look.  Can I make the download manager look like before?  (Is there a big change involved with 20+? Is  this just a false impression?)

On my users computers, Firefox has autoupdated to 20.0, and that's a big problem, because of the new download manager window. They cannot get used to it, they call me constantly at the intercom "hey, where are my downloads???".  If someone knows an hidden setting in the about:config that would restore the old download window, that would save my life


For the normal definition of a PIR (every ideal is principal in the ring), is every subring also a PIR?  I can't seem to think of a counterexample.

Given a PID (Principal Ideal Domain), is every subring of PID also a PID ?  Do I have to show that every subring of a PID is an ideal ?


I have applied for a UK visa twice and i got a rejection the first time was in 2013 and the rejection reason was the bank statment and that i was outsourced for Pfizer and provided an HR letter mentioning that i am worki g as a contractor for Pfizer however i mentioned in the application that i work for Pfizer . The second time i applied i got a rejection and the reason was that i said in the application i worked for pfizer as a headcount "permenant " resource sine july 2016 however when he searched for a history he found my old application that is mentioning april 2013 . I amattaching a copy from the rejction letter , and i need an advice on what to be done to get the visa as i am afraid to apply for the third time and get a rejection .

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


How to derive this formula?   $$n^2=\sum_{k=1}^n(2k-1).$$

I stumbled across this relationship while I was messing around. What's the proof, and how do I understand it intuitively? It doesn't really make sense to me that the sum of odd numbers up to $2x + 1$ should equal $x^2$.


I have another counting functions question! My solution is as follows, but I am not 100% sure if I am correct.   Q: I have a function $f$ which maps from $\{1,2,3,4,5,6\}$ to $\{1,2,3\}$. I want to count how many functions $f$ such that for all $i,j \in \{1,2,3,4,5,6\}$, if $ i \leq j $, then $f(i) \leq f(j)$.  My solution:  There are 3 cases:  Case 1: The case that $f(6)$ is 3. Then there are 3 options (namely 1,2 or 3) each for $f(5), f(4), ... f(1)$ so in total $3^5 = 243 $  Case 2: The case that $f(6)$ is 2. Then there are 2 options (namely 2 or 1) for $f(5), f(4), ... f(1)$ so then in total $ 2^5 = 32 $   Case 3 : The case that $f(6) $ is 1. Then $f(5), f(4), ... f(1)$ have 1 choice ( namely 1 ) so 1 such function.  So in total we have 276 such functions.  Am I correct - I have an exam tomorrow so would be very much appreciated if someone could answer :)

I stumbled upon a question given like:  Let $m$ and $n$ be two integers such that $m \geq n \geq 1$.   Count the number of functions $$f: \{1, 2, · · · , n\} \to \{1, 2, · · · , m\}$$ of the following two types:  (a) strictly increasing; i.e., whenever $x < y, f(x) < f(y)$, and  (b) non-decreasing; i.e., whenever $x < y, f(x) \leq f(y)$.  I tried in the following way.  For (a). We can say $f(n)>f(n-1)$ AND $f(n)>f(n-2) \ldots f(n)>f(1)$ (total $n-1$ elements)  Similarly for $f(n-1)>f(n-2), f(n-1)>f(n-3) \ldots f(n-1)>f(1)$ (total $n-2$ elements)...  and $f(2)>1$  Like this $$(n-1) + (n-2) + \ldots + (1) = \frac{n(n-1)}{2}$$  Is this correct?  For (b). Since there's equality, it will be $$n + (n-1) + ... (1) = \frac{n(n+1)}{2}$$  Is my approach correct? Any help is appreciated. Thanks in advance.


how can I prove this identity:  $$ n \in N_0, m \in N $$  $$ \int_0^1 x^{n}(1-x)^{m}dx\ = \frac{n!m!}{(n+m+1)!} $$  I thought about the geometric series but I am not sure  Thanks in advance!

I'm trying to prove that for $p,q>0$, we have $$\int_0^1t^{p-1}(1-t)^{q-1}\,dt=\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}.$$    The hint given suggests that we express $\Gamma(p)\Gamma(q)$ as a double integral, then do a change of variables, but I've been unable thus far to express it as a double integral.  Can anyone get me started or suggest an alternate approach?  Note: This wasn't actually given to me as the $\Gamma$ function, just as a function $f$ satisfying $$f(p)=\int_0^\infty e^{-t}t^{p-1}\,dt$$ for all $p>0$, but I recognized that. This is in the context of an advanced calculus practice exam.


I don't understand very well the behavior of my web application. It's a php web application running on Nginx. I tried to test some simple page and I get:  ab -n 5000 -c 500 http://xxx Req per sec: 600 Time per req 1.6 ms (mean across requests)  ab -n 5000 -c 100 http://xxx Req per sec: 50 Time per req 20 ms (mean across requests)   I probably don't understand the result. I thought that increasing the concurrency 10 times I would see a dramatic decrease in average request performance...where am I wrong?

I've looked around, and can't find any detailed explanation of the output at all. Most is indeed easy to understand, but there is one part that flummoxes me:  Time per request:       109537.505 [ms] (mean) Time per request:       109.538 [ms] (mean, across all concurrent requests)   This means - to me - that if you measure across all concurrent requests (whatever that means) then the requests are suddenly returned 100x faster. Why would the time per request change that much? This makes no sense.  Is there any detailed explanation of this and other parts of the ab output?


I built a gaming pc in usa and want to take it back to india will i be charged in customs? If yes how much?(the cost of the pc is around 2000 to 2200 usd) also if i bring a monitor (24 inch) how much will be the customs?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


According to :     File names in Linux can contain any characters other than (1) a forward slash ( / ), which is reserved for use as the name of the root directory (i.e., the directory that contains all other directories and files) and as a directory separator, and (2) the null character (which is used to terminate segments of text). Spaces are permitted, although they are best avoided because they can be incompatible with legacy software in some cases.   Great, both restrictions make a lot of sense. Since it is clearly possible to forbid the inclusion of certain characters in file names, why were newlines allowed? As far as I can tell their only use is to . Is there ever a valid reason to have a new line in a file name?

I understand and accept the premise that defensive1 shell scripting is both prudent and, in the longer term, more sustainable.  Many of the answers to text processing questions here follow this principle by building into the answers contingencies for unorthodox filenames; that might contain spaces, dashes and new lines.  How prevalent are new lines in filenames? Specifically:   Do any applications create filenames that include newlines by default? Are there any situations where it would be desirable to create such filenames? Or are they predominantly an instance of user error?   [1] Meaning planning for and managing the broadest possible range of scenarios and contingencies...  Question inspired by the (rather plaintive) comment on .


I am trying to install steam after installing 15.04. When It should be installed the icon shows in my applications, but wont launch when i click on it. I entered      steam<   in the terminal, and got this...     Setting up Steam content in /home/brandon/.local/share/Steam   /home/brandon/.local/share/Steam/steam.sh: line 475: no match: ssfn*   find: `/home/brandon/.steam/steam': No such file or directory   Running Steam on ubuntu 15.04 64-bit   STEAM_RUNTIME is enabled automatically   Installing breakpad exception handler for appid(steam)/version(0)   libGL error: unable to load driver: nouveau_dri.so   libGL error: driver pointer missing   libGL error: failed to load driver: nouveau   libGL error: unable to load driver: swrast_dri.so   libGL error: failed to load driver: swrast   <   I have tried to Remove it, to Purge it to Install it again. I dont know what is going on. What should I do next?

I have never used Ubuntu or any other Linux OS before last Friday. For all I know, I might have installed Ubuntu wrong and be missing a component. I would prefer if you use simplest terminology possible, but I'm OK with doing a bit of googling if need be. I just installed Steam for Ubuntu 16.04 but it won't open when I click on it in the launcher. The icon flashes for a few seconds, stops and then nothing happens. I looked in the system monitor and steam shows up there but ending the process and trying again does nothing. I heard trying to open apps that aren't working through the terminal tells you what the error is so I tried that and I got this:  Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0) libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast   Please help I just want to play CS:GO again.


There are other questions similar, but none have answers for this situation.  Any time I enter my pw into the terminal, it works fine.  But gsku thinks it's wrong.  I've tried several times, and typing very slowly.  I know I'm entering it correctly.  Any ideas?    Answers to questions:    The answer linked doesn't apply because the gksu properties are set correctly. Resetting the pw didn't help. I was referring to the 10-key pad.

I am having a problem where when I try to run say GParted, when I am prompted for a password, it says "Incorrect Password"  But when I enter the same password using terminal sudo gparted for example, it works. Why is that?  UPDATE  I noticed that theres a difference between using sudo and gksu. The later will fail with incorrect password ...


I am confused about the Perl DBI settings for handling utf8:  $db->{mysql_enable_utf8} = 1 $db->do(qq{SET NAMES utf8});   I read I should issue them immediately after making the db connection this way:  my $db = DBI->connect($cstring, $user, $password); $db->{mysql_enable_utf8} = 1 $db->do(qq{SET NAMES utf8});   Here is the issue:  1)-I have the web page with form which set to utf8, so user data are sent in utf8 to the script.  2)-the script uses CGI::Simple to read the form data. Should I decode the form data with utf8::decode() or just leave it?.  3)-Should I set these two or not:  $db->{mysql_enable_utf8} = 1 $db->do(qq{SET NAMES utf8});   I hope some one will explain the steps to save and read utf8 starting from getting the user input on the web page to the MySQL database.

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