I have a high-resolution white-paper texture background that I want to add to my Drupal site with the default Bartik theme.  I've looked at several posts across the web on how to do this with no clear answer.  I also haven't been able to find a Drupal module to do this. Most of the advice I've read is to modify the theme's CSS files.  But it's not clear which CSS file I should edit.  Colors.css, style.css?  I'm almost certain that the line I need to add is     background-image: url("/images/papertexture.jpg").    But I'm not sure where to add the CSS.

I used this: wrapper    { background-color:yellow; } but I want really everything in the background to get colored. how to? Code above just makes the wrapper background change.


Is there any chance to change the vertical spacing in theorems when using beamer? The space I am talking about is between the word "Theorem" or "Definition" and the first line in the theorem.  And also, how to force text to continue right after the word "Theorem" without making the newline?

I'm trying to create a theorem style using Beamer with Madrid theme, but I can't figure out how to not have it in boxes. Everything I try just simply ends up automatically inside boxes. Also, I don't want a line break between the title and the text.  Any ideas?  Thanks a lot.


I am using the knn means algorithm to distinguish groups. In case on the iris dataset, lets take this example:  from sklearn import datasets  iris = datasets.load_iris() X = iris.data   I understand that I can create different clusters with k. What I am looking for however is a way that can help me to determine what is the best k, so whether 2,3,4 etc... creates the best and most homegenous groups?  Any thoughts on what is considered best practise in this case?

I performed a 5-fold CV to select the optimal K for KNN. And it seems like the bigger K gets, the smaller the error...    Sorry I didn't have a legend, but the different colors represent different trials. There are 5 total and it seems like there's little variation between them. Error always seems to decrease when K gets larger. So how can I choose the best K? Would K = 3 be a good choice here because the graph kind of levels off after K = 3?


I don't understand the meaning of this command.  ls ../slc > dates   How does it work?

I tried to rev a file and then pipe it to cat > same_file but it was turning into a blank file.    While I tried rev file.txt | cat > file2.txt && mv file.txt file2.txt; it worked.    Even rev file.txt | cat >> file.txt; worked.  But when I tried rev file.txt | cat > file.txt it failed.


I would like to use version management such as GIT to Access Application. I have got conflict issue on the Access Application which 2 people modify the code and then override each other modification.  Is there any way to use version management such as Git ?

I'm involved with updating an Access solution.  It has a good amount of VBA, a number of queries, a small amount of tables, and a few forms for data entry & report generation.  It's an ideal candidate for Access.  I want to make changes to the table design, the VBA, the queries, and the forms.  How can I track my changes with version control? (we use Subversion, but this goes for any flavor) I can stick the entire mdb in subversion, but that will be storing a binary file, and I won't be able to tell that I just changed one line of VBA code.  I thought about copying the VBA code to separate files, and saving those, but I could see those quickly getting out of sync with what's in the database.


I purchased 20 GB extra of storage for my iPad and iPhone on iCloud. But my devices say they are still full. How do I get the storage to show up so I can download an update, apps etc.?

I just changed my storage plan for 50 GB for $0.99 per month. When i went on settings>General>Storage and icloud usage, where it said storage above it i didnt have more storage. But the second box, where it said icloud abov it had upgraded to 50 GB. But i dont have any more storage for me to be able to get more apps etc.


If I run time uname -a | awk '{ print substr($3,1,9)" "$12 }', I get:  $ time uname -a | awk '{ print substr($3,1,9)" "$12 }' 4.15.0-70 x86_64  real    0m0.016s user    0m0.003s sys     0m0.016s $    I would like to run the above command several times and save the entire output to a file. So I tried  for i in {1..10}; do time uname -a | \ awk '{ print substr($3,1,9)" "$12 }' >> uname.txt; done   But only 4.15.0-70 x86_64 is sent ten times to the file uname.txt. The output of time is sent to the screen for each run and not to uname.txt.  So how can I have the output of time also captured in uname.txt?    I can use script and that works but the output isn't pretty:  (B[m(B[m(B[m4.15.0-70 x86_64  real    0m0.017s user    0m0.013s sys 0m0.007s (B[m(B[m(B[m4.15.0-70 x86_64  real    0m0.015s user    0m0.008s sys 0m0.009s (B[m(B[m(B[m4.15.0-70 x86_64  real    0m0.015s user    0m0.008s sys 0m0.008s   Or as an image:    I know I could clean it up if there's no better way.

For the delivery I've been advised to print the full output of my program to a txt file. Also I need to print the execution time using the command "time" that I have implemented in my execution script.  #!/bin/bash time ./blur-effect 4k.png 4k_out16.png 16 15 &>> Output.txt    The problem I'm having is that the program output is going correctly to the txt file, but the execution time is being showed in the terminal but it must be printed also in the txt file.


When the reputation changes you can see what specific post caused the change, the exception to this rule (are there others?) is when a user is removed.  When I see that my reputation has changed due to the removal of a user I would like to see a list of posts which the user has voted on and how the reputation has changed for each.  Why do I want this? Probably because I'm slightly obsessive, I'm not sure this feature actually has any real value. I would totally understand rejecting the request but I just thought I'd let my wishes known...

Currently, when rep is changed due to the removal of another user account (to undo the rep gain/loss that happened when they up-/down-voted/accepted/were downvoted by you), the associated message is simply "User was removed". I am not the only one who found that message rather cryptic (I had to go search meta when I saw it, and I found my answer in a duplicate, so that makes me at least the 3rd person to not understand it).  I think it's a good idea to add a link to  or some more descriptive text to that.  Edit: e.g.     Another user was removed; reputation changes linked to the user's activity were reverted.   (I can see how it's hard to fully explain the event succinctly, that's why a "what is this?" link to meta or an FAQ question/answer might be better.)


Does the AC and Saves properties of Cloak of Protection and Ring of Protection stack in D&D 5E?

I play in Adventurers League and have a character that has a +1 Ring of Protection, which gives +1 to AC and saves. I also have a Stone of Good Luck which gives a +1 to saves and ability checks.  If I equip both items and my base Dex save is +4, would it become +6 due to receiving both bonuses, or +5 with just one? I can't find much in the PHB or Google to answer this.


