I've recently backed up some files on an external hard drive in order to install Ubuntu 12.04.  But when I wanted to copy the backed up files (ex. music files) back to home folder, I'm prompted with this:  error splicing file: input/output error     I'm unable to get my files back on my computer.

I recently obtained a Seagate Expansion 3TB external harddrive. I'm trying to copy over all of my stuff to prepare for reformatting and installing a new OS. A handful of my mp3s did not transfer when I was doing my music folder. I checked them after the fact and the ORIGINAL files became corrupted somehow. I am certain of at least a few that were not corrupted in anyway before doing this. Every now and then during my transfer I got  There was an error copying the file into /media/***/Seagate Expansion Drive. Error splicing file: Input/output error   Each of these files that I check after are corrupted at some point in the duration and will not play. Why did this happen and what can I do to fix it?


How could we have spent this time on the island?      How could we spend this time on the island?   What is the difference between those two sentences ?

As I know we can use both structures to talk about past ability , but is there any difference between them?  A. He could climb the mountain  B. He could have climbed the mountain


Don't really know how to formulate the question...  Suppose I do the following:      >>> l = [[]]*2     >>> l     [[], []]     >>> l[0].append(1)     >>> l     [[1], [1]]   Why does 1 gets appended to both lists?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I was reading through Introduction to Linux by Machtelt Garrels and read about the cat command.  I tried to open a pdf file using cat. After opening the file the whole character set of the terminal changed, what is the reason behind this?  Below is the before/after screenshots  Before   After   Unless I restart the terminal, the english characters won't return. Is there a way to get back the original characters without restarting the terminal?

So, when I cat /dev/input/mouse0 in a TTY, move the mouse around a bit, and then ctrl-z to stop cat, my terminal characters are all messed up.  Almost every single character gets swapped out for another character in the ASCII character set.  This same situation occurs when I execute this in Python 3.2:  print('\033[1;12mTest.\033[1;m')   The the same symptom does not appear on a shell in the GUI, only on the virtual terminals.  The problem does not go away if I log out.  I suspect that a certain escape code (which may be contained within the Python code) is remapping the ASCII byte codes to the character representations, but that is just a guess.  What is happening and how do I undo it?


$\lim\limits_{n\to\infty} \frac{a^n}{n!}=0$  how to prove this one since L'Hospital Theorem cannot be used with factorial?

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


It seems like a very silly question, but I stuck on this. Let's say that I have code like this: board = [[False] * 4] * 4  s = {(0, 3), (1, 3), (2, 1), (3, 0)}  for row in range(4):     for col in range(4):         board[row][col] = (row, col) in s print(board)  I accepted to find that the board get the True values in the tuple places, like this: [[False, False, False, True], [False, False, False, True], [False, True, False, False], [True, False, False, False]]  But I got : [[True, False, False, False], [True, False, False, False], [True, False, False, False], [True, False, False, False]]  Why ?????