I am spending the summer in Dresden. When I came here, I was carrying my iPhone 5s. Now I bought a new iPhone 6s here in Dresden and I am using it, as well as my older one, which was broken (the front camera doesn't work.) Will there be any trouble at Indira Ghandi International Airport, Delhi, if I carry the phones together in my hand bag?  Please let me know about the details, the procedures, and the problems that might occur and how to avoid them.

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


I'm having issue with fixing icon in the middle of my div. I just want to know how to fix material-icons icon-def in div collapse menu trigger. Thank you for answering me. In jsfiddle it's working, but not in my browser.     #navbar {   background: rgb(16, 16, 16);   color: white;   width: 70px;   position: absolute;   margin: 0;   top: 0;   bottom: 0;   border-right: rgb(246, 246, 255) 1px solid; }  .collapse-menu-trigger {   display: block;   width: 70px;   height: 50px;   line-height: 50px;   text-align: center;   position: absolute;   bottom: 0;   cursor: pointer; }  .collapse-menu-trigger .material-icons {   vertical-align: middle; }  .collapse-menu-trigger .material-icons.icon-def {}

     keyboard_arrow_right     keyboard_arrow_left

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I was installing KDE plasma on Ubuntu but the power supply was cut off. when I tried to reinstall, an error occurred.  Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: kde-telepathy-minimal : Depends: kde-config-telepathy-accounts (>= 15.04.0) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   I tried to use sudo apt-get --purge remove kubuntu-desktop but it failed. Using sudo apt-get -f install didn't work.  The following additional packages will be installed:  kde-config-telepathy-accounts The following NEW packages will be installed:  kde-config-telepathy-accounts 0 upgraded, 1 newly installed, 0 to remove and 60 not upgraded. 704 not fully installed or removed. Need to get 0 B/148 kB of archives. After this operation, 808 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 293342 files and directories currently installed.) Preparing to unpack .../kde-config-telepathy accounts_4%3a15.12.3-0ubuntu1_i386.deb ... Unpacking kde-config-telepathy-accounts (4:15.12.3-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_i386.deb (--unpack): trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package account-plugin-google 0.12+16.04.20160126-0ubuntu1 Processing triggers for libc-bin (2.23-0ubuntu7) ... Errors were encountered while processing: /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I also used sudo dpkg --remove --force-remove-reinstreq kubuntu-desktop and it completed successfully but have no effect. I couldn't install synaptic and I also couldn't upgrade the package either. I also couldn't remove google-im.service

I'm trying to update and upgrade my kubuntu 15.04. After trying to install all upgrades, I got the following error message:  The following extra packages will be installed: kde-config-telepathy-accounts The following packages will be upgraded: kde-config-telepathy-accounts 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/122 kB of archives. After this operation, 1.948 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 626049 files and directories currently installed.) Preparing to unpack .../kde-config-telepathy-accounts_15.04.0-0ubuntu1~ubuntu15.04~ppa1_amd64.deb ... Unpacking kde-config-telepathy-accounts (15.04.0-0ubuntu1~ubuntu15.04~ppa1) over (0.9.0-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.0-0ubuntu1~ubuntu15.04~ppa1_amd64.deb (--unpack): trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package account-plugin-google 0.12+15.04.20150415.1-0ubuntu2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) E: Sub-process /usr/bin/dpkg returned an error code (1)   How can I fix this problem?


Is there a function which would be a "functional square root" of the exponential function? I.e., function $f(x)$ such that: \begin{equation} f(f(x))\equiv f^2(x)=e^x \end{equation}  If not, what is the proof of non-existence?  If there is such a function, is it unique? Is it analytic? If it isn't unique and can be analytic, is analytic solution unique?

I was thinking, inspired by mathlinks, precisely from , if there exists a continuous real function $f:\mathbb R\to\mathbb R$ such that $$f(f(x))=e^x.$$ However I have not still been able to come up with an answer. I would like to share this problem with you.   I'm not aware of its level, though i wouldn't classify it as homework, so I'm not giving it the homework tag. If anybody feels that this problem is in reality easy or looks like an homework, please feel free to add that tag.    EDIT for those interested in the complex case, I've found this on MathOverflow. It's the first answer. Wow!


Timeline:  Asked a question, no (interesting) answers for two weeks  Set bounty on it this morning  Found the answer to my question two hours later. Answered my own question.  Bounty reputation is lost. It was not awarded to me, it was not returned to me (the 100 I invested).   Right now, I feel really stupid for answering my own bounty question.   If this is accepted behavior, then user should be warned - you are answering your own bounty question, your bounty reputation will be LOST.

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


Javadoc says that if in the string pool there is an equal String that the intern() method will return the String.   public class Demo { public static void main(String[] args) {     String str1 = "Apple";     String str2 = new String("Apple");      System.out.println(str1.intern() == str2); //false     System.out.println(str1 == str2.intern()); //true }  }   I expected to get true in both cases.

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 tried soo many guides and soo many things i browsed like the whole world wide web and I could not install aircrack-ng suite. Any help would be appreciated :) Thank you all, Best regards.

Whenever I attempt to install aircrack-ng in terminal I get the following error:  Package aircrack-ng is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:   iw  E: Package 'aircrack-ng' has no installation candidate"   I'm new to Ubuntu and so have no idea what to do.


I want to draw a perfect rectangle. How can I do that with QGIS v.3+?  .  Is there a similar solution for the latest QGIS version?

When creating a polygon, how do I do it so that the lines are straight (90, 0 degrees, etc.) and when I create corners they can be right angles? For instance, how do I create a perfect square or rectangle?


Which of these two statements is correct?  Did you know 1 in 4 kids have an undetected vision problem? Did you know 1 in 4 kids has an undetected vision problem?

Take the examples:   "One in ten children are dyslexic."  "One in ten children is dyslexic." "One in ten children has dyslexia." "One in ten children have dyslexia."   The "one" is singular so 2 and 3 should be correct. But the "one in ten" is a fraction" so 1 and 4 should be correct. And yet I think I usually say 1 and 3. Which is/are correct?!


I have an abstract class and a class which extends it and implements the methods without adding further methods of its own.  Let's call the classes A and B. B extends A. should i create an instance of class B like this  A newInstance = new B();   or like this  B newInstance = new B();   Does it make any difference and which is a better practice ?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I want to delete my CPTs and taxonomies when someone uninstalls the plugin.  Since the plugin is already deactivated the only way that i can do this is by issuing directly SQL statements to the db using $wpdb.  Is this correct or there is another WordPress way of doing it?

I am writing my plugin's uninstall.php file and would like it to delete any terms that were created in the plugin's custom taxonomy.  In the plugin's uninstall.php file I am using this:  // Delete all custom terms for this taxonomy $terms = get_terms('custom_taxonomy'); foreach ($terms as $term) {     wp_delete_term( $term->ID, 'custom_taxonomy' ); }   The problem seems to be that the custom taxonomy isn't registered at this point, so get_terms returns an error for "invalid taxonomy", thus I can't delete the custom terms in this manner, which seems the most straightforward way to do so.  If the custom taxonomy isn't registered when uninstall.php is called, how can I have it so that my plugin is able to clean up it's custom data?  Any help is greatly appreciated.  Thanks.


We are using Google Apps as email provider and have added following SPF record for our domain  v=spf1 a mx ptr include:_spf.google.com -all   We also use LivePerson as a support system and when they send email on our behalf from using our domain it fails sometime.  So how can I add their IPs to our SPF record too  mails01.liveperson.net 70.42.153.203 mails02.liveperson.net 70.42.153.232 mails03.liveperson.net 70.42.153.233 mails04.liveperson.net 70.42.153.234 maile01.liveperson.net 70.42.153.211   We get following error      e-mail delivery failed for site 62197336, id=mailTicket   "\"LTK121620451004X\" \"380116582\" \"Acknowledge\" \"1\"",   to=xyz@gmail.com, error=550-5.7.1 Unauthenticated email from   abc.com is not accepted due to domain's 550-5.7.1 DMARC policy.   Please contact administrator of abc.com domain if 550-5.7.1 this   was a legitimate mail. Please visit 550-5.7.1     to learn about DMARC 550   5.7.1 initiative.

This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info.


I have a requirement to export the tab delimited file from SFDC. Can we do it apex dataloader. I believe, there is no way to do it ? let me know if there is a workaround.  has anyone used some good free tools to convert the CSV into TAB delimited ? Thanks .

The internet vaguely says that this is possible. I need this feature to export translation values from a custom object and then import this back into Salesforce using translation workbench. Translation workbench accepts:   Field delimiter: Tab Character delimiter: None   How can we achieve a tab delimited data export from a custom object using Apex Data Loader?


I am getting below error when I am trying to insert records using data loader.I see file contains Week__c column with value as 6/29/14 and Week__c is Date field in the custom object.What may be the issue ?     "FIELD_INTEGRITY_EXCEPTION:Week: invalid date: Fri Jun 29 00:00:00 GMT 14   Error fields: Week__c "

Trying to insert a Contact from an Oracle Database:  Contact Database Entity:  @Temporal(TemporalType.DATE) @Column(name="DOB") private Date dob;   Contact SOAP SObject set Birthday:      Calendar dobCalendar = new GregorianCalendar(); dobCalendar.setTime(dwContact.getDob()); contact.setField("Birthdate", dobCalendar);   Error Message:     ERROR CODE: FIELD_INTEGRITY_EXCEPTION MESSAGE: Birthdate: invalid   date: Fri Nov 30 00:00:00 GMT 3   Any suggestions?


I am having problems trying to compute $$\int_0^1 \frac{1}{1+x^4}\;dx$$  Wolfram alpha gives an answer $$\frac{\pi + 2 \coth^{-1}(\sqrt{2})}{4 \sqrt{2}}$$

I don't know how to integrate $\displaystyle \int\frac{1}{x^{4}+1}\mathrm dx$. Do I have to use trigonometric substitution?


While surfing on YouTube, I stumbled into this  which gave me a new insight about the well-known series  $$ \frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7}+ \ldots $$ The idea shown there consists of counting (in a very clever way) how many points of the 2d integer lattice lie on a generic circumference of radius $\sqrt{r}, r \in \mathbb{N}$, centered at the origin. Then, we name $N(R)$ the number of points of this kind that lie inside the circumference of radius $\sqrt{R}$: as $R$ grows, we can think of $N(R)$ as a fairly good approximation of the area $\pi R$ of the circle, since each of the $N(R)$ points can be thought as the center of a square of area $1$. From the equality $\pi R = N(R)$ we get the series above.  I was fairly amazed by the way this result was obtained, and I started wondering: what if we used the hexagonal lattice (I mean $\mathbb{Z} \times \zeta_3\mathbb{Z}$, where $\zeta_3$ is a non-trivial third root of unity) instead of the integer lattice? Will I get another series to approximate $\pi$?  After some work, following the same kind of argument, I came to this formula: $$ \frac{\pi}{3} = \sqrt{3} \left (1 - \frac{1}{2} + \frac{1}{4} - \frac{1}{5} + \frac{1}{7} - \frac{1}{8} + \ldots \right )  $$ or equivalently  $$ \frac{\pi}{3} = \sum_{k=0}^\infty \frac{\sqrt{3}}{9k^2+9k+2} $$ I have some questions:   Can anyone give me a proof of this result which does not follow the argument I sketched above? I checked by doing some simple calculations (I also asked Wolfram) and the result seems to hold, but I'd like to be 100% sure...  The $\frac{\pi}{4}$ formula relates to the expansion of $\arctan(x)$, but I couldn't find any straightforward connection between the $\frac{\pi}{3}$ formula and $\arctan(x)$. I actually couldn't find any connection to the "pi facts" I know or I was able to find. Do anybody know anything that can explain "easily" what's happening here?   Thanks in advance!

I was doing some problems in algebraic number theory and this series came up  $$\sum_{n=0}^\infty\frac{1}{9n^2+9n+2}.$$  So, I would like to know the value of this series. However, I don't want a full answer, only hints. I have tried to use Fourier's series, but with no success, perhaps an answer can be gotten usign this.  Thanks


Is there any way to call a variadic function from another one? I know that if I want to forward a variadic call, I can use a function that accepts va_list parameters. For example, If I declare my_printf I can call vfprintf inside. Another way would be to use macros: #define my_printf(a, ...) fprintf(a, __VA_ARGS__)  but is there a way to "create" a variadic call without being forced to use va_list parameters? In other words: is there any way (standard or not, using gcc extensions, etc.) that my_printf can call fprintf directly and not vfprintf?

In C, is it possible to forward the invocation of a variadic function? As in,  int my_printf(char *fmt, ...) {     fprintf(stderr, "Calling printf with fmt %s", fmt);     return SOMEHOW_INVOKE_LIBC_PRINTF; }   Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could log invocations in other ways, or use vfprintf), but the codebase I'm working on requires the wrapper to do some actual work, and doesn't have (and can't have added) a helper function akin to vfprintf.  [Update: there seems to be some confusion based on the answers that have been supplied so far. To phrase the question another way: in general, can you wrap some arbitrary variadic function without modifying that function's definition.]


Task: Find all the finite groups which have exactly two conjugacy classes. Ideas: I have been show the class equation and the orbit stabilizer formula and I wonder if I can put them to use. My general intuition so far is such;  Given $$|G|=\Sigma_{i=1}^{r}|\mathcal{O}_a|+|Z(G)|,$$ we need $\Sigma|\mathcal{O}_a|=2$ and $|Z(G)|\geq 1$ because the identity is always in the center. It could be that either each of the orbits are size 1 or a single order is size 2.  My other idea is to use the orbit stabilizer formula: $|G:G_a|=|\mathcal{O}_a|=2.$  Maybe split the possibilities into $G$ abelian and $G$ not abelian.   I'm new to this material so please let me know if either or these ideas are on the right track! Pointers are appreciated.

Prove or contradict: A finite group with exactly $2$ conjugacy classes always  isomorphic to $\mathbb{Z}_2$.   At first I was trying to work with familiar groups to contradict it(permutations, cyclic, dihedral and general linear) but I could not find any counter example.  So I was trying to prove it.Let $G$ be a group that has exactly $2$ conjugacy classes, obviously one of those classes is $e$, and the other class is the rest of the elements.  So I'll define $f:G \rightarrow \mathbb{Z}_2$ as follows - $f(e) = 0$, and $f(g) = 1$ for every other $g \in G$. It is easy to see that $f$ is homomorphism, and also that $\ker (f) = e$, and by the first isomorphism theorem, we get that $G \cong \mathbb{Z}_2$.  Is it correct?


Simple question.  I just want to know what this error of usage is called?  The proper form should be "He has gone."  What usage is that proper form called?

Ok, so as an English teacher, I know that in the present and past perfect tenses, the auxiliary verb have is followed by the past participle form of the verb. Using most verbs, I find that this is true for all sentences I have heard. However, on several instances, I have run into a native speaker using the past form of the verb (drank) where the grammar calls for the past participle (drunk). For example: "I hadn't drank any coffee before I lived in Italy." According to grammar norms, this sentence should be: "I hadn't drunk any coffee..." More and more, I noticed that people tend to use drank instead of drunk after perfect aspect constructions. This construction was used across all communities of practice and wasn't subject to dialect boundaries. According to results from , have drank and have drunk are clear, with the standard have drunk being 4x more prevalent than have drank. However, with an instance rate of about 200,000 for the non-standard form, that is nothing to scoff at. However, the opposite was true with the negative form haven't drank vs. haven't drunk with the non-standard being almost twice as prevalent. EDIT: As for the dialect variant idea, I have researched into the various dialectal changes involving the past participle. Most constructions involving the variant are indicated to be dialectal or just plain bad grammar. However, when I started hearing it from people from the UK, this is when I started asking questions. Looking into it further, I have found some linguistic research papers involving corpora and frequency analyses of this phenomena and have found that there is definitely a shift among non-standard verbs to use the past instead of the participle for perfect aspect. At least according to the BNC and COCA. This is usually with germanic-root words such as bid/bade/bid, drink/drank/drunk, bit/bit/bitten.     So, my question, then, is whether or not there is some sort of construction that is the exception for this particular situation, i.e. some construction where perfect tense does not use past participle after the aux. verb, or if this is simply some crazy, non-standard phenomenon with the verb drink in the perfect tense.


I have an enum in which I store some UI element values that look like this:  const uiElementAttributes = {    1: {       id: 1,       color: 'red',       icon: 'icon-something.png'    },    2: {       id: 2,       color: 'yellow',       icon: 'icon-something-else.png'    },    3: {       id: 3,       color: 'blue',       icon: 'icon-this-item.png'    },    99: {       id: 99,       color: 'black',       icon: 'icon-black.png'    } };   I have a function that will return the correct object from the enum based on id passed to my function. My question is how do I check if a value is defined in an enum?  Here's the function:  const getAttributes (id) => {     // How do I check to see if the id is in the enum?    if(checkIfIdIsInEnum) {       return uiElementAttributes[id];    } else {       return uiElementAttributes[99];    }  };   UPDATE: I'm trying the suggested answer. It does look pretty straight forward but looks like when webpack transpiles my code to vanilla JS, it adds default at the end of my enum which is undefined. Any idea what may be causing this -- see below? As you can see, the id value I'm passing is 1 so it should be able to find the value 1 in my enum object.    And here's the actual enum object:   Here's the actual function code:    UPDATE 2: I resolved the issue by importing the enum within curly braces -- see below:  import {calendarEvents} from '../../enums/calendarEvents';