It seems kinda trivial but I can find out an example on the Internet to do that kind of query:  $entityQuery = new EntityFieldQuery(); $query = $entityQuery->entityCondition('entity_type', 'node'); $query->entityCondition('bundle', 'contact'); $query->propertyCondition('status', 1); if (!empty($params_categories))   $query->fieldCondition('field_category', 'tid', $params_categories, 'IN'); if (!empty($params_contextes))   $query->fieldCondition('field_family', 'tid', $params_contextes, 'IN'); if (!empty($params_organismes))   $query->fieldCondition('field_organisme', 'tid', $params_organismes, 'IN'); if (!empty($params_fonctions))   $query->fieldCondition('field_function', 'tid', $params_fonctions, 'IN'); $query->count = TRUE; $count = $query->execute();   Where $params_xxx are arrays of tid.  I need to execute these fieldConditions with an "OR" operator. That means that I want to retrieve each node that has at least one tid among the four taxonomy fields.  Now, it seems to act like an "AND" operator and sends me only those that have one tid for each taxonomy field.  Any clue is welcome.  The less complicated solution I eventually implemented:  I decided to proceed by mini queries that I merge together and erase duplicates.  /** * Implements hook_form_submit(). */ function grap_contact_repository_form_submit($form, &$form_state) {   $matches = array();   $query   = array();   $categories = $form_state['values']['categories'];   if (!empty($categories)) {     grap_contact_get_mini_query('field_category', $categories, $matches);     $query['categories'] = array_values($categories);   }   $contextes  = $form_state['values']['contextes'];   if (!empty($contextes)) {     grap_contact_get_mini_query('field_family', $contextes, $matches);     $query['contextes'] = array_values($contextes);   }   $organismes = grap_contact_get_tid_from_name($form_state['values']['organismes']);   if ($organismes[0] != null) {     grap_contact_get_mini_query('field_organisme', $organismes, $matches);     $query['organismes'] = array_values($organismes);   }   $fonctions  = grap_contact_get_tid_from_name($form_state['values']['fonctions']);   if ($fonctions[0] != null) {     grap_contact_get_mini_query('field_function', $fonctions, $matches);     $query['fonctions'] = array_values($fonctions);   }   // I have all my data in $matches }   My mini query function:  function grap_contact_get_mini_query($field, $terms, &$matches) {   $entityQuery = new EntityFieldQuery();   $query = $entityQuery->entityCondition('entity_type', 'node');   $query->entityCondition('bundle', 'contact');   $query->propertyCondition('status', 1);   $query->fieldCondition($field, 'tid', $terms, 'IN');   $results = $query->execute();   if(count($results)) {     foreach ($results['node'] as $n) {       // I use the nid as the array key to overwrite the duplicates more easily       $matches[$n->nid] = $n->nid;     }   } }

I have never had the need to do this before today, but it doesn't seem like you can make OR queries with EntityFieldQuery, since db_or is used for select queries.  An example would get to all entities that has a date field where the value is null or after today.  Am I missing something or some trick or is this simply not supported?


I was asked to submit my passport for visa stamping, but I had to renew my passport to add my spouses name. I have received the new passport now. Will there be any issues if I submit my new passport, instead of my old passport which was  listed when the application was submitted?

I applied for an H1B visa and it's been approved. I'm waiting for an appointment. But my passport will expire in 12-13 months. If I apply for a new passport now, and appear for visa stamping with the old and new passport, will there be any issue?   All the visa processing activities were done with my old passport.


I have a primitive root $ \alpha $ of a number $ p = 2^{16} + 1$. How can I show if $ \alpha^{3} $ and $\alpha^{14}$ are primitive roots as well?

I'd really love your help with the following one: : Let $g$ a primitive element modulo $m$, $g^{\varphi(m)} \equiv 1\pmod{m}$. I need to prove that  $g^k$ is a primitive element modulo $m$ iff $\gcd (k,\varphi(m))=1$.  First I tried to assume the left part, since $g^k$ is a primitive element so $g^k \equiv 1\pmod{m}$, so that $k \neq \varphi(m) $. so there is a $r$ such that $r| \varphi(m)$, $r|k$.   if $k=r$ so $\varphi(m)=kt$ for some $t$, $t &lt \varphi(m)$ so that $1 \equiv g^{\varphi(m)}=g^{kt}=(g^{k})^t$ so $g^k$ is not an primitive element. if $k \neq r$  so there are $a,b$ such that $\varphi(m)a+kb=r$ for $r\gt 1$, what can I do next?  I succeeded the other direction.  Thanks a lot


Problem: Let $A$ and $B$ be finite sets. Prove $|A\cup B| = |A| + |B| - |A \cap B|$ where $|A|$ denotes the cardinality of set $A$.   I've tried breaking up $A \cup B$ in various ways, and then using the theorem that if $A$ and $B$ are finite and disjoint then $|A \cup B| = |A| + |B|$, but it didn't seem to work for me.   Can someone help me with this?

We were ask to prove that $|A \cup B| = |A| + |B| - |A \cap B|$. It was easy to prove it using a Venn diagram, but I think we might be expected to do if more formally. Is there a formal way?


There are many possible definitions of a prime number such as the google search result of ‘prime number definition’:      ’a number that is divisible only by itself and 1 (e.g. 2, 3, 5, 7, 11).’   Though by this definition, one could argue that therefore the only prime number is -1. Take 2 as an example, it is divisible by 2, 1, -1, and -2; as none of those give a fractional part. And if one argues that factors cannot be negative, that I see to say the negative numbers can’t have proper pairs of factors. -1 however I saw only divisible by 1 and -1 so it is the only integer that fits the definition.  There are several other definitions, that give our definition of prime numbers, but some seem over the top. So my question is as follows: Using mathematical notation, what is the fewest symbols the set of prime numbers (in the group of natural numbers bounded under addition) can be defined.  edit - Please read the actual question before commenting it as a duplicate or giving answers that don’t actually answer my question. This is not asking for a definition of prime numbers, I’m asking for the SIMPLEST POSSIBLE DEFINITION, as in, requires the least amount of information, of the set of prime numbers.

Every number has the factors of $1$, itself, $-1$, and the negative version of itself (itself multiplied by $-1$).  So let's take for example $5$, it has the factors:     $ 1$   $ 5$   $-1$   $-5$   Since the definition of a prime number is a number with the factors 1 and itself, should this not mean that all numbers are composite?


I started a new website for selling posters of Movies, Celebrities and Sports. Problem is most of the images that I got from Internet are now claimed by some people that they have copyrights of the images. I am trying to find the right Images but its very difficult for me. I looked in many free stock images website but was unable to get Images which are worth printing.

I'm always on the hunt for free stock images to use while I design, what are some good resources for images that are under a a royalty free or creative commons licence?


I Installed Ubuntu on a Windows XP computer (completely installed not side by side) I have 1 gb of RAM with a Pentium 4 processor Ubuntu version is 15.04 it runs as slow as heck is there any way to speed up my computer or to revert to windows xp with out the boot disk for XP? I am thinking of getting a SSD though but I have no idea wether to get Sata III or less

What are your tips for improving overall system performance on ubuntu? Inspired by this  I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.  This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.  Preferably 1 tip per answer, with enough detail for people to implement it.  A couple of mine would be:   Install  (via Software Center or sudo apt-get install preload); Change  value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";   What are yours?  PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box.


I have a bunch of clusters of Raspberry with Raspberry OS installed, they have all the same configuration and the same packages installed. I want to keep them updated but they are connected to Internet with a limited bandwidth connection. Is there a way to set a master system that downloads the packages to upgrade and the others refer to it instead to download several times the same packages? I think I should use the sources.list file on the slaves but I don't know how to set the server if this is the way to do it

Is it possible to set up a server to mirror a distro's repository, but only download/store requested upgrades or new packages rather than download them all?  So all computers on the LAN can connect to this server for all upgrades so they only have to be downloaded once.  I've looked at apt-mirror but that seems to download everything.


Why are batteries significantly smaller than capacitors yet can store much more energy ?

Can capacitor acts like power supply, in which situations? How related are charge/discharge time of battery and capacitor? Why battery has longer discharge time compared to capacitor? Why we cannot for example use big capacitors in our mobile phones instead of batteries?


$$\dot{x} = x(1-\mu x-y), \quad \quad \dot{y} = y(-1+x-y)$$  where $\mu > 0$ is a constant. The number and type of equilibria depend on the value of μ; in fact there are three essentially different cases. Find the three corresponding ranges of μ and the number, type and stability of the equilibria in each case. (Ignore a borderline case with a zero eigenvalue, but look carefully at any other borderline cases.)  I've already worked out the following:  $$(x_0, y_0) = (0,0), \quad (0,-1), \quad (\frac{1}{\mu},0), \quad (\frac{2}{\mu +1},\frac{1-\mu}{\mu+1})$$  $\therefore$ If $\mu = -1$ or $\mu = 0$ then there exist only 3 equilibrium points. However, if $[\mu \in \mathbb{R} : \mu \ne 0, -1]$ then 4 equilibria exists.  Thus from here, assume $\mu \ne 0,-1$  Jacobian:  $$J = \begin{bmatrix} 1-2\mu x -y & -x\\y & -1+x-2y\end{bmatrix}$$  I've also worked out the Jacobian for $(\frac{1}{\mu},0)$ and found the polynomial for the EVal's to be $\frac{-b \pm \sqrt{b^2 - 4b}}{2}$ where $b = \frac{\mu -1}{\mu}$.  Now where do I go from here to complete the question? Also please do keep in mind that I'm studying Maths not Physics.  Many thanks.

Consider the following model of predator-prey dynamics :  $\dot x = x(\lambda − x − y),\ \\ \dot y = y(−1 + x − y)$  The number and type of equilibria of the system depend on the parameter $\lambda$, and there are essentially three different cases corresponding to three different ranges of $\lambda$.  Find these three ranges for $\lambda$ and the number, type and stability of the equilibria in each case. There are two values of $\lambda$ that give rise to borderline cases; one of these corresponds to a zero eigenvalue and may be ignored, but for the other borderline case you should make a careful analysis of the stability type.  I Seem to be quite a dunce at dynamics, I would appreciate some help on how to go about this problem.


I want to do the following :  l = list() l[2] = 'two'   As expected, that does not work. It returns an out of range exception.  Is there any way to, let say, define a list with a length ?

Code like this often happens: l = [] while foo:     # baz     l.append(bar)     # qux  This is really slow if you're about to append thousands of elements to your list, as the list will have to be constantly resized to fit the new elements. In Java, you can create an ArrayList with an initial capacity. If you have some idea how big your list will be, this will be a lot more efficient. I understand that code like this can often be refactored into a list comprehension. If the for/while loop is very complicated, though, this is unfeasible. Is there an equivalent for us Python programmers?


I am trying to parse a Json file with a for loop cycle. The problem is when I try to get a key that doesn't exist on the array element. Here an example of the Json file:  { "data": [     {         "id": "1445168029094512_1863149637296347",         "created_time": "2017-02-12T11:00:18+0000",         "likes": {             "data": [],             "summary": {                 "total_count": 0             }         }     },     {         "shares": {             "count": 1         },         "id": "1445168029094512_1862494140695230",         "created_time": "2017-02-11T00:30:17+0000",         "likes": {             "data": [],             "summary": {                 "total_count": 0             }         }     }]  }   Code sample:  Gson gson = new Gson(); String responseData = response.toString();     JsonObject jsonFile = gson.fromJson(responseData, JsonObject.class); for(int i = 0 ; i < array.size(); i++){     Data data = new Data();     if(array.get(i).getAsJsonObject().get("shares").getAsJsonObject().get("count")!= null) {         jsonElement = array.get(i).getAsJsonObject().get("shares").getAsJsonObject().get("count");         element = jsonElement.toString();         data.setShares(Long.parseLong(element));     } }   The problem is that on the first element of the array the key "shares" doesn't exists, so this cause a NullPointerException. I dont know how to handle this, because this is on a for loop and sometimes it would have this key and sometimes no.   Thanks in advance!

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


i have been using ubuntu for a wile now and i have recently got a new PC. The PC is a dell optiplex gx520. i try to put un the ubuntu DVD i got from a magazine called Linux Format. The CD worked on my other computers, but this one will not load it. I then tryed it on one of my other computers to see if it would work but no.  The second computer kept on crashing when it got to the graphical screen.  Thanks, Cassius

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


The origin of my object is not where I want it, so when I set other objects to the parent, they link to the origin rather then the object where I want them. How do I change the origin?

So, I'm working creating a lamp... yes, newbie here.  After modeling for a bit, I noticed that my point of origin was no longer the center of my object:    How to I reset an object origin point to the center of it's geometry?


I am trying to download all videos from a YouTube channel to then convert the videos to a WAV file  Entering the following command:  ~$ youtube-dl https://www.youtube.com/channel/UCa1Cl-msOfWu5aBzbYCJVVA --audio-format wav   Returns:   /usr/bin/env: ‘python’: No such file or directory   I had entered a command that someone suggested to solve an issue where the output is was something like 'no video format avaliable'. But instead it had return that output instead of downloading the videos and converting videos to WAV format.  The command I used to download youtube-dl was sudo apt-get install.  Entering   :~$ apt-cache policy youtube-dl   Returns:   youtube-dl:  Installed: (none)   Candidate: 2020.03.24-1   Version table:      2020.03.24-1 500         500 http://au.archive.ubuntu.com/ubuntu focal/universe amd64 Packages         500 http://au.archive.ubuntu.com/ubuntu focal/universe i386 Packages   EDIT  $ youtube-dl returns: /usr/bin/env: ‘python’: No such file or directory

I have done a clean install of 18.04 LTS. I then installed youtube-dl using  sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl   When I try to use youtube-dl, I get the following error message:  rudolffischer@HP8770w:~$ youtube-dl -U /usr/bin/env: ‘python’: No such file or directory   Python 3 seems to  be installed  rudolffischer@HP8770w:~$ python3 Python 3.6.5 (default, Apr  1 2018, 05:46:30)  [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.   Why?


I've read , and learned that the times-zoom number doesn't tell you much. So, how do you determine the magnification — the amount a lens let's you "zoom in" — from focal length data?  Why don't the lens manufacturers just tell you?  Maybe there is another factor involved?  For example, 15-45mm and 100-300mm are both "3x zoom", but  doesn't the 300 offer more "zoom in" capability or magnification than the 45mm lens?  If so then how does one measure the magnification abilities of a lens?

Zoom lenses and cameras with superzooms are often sold with a times ("×") zoom number — like a 12x zoom or 30x zoom. The question  explains how this relates to focal length numbers, like 70-200mm or 18-55mm. But how does ×-zoom relate to magnification, when used for macro or just to make something far away look bigger?  How can two 70-200mm lenses have different magnification?


I am trying to send email, but I receive the following error:     An attempt was made to access a socket in a way forbidden by its access permissions 72.52.4.90:587   Code:  var mail = new MailMessage(); var client = new SmtpClient(); client.Port = 587; client.Host = "smtp.gmail.com"; client.EnableSsl = true; client.Timeout = 10000; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.UseDefaultCredentials = false; client.Credentials = new NetworkCredential("myemail@gmail.com", "password");  mail.From = new MailAddress("myemail@gmail.com"); mail.To.Add(new MailAddress("myemail@gmail.com")); mail.BodyEncoding = UTF8Encoding.UTF8; mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;  mail.Subject = "this is a test email."; mail.Body = "this is my test email body"; client.Send(mail);   NOTE: This code is based on other questions and answers already here in StackOverflow. However, after an extensive search, it appears that no one else has experienced this particular issue so far. According to the other Q&A this code should be working.    UPDATE: After being told that this was a duplicate I've modified my code to the following, however, I'm still getting the same error.      private static void Main(string[] args)     {         var From = new MailAddress("myemail@gmail.com", "Me");         var To = new MailAddress("myemail@gmail.com", "Me Too");         var client = new SmtpClient         {             Host = "smtp.gmail.com",             Port = 587, //25             EnableSsl = true,             DeliveryMethod = SmtpDeliveryMethod.Network,             UseDefaultCredentials = false,             Credentials = new NetworkCredential(From.Address, "password"),             Timeout = 20000         };          using (var mail = new MailMessage(From, To)         {             Subject = @"this is a test email.",             Body = @"this is my test email body"         })         {             client.Send(mail);         };     }

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show.   Is it possible to do it?


Which is correct? Everyone here at xyz wish you a happy holiday or  everyone here at xyz wishes you a happy holiday?

Which is correct?     Everyone were convinced that he would go to the game.   Everyone was convinced that he would go to the game.   I think it's "was", because "everyone" is singular, but I just wanted to check.


Sort a Map by Key or by value in java  Input Map 1-eee 4-ddd 5-ccc 0-bbb 3-aaa  1st Output Map(By-Key):   0-bbb 1-eee 3-aaa 4-ddd 5-ccc 2nd Output Map(By-Value): 3-aaa 0-bbb 5-ccc 4-ddd 1-eee

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I am supposed to submit my original documents for university enrollment in Germany in the 1st week of October. I am currently waiting for my renewed Italian stay permit. The Old permit has expired but I have the receipt of the new one that I'm waiting for. Can I travel to Germany and be back in 3 days time for my permit?

I am a Filipina living legally here in Italy. My permesso di soggiorno is under renewal since it has been expired. I was scheduled for biometrics on April 11 and I have to go to Denmark on April 28. I am afraid I will not be allowed to go to denmark with only the receipt from the Posta,., or can i travel to denmark with only the receipt from posta? Are there ways in which I can travel or alternative ways to do?


how to prove this inequality by real anlysis  $\frac{|x+y|}{1+|x+y|} \leq \frac{|x|}{1+|x|} + \frac{|y|}{1+|y|}$  I finally came with the following inequality. but I dont know what to do after that  $\frac{|x+y|}{1+|x+y|} \leq \frac{|x|}{1+|x+y|} + \frac{|y|}{1+|x+y|}$

Prove that for every $a, b\in R\setminus\{0\}$ is correct this inequality:  $$\frac{|a+b|}{1+|a+b|}<\frac{|a|}{1+|a|}+\frac{|b|}{1+|b|}.$$


Let $G$ be a cyclic group of order $n$. For every divisor $d$ of $n$, prove that $G$  has exactly one subgroup of order $d$  What i tried  I know i have to prove the existence and uniqueness here  For the portion on existence  Since $G$ is a cyclic group, the $G$ is written in the form $G=<g>$ Where $g$ is the generator of the group $G$  I then let $g^{k}$ be the subgroup of order $d$ and i thus have to prove its existence, ie prove the following statement  $$o(g^k)=d$$   Also another info that i have is that $d$ is the divisor of $n$ thus  $$d|n$$ which implies $$n=kd$$  next i make use of the formula  $$o(g^k)=\frac{n}{gcd(n,k)}$$  in order to get what i want to prove  Next   given that $n=kd$ implies $k=\frac{n}{d}$  subsituting into  $gcd(n,k)=$  i  got  $$gcd(n,k)=gcd(n,\frac{n}{d})=\frac{n}{d}$$  Which thus implies that  $$o(g^k)=\frac{n}{gcd(n,k)}=\frac{n}{gcd(n,\frac{n}{d})}=\frac{n}{\frac{n}{d}}=d$$ which thus prove the statement that $o(g^k)=d$ Is my proof correct. Could anyone explain. Thanks

I have a question where the teacher wants me to find the perimeter of a right triangle using the area which is equal to $1cm^2$.  I've tried a few approaches but seem to be struggling and I can't even find the side lengths.  is this even possible?  would love some help thanks


I've been stuck on this exercise for awhile. It was suggested that I fix a point in the compact set, but I didn't know what to do with that. Can anyone provide an answer?

How to prove that a compact set $K$ in a Hausdorff topological space $\mathbb{X}$ is closed? I seek a proof that is as self contained as possible.  Thank you.


I used a bezier curve and a circle to make a claw shaped thingy around the bezier curve, I want to be able to edit the geometry of this shape, but don't know how to transform it in to an object.

Is is possible to remove the curves and only have the mesh of a tree that was created with the saplings add-on?   I'd like to apply a decimate modifier to have a few low-poly trees, but this doesn't work because of the curves. I get this message: "Cannot apply constructive modifiers on a curve."


I am semi-new to Linux and Ubuntu, I recently just got a NVMe drive dedicated to my Ubuntu itself and I am running into troubles with using ubuntu on this SSD (I did not have any trouble installing) it just keeps freezing and when I try to log in nothing happens I type my password and acts like it logs in but then doesn't and just brings me back to the log in screen. Anyone else run into this problem?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


When we try to imagine the initial expansion after the big bang we see with the CMB that the universe went from initially smaller than a hydrogen atom to what we see today. However, when we try to measure the rate of that expansion it currently defies our current observations of the laws of physics, what if at those initial conditions time as we measure it was infinitely faster than it is currently and gradually slowed down to the point where now we cannot observe a rate change. To repeat my question above if time and space are linked then surely the changes in space will have some similar effect on time?

Einstein's big revelation was that time and space are inseparable components of the same fabric. Physical observation tells us that distant galaxies are moving away from us at an accelerated rate, and because of the difficulty (impossibility?) of defining a coordinate system where things have well defined coordinates while also moving away from each other without changing the metric on the space, we interpret this to mean that space itself is expanding.   Because space and time are so directly intertwined is it possible that time too is expanding? Or perhaps it could be contracting?


I'm going through a tutorial on Ruby that explains the neat construction the select method provides. As per that, the three print statements in the following code (filtering out even numbers) should produce an identical output:  numbers = (1..20).to_a p numbers.select(&:even?) p numbers.select { |x| x.even? } p numbers.select do |x| x.even? end   When I run it, though, I get:  [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] #<Enumerator: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]:select>    Clearly, the third statement is off, even though it's impossible to tell why. It's just the curly braces replaced with the do-end block so it shouldn't change anything.  I'm on Ruby 2.5 so I guess either the tutorial was running some other version and something has changed? Or maybe there's some subtlety here that I'm not able to put my finger on.

I extracted simple example:  require 'pp' x = 1..3 pp x.map do |i| {:value => i, :double => (i*2)} end pp x.map { |i| {:value => i, :double => (i*2)} }  pp(x.map do |i| {:value => i, :double => (i*2)} end) pp(x.map { |i| {:value => i, :double => (i*2)} })   I am wondering why first pp produces:  [1, 2, 3]   While all the oders are giving:  [{:value=>1, :double=>2}, {:value=>2, :double=>4}, {:value=>3, :double=>6}]   I assume it has something to do with operator precedence. Where can I find good explanation?


Stack Exchange provides database dumps on .  However, the structure of files don't contain answers. It has only: Badges, Comments, PostLinks, PostHistory, Posts, Tags, Users, and Votes.  In the Posts I can see column AcceptedAnswerId, which is a relation to the Answer, but I can't see a table of answers.

Stack Exchange releases "data dumps" of all its publicly available content roughly every three months , and also makes that information queryable over the Internet at the  (SEDE) (updated weekly, on Sunday). Over time, as new features and other bits of data are introduced to Stack Exchange sites, the "anatomy" of the data dump is likely to change.


I want to self-study geometry for interest. What I want to study is closed to the fundamental appeal, not problem-solving, not differential geometry. But I found that there were many of books on geometry. And it is difficult for a beginner like me to figure out which books are the ones I need.  I want to learn the axiomatic/synthetic, ancient/modern  fundamentals of geometry, such like what is "point", "segment", "directed segment", "Euclidean vector", "plane", "congruence", "affine space", etc; and what is the modern way of defining and treating these concepts? If there's a book compare those difference is also what I want. I guess this kind of books should be of graduate level right? I've studied analysis and linear algebra, so a book uses plenty of terminology of these subject is OK for me!

I'm curious to whether you guys have any tips on book concerning classical euclidean geometry. I'd like somewhat of an advanced treatment, around the same level as Coxeter's "Geometry revisited". I'd however want something more comprehensive, therefore I'm asking you for tips!  Hopeful for answers ^^


Rewritten: Hopefully this helps others. The question wasn't a duplicate question. The custom roles and subscriber account were not being written. It turns out that the if statement after the internal foreach was stopping the writing of the custom roles. Once removed then the loop worked properly.  It's very important for novices to be provided explanations. In this case, I would like to know why the if statement blocked the writing of the custom roles.  if ( $wp_roles->get_role( $role_name )->has_cap( $new_cap ) )     Original statements (bold unique parts to question):  This is frustrating me. After months of trying different ways to think about retrieving all of the default and custom roles, I believed the following code would work. However, it is only returning 4 of the 5 default roles and none of the custom roles. This code works to return administrator, editor, author, and contributor but not subscriber.  I can write an elseif statement after the inner foreach loop and force subscriber to be written as well as an elseif statement to force a known custom role .. but that defeats the purpose of a foreach to return all roles.  Sorry but I'm a complete novice trying to read and understand as much as possible. This means I'm not asking you to write the code but maybe point me in the direction as well as provide an explanation.          global $current_user, $wp_roles;      $all_roles = $wp_roles->roles;      $editable_roles = apply_filters( 'editable_roles', $all_roles );      foreach ( $editable_roles as $role_name => $role_info ) {          /** If you have changed the wp_ prefix then you must modify this line to match the new prefix */         if ( is_object( $current_user ) && isset( $current_user->data->wp_capabilities[ $role_name ] ) ) {              foreach ( $new_caps as $new_cap ) {                 if ( $wp_roles->get_role( $role_name )->has_cap( $new_cap ) ) {                     $capabilities[ $new_cap ] = true;                     $current_user->add_role( $role_name );                  }             }          }      }

When writing WordPress plugins there is often a need to set up options for which roles on the site have access to certain functionality or content. To do this a plugin dev needs to fetch the list of roles that exist on the site to use in the option. Because custom roles can be created we cannot assume the default roles are the only ones available.  What is the best way to fetch the list?


I have been looking at controller classes in .NET Core with constructors that take IMemoryCache arguments but cannot see where the passed objects come from originally. For instance, this example declaration from : public class HomeController : Controller {     private IMemoryCache _cache;      public HomeController(IMemoryCache memoryCache)     {         _cache = memoryCache;     } }  Where would this constructor be called and how is the IMemoryCache object instantiated in the first place? Is this something that happens behind the scenes with .NET Core that does not have to be coded explicitly? I have seen similar examples using an ILogger object, so my question would also apply to that.

There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used?


I'm implementing a dragListener in a fragment as the code below shows:  private class ChoiceDragListener implements View.OnDragListener {     @Override     public boolean onDrag(View v, DragEvent event) {         view = (View) event.getLocalState();         dropTarget = (TextView) v;         dropped = (TextView) view;         switch (event.getAction()) {             case DragEvent.ACTION_DRAG_STARTED:                 dropped.post(new Runnable(){                     @Override                     public void run() {                         dropped.setAlpha(0);                     }                 });                 break; // MORE CODE FOLLOWS   The variables view, dropTarget, and dropped are declared on the class Level:  private View view; private TextView dropTarget, dropped;   The implementation works on my test devices and for the vast majority of users. However, Google Console notifies me about some users having a NullPointException on the line dropped.post(new Runnable(){.   Having had more exception reports in the past in this part of the code (i.e. the dragListener), I implemented the solution found here:   , that is, using a post(runnable) method. This seems to have lessened the number of reports. However, there are still some showing up.  The full log follows:  Samsung Galaxy J3 Pop (j3popltetfnvzw), Android 6.0  java.lang.NullPointerException:    at com.*******.****.******.FragmentOne$ChoiceDragListener.onDrag (FragmentOne.java:1125)   at android.view.View.dispatchDragEvent (View.java:21164)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewGroup.notifyChildOfDrag (ViewGroup.java:1587)   at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1429)   at android.view.ViewRootImpl.handleDragEvent (ViewRootImpl.java:6613)   at android.view.ViewRootImpl.access$1400 (ViewRootImpl.java:221)   at android.view.ViewRootImpl$ViewRootHandler.handleMessage (ViewRootImpl.java:4456)   at android.os.Handler.dispatchMessage (Handler.java:102)   at android.os.Looper.loop (Looper.java:148)   at android.app.ActivityThread.main (ActivityThread.java:7422)   at java.lang.reflect.Method.invoke (Native Method)   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)   at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)   I feel a bit at loss about this. It's hard for me to troubleshoot the error, as it seems to only affect a relatively small number of users (and I can't personally replicate it).  Any ideas what could be the source of this error, or what else I could try?  If you need more details or code, I'd be happy to provide more context.

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


Suppose I have file main.txt which contains following:    Some text  #include fragment1.txt  Some other text  #include fragment2.txt"  Some other text    where fragment1.txt and fragment2.txt looks like this:  fragment1.txt:    This is content of fragment1    fragment2.txt:    This is content of fragment2    Question: How to display whole main.txt file with "expanded" included files, like this:    Some text  This is content of fragment1  Some other text  This is content of fragment2  Some other text    Thanks

Let us say we have the following Makefile  include config.mk  # Generate summary table. results.txt : $(ZIPF_SRC) isles.dat abyss.dat last.dat     $(ZIPF_EXE) *.dat > $@  # Count words. .PHONY : dats dats : isles.dat abyss.dat last.dat  %.dat : books/%.txt $(COUNT_SRC)     $(COUNT_EXE) $< $*.dat  .PHONY : clean clean :     rm -f *.dat     rm -f results.txt   where all the variables are defined in config.mk  LANGUAGE=python COUNT_SRC=countwords.py COUNT_EXE=$(LANGUAGE) $(COUNT_SRC) ZIPF_SRC=testzipf.py ZIPF_EXE=$(LANGUAGE) $(ZIPF_SRC)   Is there any tool available that can expand all the include lines within the makefile so as to produce a bigMakefile? If such a tool does not currently exist, can a python/perl/awk/bash script be cooked up to achieve this goal?


I am using Ubuntu 13.10. When I try to open the Adobe Flash Player download page, Firefox shows an error that it is unable to open the page. It opens other pages fine but no the above page. What can I do?

I have had significant problems with watching flash video in 64-bit Ubuntu.  Does anyone know of a good way to get flash running on the platform?


I have a website at www.grokit.ca hosted on google app engine. If I issue the following command:  nslookup -query=any -debug www.grokit.ca  ... I get the following output:  $ nslookup -query=any -debug www.grokit.ca Server:         X.Y.Z.12 Address:        X.Y.Z.12#53  ------------     QUESTIONS:         www.grokit.ca, type = ANY, class = IN     ANSWERS:     ->  www.grokit.ca         canonical name = ghs.googlehosted.com.         ttl = 400     AUTHORITY RECORDS:     ADDITIONAL RECORDS: ------------ Non-authoritative answer: www.grokit.ca   canonical name = ghs.googlehosted.com.   Same with dig: dig www.grokit.ca:  ; <<>> DiG 9.9.6 <<>> www.grokit.ca ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34283 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1  ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4000 ;; QUESTION SECTION: ;www.grokit.ca.                 IN      A  ;; ANSWER SECTION: www.grokit.ca.          865     IN      CNAME   ghs.googlehosted.com. ghs.googlehosted.com.   214     IN      A       74.125.28.121  ;; Query time: 55 msec ;; SERVER: X.Y.Z.12#53(X.Y.Z.12) ;; WHEN: Fri Dec 11 17:53:03 PST 2015 ;; MSG SIZE  rcvd: 92   So basically I get it, my domain is CNAME (~alias), which is linked to ghs.googlehosted.com, which is at IP address 74.125.28.121. However, if I point the browser to 74.125.28.121, this is just a default google website:   So my question is, where is the rest of the DNS lookup? How does the browser know where to issue the GET given that if it uses the IP resolved by DNS it will get a 404 (going to the website on a web browser from www.grokit.ca does work).

I'm trying to understand how web services which have you setup CNAME records on your domain pointing to their servers work.  For example, following the instructions on LaunchRock (), I create a CNAME record as  signup.mysite.com    with the value   sites.launchrock.com   I understand that folks accessing signup.mysite.com would be redirected to sites.launchrock.com, but I'm trying to understand how sites.launchrock.com is configured so that it detects this incoming request and tailors the webpage appropriately for my landing page.  What software / configuration is present there that handles this properly?  I looked at this  - but this did not explain how to serve different content to different domains.


The beam energy is sometimes in AGeV in collider papers. I'm stuck on how to convert AGeV to GeV.

AGeV means GeV per nucleon. But why A letter is used for such a short cut? Why not NGeV, for example?


$\qquad^{\star\star}(b)$ Prove, more generally, that   $$f'(x) = \lim_{h, k \to 0^+}\frac{f(x + h) - f(x - k)}{h + k}$$   ONLY HINTS PLEASE.  The denominator is the issue. I thought of $u = h + k$ but that created an issue  for the limit bounds. I tried adding and subtraction $f(x)$ in the numerator but the denominator causes issues.  ONLY HINTS PLEASE!  Attempts:  $$f'(x) = \lim_{h, k \to 0} \frac{f(x + h) - f(x + h + k) + f(x + h + k) - f(x - k)}{h+k} $$  $$ = \lim_{h, k \to 0} -\frac{f(x + h + k) - f(x + h)}{h+k} + \frac{f(x + h + k) - f(x - k)}{h+k}$$  let $u = x + k$. As $k , h\to 0,$ $u \to x$ and $x - k =  u - 2k$  Which makes things weird.

I read somewhere recently that you can define the derivative as follows:  $$f'(x) = \lim_{h, k \to 0^+} \frac{f(x +h) - f(x - k)}{h + k}$$   I have been trying to prove this for about 2 hours, and can't seem to get it done. How should I proceed?  Edit: Assume $f$ is differentiable for all $x \in (x - \delta, x + \delta)$ for some $\delta > 0$.


I have a text from which I want to extract text that occurs betweeen two match strings. But when I am trying to extract it using regex instead of the all the matches of that range it is extracting the last one.  Here is what I have tried  string = "\n3.5\nFerguson to Gayle, FOUR, short of length delivery on the stump, 115.9km/h, Gayle clears that leg and clubs it off the toe-end just over mid-on to the long-on fence for four\n3.4\nFerguson to Gayle, no run, yorker length delivery, inch-perfect, 148.2km/h, digs it out off the toe-end\n3.3\nFerguson to Gayle, no run, slower delivery on a good length heading for middle, Gayle delays his defence from the crease back down the wicket\n3.3\nFerguson to Gayle, wide, 148.1km/h, wide down leg, swings away after the ball crosses the batsman's missed flick and swerves to the left of the 'keeper who has done well to collect it\n3.2\n" re.findall("3.4(.*)3.3", string,  re.DOTALL)   What I want is all the matches i.e from \n3.4\nFerguson towicket\n3.3 and the other \n3.4\nFerguson to toe-end\n3.3 i.e both the occurence. However my code only gives me the largest one. Is there any way to do it? Any help would be highly appreciated.  Note : Please understand that what I want is all possible matched pattern however adding ? gives only the first one.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


How to install Ubuntu in parallel with Windows 10?  The wubi installer doesn't work and even the Boot from USB when trying to install does not process

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


I read , and while it does explain what's going on, it doesn't give any solutions. I'm using Creative A60 speakers (I think I bought these back in 2011, but not sure), plugged in through 3.5mm audio jack in the back of my computer. They're beeping/buzzing regularly when my phone is on my computer desk. I don't have any room to move my phone away from my speakers in a way that doesn't increase the risk of accidentally pushing it off, so I'm looking for an alternative option to make this interference go away. It's extremely annoying, especially when it happens at 11 PM when everyone else is asleep, and I want to get rid of it, preferably without buying new speakers. How do I stop this interference?

My PC's desktop speakers are periodically producing .  Even if I move my phone away from the actual speakers, the noises are still present with the same intensity. I have to completely move the phone away from my desk to get rid of the noises.  I know many different speakers and phones are affected by this as this has been an issue for me ever since I owned a mobile phone.  Why is the phone causing these noises even though it's far away from the actual speaker? What can I do to get rid of the noises (while keeping my phone on the desk)?


Currently there is no way to see from the mobile app if a post has been set or converted to community wiki. Is this feature planned for the app?

I'm requesting that Community Wiki questions and answers display differently than non-wiki ones or otherwise indicate that they are wikis.  Example CW post in browser:    How the same post looks in the app:    One can clearly see it is impossible to distinguish between CW and regular posts in the Android app.


Can someone help me understand why, calling n to the number of possible solutions to the below equation and constraint: $$ x_{1} + ... + x_{k} = 100 ;\textit{ }x_{i}\geq 1 \textit{ for }1 \leq i \leq k $$ n is: $$ n= \binom{99}{k-1} $$ It is used in my text book to reach the solution of a broader problem, but I can't see exactly why n takes that value. Thank you!

How to use the  method?  Say I want to find number of combinations I can get with $x_1+x_2+x_3+x_4=22$,  where $x_i\in\mathbb{N}$.  Is this the correct time to apply the method?  This is being repurposed in an effort to cut down on duplicates, see here:     and here:


Recently upgraded to a Samsung S10e and Android 10, but all Q&A in the Stack Exchange app v1.0.95 are blank.  The title and comments are visible, but question/answer posts are just white space. Accessing the About page in the app is also blank.  I tried clearing data, cache and re-installing the app, but I still get the same behaviour.

I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions.


We have $n$ number of people and some pairs given. These pairs of people are never to be together. How to calculate the number of arrangements possible? e.g we have n=4 and pairs =3 and pairs are (1,2) (2,3) (3,4) ,in this case their are 2 arrangements possible (2 4 1 3) and (3 1 4 2).

Given $n$ objects with values $\{x_1,x_2,x_3,\dots,x_n\},$ and $m$ pairs $a_k = \{x_i,x_j\}$. Let $\{p_1,p_2,p_3,\dots,p_n\}$ be a permutation of objects. The question is to find number of permutations of objects such that none of the pairs $\{p_i,p_{i+1}\} \in a_k\ \forall i \in (1,n-1)$.  I tried to use inclusion-exclusion principle, first I took all the objects without any constraint. Then I picked number a pair $a_k$ and removed it from the total answer using inclusion-exclusion. But I was not able to solve it.  I don't assume the solution has a compact form, so I expect a procedure rather than an answer.


I have created an app in c#, which sends SMS after a defined time gap, for this I am using timer and a label which count number of record(sent messages). now when I click on submit button to start sending sms, it fetches records from DB but when it come to that label portion which shows number of sms it shows an error message  System.InvalidOperationExecution Cross-thread operation not valid control 'lblXXX' accessed from a thread other than the thread it was created. My Code is  For Button  private void btnSend_Click(object sender, EventArgs e)         {             this.btnSend.Enabled = false;             this.starttimer();         }   For Timer  private void starttimer()         {             System.Timers.Timer timer = new System.Timers.Timer();             timer.Start();             timer.Interval = 3000;             timer.Elapsed += new ElapsedEventHandler(this.time_elapsed);          }   for Lable  while (this.dr.Read())                         {                             this.lblWeightSMS.Text = Convert.ToString(Convert.ToInt32(this.lblWeightSMS.Text) + 1);

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I've been trying to pair up my bluetooth keyboard with my computer after reinstalling from a standard ubuntu 12.04 to a minimal install.  In the minimal install I have no gui, so I've been trying to use the various command line tools available, but I can't figure out how the pairing is supposed to go. Pairing when I had a gui worked flawlessly.  I've asked for help here:   No one has replied but a lot of details of my situation is available there.  How is one supposed to pair bluetooth devices from the command line?

I am developing one site which has chat feature in Rails. I am using Ubuntu 12.04 LTS. I need to check that the site is IE9 because the chat feature using socket io of HTML5. I want to know that how to install IE9 in Ubuntu. I have looked at Chrome and Firefox extensions but if any standalone is available then please give me suggestion.


I'd like to perform polynomial regression on my data (which lies in [0,10]), but I need to ensure that the endpoints of the range are fixed, i.e. that the curve goes through (0,0) and (10,10). So the interpolant   $y = a + bx + cx^2 + \epsilon$  becomes   $y = bx + cx^2 + \epsilon$ with  $b = 1 - 10c$.  Assuming just quadratic for now, although I might go to a cubic if the data warrants it.  But how do I express this constraint during fitting?

I know how to perform a linear regression on a set of points. That is, I know how to fit a polynomial of my choice, to a given data set, (in the LSE sense). However, what I do not know, is how to force my solution to go through some particular points of my choosing. I have seen this be done before, but I cannot remember what the procedure was called, let alone how it was done.   As a very simple and concrete example, let us say that I have 100 points scattered on the x-y plane, and I choose to fit a whatever-order polynomial through them. I know how to perform this linear regression very well. However, let us say that I want to 'force' my solution, to go through, say, three of my data points at x-coordinates $x=3$, $x=19$, and $x=89$, (and their corresponding y-coordinates of course).  What is this general procedure called, how is it done, and are there any particular pitfalls I need to be aware of?  Edit:  I would like to add, that I am looking for a concrete way to do this. I have written a program that actually does the linear regression in one of two ways, inverting the covariance matrix directly, or through gradient descent. What I am asking is, how, exactly, step by step, do I modify what I did, such that I force the polynomial solution to go through specific points?   Thanks!


I cant find my follower Serena and for some reason most normal methods don't work sleeping waiting getting a dog and i have no other way I'm on Xbox and i need help please

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


New QGIS user, 2.6 Brighton.  My project CRS is default to Nad83ft / N.Carolina (US).  I loaded various polygon and line (provided to me) that have various CRS's but they still show correctly in place over USGS / ortho-imagery.  Oddly, setting each file's CRS to NAD83ft / N. Carolina moves them out of view. Clearly I'm missing something about CRS basics.

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


We know that the speed of light is always constant in space no matter the speed of the object emitting light, right?    Now consider this. An object is moving at half the speed of light and shined 2 beams of light; one in the direction it is moving and one in the opposite direction. If it was possible to see the beam of light, it would appear from the perspective of the object, that the beam of light moving in the same direction as its moving would appear to be moving at half the speed of light, and the beam of light opposite of the direction of the object would appear to be moving at 3/2 the speed of light.    Now, to apply this concept to something more possible. In theory, a device consisting of 3 laser beams, and 3 sensors could be able to calculate the absolute speed and direction it is moving in the universe. Say we made a device with 3 lasers set up so that they are all perpendicular to one another and sensors with known distances from the lasers, and all of this is occurring in a vacuum, then all at the same time the lasers would shoot at their respective sensors, and the times it took for the light to reach the sensors were recorded. The velocity of the lasers from the perspective of the device could then be calculated by using distance over time. Using the apparent velocity of the laser, the velocity of the object in the direction of the laser could be calculated by subtracting the apparent velocity from the speed of light. Then using these 3 velocity measurements, you could measure the speed that the device is moving through space itself. Using this device, it would be possible to measure the velocity of Earth at any point in time.    After researching the speed the Earth is moving, I saw that the method of figuring this out involves background radiation in the universe. Why would my method be discarded and the background radiation method be used instead. Surely I am not the first to think of this. Why would my method not be used?  Edit: I am aware that the speed of light is constant no matter what. Just it can seem to be going at 3/2 or 1/2 the speed of light from the perspective of something also in motion in the same way that a car going 60mph views a car going 90mph as going 30mph faster than it, or just 30mph in the perspective of the 60mph car.

The title says it all.  If I was on a bus at 60 km/h, and I started walking on the bus at a steady pace of 5 km/h, then I'd technically be moving at 65 km/h, right?  So my son posed me an interesting question today: since light travels as fast as anything can go, what if I shined light when moving in a car?  How should I answer his question?


In my Apache config httpd.conf, I wish to setup a rule like below  SetEnvIfNoCase %{QUERY_STRING} ^.*(getBook+)$ no-gzip dont-vary   I am hoping to do no-gzip when my URL looks like  http://myurl.fake.com/book/getBook3?id=234  http://myurl.fake.com/book/getBook1?id=xxx   I am not sure if I can do that by setting up something like the above in httpd.conf..  The reason I do query string is because the url  myurl.fake.com/book/getBook3 was mod_rewrite from  myurl.fake.com/index.php?controller=book&action=getBook3  Thanks!

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


The question is : Show that the nilpotent elements of a commutative ring form a subring.  Here is my unsuccessful take on it:  Let $R$ be a commutative ring and let $S = \{a \in R | a^n = 0 \}$  be the set of nilpotent elements from $R$. Now, $0 \in S$, since $0^1 =0$. Hence $S$ is nonempty.  Let $x,y \in S$, then for some positive integers $n$ and $m$ we have $x^n=0$ and $y^m=0$. So far so good.  Now we try to show that $(x + y)^k = 0$, for some positive integer k. This is where I am stuck.

Let $R$ be a commutative ring. Show that for any $a,b \in R$ nilpotent that $a+b$ is also nilpotent in $R$.  We know $a^n = 0$ for some n and $b^m = 0 $ for some m, so consider $(a+b)^{m+n} = (a+b)(a+b)...(a+b)$  $n+m$ times.  I don't see how $R$ being commutative helps me here.


I created an application in java and I want it to run only once. If the application is already running, a messagebox should popup telling the user that the application is already running.  Any idea?

Sometime I see many application such as msn, windows media player etc that are single instance applications (when user executes while application is running a new application instance will not created).  In C#, I use Mutex class for this but I don't know how to do this in Java.


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

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


Right now I've been using something along the lines of:  $mysqli->prepare("INSERT INTO names VALUES('$name')");   Is this less safe than using bind_param/bind_value or does it not matter and it's the prepare itself that makes it safe?  I've always been curious, I think using bind_param/bind_value is safer but I don't really know. Sorry if this is a duplicate as I couldn't actually find any other question (I don't really know how to phrase this question, so that's probably why).

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


I have three websites on various topics, but I can't decrease the bounce rate for them. Some spam referrers have been increasing my site's bounce rate day-by-day.       How can I remove this type of referral spam via a .htaccess? Can you provide an example for one such referrer?

I'm getting a lot of spam referral traffic from semalt.semalt.com/referral on my website. I took a look at the link and there’s very little information about this.   The number of website visits is 185 this month, and they result in a 100% bounce rate.   So how I can block this website?


Basically, the functions of ctrl have switched with the basic controls. If I want to have smooth scaling, I now need to press ctrl. I don't know what I have toggled , but I'd rather not reload an entirely new project and copy over the obj file.

My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal?


I've looked around for this and there seem to be a couple of different ways on how to do this.     However, all of these seem to be old ways (I might be completely wrong here and those methods can be totally valid today) but I'd like to make sure I'm using the latest method for doing this and avoid making a request like it's suggested in one of the StackExchange answers in the link above (The tooling API method). I also don't want to implement this in a Visual Force or any UI pages, I'd like to create custom fields on an existing object based on a received post request. A simple example for what I'm trying to do: for (String fieldName : fieldNameList) {    Existing_Custom_Object__c.CreateNewCustomField(name = fieldName, type = checkbox, ...);    // Upload/Push this change to the org }

Anybody knows how to create custom text fields on salesforce.com objects using apex?


I am using macOS 10.15.6 with zsh. I was creating a small script for bash and ksh, and wanted to test it quickly in zsh, and found that zsh was behaving strangely compared to other shells. Here is the culprit line in my code (simplify to the extreme): ls something.* 2> /dev/null  In the case that there are no file beginning with "something.", then you should get no output, no error, nothing. Just nothing. It just works with bash, ksh and sh. So back to my problem, on macOS I have this version zsh 5.7.1 (x86_64-apple-darwin19.0) the output I get when running the previous command is the following: % ls something.* 2> /dev/null zsh: no matches found: something.*  Is that normal? Why the stderr was not redirected to /dev/null??? This is one of the first time I am really using zsh, so I might have missed something here. I have read the documentation at this link, and I don't see how this simple line is wrong according to the zsh documentation... (  ) Thank you in advance for your help!

Using zsh, I get a "No match found" message when choosing a pattern that does not fit with rm and that even when redirecting the output.  # rm * > /dev/zero 2>&1   zsh: no matches found: *   How can I get rid of this message?


I have a task to enter word http:// at begining of each line of text file. How this can be done using shell script  My text file is like:  agr.nc.in mpi.ni.in ir.o.in chemis.go.in da.ni.in dgt.go.in dgn.go.in   output file should be like:  http://agr.nc.in http://mpi.ni.in http://ir.o.in http://chemis.go.in http://da.ni.in http://dgt.go.in http://dgn.go.in

What's the simplest way to do a find and replace for a given input string, say abc, and replace with another string, say XYZ in file /tmp/file.txt?  I am writting an app and using IronPython to execute commands through SSH — but I don't know Unix that well and don't know what to look for.  I have heard that Bash, apart from being a command line interface, can be a very powerful scripting language. So, if this is true, I assume you can perform actions like these.  Can I do it with bash, and what's the simplest (one line) script to achieve my goal?


I have been trying to establish that there is a bijection from the set of real continuous function on $[0,1]$ denoted by $C[0,1]$ to the set of reals $\mathbb{R}$.  I have been using Cantor-Schröder-Bernstein theorem to prove this. Consider the function: $f:\mathbb{R} \to C[0,1]$ by $f(x)$ equals the constant function $g:[0,1]\to\mathbb{R}$ given by $g(y)=x$ for each $y\in[0,1]$. Clearly, $f$ is an injection. I have been trying to find an injection from $C[0,1]$ to $\mathbb{R}$ but have been unsuccessful in doing so.  I suspected that $h:C[0,1]\to\mathbb{R}$ defined by $h(f)=\int_{0}^{1}f$ would work but certainly it doesn't.  Hints would be appreciated.  TL,DR: Find an injection from $C[0,1]$ to $\mathbb{R}$.

I believe that the set of all $\mathbb{R\to R}$ continuous functions is $\mathfrak c$, the . However, I read in the book "Metric spaces" by Ó Searcóid that set of all $[0, 1]\to\mathbb{R}$ continuous functions is greater than $\mathfrak c$:  "It is demonstrated in many textbooks that $\mathbb{Q}$ is countable, that $\mathbb{R}$ is uncountable, that every non-degenerate interval is uncountable, that the collection of continuous functions deﬁned on  $[0,1]$ is of a greater cardinality than $\mathbb{R}$, and that there are sets of greater and greater cardinality."  I understand that (via composition with the continuous function $\tan$ or $\arctan$) these sets of continuous functions have the same cardinality. Therefore, which claim is correct, and how do I prove this?


I need to find a way of speeding up the following Python code, not by just using some kind of package, but by using a different method. I can only see that a for loop is going to work for a problem of this kind.  import time start_time = time.clock() #Set the start time of the program to be the current time  Nlist = [10**2, 10**3, 10**4, 10**5, 10**6, 10**7, 10**8] #The values of N we are summing to  for k in range(len(Nlist)): #Repeating the loop for the amount of elements in our list     x = 0.     y = 0. #Set initial values for x and y      for i in range(1,Nlist[k]+1): #Summing over the various values of N (separately) in our list          x = 1./i #The summand          y += x #Keep adding 1/i for i=1,...,N i.e. our desired result  end_time = time.clock()  print('') print('Time taken: {} seconds'.format(end_time - start_time)) #Prints time taken to run program   Here, I need to sum the harmonic series up to different values, namely N. The above code takes around 25 seconds to execute.  Is there a better way of doing this?

Does anyone know how to write a program in Python that will calculate the addition of the harmonic series. i.e. 1 + 1/2 +1/3 +1/4...


My customer.dat files looks like as follows:    4  Jon 1000  Jane 2000  Jake 20000  Drake 100000   The first number represents the total number of customers in that file, while the first string is the Name of the customer and the latter is the balance they have.  The following code is the application code I have written. I want it to read from the customer.dat and create an array. The problem with the application is that I created a customer ID, which checks the name the user inputs(if it exists in the array( and then sets a customer ID. However, whenever I run the application, no matter what name I type, even if I type Drake - and type "1" to view the portfolio, it ends up always showing the first name which is Jon.      Scanner infile2 = new Scanner(new File("customer.dat"));      customer[]mycustomers; // declaring an array to stock      int numofcustomers = infile2.nextInt();     mycustomers = new customer [numofcustomers];       for (int i = 0; i < numofcustomers; i++)     {         mycustomers[i] = new customer(infile2.next(),infile2.nextDouble(), numofcustomers);         System.out.println(mycustomers[i].toString());     }     Scanner input = new Scanner (System.in);     System.out.println("Please type in your name");     String Name  = input.nextLine();     int cusID = 0;     for (int i = 0; i < numofcustomers; i++)      {         if ( Name == mycustomers[i].getName())        {            cusID = i;         }     }     System.out.println("Please type in 1 for a customer to view their portfolio, 2 to trade stocks or 3 to exit the application");        int choice  = Integer.parseInt(input.nextLine());      if (choice == 1)     {             System.out.println(mycustomers[cusID].toString());      }   The following is a snippet of what is located in my customer.java which contains setters and getters:      public customer(String n, double b, int Size)     {         Name = n;         balance = b;         stock[] A = new stock[Size];         Portfolio = A;     }      public String getName() {         return Name;     }      public void setName(String name) {         Name = name;     }   I'm not sure if I was able to describe the problem correctly, but if not, let me know if any more information is required.

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


I have a question about the definition of linear independence. I saw a definition below in my course. Definition A set of vectors $\{v_1, \cdots v_n\}$ is linearly independent if the equation $c_1 v_1 +\cdots c_n v_n = 0$ has only the trivial solution $c_1 = \cdots =c_n =0$. The set is called linearly dependent otherwise. When I saw this, I wondered: what if $v_i$ are all the same? For example, Is $\left\{\begin{pmatrix} 1 \\ 0 \end{pmatrix},\begin{pmatrix} 1 \\ 0 \end{pmatrix}\right\}$ linearly independent? My thought is that, since set with the same element $\{a,a\}$ is equal to $\{a\}$, as we see , so $\left\{\begin{pmatrix} 1 \\ 0 \end{pmatrix},\begin{pmatrix} 1 \\ 0 \end{pmatrix}\right\}=\left\{\begin{pmatrix} 1 \\ 0 \end{pmatrix}\right\}$ must hold, and this set is linearly independent. Is this correct? if not, why? This question arose when we were discussing the statement "$n+1$ vectors in $n$-dimensional vector space are linearly dependent". If my argument is correct, I think this would be false.

My question concerns the definition of linear combinations and a criteria for linear independence of a Set (either finite or infinite).  Here is the following Definition and Criteria given:   A vector $v$ in vector space $V$ is a linear combination of vectors of set $S$ if there is a a finite number of vectors $x_1, \cdots , x_n$ and scalars $a_1, \cdots , a_n$ such that $$v= a_1x_1 + \cdots + a_nx_n$$  Question:  Here is finite restricted to more than $1$ vector. Or does this definition include the possibility of a vector $v$ being a linear combination of no vectors?  Also, can these finite vectors in set S be the same. That is must they all be distinct?   Criteria for Linear Independence:  My book writes the following fact:  A set is linearly independent if and only if the only representations of the zero vector as linear combinations of its vectors are trivial representations.  Question:  Taking in mind the definition of linear dependence requires a nontrivial representation of the zero vector as a linear combination of DISTINCT vectors of the set examined for linear dependence, why does this criteria for linear Independence say "as linear combinations of its vectors" as opposed to "as linear combinations of its distinct vectors" ?   Lastly, if a set is linear independent, does that imply the set contains distinct vectors?  Does it make sense to talk about linear dependence and linear independence in the context of a set of vectors with some vectors repeated. That is with a set of vectors with element all not distinct?    Thanks in Advance.


Consider the following code:  class SomeClass:     def __init__(self):         self.foo = None  some_list = [SomeClass()] * 5   The problem with this code is that all 5 items of some_list refer to the same instance of SomeClass. If I do some_list[0].foo = 7, then I get some_list[1].foo equal to 7, etc.  So how to instantiate N different SomeClass instances in a list?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Is there any climatic portal for downloading historical climatic data ( Rainfall & Temperature) on a daily basis or at least on a decadal basis?  PRISM gives only for US regions.

I'm looking for climatic information in the form of raster like MODIS daily LST (Land Surface Temperature) data. I'm looking for other parameters like precipitation, humidity, air pressure and so on. Does anybody have information where could I find MODIS (or other sources) data for these parameters and what is the best choice for each?


I am trying to capture some text in a string shown below  testdir1\testdir1\textfile.vhd  I want to capture the file extension plus the dot and i am using the regex  [.vhd]{4}$  This seems to work on regex101    but when i actually implement this in python it doesn't  import re result = re.match(r'[.vhd]{4}$',"testdir1\\testdir1\\textfile.vhd") print(result)  None   I am assuming that the regex is essentially working but i am calling the python match function wrong???  any help would be appreciated.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


The question is basic, How to get output of ps with headers in Linux.   Linux details:  PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)"   I can get it with ps -ef | { head -1; grep query; }, but that is lot of text. When looking at docs of ps using man ps, I can see there is one option --headers, but using that also does not give headers:  >~$ ps aux --headers | grep grep user  24082  0.0  0.0   6656   628 pts/0    S+   12:59   0:00 grep grep   Also tried option h with the command:  ~$ ps auxh  | grep grep user  25982  0.0  0.0   6656   624 pts/0    S+   13:14   0:00 grep grep

How can I grep the PS output with the headers in place?  These two process make up an app running on my server....  root     17123 16727  0 16:25 pts/6    00:00:00 grep GMC root     32017     1 83 May03 ?        6-22:01:17 /scripts/GMC/PNetT-5.1-SP1/PNetTNetServer.bin -tempdir /usr/local/GMC/PNetT-5.1-SP1/tmpData -D   does 6-22:01:17 mean that it's been running for 6 days?  I'm tring to determine the length of how long the process has been running...  Is the 2nd column the process id?  So if I do kill 32017 it'll kill the 2nd process?


Whuber provided an answer at  which required using Avenue code.    Any idea how to make it work in ArcGIS Desktop 10?

How would you generate building shadows from building footprints? I have attribute values for the heights of buildings. So would preferably like to have the shadows' sizes vary based on that. The best suggestion I've found using ArcGIS is drop shadows:


I get the error mentioned in the title of the question. Can you help me please ?  \begin{table}[htb!]       \centering         \caption{\textit{others criterias : first scenario}} \label{Table2}         \resizebox{0.5\columnwidth}{!}{%      \begin{tabular}{c|ccc|cccc|c}     &\multicolumn{3}{c}{\underline{Instances}}     &\multicolumn{4}{c}{\underline{DPA}}     &&     &Staff &Activities &periods  &EA     &EB    &TG-AV   &RV-TD   \\ \hline        &3     &72        &10     &477    &47     &178    &1421    \\         \hline          &3     &72        &10     &1087   &34     &207    &1170    \\         \hline          &3     &72        &10     &1415   &22     &215    &932     \\         \hline          &5     &120       &10     &1925   &1977   &485    &1897    \\         \hline          &5     &120       &10     &457    &552    &216    &1123    \\         \hline          &6     &140       &10     &1605   &1981   &347    &3039    \\     \hline     \end{tabular}%     }     \end{table}


Prove that $n<2^n$ for every positive integer $n$.  $P(1): 1 < 2^1$  $n+1<2^n+1$ for induction hypothesis  $n+1<2^n+2^n$ I can't undertstand this passage (this is from my teacher's slide)  $n+1<(2)2^n$  $n+1<2^{n+1}$

These are just the examples from my textbook, but I don't think it did not explain well.  One of the problem was to prove the inequality   $$n<2^n$$  for all integers $n$.  I understand we assume if $P(n)$ is true, $P(k+1)$ is true.  Thus $k+1< 2^{k+1}$  But in the text book, they added one more line that I don't understand:  $$k+1<2^k+1 \le 2^k+2^k=2\cdot2^k=2^{k+1}$$  I understand  $$k+1<2^{k+1}$$  But how do I know $2^k+1$ is larger than $k+1$, and smaller than $2^{k+1}$?  I have one another example just in case,  proving $2^n<n!$ using induction.  $$2^{k+1}=2\cdot 2^k<2\cdot k!<(k+1)k!=(k+1)!$$  I understand we should start with $2^{k+1}<(k+1)!$, but  Where did $2\cdot k!$ come from? Textbook says it came from inductive hypothesis, but I still don't get it.  Please advise.


// this has data from elsewhere, just showing its the same type multimap<string,string> map_with_data; string string_key = "some_string";  // not working: multimap<string,string> new_map;  new_map = map_with_data[string_key];   I want a return of a multimap with only the key pairs with the key string_key. What is the right way to do this or is this method of direct copying even possible?  I'm getting: error: no match for ‘operator[]’ (operand types are ‘std::multimap<std::basic_string<char>, std::basic_string<char> >’ and ‘std::string {aka std::basic_string<char>}’)|

Multimap essentially has groups of data sorted by the key. I want a method by which I could access these individual groups and get their aggregate values. For example, in a std::multimap< string, int > I store   {"Group1", 1},  {"Group1", 2},  {"Group1", 3},   {"Group2", 10},  {"Group2", 11},  {"Group2", 12}   Having stored these values, I should be able to iterate this multimap and get the aggregate values of each "group". Problem is there aren't any functions defined in STL to access MultiMaps in such a way. I could use lower_bound, upper_bound to manually iterate the multimap and total the group's contents, but I am hoping there could be better ways already defined in STL ? Can anyone propose a solution as to how I could get the aggregate values for a group in the above example.


I have a 4TB internal drive in my ubuntu server. This drive contains backups made by a script that's been running for years. This script creates a new directory every day and rotates the existing ones, something like backup.1 (today), backup.2 (yesterday), backup.3, and so on. It keeps 365 directories (so a full year of backups). The script uses symlinks in order to not duplicate files. So backup.1 will contain new/changed files but files that are the same than yesterday will be symlinks to the files referenced in backup.2 (or point to the same inode if the one in backup.2 is a symlink). So this is very efficient. The problem is I'm attaching an external drive now, another 4TB drive. I want to run a script to "clone" the internal 4TB directory using rsync. This is my script: echo "Stopping crons" /etc/init.d/cron stop  echo "Mounting external drive" mount /dev/sdd1 /mnt/external-drive/  nice -n2 rsync -av --delete /mnt/master/ /mnt/external-drive/  echo "Starting CRONS" /etc/init.d/cron start  The problem I have is my external drive is full. I check and rsync is not keeping the original structure. It's rather creating a new file even for the files that in the source drive are just links. My source drive has only 2TB used.

How to move directories that have files in common from one to another partition ?  Let's assume we have partition mounted on /mnt/X with directories sharing files with hardlinks. How to move such directories to another partition , let it be /mnt/Y with preserving those hardlinks.  For better illustration what do I mean by "directories sharing files in common with hardlinks", here is an example:  # let's create three of directories and files mkdir -p a/{b,c,d}/{x,y,z} touch a/{b,c,d}/{x,y,z}/f{1,2,3,4,5} # and copy it with hardlinks cp -r -l a hardlinks_of_a   To be more specific, let's assume that total size of files is 10G and each file has 10 hardlinks. The question is how to move it to destination with using 10G (someone might say about copying it with 100G and then running deduplication - it is not what I am asking about)


I am trying to install Guest Additions in VirtualBox with Windows XP host and Ubuntu 12.04 guest. I followed the above steps:  Devices-> Insert Guest Additions CD Image. After that I locate the folder /media/VBoxAdditions4.3.4_91027/ and run sudo ./VBoxLinuxAdditions.run   I want to be able to create shared folders and adjust the resolution of the screen. I achieved to do the first issue, but I couldn't do the second one. I didn't get any message, however it is not possible to change the resolution of the screen and I cannot switch to fullscreen. What am I doing wrong?  I found in the instal log the following message: unknown version of the X Window System. I've tried the solution of the proposed link but I got the following message:  Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies: virtualbox-guest-x11 : Depends: xorg-video-abi-11                     Depends: xserver-xorg-core (>= 2:1.10.99.901) E: Unable to correct problems, you have held broken packages.   I tried also to install with the command sudo apt-get install virtualbox-guest-dkms but nothing is changing. During the installation of dkms I got the message: Error! Bad return status for module build on kernel 3.13.0-32-generic(i686).

Environment: Lenovo T530 running Windows 7.  Have installed Ubuntu 14.04 on a virtual machine using VM Virtual Box.  Have installed all the updates from both Virtual Box and Ubuntu.  Problem: While in Ubuntu's desktop and other Ubuntu initiated programs, the window is reduced to about 3x4 inches showing in the middle of the rest of my regular Virtual Box window.  I am seeing only the upper right hand of the screen output of what I would normally see.  Please help.   I've seen    But, none of these answers works in 14.04.


Let's say we have a playlist consisting of $N$ songs. Each time I want to listen to music, I pick a random sample of $k\leq N$ different songs ($k$ is constant and deterministic over time) from that playlist and listen to them. Note that in the $k$ songs of one sample there are no duplicates, but the next may contain songs I've already heard in other samples. What is the expected number of samples I have to pick such that I have heard each song of that playlist at least once?  I calculated a simple example, where $N=3, k=2$ and let $X$ denote the random variable representing the number of samples it takes to cover all songs. Then $$ E[X]=\sum_{n=1}^{\infty}n\cdot Pr(X=n)=0+2\cdot\frac{2}{3}+3\cdot\frac{1}{3}\cdot\frac{2}{3}\dots=\sum_{n\geq 2} n\cdot\frac{2}{3}\cdot\frac{1}{3^{n-2}} \\ =\frac{2}{3}\cdot\sum_{n\geq 0}\frac{n+2}{3^n}=\frac{2}{3}\cdot\left(\frac{3}{(3-1)^2}+\frac{2}{3-1}\right)= \frac{7}{6} $$  But if I try to be more general or even only consider a little more difficult example I have problems calculating the individual probabilities as the possible combinations for $X=n$ depend on the previous combinations and I don't know how to take that into account.  Can anybody help me out with that and maybe also verify if my calculations for the example were correct?

I heard an interesting question recently:     What is the minimum number of people required to make it more likely than not that all 365 possible birthdays are covered?   Monte Carlo simulation suggests 2287 ($\pm 1$, I think).  More generally, with $p$ people, what is the probability that for each of the 365 days of the year, there is at least one person in the group with that birthday?  (Yes, ignoring the leap-day.)


When posting questions to several different sites across the Stack Exchange network, I've noticed that depending on the tags that I've included as part of my question, one of these tags will sometimes be selected and added to the title of the question. As an example, if you take a look at a question that I posted on the Apple Stack Exchange site (), you'll notice that the "Cellular Carriers" tag is listed in the title of the page - despite it being the second tag listed as part of the question. What determines which tag is shown as part of the title of the question?

I've seen questions edited to remove the language name from the title. Won't search engines - and folks using search engines - have an easier time finding them if these "tags" are kept as part of the title?


Show that if $\gcd(a,b) = 1$ and $a|n$, $b|n$ then $ab|n$  What I have is as follows:  If $\gcd(a,b) = 1$ and $a|n$ and $a|n$ we know that:  $a=mn$ and $b=sn$ were $m,s \in \mathbb{Z}$  $ab|n = (mn)(sn)|n = n(ms)|n = \frac{(n)(ms)}{n} = ms$  This is were I am stuck. Im I done here or am I missing something?

I'm stuck at proving:     Let $a, b, c \in \mathbb{Z}, a\cdot b \neq 0$. Prove:   $$ a \mid m \hspace{15px}\text{and}\hspace{15px} b \mid m \implies \frac{a \cdot b}{\text{gcd}(a, b)} \mid m $$   My current attempt looks like this:  Let $t := \text{gcd}(a, b)$ donate the greatest common divisor of $a$ and $b$.   $$ \implies\exists\, a', b': a = t\cdot a' \hspace{15px}\text{and}\hspace{15px} b  = t \cdot b' $$  $$ \implies \frac{a  b}{\text{gcd}(a, b)} = \frac{a  b}{t} = \frac{t  a'b}{t} = a' b $$  I know that since b \mid m: $a'b \mid m$ iff $\text{gcd}(a', b) = 1$ and $a' \mid m$, but I'm not sure whether this is the right approach to this problem.   Currently I don't know about identities involving the least common multiple.


If my pie is hot, and Lola's pie is hot.  Can I say      "Lola and my's pies are hot"?    Or should it be      "Lola's and my pies are hot"?   These posts,  and  deal with possessive pronouns and the Saxon genitive, but do not address specifically the case illustrated here.

I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water?


Used space on Disk C: doesn't match actual used space. Difference is around 30 GB.  Results of chkdsk:       116859903 KB total disk space.       70064692 KB in 249924 files.         135696 KB in 53311 indexes.              0 KB in bad sectors.         552999 KB in use by the system.          65536 KB occupied by the log file.       46106516 KB available on disk.        4096 bytes in each allocation unit.   29214975 total allocation units on disk.   11526629 allocation units available on disk.   In addition it has listed the following:       The Volume Bitmap is incorrect.     Windows has checked the file system and found problems.     Please run chkdsk /scan to find the problems and queue them for repair.   To which I have run chkdsk /scan and it comes out with no errors found. I have also attempted running the Tools > Error checking in the properties dialog of the disk with the same outcome.  However, the indication in This PC and the Local Disk (C:) Properties shows 97.4 GB used or 13.9 GB free space.    Completely contrary to:   chkdsk with 43.97 GB free WinDirStat with 64.6 GB used SpaceSniffer with 71.9 GB used    Any idea why the difference would be there and how to resolve the issue?  SpaceSniffer shows 25.5 GB Unknown (not yet scanned) Space. Found thanks to . However I do not have the Lenovo R&R backups issue (RRBackups folder in C:) as specified in that question.    Still working on figuring out what that unknown space is. If anyone has any suggestions please let me know.

I'm trying to determine what's eating almost half of disk on my Windows 7 Lenovo laptop but haven't been able to determine what.  I read some of the answers on this site but none of the causes seems to be the cause of my problem.  What I've done so far:   Checked Windows' System Restore points but only minimum use, either way I deleted around 2GB if usage from there Used WinDirStat and it came back with a total of 71.3GB usage at the root level C Drives properties says 135GB being used out of 138 GB total, ie, 135 GB - 71.3GB = 63.7GB missing somewhere No "Unknown" files reported by WinDirStat Windows Disk Management utility doesn't report any unused partitions or unclaimed space chkdsk comes out clean Windows disk cleanup tool doesn't report anything big, just small stuff in the lower MB range Lenovo backup tool hasn't been used nor there is a folder for the backup images   Any idea on what to look at and/or do?  EDIT: some additional info...