How do I check if an object has a specific property in JavaScript?  Consider:  x = {'key': 1}; if ( x.hasOwnProperty('key') ) {     //Do this }   Is that the best way to do it?


I created this Eevee Environment Design using ducky 3d's Tutorial () 5 months ago. I reopened it today and the textures for the pyramid arent showing up.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I've been looking for somethig like JsHint for a while now, but aimed at verifying whether a team's coding conventions are being followed in C# instead of Javascript. I've been googlinghigh and low but I can't find anything. Do you fellow overflowers know of such a tool?  I'm ultimately thinking about making one of my own, should none currently exist.

What tools are there available for static analysis against C# code? I know about FxCop and StyleCop. Are there others? I've run across NStatic before but it's been in development for what seems like forever - it's looking pretty slick from what little I've seen of it, so it would be nice if it would ever see the light of day.   Along these same lines (this is primarily my interest for static analysis), tools for testing code for multithreading issues (deadlocks, race conditions, etc.) also seem a bit scarce. Typemock Racer just popped up so I'll be looking at that. Anything beyond this?  Real-life opinions about tools you've used are appreciated.


I came across this article in scientific american article with the title "". I am quite quite baffled by this. Can someone give me some implications that this new finding might have and how it affect might affect the mathematical community ??

I found  pop math article saying that there was a paper published last year that proved that the cardinalities of the reals and naturals are equal. Is this true or is it a misinterpretation of the result? If it is true, I'm dying to know what the bijection between the two sets is.


I know this question as been asked many times before, but the solution, that usually helped doesn´t work for me. So I would be very happy about some assistance!  I built a scene, and when I try to render it is always using Path Tracing Tile....instead of Samples.  I have NOT checked the Square Sample Box! But it is still rendering in Pathes...why could that be?

I'm trying to render a scene in Blender, and as of yesterday (it was not doing this when I was working on it 2-3 days ago), I am seeing orange squares dancing around the rendered image. Google tells me that these are render tiles (I think), but what are they, why are they there, and how do I get rid of them?


In a colloquium talk yesterday, Robert Bryant pointed out that for all initial values $a_0, a_1 \in \mathbb{R}$, the sequence generated by the recurrence relation $$ a_{n+1} = |a_n| - a_{n-1} $$ turns out to be periodic with period 9, i.e., $$ a_n = a_{n+9} = a_{n+18} = a_{n+27} = \cdots $$ This is an interesting and unexpected fact, especially when you consider that to directly prove the periodicity (by writing down expressions for $a_2, \dots, a_9$ in terms of $a_0, a_1$), you would have to prove the following monstrous identity: $$ a_0 = -\left| \left| a_1\right| -a_0\right| -\left| -\left| \left| \left| a_1\right| -a_0\right| -a_1\right| +\left| a_1\right| +\left| -\left| \left| a_1\right| -a_0\right| +\left| \left| \left| \left| a_1\right| -a_0\right| -a_1\right| -\left| a_1\right| +a_0\right| +a_1\right| -a_0\right| +\left| \left| \left| \left| a_1\right| -a_0\right| -a_1\right| -\left| a_1\right| +a_0\right| +\left| \left| \left| \left| a_1\right| -a_0\right| -a_1\right| +\left| \left| \left| a_1\right| -a_0\right| +\left| -\left| \left| \left| a_1\right| -a_0\right| -a_1\right| +\left| a_1\right| +\left| -\left| \left| a_1\right| -a_0\right| +\left| \left| \left| \left| a_1\right| -a_0\right| -a_1\right| -\left| a_1\right| +a_0\right| +a_1\right| -a_0\right| -\left| \left| \left| \left| a_1\right| -a_0\right| -a_1\right| -\left| a_1\right| +a_0\right| -a_1\right| -\left| a_1\right| -\left| -\left| \left| a_1\right| -a_0\right| +\left| \left| \left| \left| a_1\right| -a_0\right| -a_1\right| -\left| a_1\right| +a_0\right| +a_1\right| +a_0\right| +a_1 $$ Of course, a straightforward "brute-force" approach this problem would be to consider sequentially the cases $a_1 > a_0 > 0$, $a_0 > 0 > a_1$, etc. and show that the RHS whittles down to the LHS in each case. But due to the simplicity of the original recurrence relation, I wonder if there isn't a more elegant way (hopefully involving less casework) to see that this recurrence must be 9-periodic.

Prove that any sequence of real numbers satisfying $a_{n+1}=|a_n|-a_{n-1}$ is periodic.   Although it looks simple, I can't prove this statement...  I tried rewriting the first few terms of the sequence, but nothing interesting showed up...  I'd be mostly interested in hints for this one.


I want to know where YouTube stores the videos when I go offline. I know it's on my device somewhere, but I can't figure out where.

I'm using YouTube offline feature on my Android device, so that I can playback the offline videos within the YouTube app even there is no internet connection. When I searched for any of the video files, I can't find them on device/SD card memory. Are they encrypting the file so that it can be played only with YouTube app? Does anyone know the specific folder for offline video data?


This is quite a recent book. It starts with a boy (as of yet unbeknownst the most powerful magician ever) who is offered to see the world of magic by four men in trenchcoats (one of them smokes).  He is shown many wonders.  He is taken in by a lady to a neutral Halloween party of good and evil and then ambushed.  He is then taken to a fairy dimension by one of these four men who turns into a lady as he crosses over.  He is told not to leave the path and is kidnapped by the Baba Yaga and he accepts a gift from the fairies preventing him from leaving their realm.

I am looking for a book I read that involved a Child who met a few different wizards who teach the child something. I remember one took him to the Faerie realm and he was taken through a Market where a vendor accused him of stealing an item but was found out the vendor was lying so the boy was able to pick something out of the vendors items and the child picked an egg that turned out to contain a universe inside that he traded with I believe to be the queen of the faeries because he ate something while there.


$\mathbb{Z}^*_m = \{a \in \mathbb{Z}_m | \gcd(a, m) = 1\}$. As $\mathbb{Z}^*_p$ is cyclic when $p$ is prime the group contains at least 1 generator. Can we say anything else about the number of generators in such a group?

How many generators does a cyclic group of order $n$ have? I know that a cyclic group can be generated by just one element while using the operation of the group.  I am having trouble coming up with the generators of a group of order $n$.  Any help would be great!  Thanks!


I'm trying to unwrap part of the model you see below.  But whenever I press "Unwrap", it just gives an error message saying "Object has non-uniform scale, unwrap will operate on a non-scaled version of the mesh". Does anybody know how to fix this?

So, I've been unwrapping semi-circular objects and this happens:     I wanted to know if it is a configuration setting that I'm screwing up or something like that. I can edit it but it is a huge pain, in some tutorials they just work. This is killing me slowly and surely.


I have a below situation.   function mousemove(e){ if(left button clicked){ //drag the element } else{ //show the tooltip } }   Initially i have binded the mousemove function. while mouse moving i need to check whether the left button is clicked or not. if clicked means i need to drag it. else means i need to show tooltip.  i searched a lot. i cant get the solution for all the browser, I need to do this for IE8,IE9,IE10,IE11,Chrome, firefox and safari. please help me... thanks in advance..

Is there a way to detect if a mouse button is currently down in JavaScript?  I know about the "mousedown" event, but that's not what I need.  Some time AFTER the mouse button is pressed, I want to be able to detect if it is still pressed down.  Is this possible?


OK, got myself a clean virtual machine running Debian 9 (Stretch). I installed  from the Debian package system. It's running version 0.204002. The Dancer2 software is telling me that the latest version is 0.205002.  I want to finally, once and for all, learn the proper way to upgrade Perl modules on a Debian machine to the latest and greatest versions without ruining the Debian dpkg dependencies. How do I achieve this?  EDIT Yes, this is a development machine I'm just playing with. But what if I wanted to run the latest version of Dancer 2 on a production machine? How would I do it?

I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc?


On RC circuit, capacitor discharges when the voltage supply is removed.  But I've learned that the net electric field outside a charged capacitor is zero by gaussian surface and gauss law.  I don't understand the mechanism. Shouldn't be there an electric field in order to make charge flow when discharging happens?  Is there an another mechanism?

Suppose a charged capacitor (parallel plates), the negative and positive charges on two plates attract each other. Which force cause the negative charge carriers (electrons) move through the circuit to the other plate if we connect two plates (from outer sides) with a wire?


This command is working ok while logged as regular user or as root, but it does not work when using sudo:  arm-linux-gcc --v   not working:  sudo arm-linux-gcc --v   The error I get is   sudo: arm-linux-gcc: command not found   Output requested in comments:  $ which arm-linux-gcc /opt/ARM/toolschain/4.4.3/bin/arm-linux-gcc $ sudo env | grep PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

I want to add some command to PATH so that I can use them conveniently, such as:  export $PATH = "$PATH:/opt/storm/bin"   but sometimes storm need root authority, but when I use it with sudo, Ubuntu cannot find the command.  sudo storm nimbus   how can I find these command when I use sudo?


Does any metric $d$ always induce a topology on any given set $X$?

My book gives the following definition:     Let $(M,d)$ be a metric space, and let $\mathcal{T}$ be the collection of all subsets of $M$ that are open in the metric space sense...  $\mathcal{T}$ is called the topology generated by d   Then it later says to prove things about two different metrics generating the same topology. However I'm very confused about what all this means.   When I read "all subsets," I think of the theorem that says a set with $n$ elements will have $2^n$ subsets. (ex. all the subsets of $\{1,2,3\}$ are $\{\emptyset, \{1\},\{2\},\{3\},\{1,2\},\{1,3\},\{2,3\},\{1,2,3\} \}$). So I think "all subsets that are open" would be like, If M is the set (1,5), then an open subset would be any set $(a,b)$ where $1<a<b<5$, and then all subsets would be all possible union combinations of these "$(a,b)$" sets.     Its seems to me that metrics have nothing to do with subsets. Clearly there is something i'm not understanding. Please Help me.   It would be very enlightening, if someone could give me some simple examples of 1 set and 2 metrics generating two different typologies.


Suppose that X and Y are random variables on a common probability space such that $E(X^2+Y^2) \lt \infty$, $E(X|Y)=Y$, $E(Y|X)=X$. Prove that $$P(X=Y)=1$$  My work: $E(X)=E(E(X|Y))=E(Y)$ and $E(Y)=E(E(Y|X))=E(X)$  But I don't know what to do next and I'm sure how to use the condition $E(X^2+Y^2) \lt \infty$.  Thanks in advance.

Assume that $X$ and $Y$ are two random variables such that $Y=E[X|Y]$ almost surely and $X= E[Y|X]$ almost surely. Prove that $X=Y$ almost surely.   The hint I was given is to evaluate: $$E[X-Y;X>a,Y\leq a] + E[X-Y;X\leq a,Y\leq a]$$  which I can write as: $$\int_A(X-Y)dP +\int_B(X-Y)dP$$ where $A=\{X>a, Y\leq a\}$ and $B=\{X\leq a,Y\leq a\}$.  But I need some more hints.


I accidentally deleted my default terminal icon and I also unintentionally replaced the Terminal.icns file in /Applications/Utilities/Terminal.app/Contents/Resources/Terminal.icns So can anyone provide me with the original icns file?  This not a duplicate question the other question is regarding apps not icons and I have deleted the icon not app please red the question carefully

I've deleted a system file from my Mac and need to get it back.  System files can include:   hidden files in the root of / - especially unix files in /private  /System files /Library files /Applications files that ship with the core OS   System files are not any app, user files or files that can be regenerated by a known sequence such as cache files, Spotlight index files, etc…    Canonical question and answer for .


I have to create system variable in Windows through calling CMD.Exe. I try : cmd.exe /C maVar=maVal  Saddly, no maVar is created. If i open CMD.Exe and type : maVar=maVal  -> maVar is created. Saddly, i have to do it through calling cmd.exe, not launching cmd.exe. Anyone know what is ly mistake ? Thanks

I want to set an environment variable from the command prompt and then be able to access it globally (for instance, I should see it by going to System -> Environment Variables).    When I use the set command, it isn't accessible in a new cmd session.  set NEWVAR=SOMETHING echo %NEWVAR%   Related questions:


So this is a question about jvm design, since basically java is pass by value, and what is actually pass into method is object's reference address copy, then why we do that instead of passing the origin reference address? would this cause any trouble in practice? Thanks.

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


We have a 120GB database. There was table with 60GB of data which is useless and we have truncated it.   Now database size is 120GB with free space 60GB. The database will not grow up to 60GB in at least 3 months. So can we shrink the data file.  Am aware of fragmentation issue. I can rebuild my index since our's is not a 24*7 database.   Please advice on shrinking MDF file

This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments?


Also when we rest our hand on an object does that mean we are effectively levitating because of the repulsion of the electron clouds?

If you've ever been annoyingly poked by a geek, you might be familiar with the semi-nerdy obnoxious response of      "I'm not actually touching you! The electrons in the atoms of my   skin are just getting really close to yours!"   Expanding on this a little bit, it seems the obnoxious geek is right. After all, consider Zeno's paradox. Every time you try to touch two objects together, you have to get them halfway there, then quarter-way, etc. In other words, there's always a infinitesimal distance in between the two objects.   Atoms don't "touch" each other; even the protons and neutrons in the nucleus of an atom aren't "touching" each other.  So what does it mean for two objects to touch each other?   Are atoms that join to form a molecule "touching"? I suppose the atoms are touching, because their is some overlap, but the subatomic particles are just whizzing around avoiding each other. If this is the case, should "touching" just be defined relative to some context? I.e, if I touch your hand, our hands are touching, but unless you pick up some of my DNA, the molecules in our hands aren't touching? And since the molecules aren't changing, the atoms aren't touching either?  Is there really no such thing as "touching"?


Working on Java 7, i have the following String date = "12/04/2012".  I converted the String to a Date format:  Date date_converted = DateUtils.parse(DateUtils.STANDARD, date);   Now i want to add a day to my Date, someone can help me?

I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?


I cannot find the answer to this in the EL&U archives but I am sure it must be there somewhere and that this is a duplicate question.  Singular :      He/she goes to the shops every day.    Plural :     We/they go to the shops every day.   Why am I plural ?     I go to the shops every day.     EDIT : The supposed duplicate is an interesting question and has a very competent answer but the answer is very broad and does not specifically answer my own question. People learning English often err in this very matter and it would be interesting if someone could answer more specifically to give an orderly reason why we do something in English that appears to be either completely chaotic or strangely contradictory.

In most English verbs, there is a consistent pattern in the conjugation of present and past tense.  For past tense, the same inflection is used for each grammatical person, but in present tense, third person singular stands apart from the rest. For example, with run:  Past tense: I ran / you ran / we ran / they ran / she ran Present tense: I run / you run / we run / they run / she runs  There is an exception, which is To be.  The pattern of unique conjugation for the third person singular present tense can be seen in this chart, along with the irregularity of to be.  Setting aside to be (at least for now), is there a logical or etymological reason for the unique conjugation of the third person singular present tense?


Can someone tell me why I get this error when I try to add a repository and what if anything I can do about it?  When I try to add a repository using:  sudo add-apt-repository ppa:upubuntu-com/tor   I get the following error:  Command 'sudo' is available in '/usr/bin/sudo' The command could not be located because '/usr/bin' is not included in the PATH       environment variable. sudo: command not found

I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code to compile the python source, I get this error:  'Command 'sudo' is available in '/usr/bin/sudo' The command could not be located because '/usr/bin' is not included in the PATH environment variable. sudo: command not found'   I've also tried running gksudo command to view what my environment shows but I pretty much get the same error.


Suppose that $n$ is odd. Then we need to find a recurrence relation for: $$f(n) = \sum_{i = 0}^{\lfloor\frac{n}{2}\rfloor}\binom{n-i}{i}$$ I have no idea how to proceed. I thought of using a generating function $g(n, x) = \sum_{i=0}^{\infty} \binom{n-i}{i} x^n$ but not sure how to go forward. Please provide some insights. Thank you!

Prove the following fibonacci sequence, which appear in Pascal's Triangle. I am not sure where to start on this, any pointers? $$ f_n = {n\choose0} + {n-1\choose1} + ... + {n-k\choose k}$$  where $\displaystyle k=\left\lfloor\frac{n}{2}\right\rfloor$


What happens when the distance between the slit and the source of light is changed in Young's Double slit experiment.

I read in a text  of optics  Eugene Hecht where i got that,  missing fringes in a double-slit interference experiment results when diffraction minima cancel interference maxima. Is there any relationship  between the the slit width  w and  source distance d, so I can tell when the maxima could be missing?


I have been creating some C programs and I have saved them to my Home directory while editing. I have compiled them with gcc and then run the executable file with ./ and they work fine. However, when the programs are ready, I take the executables to another directory in another partition of my hard drive where I store my personal files, but when I try to run them from this new location, the terminal prompts the message "Permission denied".   Is there any way that I can run the programs from any location I store them, other than the Home directory?  Thanks in advance for your help.

I have this problem: I'm used to compile and run .c files with CodeBlocks. If I do that from my Desktop (ext4 partition) it works without problems, but doing this from my secondary hard drive (NTFS partition) makes CodeBlocks to say permission denied while running a .c file.  I have read it's because of the partition type is it correct? But I don't know how to solve it. I tried to edit fstab (sudo gedit /etc/fstab) adding this line:   /dev/sda /media/Dati ntfs user,exec 0 1   but after rebooting Ubuntu I had a warning on boot about a problem mounting a drive, that's because I set KDE to auto mount my Dati drive on boot.   So I should auto mount my NTFS drive with execute permission? How can I do that?


Let $X,Y$ be two random variables with exponential distribution and their rates are $\gamma, \beta $. Let $Z$ be a random variable such that $Z = min\{X, Y\}$.  How do I prove that the density function of $Z$ is $(\gamma+\beta)e^{-(\gamma+\beta)x}$ for $x\geq0$ and $0$ for $x<0$?

How can I prove that the minimum of two exponential random variables is another exponential random variable, i.e. Z = min(X,Y)


Is there a reason why meta moderators are not in the ? Are the meta moderators for each site the same as moderators for the site? As in Meta moderators for Android Enthusiasts are the same people as moderators for Android Enthusiasts? This question is not a duplicate because it deals with the all the meta websites and not just meta of Stack Exchange,  as pointed out in the comments below the question.

Post-split, Meta's moderators are (we've been told) the CMs and maybe a few other employees.  And, sure enough, those folks have diamonds.  However, something's missing:    Where are all the moderators??  Also, while I'm here, see the underlined text -- I know it's boilerplate, but since Meta doesn't have elections, you might want to change that.  (Lest you say that per-site metas have that text too, at least their associated sites have elections.  Lest you say that betas don't have elections, at least they can aspire to do so in the future.)


I have a computer full of viruses (well actually my cousin has). I want to delete windows 7 and reinstall it.  Is it possible to do it without a windows iso file?   I also have an ubuntu iso on my hard disk but I don't want to connect it to the infected computer because I am worried that it may transfer some of the viruses on that device.

Is it possible to install Windows 7 (Current RTM Version) on a computer without using removable media like DVD or USB?  The first thing that comes to my mind is through the network, but I don't have experience of doing a fresh install of Windows 7 via the network.  How to install Windows 7 via the network without any removable media?  P.S. I know some may think that doing so, is just a waste of time and it's easier to do it with removable media, but in the current situation the target PC neither has CD/DVD Drive nor supports booting from USB. And in addition to that, the target computer is connected to the network via a wireless connection (I don't know if it will cause any problems with the installation).


Trying to update my Ubuntu system. Getting this error on some Nvidia driver. It broke the update and only prompting to apt --fix-broken install now. And that command is failing as well.  I couldn't find any solution to fix this broken update. Any suggestion to fix this ?  root@rajhome:~# apt --fix-broken install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following package was automatically installed and is no longer required:   libllvm7 Use 'apt autoremove' to remove it. The following additional packages will be installed:   libglx-mesa0 The following packages will be upgraded:   libglx-mesa0 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 91 not fully installed or removed. Need to get 0 B/142 kB of archives. After this operation, 23.6 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 244787 files and directories currently installed.) Preparing to unpack .../libglx-mesa0_19.0.2-1ubuntu1.1~18.04.1_amd64.deb ... Unpacking libglx-mesa0:amd64 (19.0.2-1ubuntu1.1~18.04.1) over (18.2.8-0ubuntu0~18.04.2) ... dpkg: error processing archive /var/cache/apt/archives/libglx-mesa0_19.0.2-1ubuntu1.1~18.04.1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package nvidia-418 418.67-0ubuntu1 Errors were encountered while processing:  /var/cache/apt/archives/libglx-mesa0_19.0.2-1ubuntu1.1~18.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


I'm currently working with old french cadastre on QGIS, I've vectorised it and now I want to tile it. I've georeferenced it, but it's not sufficient for a great result. To improve the result, I would like to create boundaries of my shape. Convex hull doesn't work as I want. I looking for a method who sticks at best at my shapes hull. I've tried TIN method, but it return some triangles out of boundaries and I've to delete them manually, and my job ask me to do it automatically. Dissolve method isn't sufficient too, because there are holes between polygons, and I want to take them in consideration. There is an image of the expected result. I can only use open-source software.     Is there someone with a best idea?

Is there an option in QGIS to fill holes in polygons automatically by setting parameters e.g. maximum area, distance between borderlines? I want to delete/fill holes that a very "thin"/small.


A domain $R$ is a Dedekind domain iff it is integrally closed, Noetherian with Krull dimension at most one. I think they put Noetherian in the definition not only to make proofs easier but also because it's important. To see that it's really necessary to have Noetherian in the definition do you have an example for me of a domain $R$ which is integrally closed, not Noetherian with Krull dimension one? All my examples of domains which are not Noetherian fail to have Krull dimension one.

I've tried to construct examples of rings that match all except one of the properties in the definition of a Dedekind domain. (This is an old number theory qual question from Berkeleys MGSA website).  The only starting point that I can think of would be  $R:=K[X_1,X_2,\ldots]$  for $K$ a field. This is clearly integrally closed as any polynomial relation is contained in $K(X_1,\ldots,X_n)$ for some large enough $n$ and $K[X_1,\ldots,X_n]$ is integrally closed being a UFD.  The problem is then to get rid of enough ideals from this ring $R$, so that its dimension would be 1, but I can't seem to figure out what to do.  Anyone have any other ideas for rings that could work as a starting point? The polynomial ring with an infinite number of variables is pretty much the only example that I know of for how to construct a non-noetherian ring that's still a domain.


I can download, but not run virtualbox. It says:     WARNING: The character device /dev/vboxdrv does not exist.     Please   install the virtualbox-dkms package and the appropriate    headers,   most likely linux-headers-generic.      You will not be able to start VMs until this problem is fixed.   Does someone know how to fix this?

I want to use Windows 7 or 8 but I don't know to install a software like VirtualBox which we have to do with the use of terminal. I don't want to use Windows as a main OS so I want to use it in VirtualBox. Can you tell me how to install downloaded files in Ubuntu. I once installed java runtime but don't know the meaning of the lines which I have written in terminal, I just did as the blog posted by a man says.


I understand that, if S is a child class of T, then a List<S> is not a child of List<T>. Fine. But interfaces have a different paradigm: if Foo implements IFoo, then why is a List<Foo> not (an example of) a List<IFoo>?  As there can be no actual class IFoo, does this mean that I would always have to cast each element of the list when exposing a List<IFoo>? Or is this simply bad design and I have to define my own collection class ListOfIFoos to be able to work with them? Neither seem reasonable to me...   What would be the best way of exposing such a list, given that I am trying to program to interfaces? I am currently tending towards actually storing my List<Foo> internally as a List<IFoo>.

It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way.  List<string> sl = new List<string>(); List<object> ol; ol = sl;   results in Cannot implicitly convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  And then...  List<string> sl = new List<string>(); List<object> ol; ol = (List<object>)sl;   results in Cannot convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  Of course, you can do it by pulling everything out of the string list and putting it back in one at a time, but it is a rather convoluted solution.


I recently had a question that had two good answers, both of them were valid solutions to my problem. How do I decide which one to accept?

Possible Duplicate:          I got two answers for the same question from different users and both of them correct and working perfectly, but I am unable to accept both of them. Why? There may be some questions that can be answered in several ways, but I can't here in Stack Overflow. Why?


I've tried to find the sum of $\sum_{k=1}^{∞} \frac{k^2}{(k+1)!}$ and calculator says its sum is $e-1$. I thought that it is related to the Maclaurin series of $e$, well I could not derive the $-1$ term for answer. What is an elementary way to derive the answer? Thank you for your help.


Most people who’ve sat through any lesson involving vectors will know about the vector dot product     If $\displaystyle \mathbf p=\left[{v_1\atop v_2}\right]$ and $\displaystyle \mathbf q=\left[{w_1\atop w_2}\right]$, then $$\mathbf p \cdot \mathbf q=v_1w_1+v_2w_2$$   Obviously this is the special case where the vectors lie in the two dimensional plane, and this formula does extend to $n$ dimensions, my typesetting abilities just aren’t advanced enough to know how to represent such vectors. In any case, I’m just wondering, so that I don’t go through the rest of any future linear algebra courses blind, why do we define the dot product of vectors in this way? Instead of, for example, multiplying each component of one vector by the corresponding component of a second vector to produce a third vector, whose components are these products?  Any input is appreciated, thank you.

I was just wondering why we don't ever define multiplication of vectors as individual component multiplication.  That is, why doesn't anybody ever define $\langle a_1,b_1 \rangle \cdot \langle a_2,b_2 \rangle$ to be $\langle a_1a_2, b_1b_2 \rangle$?  Is the resulting vector just not geometrically interesting?


I'm a doctor from Pakistan. My husband is a British citizen and we have a one-year-old daughter, whose passport we have just applied for.  My husband is unemployed, so we do not meet the income requirement for a spouse visa. However, Ineed to apply for a standard visitor visa to take my plab 2 exam.  I am afraid my application would be rejected due to insufficient ties to my home country. I've been employed in the same job for 3 years, however I do not own any land or even have a rental agreement in my name. I live with my in-laws and they pay for the utilities etc.  What other documents could I attach to strengthen my case? And secondly I haven't decided whether to take my daughter along or not. If her passport arrives in time I could take her with me. What bearing would that have on my case?  I intend to apply for 5 days. The other option is to apply for 5 weeks and attend the short academy course most people take before the exam, but I pessimistically think that would completely ruin any chance I have of being granted a visa...

I am an Indian national who recently cleared his PLAB1 examination and has booked to sit PLAB2 in UK (which can be given only in UK). Before applying for a visa, I would like to know about the how one can prove home ties. Of course, I have read about the Family, Job, Property being used as ties but...  I haven't worked since my graduation (two years now) as I wasted a lot of precious time on USMLE. After that IELTS and then PLAB1. So can't show job as tie.  I don't have any property in my name but my father does have residential plots and agricultural lands worth a few crores on his name.    Does an affidavit that I am his only son and heir to all that bla bla bla, serve the purpose?  I do have few life insurance policies in my name.  Can they be used as an indicator of some kind of active Indian society member thingy?  I am unmarried but do intend to show my parents as family ties.   I did my medical studies in China (6-7 years). I have also traveled to a few countries like Russia, Thailand, Philippines, HK, Macau etc etc (though not a single Western country).    Can that be used in my favour in home ties that I have always obeyed country's laws and returned to India upon completion of the purpose of the trip?


Is there any difference in meaning between the following two sentences?        My car needs to be repaired.   My car needs reparing.

Do the following two sentences mean the same thing? If so, which is more commonly used?        My car needs repairing.   My car needs to be repaired.


I am trying to write values to the Campaign Member fields based on values from the related Lead record. When I attempt to run this I get the error message:  addCampaignMemberValues: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.addCampaignMemberValues: line 7, column 1  If I wanted to use dot notation to traverse from the Campaign Member down to the Lead level fields like Lead Source, etc. how can this be done?  I'm also looking to run the default assignment rules at the end of the trigger and if am only could let me know if this approach looks OK, that would be very helpful!  Thanks!  trigger addCampaignMemberValues on CampaignMember (after insert) {     List<Lead> ls = new List<Lead>();      for (CampaignMember cm: trigger.new) {          if(cm.Lead.Primary_Campaign__c == NULL && cm.Lead.LeadSource != 'Tradeshow') {             cm.Lead.Primary_Campaign__c = cm.CampaignId;             //check if Lead.System_Type__c is null and Campaign.System_Type__c is not null             if(cm.Lead.System_Type__c == NULL && cm.Campaign.System_Type__c != NULL ) {                 cm.lead.System_Type__c = cm.Campaign.System_Type__c;             }             //check if Lead.System_Group__c is null and Campaign.System_Group__c is not null             if(cm.Lead.Systems_Group__c == NULL && cm.Campaign.Systems_Group__c != NULL ) {                 cm.Lead.Systems_Group__c = cm.Campaign.Systems_Group__c;             }              ls.add(new Lead(id = cm.leadid));         }      }     //run assignment rules on leads     Database.DMLOptions dmo = new Database.DMLOptions();     dmo.assignmentRuleHeader.useDefaultRule = true;     Database.update(ls, dmo);  }

Situation: I am trying to build a custom validation rule via apex that will stop users from saving a charge item to a quote if the   charge item exceeds the available product quantity. The charge item   being saved is a child of (and has a lookup relationship to) a "Rate   Plan", which is the object that carries the available product quantity   field.      Object that triggers apex: zqu__QuoteCharge__c      Relationship field on QuoteCharge: zqu__ProductRatePlanCharge__c     The trigger is currently in the BEFORE INSERT context, to block users from saving new records. I pass Trigger.new as a parameter to my class/method: z_QuoteChargeTriggerHandler.customValidation(Trigger.new);    In my for() loop, I've added a bunch of System debugs since my if statement wasn't being triggered.   When I System.debug(zqu__ProductRatePlanCharge__c) it returns an Id, so I know the relationship is there.   However, when I System.debug(zqu__ProductRatePlanCharge__r.Ascent_Quantity__c) I return null. Expected: 0.     Ultimate Question: Since I cannot SOQL query this record during BEFORE INSERT (At least, I think so, since the record hasn't been   inserted yet?) How can I reference related objects using the __r   relationship before insert of a new record in the context of   Trigger.new?   Code:  public void customValidation(List<zqu__QuoteCharge__c> newList){     if (newList != null && newList.size() > 0){     List<zqu__ProductRatePlanCharge__c> rpc = new List<zqu__ProductRatePlanCharge__c>(); // create a list per other Stack suggestion         for(zqu__QuoteCharge__c quoteCharge: newList){             if(quoteCharge.Name != 'Discount'){                 rpc.add(quoteCharge.zqu__ProductRatePlanCharge__r); // add to that list?                 System.debug('MM++++ rpc: ' +rpc); // rpc returns null but shouldnt?                 System.debug('MM++++ Charge Name: ' +quoteCharge.Name);                 System.debug('MM++++ Charge Quantity: ' +quoteCharge.zqu__Quantity__c);                 System.debug('MM++++ RatePlan Link: ' +quoteCharge.zqu__ProductRatePlanCharge__c); // returns ID (Lookup, expected)                 System.debug('MM++++ RatePlan Name: ' +quoteCharge.zqu__ProductRatePlanCharge__r.Name); // returns null (expect name)                 System.debug('MM++++ Ascent Quantity: ' +quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c); // returns null (expect: 0)                  if(quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c == 0 || quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c < quoteCharge.zqu__Quantity__c){                     quoteCharge.addError('The Product: ' +quoteCharge.Name + ' only has ' +quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c + ' in stock but you are trying to sell ' +quoteCharge.zqu__Quantity__c);                 }             }         }             } }


I've just started studying PHP and having concluded my first PHP & MySQL for dummies book I have a concern about having a secure connection between my PHP application and MySQL database.  From what I learned, one approach is to create a .php file with the database credentials, for example:  --- database.php ---  <?php  define('HOST', 'localhost'); define('DB_USR' , 'mysql_username'); define('DB_PSWD' , 'mysql_password'); define('DB_NAME' , 'mysql_newbie');  ?>   and then place a require_once('database.php') in every PHP page that requires any sort of database queries.  My concern is whether this approach is safe. Isn't the file database.php accessible to everyone once it's placed on the webserver? Anyone can potentially read the database's credentials and mess his way around it?  Any thoughts?

When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to know that login and password somewhere. What is the best way to secure that password? It seems like just writing it in the PHP code isn't a good idea.


Which is the correct heading? What StackOverflow does. or  What StackOverflow do.

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


When using least square for classification of two classes labeled as 0 and 1, the value 0.5 is a common choice for the threshold. Intuitively, it makes sense, but is it always optimal? In which sense?

I have a question regarding classification in general. Let $f$ be a classifier, which outputs a set of probabilities given some data D. Normally, one would say: well, if $P(c|D) > 0.5$, we will assign a class 1, otherwise 0 (let this be a binary classification).   My question is, what if I find out, that if I classify the class as 1 also when the probabilities are larger than, for instance 0.2, and the classifier performs better. Is it legitimate to then use this new threshold when doing classification?  I would interpret the necessity for lower classification bound in the context of the data emitting a smaller signal; yet still significant for the classification problem.  I realize this is one way to do it. However, if this is not correct thinking of reducing the threshold, what would be some data transformations, which emphasize individual features in a similar manner, so that the threshold can remain at 0.5?


This has appeared as the dropdown on my review queue button today:        I can't find out anything about it.    What does it mean? Why aren't there any review queues available to me? How long it's going to stay there?! :(

When I am review-banned, the direct effect is that when I click the review icon in the top-bar, I get this:        This doesn’t tell me anything about what's going on, just that all review queues have miraculously become unavailable to me. It doesn't show that it's because I've been banned, or why I've been banned, whether it's for failing audits or whether there is a custom message supplied by a moderator. Only when I new-tab-click that button, it takes me to /review, or when I manually navigate there, I get :        This is confusing for review-banned users who use the dropdown in their standard workflow (). I only performed the above test to reproduce the experience of a confused review-banned user on a site I moderate.  Please replace the dropdown message with something more informative in case of a review ban.


Maybe this question is too simple for this site, and I should post it on the english-learners-site, but I will give it a try.  Lets say we have 3 scenarios:   A person who hates all followers of a specific religion, no matter what their background is, but otherwise likes people of all skin colors and origin countries who are not followers of a specific religion. A person who hates all people with a specific skin color, no matter what their background is, but otherwise likes followers of all religions and origin countries who do not have a specific skin color. A person who hates all people from a specific country, no matter what their background is, but otherwise likes followers of all religions and all skin colors who are not from a specific country.   "Hates" in this context means believing they are worthless, being prejudiced against them, generally discriminating against them, bad behaviour against them, and disliking them.  "likes" just means the opposite of my explanation above.  So, based on this  of the word racist:    The belief that race accounts for differences in human character or ability and that a particular race is superior to others. Discrimination or prejudice based on race.   Would you use the word racist to describe the person in all of the 3 examples I gave? Or are there better fitting words for specific forms of discrimination? Particularly for the first scenario (religion specific racism). I am looking for a better word to describe such a person.  Religion is independent from race, and I am not sure if only country of origin is enough to relate to a specific race so that the word racist could fit here. Skin color is more obvious, but there could also be some discussion if a specific skin color already suffices to assign something to a specific race.  (I am not a native english speaker, so sorry for any mistakes and if this is obvious for native speakers.)  Edit:     This question may be related to this  and this   , but I dont see it as a duplicate at all, because there   are various different aspects in the question and answers.  Also i   could not find the questions by search before i wrote my question,   maybe some of the answers and aspects are similar, but the questions   itself are different in my opinion. But that is only my opinion, feel   free to close this, if you think they are too similar. I got some   useful answers already, so I dont insist to keep this open.      I will accept the answer with most votes at the weekend, so the   community decides which answer fits best

I am looking for a stronger word than "discrimination", which somehow remains ambiguous because of its multiple meanings. I am especially interested in referring to discrimination in the sense of partiality and prejudice towards certain demographic categories. The word "discrimination" could be used in combination with an adjective such as "racial", but again that would be to specific, because it would omit discrimination based on other categories such as religion, gender or culture. What I would require is a word describing the thought process by which one purposely, unfairly and hatefully excludes an entire population from courtesy and tolerance one would apply to oneself.


This seems obvious, but I can't imagine the formal outline of the proof. I just need a start here. Sorry for being a total noob.

I have a question which is giving me a hard time.    I want to show that $$ \lim_{n\to \infty}\frac{1}{n} \sum_{k=1}^n x_k =x$$ given that $\lim_{n\to \infty} x_n= x$.


I want to know how for loop is processed in below condition.  void main() {       int i,j;     For(i=1,j=1;i<=5,j<=10,i++,j++)     {         printf("%d%d",i,j);     } }   sorry for typo mistake I correct my syntax here  For(i=1,j=1;i<=5,j<=10;i++,j++)  answer of this -1122334455667788991010  How's that possible because loop for I will be iterate for only 5 times how's that possible ? I want to know how loop will be executed ?


Even if they move toward each other at relativistic velocities and not head-on?  I looked at questions  and , but did not find the answer.

All black hole mergers seem to result in one Kerr black hole after ring-down.   Could it be possible, that two initial black holes with two separate event horizons form an “intermediate compound state” with one event horizon, which - at a later time - “decays” in two final black holes?  I know that the answer to this question is “no” when applying Bekenstein-Hawking entropy where the decay would violate the second law which postulates $dA/dt > 0$.   And the answer seems to be “no” when relying on numerical relativity for black hole mergers.  My question is if there is a more elegant, geometrical proof following entirely from general relativity, which rules out such a decay.  Thanks


I want to trigger a customized job on window resize after certain data is loaded:  function doJob() {      ...  }  DataLoaded() {    $(window).on("resize", function() { doJob(); }); }   However DataLoaded can be occured multiple times, how can I make sure doJob() only bind once ?      PLEASE NOTE, bind once, but can be executed multiple times, so $("...").one("...") is not my goal   IMO:        set a global variable isBind to check if method is bind, which looks redundant   $(window).off("resize").on("resize", ....), I'm not sure if calling off() first is a safe way

I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data.  My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail.  $('#myimage').click(function { return false; });


This question is directly related to the question I asked here:   I figured out the answer to that one by simply adding if (e.target === this), but now my returned response wont do anything when I check the box.  The new code that is being returned by my .post is:  $output .= "

"; $output .= "<input id=\"toedit\" type=\"text\" placeholder=\"$item_to_edit\" size=20>"; $output .= "	"; $output .= "<input id=\"test_editing_check\" type=\"checkbox\" name=\"test_editing_check\" value=\"test_editing_check\" \>"; $output .= "

";   But my Jquery which is on the original page:  $("#testing_editing").click(function(e){     if (e.target === this) {         var testhtml = $(this).html();         var meatseafood = '<?php echo $meatseafood; ?>';         $.post('edit_order.php', {'itemtoedit':testhtml,'meatseafood':meatseafood}, function(data) { //make ajax call to check_username.php         $("#testing_editing").html(data); //dump the data received from PHP page         });     }     });     $("#test_editing_check").click(function(){         if ( this.checked ) {             var testvalue = "HI";             alert(testvalue);         }     });   Doesn't seem to work on the check box that is being returned by the .post() call.  Is there something i need to do in order to make a .post() return be recognized by the main page's jquery code? I hope its not something wrong with my syntax but i've used this exact (very basic) code on another page (but not with a .post() call) and it works fine.  Basically, when you click the div my main page writes, it calls a .post() and returns a editable input field and a check box.  When i click that checkbox, i want it to make another .post() call and update a database with the newly entered data.  however, when i check the check box nothing happens.  it would seem my ajax returned code isn't recognized by the jquery from the original/main page. with my test code all i'm trying to do is pop up an alert box when i click the checkbox to show that it has "read" the input box and can now send that data through the .post() call to be processed.  Let me know if you need any other code. It seems pretty cut and dry though so i'm not sure why it isn't working and that's why i'm here :)  (the idea of what i'm trying to do is, a user submits a form, on the next page, a "confirmation box" is shown saying "is this what you wanted to submit with your form? and if the answer is no, they can "click" on the data and change it w/out having to reload the page.  the clicking part works but the checkbox to acknowledge "yes, i want to change my data to this newly entered data" isn't working.)  Thanks for any help.  Derek Conlon

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


How to solve this problem. I have installed arcgis 10.3 and installed the extensions as well but the extension does not get activated and shows following error.

The Data Interoperability Tools .tbx appears in my system toolboxes, however when I double click quick export or import, a red X appears.  I have gone into the administrator settings and the tool doesn't appear to be installed. How do I install it?  I am using ArcGIS 10.2 for desktop trial.  After I attempt to evaluate extensions, I receive a message which states all requested features have already been authorized on this machine.


Could someone explain simply, the significance of Quadratic Reciprocity? I recall it being referred to as a ``crowning achievement,'' but I failed to grasp why.

I want to motivate the quadratic reciprocity theorem, which at first glance does not look too important to justify it being one of Gauss' favorites. So far I can think of two uses that are basic enough to be shown immediately when presenting the theorem:  1) With the QRT, it is immediate to give a simple, efficient algorithm (that can be done even by hand) for computing Legendre symbols.  2) In Euler's proof of Fermat's claim on the conditions in which a prime $p$ is of the form $x^2+ny^2$ (for certain small values of $n$) the proof is reduced to finding the conditions under which $p$ divides $x^2+ny^2$ for some $x,y$, hence to the question under which conditions is $-n$ a quadratic residue modulo $p$, which leads immediately to the QTR (for example, for $n=3$, where we get that $p\equiv_3 1$). I really like this example since it begins with an "historic" problem and proceeds to "discover" the QTR through special cases (which is what Euler did in practice - see Cox's book on "Primes of the form $x^2+ny^2$").  However, I am sure there are many more examples (and I'm especially curious as to how Gauss reached the theorem himself). I'd love to hear about them and receive references for further reading.


I created an empty read-only directory: mkdir -m 400 ~/Desktop/hello  As per the octal permission, it indicates the directory has read only permission. But contrast to that when I am using the following command the directory was deleted: rmdir ~/Desktop/hello  How is this possible to delete the directory when it is read only?

If I create a file and then change its permissions to 444 (read-only), how come rm can remove it?  If I do this:  echo test > test.txt chmod 444 test.txt rm test.txt   ...rm will ask if I want to remove the write-protected file test.txt. I would have expected that rm can not remove such a file and that I would have to do a chmod +w test.txt first. If I do rm -f test.txt then rm will remove the file without even asking, even though it's read-only.   Can anyone clarify? I'm using Ubuntu 12.04/bash.


I installed ubuntu a while ago and then removed it soon after. Now Windows 10 is back to normal apart from GRUB boot launcher is activated and I have to type "exit" to exit it and go into Windows 10.  I do not have a windows recovery disk or USB either so I am unsure how to remove it.

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


After a major migration from Windows to Ubuntu 12.0.4 Lts, I have found that I can find a substitute for pretty much everything I worked with on Windows 7. the LibreOffice package is an all-out package that can easily meet every requirements and satisfy needs, but there is one thing missing from the equation and that is an application that can open OneNote files with .one extension in  Ubuntu and Kubuntu (Debian). It is a huge hole in there for me to lament about everyday since my students do their homework in OneNote Notebooks, I have to switch to Windows every time, which is like going back to drive a rundown junk car after buying a Mercedes S500 and driving it for a while. it is so dramatically sad. what should I do?

I know that Libre Office is a bit like Microsoft Office, but I can't find the equivalent of One Note, something that I used a lot before I moved over to Ubuntu, and I do miss the features that it had. Currently I use Evernote Web, or just nothing at all.  Does this not exist?


I am trying to delete a line from xml file by comparing resource name tab value from same xml file, the below bash script works if I put logfilename as Mansing but gets failed when I keep the value as 'jdbc/test'. Any help?  bash code:   logfilename="jdbc/test"  sed -i "/\<$logfilename\>/d" /home/test/test.xml   test.xml file is as below:  <a> <Resource name="jdbc/test" auth="container" url="localhost:8080" <Resource name="Mansing" auth="container" url="localhost:8080" </a>

In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="<funny characters here>" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user.


I need to determine the values of p for which this integral converges conditionally and absolutely.  $$\int_{0}^{\infty} \dfrac{\sin(x)}{x^p} dx $$  I think the interval for conditional convergence is $0 < x < 2$ and for absolute convergence the interval is probably $0 < x < 1$. I'm guessing that I need to somehow compare it with the $\dfrac{1}{x^p}$ integral, but I am not sure exactly where to begin and how to logically proceed. I first thought about dividing the integral into two separate improper integrals, with one of them integrating from $0$ to $1$ and the other from $1$ to infinity, but I do not know how to continue from that point on.

Hi I am trying to find out for what values of the real parameter does the integral $$ I=\int_0^\infty \frac{\sin x}{x^s}dx $$ (a) convergent and (b) absolutely convergent.     I know that the integral is convergent if $s=1$ since $$ \int_0^\infty \frac{\sin x}{x}dx=\frac{\pi}{2}. $$ For $s=0$ it is easy to see divergent integral since $\int_0^\infty \sin x\, dx$ is divergent.  However I am stuck on figuring out when it is convergent AND or absolutely convergent.  I know to check for absolute convergence I can determine for an arbitrary series $\sum_{n=0}^\infty a_n$ by considering $$ \sum_{n=0}^\infty |a_n|. $$ If it helps also $$\sin x=\sum_{n=0}^\infty \frac{(-1)^{2n+1}}{(2n+1)!} {x^{2n+1}}$$. Thank you all


I want to increase the ulimit -n value,so I add   *       soft  nofile  20000 *       hard  nofile  20000   in the /etc/security/limits.conf file, but there is a question confuse me all the time. what level is the value ulimit -n mean? user level or process level? Specifically speaking, if the value of ulimit -n is 512, and user testUser hava 3 process, does it means testUser can have the total file descriptors for 512 sum up for all his 3 process, or does it means each of testUser's process can have 512 file descriptors and thus testUser can hava a total file descriptors amount of 512*3?

I'm tuning the nofile value in /etc/security/limits.conf for my oracle user and I have a question about its behavior: does nofile limit the total number of files the user can have open for all of its processes or does it limit the total number of files the user can have open for each of its processes?  Specifically, for the following usage:  oracle                  hard    nofile                  65536


On Saturday, Jimmy started painting his toy helicopter between 9:00 a.m. and 10:00 a.m. When he finished between 10:00 a.m. and  11:00 a.m. on the same morning, the hour hand was exactly where the minute hand had been when he started, and the minute hand was exactly where the hour hand had been where the hour hand had been when he started. Jimmy spent $t$ hours painting. Determine the value of $t$.   Let $h$ represent the initial position of the hour hand.  Let $m$ represent the initial position of the minute hand.  Note that in this solution position will be represented in "minutes". For example, if the hour hand was initially at $9$, its position would be $45$.   $$45\le h \le 50$$ $$50 \le m \le 55$$ $$\implies 0 \le (m-h) \le 10$$  Time can be represented as the number of minutes passed since 12 a.m. (for example 1 am = 60, 2 am = 120 etc.)  Then:  $$60(\frac{h}{5}) + m + t = 60 (\frac{m}{5}) + h$$ $$\implies 12 h + m + t = 12m + h$$ $$\implies t = 11 m - 11 h$$ $$\implies t = 11(m-h)$$  $$0 \le t \le 120$$ $$\implies 0 \le 11(m-h) \le 120$$ $$\implies 0 \le m -h \le \frac{120}{11}$$  That was as far as I got. Could someone point me on the right path to complete the above solution? (if possible). I am not simply looking for a solution but instead a way to complete the above solution. Any help is appreciated, thank you.

This is from 2012 Euclid. I was wondering if someone could point out the flaw in my reasoning here: Let the minute hand point to $50+x$ minutes. Then the hour hand points to $45 + \dfrac{50 + x}{12}$ minutes because the hour hand moves at a rate 1/12 that of the minute hand. Since the hour hand will move from $45 + \dfrac{50 + x}{12}$ to $50+x$ the number of minutes it travels is $50+x -45 - \dfrac{50 + x}{12} = \dfrac{11x + 10}{12}$ but since the minute hand travels to $45 + \dfrac{50+x}{12}$ and the hour travels to $50+x$ we know that x = $\dfrac{45 + \dfrac{50+x}{12}}{12}$ and x = $\dfrac{590}{143}$ Plugging this into $\dfrac{11x + 10}{12}$ we get 60/13 and we divide by 12 to convert minutes to hours, for a total of 5/13 hours. The correct answer is 12/13. I was hoping someone could point out the error in my solution, rather than providing a new one, as I have seen better ways to solve this using angles, but would like to see the error here.


I'm trying wrap my head around python decorators so I borrowed this supposedly fastest   :  class memoize(dict):       def __init__(self, func):           self.func = func       def __call__(self, *args):           return self[args]       def __missing__(self, key):           result = self[key] = self.func(*key)           return result  >>> @memoize ... def foo(a, b): ...     return a * b >>> foo(2, 4) 8 >>> foo {(2, 4): 8}   Piece of cake but then I came to know about . The doc says it:     This is a convenience function for invoking update_wrapper() as a function decorator when defining a wrapper function. It is equivalent to partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated).   When to use it and when not to use it ? Could anyone tell me If I've to use the above class memoization using that functools.wraps how would I change it ? Thanks in advance!

In a comment on this , someone said that they weren't sure what functools.wraps was doing. So, I'm asking this question so that there will be a record of it on StackOverflow for future reference: what does functools.wraps do, exactly?


I have proved that a continuous function $f(x): \mathbb{R} \rightarrow\mathbb{R}$ cannot take every value in its range exactly twice. How is the general case with an even number of times proved?  Here's my proof for the basic case.  Suppose continuous $f(x): \mathbb{R} \rightarrow \mathbb{R}$ takes every value in its range exactly twice. Let $f(a) = f(b) = w$ with $a < b$. Claim that $\forall x \in (a,b), \; f(x)>w$ or $f(x) < w$.   If $f(x) = f(a) = f(b) \; \forall x \in (a,b)$, that clearly contradicts the hypothesis. If $\exists x_1,x_2 \in (a,b): \; f(x_1) < w < f(x_2)$, then by Intermediate Value Theorem, $\exists x_3 \in (x_1,x_2)$ or $(x_2,x_1)$ such that $f(x_3) = w$ contradicting the hypothesis.   Assume for the moment that $\forall x \in (a,b), \; f(x)>w$. By Extreme Value Theorem, $f(x)$ attains maximum $f(c_1) > f(a)=f(b)$ at some $c_1 \in (a,b)$. By the hypothesis, $\exists c_2 \in \mathbb{R}\setminus \{c_1\}$ such that $f(c_2) = f(c_1)$. Claim that $c_2 \in (a,b)$.   If $c_2 > b$, for some value $u \in \Big(f(a),f(c_1)\Big) = \Big(f(b),f(c_1)\Big) = \Big(f(b),f(c_2)\Big)$, $f(x) = u$ at least three times, namely $x_1 \in (a,c_1), \;x_2 \in(c_1,b), \;\text{and } x_3 \in(b,c_2)$, contradicting the hypothesis. By similar reasoning, $c_2 \nless a$.   Without loss of generality, assume $a < c_1 < c_2 < b$. By Extreme Value Theorem, $f(x)$ attains minimum $f(d)$ at some $d \in (c_1, c_2)$. Because $f(a) = f(b) < f(d) < f(c_1) = f(c_2)$, by Intermediate Value Theorem, $f(x) = f(d)$ at least three times, namely $x_1 \in (a,c_1), \; d, \text{ and } x_2 \in (c_2,b)$. This is a contradiction to the hypothesis.  Now for the other case when $\forall x \in (a,b), \; f(x) < w$. Let $g(x) = -f(x)$ and apply the above proof to conclude that $g(x)$ cannot take every value in its range exactly twice, so neither $f(x)$.  Thanks.

Suppose $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous. Is it possible for $f$ to assume each value in its range an even number of times?  To clarify, some values might be taken 0 times, some 2, some 4, etc., but always an even (and therefore finite) number. I don't require that there be a value that is assumed any particular number of times.  For example, the function might be surjective, or never take on any value exactly twice.  This question is possibly the same as . That question may instead have meant, "If $n$ is even, is it possible for $f$ to assume every value in its range exactly $n$ times?"  In any event, it has not been answered.


With $\{\}$ denoting the fractional part function, does the following integral admit a closed-form? $$\int_{0}^{\pi/2}\bigg\{\sec(x)\bigg\}dx$$

I have tried the $u$ substitution yet I could not move forwards on this problem. Could you calculate in closed-form this integral? $$\int_{0}^{\pi/2}\bigg\{\csc(x)\bigg\}\mathrm{dx}$$