when i clicked on button after saving record it is showing error message that component need to refresh it. i have already refresh it even cookie cache and history also deleted but not showing success toast message.       ({ CreateContact : function(component, event, helper) {     var cont = component.get("v.ConDetails");     var toastEvent = $A.get("e.force:showToast");     toastEvent.setParams({                     "title": "Success!",                     "message": "Record Save Successfully",                     "type": "SUCCESS"                 });     var action = component.get("c.NewCon");     action.setParams({ "con": cont     });      action.setCallback(this, function(a) {            var state = a.getState();             if (state === "SUCCESS") {                 toastEvent.fire();              }         });     $A.enqueueAction(action); } })     Controller code below     public class NewContactController {  @AuraEnabled public static contact NewCon(Contact con){     if(con != null){         insert con;     }     return con;   } }   Component code below    <aura:component controller="NewContactController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" > <aura:attribute name="ConDetails" type="contact" default="{ 'sobjectType' : 'Contact' }" />  <lightning:card variant="Narrow" title="Contact" iconName="standard:contact"> </lightning:card>

             <lightning:input aura:id="confn" value="{!v.ConDetails.FirstName}" label="First Name"/>

             <lightning:input aura:id="conln" value="{!v.ConDetails.LastName}" label="Last Name"/>

             <lightning:input aura:id="contemail" value="{!v.ConDetails.Email}" label="Email"/>

             <lightning:button aura:id="save" type="save" label="Save record" variant="brand" class="slds-m-top_medium" onclick="{!c.CreateContact}" />

I am using Lightning toast messages in my lightning controller. But I am getting error like "Cannot read property 'setParams' of undefined"  Below is my code:  var toastEvent = $A.get("e.force:showToast"); toastEvent.setParams({    "title": "Error!",     "message": "Plase provide 'Part Number' to add to the list." }); toastEvent.fire();


My laptop specs say :input 19V and 6.3A, That means (120W charger),   I hve recently bought a charger because my old charger broke up. So this new charger provides 19.5V with 6.5A (126W) ; That are higher than the laptop's specs. Should i look for another charger that is compatible with my laptop 100% or i should not worry about this problem. Thanks

Possible Duplicates:             I have an ASUS K50IN laptop which requires an input of 19 V at 3.42 A. Its charger has stopped working (wires cut by rats!). My brother have a charger that is 19 V, 7.1 A. Their polarity is the same and the tip fits correctly.. Can I use this charger on my laptop?


I am working on a project that uses PHP/MYSQL as the backend for an IOS app that makes a lot of use of dictionaries and arrays containing text or strings.  I need to store this text in MYSQL (coming from Arrays of srtrings on phone) and then query to see the text contains (case insensitive) a word or phrase in question.  For example, if the array consists of {Ford, Chevy, Toyota, BMW, Buick}, I might want to query it to see it contains Saab.  I know storing arrays in a field is not MYSQL friendly as it prevents optimization. However, it would be way too complicated to create individual tables for these collections of words which are created by users.    So I'm looking for a reasonable way to store them, perhaps delimited with spaces or with commas that makes possible reasonably efficient searches.  If they are stored separated by spaces, I gather you can do something with regex like:  SELECT      * FROM     `wordgroups` WHERE     wordgroup regexp '(^|[[:space:]])BLA([[:space:]]|$)';   But this seems funky.  Is there a better way to do this?  Thanks for any insights

I would like to write an SQL query that searches for a keyword in a text field, but only if it is a "whole word match" (e.g. when I search for "rid", it should not match "arid", but it should match "a rid".  I am using MySQL.  Fortunately, performance is not critical in this application, and the database size and string size are both comfortably small, but I would prefer to do it in the SQL than in the PHP driving it.


So I am obviously missing something completely obvious here. I have a button and an actionlistener hooked up to it. When I click the button, I want run an if statement that takes the contents of a TextArea and compares it to a String. Like So:  String a = "hello"; JTextArea area = new JTextArea("type something"); JButton button = new JButton("Go");  button. [insert actionlistener crap]      //here's the important part:     if (area.getText() == "hello"){         //this will not be executed     }   It's really weird. I even went through the debugger and at that if statement, both of those items are "hello". But it skips over it! What am I doing wrong?  EDIT: a lot of you are saying "use .equals". Can anyone tell me why?

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?


“The gold ones are Galleons,” he explained. “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it’s easy enough.”      Harry Potter and the Philosophers Stone – Chapter 5 – Diagon Ally   The fractions 17, and 29 are not only odd (unusual, bizarre, eccentric), and odd (uneven), they are primes. Clearly this is not a well thought out system, and thus produces a really humorous effect on the text.  I initially thought that this is a diss on the imperial measurement system, because I was under the () impression that Hagrid had a southern US accent.  Has JKR ever said why she chose these fractions for the wizarding currency subunits?

There are 17 Sickles in a Galleon, and 29 Knuts in a Sickle. This seems very impractical, as both numbers are primes.  It might be an out-of-universe parody of how old muggle money was divided before it was made decimal, but that old system at least made some sense: the divisions of 12, (or 20) meant that they had a lot of divisors, so you could easily divide it in 2, 3, 4 (or 5) equal parts.  Is there a reason why wizard money is divided in such a way?


I am not sure of the correct mathematical name of the feature I am looking at. Its been a long time since I did math at school.   seems to concerned with this sort of thing, but leaves me unsure that I have understood what is written. Below I use '%' as MOD and '^' as 'raised to the power of'.  And am quite wordy. For all primes > 2, there is a sequence {2^n%prime, for all integer n, 0 to infinity}. That is { 2^0 % prime = 1, 2^1 % prime = 2, .. 2^(prime-1) % prime = 1, 2^prime % prime = 2, ..} 2^((prime-1) * m)%prime = 1 and 2^(prime * m)%prime = 2 for all integer m. if the prime is 7 however, the sequence is made up of two instance of a shorter sequence thus: 2^0%7 = 1, 2^1%7 = 2, 2^2%7 = 4, 2^3%7 = 1, 2^4%7 = 2, 2^5%7 = 4, 2^6%7 = 1 and then 2^(6 * n)%7 is still 1; but the are extra values that are also another set of at (2^(3+6*n)%7) So the cycle-length(prime) is what I have been calling the first n > 0 where 2^n mod prime is 1. I have inserted some code that calculates this by trial until repetition.. with some trivial uses of it. long cycleLength(long prime) {     long remainder = 1 ;     long length = 0 ;      do {         length++ ; //#define FAST_MODULO #ifdef FAST_MODULO         remainder = (remainder+remainder)%prime ; #else         remainder += remainder ;         if (remainder > prime) remainder -= prime ; #endif         if (remainder == 1)             return length ;     } while (length < prime/2) ;      return prime-1 ;}  size_t pow_of_2(unsigned n) {     size_t result = 1 ;     size_t pow = 2 ;      while(n)     {         if (n & 1) result *= pow ;         pow *= pow ;         n /= 2;     }     return result ; }  #include <iostream> using std::cout ;  int main(int ac, char **av) {     long prime = 17 ;      cout << "cycleLength(17) = " << cycleLength(17) << '\n';      cout << "2^16 = " << pow_of_2(16) << '\n' ;     cout << "2^33 = " << pow_of_2(33) << '\n' ;      cout << "33 % CL(17) = " << 33 % cycleLength(17)           << ", 2^(33 % CL(17)) % 17 = " << pow_of_2(33%cycleLength(17)) % 17 << '\n' ;     cout << "2^33 % 17 = " << pow_of_2(33)%17 << '\n' ;     cout << std::endl ; }  I have observed that cycles are either length (prime-1) or divisor of (prime-1). So the run-time is reduced by stopping at (n == prime/2) and returning (prime-1) as that is the only case remaining; and the code is about 25% quicker as a result. The algorithm is currently O(N) time complexity. I am hoping for clues or insight that might reduce this. Thanks for reading this.

If I take the $k \in \mathbb{N}$ power of 10 and mod it by a large prime, I notice that the remainders repeat at some point.  For instance $10^k mod~7$ seems to repeat every $8$th value of $k$.  Given $k$ (the power of ten), and a large prime number $p$, how can I compute the size of the cycle?  I tried writing a python script that computes the first instance of a repeat. However, I don't know if this works since a single instance of a repeat may not necessarily mean a full cycle.


Can quantum entanglement make sending a message, whether audio, video, or even Morse code, instantaneous between two points (faster than it could travel normally at the speed of light)?  Let me first be clear, my question is not whether a message can travel faster than light. I simply mean whether a message can be generated here and then a copy of that message heard over there sooner than the message would normally be received.  Say a large number of entangled pairs are generated. One half the particles are given to Jack and the opposite ones to Sally. Jack then hops on a ship and travels 8 months to Mars. Sally then manipulates her particles in the form of a message. Do the corresponding opposite particles get manipulated simultaneously so that Jack receives the message instantly instead of the 16 light-minutes for a classically transmitted message?

As I understand it (from a lay physics perspective), quantum entanglement has been experimentally demonstrated - it is a reality. As I understand it, you can measure something like the spin of an electron and know that its entangled pair will, in that same instant, no matter where in the universe it is, have the opposite spin.   This would not seem to have any utility as the foundation of a superluminal communications device. Is this true, or has it been established that is there some aspect of quantum entanglement that can ultimately lead to the development of such a device.  In other words: is superluminal communication via quantum entanglement an open scientific question, has it been settled as an impossibility, or is it currently more of an engineering problem than a scientific one?


we have countered a seriously weird problem. 3 of our very most popular search results went invisible. This means, that they still show avg. position, they still get impressions. But they don't get clicks / traffic.  Its been 5 days since it happened. There is no messages in regards to those pages or manual actions (delay of up to 3 days). Absolutely everything is green. And the live testing tool is green as well. There has been no DMCAS (dmca has delay of 2-4 days).  With all the years we have been doing business, we have encountered all possible situations with google. But this is something unique. The results are simply put invisible and other content from our site wont pop up, as it gets labeled as "irrelevant" as the main URL is there (but invisible.)  Is there some sort of a algorithm that detects X anomyalies and makes specific results into invisible until manual review by a googler?

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


In an anti-matter universe, when an anti-matter black hole is consuming a large anti-matter star, would it emit anti-matter gamma radiation, or would gamma radiation be the same in either a matter or anti-matter universe?

I know what anti-matter is and how when it collides with matter both are annihilated. However, what about anti-photons? Are there such things as anti-photons?  I initially thought the idea preposterous. However I am curious because, if anti-photons don't exist, then anti-matter could theoretically transfer its energy to normal matter - through the mechanism of light. Is it right?


I have installed Nagios on my network, and I have some beginner questions.  I would like to get some "best practice" information about the following types of server:   Web Server Exchange Server Database Server   From the list above I would like to know the resources that should be monitored. For example, what are the preferred checks to monitor an exchange server, I initially thought of these :   Disk Space (C:)  CPU Load (%) Memory Usage (%)    I'd like to compile a list of these so that when I add a new server to my network I know what checks I should add (in essence a set of templates) depending on the server type.  To further clarify, I am not asking HOW to configure Nagios, but what are some best practices and typical checks I should choose for different types of server.

I run a medium-sized Nagios server. It monitors roughly 40 servers with 180 services currently and is only growing by the day.  I migrated from an old Nagios setup that was configured in a very esoteric fashion, forcing me to reconfigure everything from scratch.  Now that the server is running and works for most of what we need it for, I'm looking into making it a bit more scalable; currently each hosts is its own file in /etc/nagios/hosts/, and each host has all of its services in the same file. This is obviously not optimal, but neither is obfuscating all of my configuration into hundreds of different files.  So my question is this: to any experienced Nagios admins out there, what is the best way to make use of hostgroups/servicegroups without over-complicating the configuration?


I have four number of values for number of policies within a given field put forward in a given year. I want to find if there is a statistically significant increase or decline in the number of policies over time.   My initially approach was to try and run a t-test on the values, but I believe that that was wrong as I used percentage values compared to total number of policies.   What would be the best way to find statistical significance? I think I may have been trying to over complicate things that that this only needs simple regression.

I am trying to build a stock screening utility.   What  I am trying is to find if there is a rising trend in a time series of profit margins of a company. I know there can be dips in some years but I want to find if mathematically that overall there is a rising trend as well as towards the recent years there is higher margins as compared to previous years.   Is there any way we can find it mathematically?          Profit Return Year,Company A,Company B,Company C 2005,38.97,20.44,22.01 2006,22.4,20.59,20.63 2007,22.4,20.59,20.63 2008,21.56,22.01,23.87 2009,25,20,23.52 2010,25,22.38,18 2011,30,24.13,24.85 2012,32,25.43,27.47 2013,30,20,22 2014,35,27,20


Suppose we have a continuous function $f : \mathbb{R} \to \mathbb{R}$. Suppose also that for a certain point $c$, $\lim_{x \to c} f'(x)$ exists. Must $f'(c)$ exist as well, and be equal to this limit?  This isn't quite the same as asking if derivatives are always continuous. The well-known function $f(x) = x^2 \sin (1/x)$ is continuous and differentiable everywhere, but its derivative has no limit at $x = 0$. I'm wondering if the derivative of a continuous function can have a discontinuity where its limit does exist.

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


This is the following error i am getting....  Starting SFDX: Create Project  11:39:05.943 sfdx force:project:create --projectname gfgfgf --outputdir c:\Users\SAMEER\Desktop\ToDoManager --template standard ERROR running force:project:create:  Command failed with exit code 1: npm root -g --prefix c:\Users\SAMEER\Desktop\ToDoManager\.yo-repository --loglevel error 'npm' is not recognized as an internal or external command, operable program or batch file. 11:39:07.122 sfdx force:project:create --projectname gfgfgf --outputdir c:\Users\SAMEER\Desktop\ToDoManager --template standard  ended with exit code 1

I am getting the error "'npm' is not recognised as an internal or external command" while creating project in VS code using Salesforce CLI. Don't know what I am missing out. Can anyone guide me.


I've a DIP I scavenged from a old receiver but I cannot find a datasheet that's why I've to ask a question about its manufacturer but I don't know on which site I should ask the question. I've tried to look for a appropriate site  but cannot find any.

I am currently doing some electronics and microcontroller programming, and I have a couple of questions to ask the people here.    Most of the questions are regarding wiring on breadboards and components.    On which of the websites (Stack Overflow, Server Fault, or Super User) should I ask these particular questions?


Let Nl and N2 be 6 X 6 nilpotent matrices over the field F. Suppose that N1 and N2 have the same minimal polynomial and the same nullity. Prove that N1 and N2 are similar. Show that this is not true for 7 X 7 nilpotent matrices.  Well, if Nl and N2 are 6 X 6 nilpotent matrices, the characteristic polynomial of them, are p1(x)=p2(x)=x^6 and the minimal m1(x)=m2(x)=x^i with i=1,...,6. As these matrices has same nullity, (call it "s") then rank(N1)=rank(N2)=6-s. Now, should i do?  Should i fix the minimal and consider the possibilities for the rank and confirming that all have the same Jordan form?

From Hoffman and Kunze.     Let $N_1$ and $N_2$ be 6 X 6 nilpotent matrices over the field F. Suppose that   $N_1$ and $N_2$ have the same minimal polynomial and the same nullity. Prove that   $N_1$ and $N_2$ are similar. Show that this is not true for 7 X 7 nilpotent matrices.   Right so nilpotent matrices have $N^k= 0$ for some k. Since these have the same nullity and minimal polynomial $N_1^k = N_2^k = 0$ from some k right? The same minimal polynomial implies the same characteristic values but thats not enough to say they have the same jordan form and are thus similar right?  and how would I get started in proving this breaks for 7x7 nilpotent matrices?  Thanks in advance for any assistance.


I just bought my new MSI laptop and shortly after i instaled windows 7 ultimate i found out that my keyboard is crazy. All buttons are mixed but in a very unique fashion that i cant relate to anything.  If i push all the buttons from 1 to backspace like 1234567890-= i will get 976P4 and button 7 is a scroll lock button and button 6 i guess is tab cause its highliting "file" in the notepad. Spacebar acts like a backspace and backspace acts like a 3 on a numberic keypad. How do i know that? it normally types 3 but if i press numlock on "screen on keyboard" it starts to act like PgDn.  The whole thing was also present in BIOS and in windows instalation but i ignored it thinking that it would go away after instaling windows. Now i cant even boot my laptop from a disc as if laptop didnt respond to me pushing f8.

The keyboard on my laptop seems to be typing by itself:   It sometimes types characters like 134, whether by itself or when I hit certain keys. Repeating characters may appear unexpectedly. The system volume may change by itself, or windows like the Print dialog or Web browser may appear.   This can happen without any input or as I type, and may occur more often when certain keys are pressed. Sometimes, the keyboard fails to respond altogether. This is happening regardless of the software involved.  Is there a ghost in my keyboard—is my keyboard broken?  A sample of text from the keyboard might look like this (normal QWERTY...ASDF...ZXC... sequence is expected):   QWERTYUIOPASDF)(G@*HKLZXCVBN QWERTYIOPASDFGL!#ZXCVB13 QWERTYUIOPASDFGHJKLZXCVB!#N qwertyu41iopasdf19g13h28j113k4113zxcvb4n qwerty4u1iopasdf0g7h1jklzxcvb13m qwert13uuuuuuuuuuuuuuuiopasdf87091134ghhhhhhhhhhhhhhhhhhhhhhh13jk13zxcvb14      This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


Wrong Sentence:     Never before in the history of the world such a thing has happened, I don't think that will ever happen again.   Right sentence:     Never Before in the history of the world has such a thing happened, I don't think that will ever happen again.   Why “has such a thing happened” is the right form, and why can't I use such a thing has happened?

I have seen this construction quite often:      Online ads have been around since the dawn of the Web, but only in   recent years have they become the rapturous life dream of Silicon   Valley.   What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to:      Online ads have been around since the dawn of the Web, but only in   recent years they have become...   And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now.


I have list with different brackets:[,],{,},(,) I need to merge them into double brackets  for (int i = 0; i < word.size(); i++) {         if (word.get(i).equals("("){             word.set(i,"()");         }         if (word.get(i).equals("{"){             word.set(i,"{}");         }         if (word.get(i).equals("["){             word.set(i,"[]");         }`   It works, but it remove some brackets. If before this there are like 107963, now it's 107952

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?


Assume I've got these variables in a bash script:  path_family="/home/family" path_family_log="/var/log/family.log" path_friends="/home/friends" path_friends_log="/var/log/friends.log" path_pets="/home/pets" path_pets_log="/var/log/pets.log"   I want to create a for loop where I could do something like the following:  for TYPE in family friends pets do   for FILE in $path_<TYPE>   do     cat $FILE >> $path_<TYPE>_log   done done   Obviously this isn't correct code, just most direct way to express what I want. I'm pulling my hair out trying to figure out how to do the substring substitution on the variable name and have it work as intended.

Let's suppose I've declared the following variables:  $ var='$test' $ test="my string"   If I print their contents I see the following:  $ echo $var $test  $ echo $test my string   I'd like to find a way to print the content of the content of $var (which is the content of $test). So I tried to do the following:  $ echo $(echo $var) $test   But here the result is $test and not "my string"... Is it possible to print the content of the content of variables using bash?


I need to copy many elements (and their attributes) from a shapefile and paste to another one. If I use copy/paste functions it pastes only the polygons but not the attributes.   How can I solve it?

Is it possible to create layers from selection in QGIS?  I am using QGIS 1.7.4-Wroclaw.  To make it easier for others to see this, here are some pics. I used QGIS 2.0.1-Dufour.  SELECT    SAVE    ADD


I need to create users in code specifying password, email and other fields' values.    How can I achieve this?

I know that I can programmatically create a user using the following code, in Drupal 7.   $new_user = array(   'name' => $name,   'pass' => $sifra, // note: do not md5 the password   'mail' => $email,   'status' => 1,   'init' => $email,   'roles' => array(     DRUPAL_AUTHENTICATED_RID => 'authenticated user',     3 => 'custom role',   ), );  // The first parameter is sent blank so a new user is created. user_save('', $new_user);   What is the equivalent code in Drupal 8?


I'm a complete stranger with Ubuntu, and i've run into a problem with installing.  What I am trying to do, is to install Ubuntu 13.10 to my old laptop. This laptop has a new hard-drive, that is completely empty. So no Windows or other operating systems to work with.  I'm booting my computer with USB, and it starts normally, but ass I press "Install Now" instead of "Try Ubuntu", then those problems really start. It gives me message "No root file system defined.." etc.  What to do?

I am new to linux/ ubuntu and just downloaded the v11 of ubuntu to learn linux. I faced this "No root file system is defined" error while trying to install it. This is how I was proceeding -    Downloaded ubuntu v11 from the ubuntu.com website, wrote the iso into a bootable cd, and then got into the linux installation process on restarting; everything fine till here. In one of the screen during installation, there are three choices - install alongside windows, something else etc.. Since I have windows 7 in the C drive, I selected the first option - "Install alongside another OS".      Let me interrupt here to give my existing system details - HardDisk   size: 640GB.  Number of existing partitions - 5 C drive - label   windows - 160GB - has windows 7 installed D drive - label linux -   160GB - does not have any data E drive - label backup - 100GB - has   some data F drive - label entertainment - 100GB  - has some data G   drive - label work - 90GB  - has some data All of the above are in   NTFS format.    In the screen that follows, an image is shown with 2 parts and each part is shown to have size equal to 80GB. There is a horizontal slider in the middle of these two images, with which I can resize the partitions. The right side partition is labeled Linux. There is also an option to do 'advanced partitions'. On clicking advanced partitions on the above screen, a new screen is shown in which the partitions existing in my computer are shown - but the labels are different. I see that there are two partitions with size = 160GB each (as expected), and so I assumed that the first 160GB would be my existing C drive and the second on would be the partition which I had labeled as linux (drive D). So I selected the linux partition and clicked on proceed/ install now, and then this error was shown - "No root file system defined".. and I cannot proceed after this.   Please let me know two things here:   During the screen in point number 3 above, the image with slider was shown. Which partition (drive c: or d: or anyother) is being referred to here? Which one am I actually resizing - is it the existing c: drive which has windows 7 installed already, that is getting shrunk and then ubuntu getting installed in the remaining space? What does ""No root file system defined" error mean? How do I select the proper partition and continue with the installation?    P.S.:  I had already partitioned my drives as mentioned above, and the D drive with 160GB was specifically left free for installing ubuntu. I would like to Select D drive during setup and install ubuntu here, while still keeping the already installed windows7 in C drive.  Thanks!


'Who can Curly see?' is the title of a book for kids. Curly is the name of a caterpillar. The book is to show that Curly saw several kinds of insects. When I read it I think the who should be whom instead.  I am not an English native speaker and I am not sure the use of who is correct or not in this book's title.  So could you help to clarify this?  Thanks.

Possible Duplicate:          I was writing a LinkedIn recommendation one day, and ended up pondering for a while which of these forms to use:     … is a great developer whom I always   found easy to work with.      … is a great developer who I always   found easy to work with.   Both are basically correct in contemporary English, right? But is one or the other preferable, and if so, why?   (In this case I went with the latter, as it seemed more common (Google)  and I wanted to avoid sounding unnecessarily “archaic”, although I’m not sure whether that would have been the case. Also note that I try to write in a “friendly professional” style instead of overly formal one. :-)


I have a question for our theoretic SuperUsers. How much knowledge and which fields of physics you have to know to start studying string theory? I am now on QFT, after I think I'll start study Supersymmetry or maybe special cases of QED. How much more should I know to start Strings? :)

The question I guess is pretty clear. I am a physics undergrad wishing to pursue research in quantum gravity(string theory?). What are the subjects I should learn other than the usual compulsory undergrad courses such as quantum mechanics, and GR, etc? Things that come to my mind are QFT, lie algebras, differential geometry, algebraic geometry etc? Other than this, could you suggest any topic that are not entirely essential but interesting in mathematical physics, gauge theory etc (e.g. solitons, monopoles etc). Actually I am looking for a mini project of sorts which would give me an idea of what these fields really are. I have done some lie algebras, classical field theory and am currently studying QM.


How to create an import button that loads always the same OBJ file?   I'm creating a connection bridge between Blender and other software. I was able to create a button following the scripts templates. In Blender, there is an import script template but contains a custom import function that prints text into the console.  This script is working but when I introduce the path, (filepath="X:/DoNotMove/Blender/mesh.obj") it stops working.  import bpy  # WIP BLENDER BRIDGE: Alan Mattano 2020 Soaring Stars lab  class CustomImpotPanle(bpy.types.Panel):     """Import Custom Panel for Rhino bridge"""     ui_tabTitle ="Import OBJ"     ui_topHeader = "Blender Bridge"          bl_label = ui_tabTitle     bl_idname = "OBJECT_PT_rhino"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'     bl_context = "object"      def draw(self, context):         layout = self.layout             obj = context.object          row = layout.row()                     row.label(text="Bridge", icon='MESH_CYLINDER')                      # IMPORT OBJ (consider using %Temp%)         row = layout.row()                     row.operator("import_scene.obj", text="IMPORT OBJ", filepath="X:/DoNotMove/Blender/mesh.obj")  def register():     bpy.utils.register_class(CustomImpotPanle)      def unregister():     bpy.utils.unregister_class(CustomImpotPanle)  if __name__ == "__main__":     register()   NOTE: By the way, the place for this type of button is not the best solution (but is working). Probably the top windows toolbar is a better solution.

Basically, I want to have a single operator which can do multiple things, based on some attributes values.  class MyPanel(bpy.types.Panel):     # (...)     layout = self.layout     row = layout.row()     row.operator("my.button", text="Button text")  class MY_BUTTON_OT_Button(bpy.types.Operator):     bl_idname = "my.button"     bl_description = "Button description"     bl_label = "Button"     foo = bpy.props.IntProperty()     bar = bpy.props.BoolProperty()      if bar:         # Do something with foo     else:         # Do something else :P   I know how to set one attribute, like so:      row.operator("my.button", text="Button text").foo=5   But what about multiple arguments? I tried several things that didn't worked, like (e.g.):   With setattr(): row.operator("my.button", text="Button text").setattr(foo=5,bar=True)   With a custom method setVal() in the operator class: row.operator("my.button", text="Button text").setVal(foo=5,bar=True)   Maybe I must use a single EnumProperty? I hope to avoid this, so my question is: Is it possible to pass multiple custom arguments to set attributes in an operator class? And if yes, how ?  Thanks for your help.


I have a textfield that inputs date in this format: yyyy-mm-dd, how can I add a day to that users input? I have the following code but it doesnt work...  users_date = document.getElementById('users_date').value;     var date = new Date(users_date); var next_date = new Date(); next_date .setDate(date.getDate()+1); document.getElementById('next_date').value = next_date;   The first problem is the format of the date in the second is like 'Mon Aug 05 2013 16:24:40 GMT-0500 (Hora est. Pacífico, Sudamérica)'  The second problem is that when the user input the fist day of the month like '2013-01-01' or '2013-08-01' it displays 'Sun Sep 01 2013 16:26:06 GMT-0500 (Hora est. Pacífico, Sudamérica)' ALWAYS  For example if user inputs 2013-01-01 I want another textfield to be 2013-01-02 or 2013-08-31 it displays 2013-09-01, how can I do that?  Thanks!!  ITS NOT DUPLICATE BECAUSE THE OTHER POST DOESN'T FORMAT THE DATE!!!!

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


I'm trying to use sed to remove any subdomain prefix from a list of hostnames, but it's not replacing anything when I use a regular expression.  Here's the simplified example that's not working:  echo "subdomainxyz.example.com" | sed 's/[a-z]+\.example\.com//'   When I hard-code a particular subdomain in there, it works just fine:  echo "subdomainxyz.example.com" | sed 's/subdomainxyz\.example.com/example.com/'

I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?


My site address is  My Google rank for people searching from the UK is currently 14th - which considering the last 10 years I've been ranking at 18/19/20 or lower is much better. But For people searching from around the world - specifically the USA - I understand my rank is somewhere on page 3. So how would I go about improving my international standing? PS. I'm hoping my rank in the UK has more improvements to make in future updates. EDIT Here's some detail of what sort of things that I've done over the years to try and improve rankings:  Got rid of a directory listing of about 750 noindexed demo pages which didn't have a lot of content beyond a canvas or SVG chart example and the JavaScript code that creates it. This was in August 2019. In the December 2020 Google update my site moved up to 14th position in the UK for the search that I'm targeting - "javascript charts". It still remains in a page 3 ranking for the USA.  I've added an extensive About page:   I used to have a forum which I removed - but since then I've re-added one. This time I'll be making sure the titles are good quality (a lot of people who post messages don't have English as their first language for example).  All/most of the pages have good titles and meta descriptions.  All the pages have been spell checked. When I did this the site started moving up but about 2 weeks later it was pulled back to 18/19/20 overnight. This was before I removed the demo pages. My sight isn't good so I made a lot of spelling and grammar errors!  All of the pages have a set of breadcrumb links.  All pages use HTTPS and gzip compression.  For improved usability, the font size and the CSS line-height have been increased.  I've added an FAQ to the site (  ) which also uses schema. This was a recent addition; this year.  For pretty much all support requests I usually ask people if they could link to me. I usually get positive responses.  The URLs of the pages used to be quite long, but I've shortened them and added 301 redirects from old to new. An example of the new URL style is:    Which is a page about the Google Sheets connector.  I frequently use online performance tools like  ( I just ran a test and got 5 A grades testing from the UK).  I have a spider tool on my computer (Xenu spider) which I use frequently to look for 404 pages. There shouldn't be any legitimate 404 pages currently.  I've tried to "flesh out" pages and make them more verbose (without adding useless crap).  The footer contains links to various key pages on the site - such as the canvas and SVG sections of the website, the FAQ, the support forum, the Twitter and Facebook pages.  The site has Twitter and Facebook pages which are kept up-to-date and relevant, closely mirroring what gets posted on the websites blog (  ).  The pages are quick to load and render, not using complicated HTML so they render consistently across browsers and platforms.  I've added unique Twitter/Facebook meta/Og tags for each page.  The site works well on mobile. No problems reported on GSC. For smaller screens the nav bar turns into a hamburger menu.  Certain JavaScript libraries are positioned to enhance speed - eg charts that aren't immediately visible are created by code that's positioned at the bottom of the page.  Certain HTML5 tags are used (fwiw) eg /.  Summary blocks have been added to the top of each page that use the meta description.  I used to change the design of the site quite often - but I no longer do this. According to the waybackmachine the last significant change to the design of the front page was between August 25th and September 15th in 2019.   There's probably more - I'm always tinkering with something - but this should give a pretty good impression I think. If there's more that you need to know then let me know.

What are the best ways to improve a site's position in the Google search results?


Hypothetical example:  A researcher counts the number of persons entering a building over a one hour period and records this number.  The following day the researcher performs the same count during the same hour of the day.  Can these two numbers be compared for a statistically significant difference using a t-test, despite the fact that neither are means?  (Please ignore the fact that taking single readings and trying to infer meaningful findings is abhorrently bad science, this is intended as a statistical question.)

This is an elementary question, but I wasn't able to find the answer.  I have two measurements: n1 events in time t1 and n2 events in time t2, both produced (say) by Poisson processes with possibly-different lambda values.  This is actually from a news article, which essentially claims that since $n_1/t_1\neq n_2/t_2$ that the two are different, but I'm not sure that the claim is valid.  Suppose that the time periods were not chosen maliciously (to maximize the events in one or the other).  Can I just do a t-test, or would that not be appropriate?  The number of events is too small for me to comfortably call the distributions approximately normal.


I have a list that holds a few strings(names). For this example. It will hold:   TeSt1 TeSt2 TeSt3   And I'm trying to check if that list has one of those. And I'm doing this like this at the moment:  if (list.Contains(test2)) {  }   But I need it to be case insensitive.. But how can I do that? in an if statement.

Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such.


I plan to visit Australia from the UK, I am an Australian national with dual nationality - I also hold a Greek passport.  I have all the correct documentation and everything is fine.  However, if I leave the UK and present my Australian passport to immigration control on exit from Heathrow, will this then pose problems when I return back to the UK and present my Greek passport. I will be carrying both passports.

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Im experimenting with some stuff, and i was just wondering if thwre is any way to modify the source of the parameter values passed to a method? Like if i have this method for swapping two values:  void swap(int i, int j) {     int temp = i;     i = j;     j = temp; }   Is there any way to make it so that the integers passed to the method get changed as they are modified in the method?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


On MacOs X running updated mactex packages, when I compile my biber file I get this error:  data source /var/folders/yf/y69gwrx12kj2jtzrs78vg2vm0000gn/T/par-67696f6e61/cache-    23e542f078c05cf97a78083ff4d628bc746d389d/inc/lib/Biber/LaTeX/recode_data.xml not found in . Compilation failed in require at Biber/Utils.pm line 20. BEGIN failed--compilation aborted at Biber/Utils.pm line 20. Compilation failed in require at Biber/Internals.pm line 8. BEGIN failed--compilation aborted at Biber/Internals.pm line 8. Compilation failed in require at (eval 22) line 2. ...propagated at /opt/local/lib/perl5/5.14.1/base.pm line 94. BEGIN failed--compilation aborted at Biber.pm line 5. Compilation failed in require at script/biber-darwin line 20. BEGIN failed--compilation aborted at script/biber-darwin line 20.   Any idea on how to solve it?

I'm trying to use biblatex and when I compile my document I get an error like the following:  Windows  data source C:\Users\<username>\AppData\Local\Temp\par-5061756c\ cache-890efc00b3ca6b775c7d44a325c1349fb2a3a3bd\inc\lib/Biber/LaTeX/recode_data.xml not found in .   Mac  data source /var/folders/v2/rld0ls7d2935gkvqv5hfr1x00000gn/T/par-616c616e/ cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/LaTeX/recode_data.xml not found in .   Linux  data source /tmp/par-6963617269756d/cache-f37ab610b7d79b2720a8ee3732849c6821705520 /inc/lib/Biber/LaTeX/recode_data.xml not found in .


I have a user profile with extra fields like company address and company name etc.  I also have a content type job where i'd like to use the author's profile info (company name, address) in the content created by that author.  How do I use fields from the author profile in my nodes created via the job content type?  Is there something like a token field that I can use in my content type to display profile fields?  I know in views there's an option to use relationships, but I'd like to not use views for this if possible.

I've added a few custom user fields which users complete when registering.  What is the simplest approach to show these fields when viewing content that user has created?  For example, when viewing a blog entry I can see the 'submitted by..' and their name. I would like to use my custom user fields to expand that summary.  I've got no problem using views, or creating/modifying the theme etc, but I'd like some guidance on the easiest approach before I start out. (It's too easy to hack away on one approach in Drupal when there's a much easier solution!)


I've seen this symbol - @ everywhere, especially in java and php and none of my books ever explained what it's used for. I'm learning objective-c right now and the code says      @property (weak, nonatomic) IBOutlet UITextField *textField;   I've tried googling what @ is but no search results came up. Can anyone tell me what it's used for?

I'm learning objective-c and keep bumping into the @ symbol. It is used in different scenarios, for example at the start of a string or to synthesise accessor methods.   What's does the @ symbol mean in objective-c?


I'm having a problem with a the use of Bring vs Take.  I know, more or less, the difference between bring and take but in this case the "thing" that has to be moved from here to a different place is ME, so it makes me a bit confused.  We are talking about some rails (train tracks) and I'm wondering the following:     "Will they [the rails] bring me there?" (a known place)   or should I write:     "Will they take me there?"

English (other than American English) has a clear differentiation between the two words. Both are about translocating something. In "bring" the something of somebody is moved to where the speaker is currently situated. "Take" is used to translocate something or somebody to a place that the speaker is not currently at.   You cannot “bring” your books to school if you are currently at home. You can only take them to school. Most of the time one can get the meaning from the context of the sentence but it can get very confusing when the other party is on the telephone and you do not know their location.   Why does American English not differentiate and when did it lose the differentiation?


cat file_1.txt  100 200 name  100 200  100 200  150 300  150 300  150 250  150 250  150 300 name   final file should be   150 300  150 300  150 250  150 250   i am using this command   cat file_1.txt | grep -v "name">file_2.txt; cat file_2.txt| while read line;do cat file_1.txt| grep "$line"| head -1|grep -v "name" ;done   but data is too much cant use while loop it is taking to much time cat use while loop . is there any other way to do it fast  like using "grep -vf file_1 file_2" something like that By passing like that  . please let me know.  here i am using the logic of getting the top most line of pattern found pattern is  every line of "file_1.txt"

cat file_1  my colour is red my rose is red my colour is blue my rose id blue  cat file_2  red blue  cat output_file should be my colour is red my colour is blue   here i am using   cat file_2 | while read line;do cat file_1 | grep "$line" | head -1;done   here i am trying to get the top most line containing the pattern "red" and "blue" which is present in the file_2  is there any other way  to do , as fast as possible, while loop is taking time


We have a table with n rows. If you double-click any row, you copy the value of the last column of this row to the clipboard. I think it's a useful functionality but I'm not able to implement it. Any suggestion?  I've tried things similar to:

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


We have a weird issue on one of our sites.  The site in question forces https for all traffic but it throws a security error for some users. Different browsers, settings and network environments make it almost impossible to determine the cause of why the user is getting the error.  But, and here comes the question: when I try the same site on my machine, I get the security error in Firefox (v22) and not in Chrome or Safari, or in a VM running Windows 7 and IE9.  www.domain.com uses an invalid security certificate.  The certificate is not trusted because no issuer chain was provided.  (Error code: sec_error_unknown_issuer)  Is this an issue on the back-end and is Firefox the only browser failing because of it, or is it a problem in Firefox, thus making it a local browser problem?  Any feedback would be highly appreciated!

I purchased a certificate from  for my application, the problem is when I go to the url  I am getting the following message.   The certificate is not trusted because the issuer certificate is unknown. Error code sec_error_unknown_issuer. So people have mentioned that the intermediate certificate is need but I think that I have installed that as well as the main certificate.  This message seems to appear with Firefox and seems to be ok with the IEs  Any ideas?  Thanks


I am taking a class at Pluralsight and made the mistake of typing 'express -H' as instructed. Now I have a dir named -H and Ubuntu will not let me access it or otherwise deal with it. I would like to rename it - any help?

This may be a simple question, but how do I use files starting with "-" with command line programs?   For example,  I am trying to use pdfgrep on a file named -2013-01-01.pdf but it complains that there are no options defined for 2, 0, 1, 3 and so on.  Changing the filename to something that does not start with "-" solves it, but this is not an option since the files aren't created by me. I simply want to check for a specific change I know is coming.


How can I get a Type of member, ignoring its value ?  public static class Program {      public static String a {set; get;}      public static void Main()     {          a = null;          a.GetType(); //Cant do that, it's null, how can i get "String"?     }  }

I want to get the PropertyInfo for a specific property.  I could use:  foreach(PropertyInfo p in typeof(MyObject).GetProperties()) {     if ( p.Name == "MyProperty") { return p } }   But there must be a way to do something similar to   typeof(MyProperty) as PropertyInfo   Is there?  Or am I stuck doing a type-unsafe string comparison?  Cheers.


I asked this question . Some doubts emerged in my mind from the comments. Here they are:  Are time and the arrow of time, the same thing? All of modern physics, seems to treat time as just another dimension, except the very important distinction that time has only one direction. So, if there was no arrow of time but time still existed, would we be able to distinguish such a "time" from the spatial dimensions?

This is an attempt to gather together the various questions about time that have been asked on this site and provide a single set of hopefully authoritative answers. Specifically we attempt to address issues such as:   What do physicists mean by time? How does time flow? Why is there an arrow of time?


Can I amend my 2019 return to remove my parent as a dependent so they can get stimulus check?  I know that it says that if an adult "can" be claimed as a dependent than they aren't eligible but how does the IRS know if an adult could be claimed or not be claimed as an adult dependent on someone's tax return regarding the COVID stimulus?

On my 2019 Tax Return I claimed my 28 year old girlfriend as a dependent. This makes her ineligible to receive a COVID Stimulus Check. My return was already accepted and I have already received my refund. Should I amend my return, remove her as a dependent? Would she then be eligible to receive the stimulus check?


The question asked is very different from the so called duplicate post as I have specific errors and they are just asking why it needs to be in the .h file... I already have it in the header file and am getting the errors below.  Updated the files and I still get the following errors.   1 Unresolved externals (lab12.exe line 1) unresolved external symbol "public char__thiscall Pair::geetFirst(void)" (?getFirst@?$Pair@D@@QAEDXZ) referenced in function_main (lab12.obj line 1)   Pair.h  #pragma once template <class T> class Pair {  private:     T theFirst;     T theSecond;  public:     /*Pair(const T& dataOne, const T& dataTwo);*/     Pair(T a, T b) {         theFirst = a;         theSecond = b;     }     T getFirst();     T getSecond();  };   Pair.cpp  #include "stdafx.h" #include "Pair.h"   template<class T> T Pair<T>::getFirst() {     return theFirst; }  template<class T> T Pair<T>::getSecond() {     return theSecond; }   Main.cpp  #include "stdafx.h" #include "Pair.h" #include <iostream> using namespace std;  int main() {     Pair <char> letters('a', 'd');      cout << letters.getFirst();       cout << endl;     system("Pause");      return 0; }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm programming a quite simple PHP Script, that writes a string (sentence) got from an HTML FORM into a file. This string sometimes contains Non-ASCII Characters, in my case german umlauts, äöü. But instead of writing them to the file correctly it just writes little question-mark-symbols. How can I fix that?   <?php header('Content-type: text/html; charset=utf-8');   #   $_POST["message"] #   $_POST["random"] #   $_POST["date"]  #$MESSAGE = utf_encode($_POST["message"]);  $countfile = fopen("filecount", "r");  $filecount = fread($countfile,filesize("filecount")); fclose($countfile);   $filename = $filecount + 1; echo($filename);  if ($_POST["random"]){  $newmessagefile = fopen($filename, "w"); fwrite($newmessagefile, $_POST["message"]); fclose($newmessagefile);  $countfilew = fopen("filecount", "w"); fwrite($countfilew, $filename);  fclose($countfilew); }   else {      $newmessagefile = fopen($_POST["date"], "w");     fwrite($newmessagefile, $_POST["message"]);     fclose($newmessagefile);      $specialdaysfile = fopen("specialdays", "a");     fwrite($_POST["date"]);     fclose($newmessagefile);  }  ?>

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


I'm having a problem finding functions $f:Z \rightarrow Z$, such that:   $f$ is onto but not one-to-one, $f$ is one-to-one but not onto, $f$ is neither one-to-one or onto, $f$ is both one-to-one and onto (bijective).   Please help me thank you

Can you give me examples for the following $f:\mathbb Z \to \mathbb Z$ (for integer functions)   injective but not surjective surjective but not injective surjective and injective neither surjective nor injective


When I am setting data to the ObservableList it throwing null pointer exception, I could not understand the problem. anyone please help me to find the solution.  Here is my code:  @FXML private Label label; @FXML private ObservableList<ObservableList> data; @FXML private TableColumn column1; @FXML private TableColumn column2; @FXML private TableView table;  public void initialize(URL url, ResourceBundle rb) {     // TODO     String selectSql = "select first_name,last_name from hr.employees";     try (Connection conn = ConnectDB.getConnection(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(selectSql)) {         System.out.println("Getting Connection....");         while (rs.next()) {             ObservableList<String> temp = FXCollections.observableArrayList();             temp.add(rs.getString(1));             System.out.println("First Name == "+rs.getString(1));             System.out.println("Last Name == "+rs.getString(2));             temp.add(rs.getString(2));             System.out.println("List Value === "+temp);             data.add(temp);             //table.setItems(temp);         }         table.setItems(data);     } catch (Exception e) {         //System.out.println("Error: "+e.getMessage());         Logger.getLogger(FXMLDocumentController.class.getName()).log(Level.SEVERE, null, e);     } }   i am getting error in --->  data.add(temp);

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


What are some closed, disjoint subsets $A, B$ in $R^2$ where $inf\{d(A, B) = 0 \forall a \in A \forall b \in B\}$?

Let $A$ and $B$ be two sets of real numbers. Define the distance from $A$ to $B$ by $$\rho (A,B) = \inf \{ |a-b| : a \in A, b \in B\} \;.$$ Give an example to show that the distance between two closed sets can be $0$ even if the two sets are disjoint.


I am using LAMP in Ubuntu 12.04. How to reset the phpMyAdmin password?  hypertext@hypertext-desktop:~$ sudo mysqld --skip-grant-tables & [2] 7196 hypertext@hypertext-desktop:~$ sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700                                                         UPDATE user SET Password=admin WHERE User='root'; bash: syntax error near unexpected token `('  [2]+  Stopped                 sudo mysqld --skip-grant-tables hypertext@hypertext-desktop:~$ sudo mysqld --skip-grant-tables & [3] 7252 hypertext@hypertext-desktop:~$ sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700 mysql -u root mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)  [3]+  Stopped                 sudo mysqld --skip-grant-tables hypertext@hypertext-desktop:~$ sudo mysqld --skip-grant-tables & [4] 7259 hypertext@hypertext-desktop:~$ sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700 UPDATE user SET Password='admin' WHERE User='root';FLUSH PRIVILEGES; exit; UPDATE: command not found  [4]+  Stopped                 sudo mysqld --skip-grant-tables  [4]+  Stopped                 sudo mysqld --skip-grant-tables FLUSH: command not found exit There are stopped jobs. hypertext@hypertext-desktop:~$ sudo pkill mysqld sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700 [sudo] password for hypertext:  hypertext@hypertext-desktop:~$ sudo service mysql start sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700 [sudo] password for hypertext:  mysql: unrecognized service hypertext@hypertext-desktop:~$ ^C hypertext@hypertext-desktop:~$

This error occurs whenever I try to work with sudo. I changed the permissions of /var/ folder to 777 and I think this causes the error. Please help me get back a functional sudo and /var.


I have a windows 10 tablet that I reset and then it went back to windows 10 1511. Now I want to update it to 1803. I don't want to get the latest version (1909 as of the moment). That's because I'm testing our software for compatibility with 1803. I need to make sure our app will run smoothly on 1803.  How can I do that?

I need to repair my Windows 10 installation. Where can I get a clean ISO (with install.wim, no Install.ESD, so that I can run DISM against the WIM) of the specific Windows 10 build required for this?  In my case, I need the Anniversary update (Build 14393), Creators Update (Build 15063) or Fall Creators Update (Build 16299.15).


My root partition size is not enough for me and should be increased in order to allow me adding some new application and services (e.g. mongodb). I got some more free space and I can see it when I type print free in the GNU parted tool:  Number  Start   End     Size    Type      File system  Flags         32.3kB  1049kB  1016kB            Free Space  1      1049kB  256MB   255MB   primary   ext2         boot         256MB   257MB   1048kB            Free Space  2      257MB   8589MB  8332MB  extended  5      257MB   8589MB  8332MB  logical                lvm         8589MB  17.2GB  8591MB            Free Space   My space partiotning looks like:   Filesystem                   Size  Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-root  3.7G  2.6G  923M  74% / none                         4.0K     0  4.0K   0% /sys/fs/cgroup udev                         2.0G  4.0K  2.0G   1% /dev tmpfs                        396M  520K  395M   1% /run none                         5.0M     0  5.0M   0% /run/lock none                         2.0G     0  2.0G   0% /run/shm none                         100M     0  100M   0% /run/user /dev/sda1                    236M   66M  158M  30% /boot   (df -h in the command line)  Any easy and quick way to allocate more space to my root partition? ( I guess it's /dev/mapper/ubuntu--vg-root)

I'm sure this has been answered somewhere on here before (I even found kinda a guide , but seemed to be a bit spotty and incomplete) but I was wondering if someone could assist me or at least point me in the right direction to get what I'm trying done accomplished.  Basically I installed Ubuntu 14.04 (via "Guided - use the entire disk and setup LVM") on a 20GB disk. I then physically added a clean 80GB disk to the machine, which it detects as 'sdb'.  Basically my question is, I want to be able to add/combine the allocated amount of space from the new disk (80GB) to my machine so that instead of showing two drives (20GB and 80GB), it simply shows one drive (100GB). I'm not worried about RAID or any other special add-ons.  I'm somewhat new to Linux, but understand that I need to use LVM to accomplish this.  If there is anyone who can help me out or link me to a helpful guide/tutorial, it would be very much appreciated! Not sure if this is needed either, but here is my 'fdisk -l' and '/etc/fstab' output:  fdisk output (shortened):  Disk /dev/sda: 21.5 GB, 21474836480 bytes    Device Boot      Start         End      Blocks   Id  System /dev/sda1    *       2048      499711      248832   83  Linux /dev/sda2          501758    41940991    20719617    5  Extended /dev/sda5          501760    41940991    20719616   8e  Linux LVM  Disk /dev/sdb: 85.9 GB, 85899345920 bytes Disk /dev/sdb doesn't contain a valid partition table  Disk /dev/mapper/ubuntu--vg-root: 20.4 GB, 20392706048 bytes Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table  Disk /dev/mapper/ubuntu--vg-swap_1: 801 MB, 801112064 bytes Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table   /etc/fstab (shortened):  # <file system> <mount point>   <type>  <options>       <dump>  <pass> /dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1 # /boot was on /dev/sda1 during installation UUID=26710773-7a64-4f34-a34e-0057cb1739d7 /boot           ext2    defaults        0       2 /dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0


This shouldn't be "trite". I'm wanting a word one could say when an empty statement is made especially when it's annoying..... For example, you're driving and see a sign advertising for a massive lottery and someone says, "yah you know after taxes...." or if you're watching a news channel and a protest rally is being covered and someone (also watching) says "they just want attention".

Consider this conversation:      John: I am giving free chess lessons.   Mary: Nice! You’re a true teacher.   John: How so?   Mary: A true teacher imparts knowledge without a price tag.   John: But what if teaching is his only source of income? Would he not be a “true” teacher then?   Mark (in response to the question above): You clearly mentioned “free chess lesson”.   I don’t see how Mark’s comment adds anything to the discussion or makes sense in the current discussion. It is “redundant” — that’s one word for it — but is there a more fitting word?


My spelling tool suggests that I should fix "All of the" to "All the" in the following statements:   If we take all of the above notes into account... All of the methods described above shorten your path to... Next step will be just to execute all of the statements above... ...but there is no single answer to all of them.   What would be the correct variant?

I frequently see people write "all this", instead of "all of this". Is this a grammatically correct phrase? My intuition tells me that it's wrong (the spoken phrase "all this" is really a contraction of "all of this"); but I'm having a hard time finding any evidence to support the claim.


I have written some code that builds up a matrix of values (strings and numbers). The matrix is always 3 rows and unknown columns and is sized like this:  ReDim MyMatrix(1 To 3, 1 To SelectedPivot.RowFields.Count)   I then populate the matrix with three loops.  I have written a UDF that requires 1st and 3rd row of the matrix, as follows:  Public Function MyUDF(SourceTable As ListObject, Arr1() As Variant, Arr3() As Variant) ... End Function   ...where Arr1() is the first row of 'MyMatrix' and Arr3() is third row of 'MyMatrix'  Back in the main sub, I am trying to use the UDF like this:  Result = MyUDF(SourceTable, MyMatrix(1), MyMatrix(3))   And I get the error 'Type mismatch: array or user-defined type expected'  Any suggestions on how to get this working? I thought 'MyMatrix(n)' in a two-dimensional array gives the nth row

What function can I use in Excel VBA to slice an array?


So I have an old hard drive which ran Windows XP. The rest of the computer was scraped. I can't recall the login password for the user on that hard drive. I want to recover files from this hard drive.  My question:  If I get an adapter and connect it to my PC running windows 10 will I be able to simply access the drive as if it was a new drive and browse the files? If not how do I retrieve the files?  Also if I want to completely copy the content of the disk to a new hard drive can achieve that with a tool like deamon?

I have a really old Windows XP computer with data still intact in its two hard disk drives. Due to stability issues with the motherboard hardware, this computer hasn't been able to boot up stably, but its data is safe and intact.  I have decided to throw away all the hardware as e-waste, except the hard disk drives, which I have kept in electrostatic protective bags. I am planning to retrieve the data from there using a HDD docking station such as this  but need some advice before proceeding.   Currently, my new computer is running Ubuntu 16.04. My understanding is just by attaching the old hard disks to the HDD dock, and plugging in that dock into my new Ubuntu computer, I will be able to access all data in the old hard disks as if they were external USB storage devices.   If my Windows XP machine had a login password, would this prevent me from accessing the data?  How would my Ubuntu OS work to perform the mounting of the hard disks onto its file system? Do I need to perform additional steps or run some software that can allow me to access the data? Would there be any incompability issues arising from the hard disks being Windows OS, but my computer being Linux?   Thank you.


I am trying to work out exactly what I need to do to dispose of a property in C# when using IDisposable. I can see the template, but I am not sure about actually disposing of objects.  I am working with the example given on this site:   I have added 3 properties:  privInt: Private value type. Would I dispose of this as it could be saved on the heap so may require GC? If I would then how, cannot set to null or call dispose? If not then I assume it has to be left to GC - but is it not the point of Dispose to free resources?  NonIDisClassInstance - Do I set to null? Is that enough  Can anyone comment on my implementation below and advise on what is correct/wrong.  IDisClass - Just call dispose  class BaseClass : IDisposable {    // Flag: Has Dispose already been called?    bool disposed = false;     // Public implementation of Dispose pattern callable by consumers.    public void Dispose()    {        Dispose(true);       GC.SuppressFinalize(this);               }     //Private value type    private int privInt;     //Private class that does not implement IDisposable    Private NonIDisClass NonIDisClassInstance;     //Private class that does implement IDisposable    Private IDisClass IDisClassInstance;     // Protected implementation of Dispose pattern.    protected virtual void Dispose(bool disposing)    {       if (disposed)          return;         if (disposing) {          // Free any other managed objects here.          //       }        // Free any unmanaged objects here.            DisposeOfThis = ????;       NonIDisClassInstance = null;       IDisClassInstance.Dispose();       disposed = true;    }     ~BaseClass()    {       Dispose(false);    } }

I know from reading  that the "primary" use of the IDisposable interface is to clean up unmanaged resources.  To me, "unmanaged" means things like database connections, sockets, window handles, etc.  But, I've seen code where the Dispose() method is implemented to free managed resources, which seems redundant to me, since the garbage collector should take care of that for you.  For example:  public class MyCollection : IDisposable {     private List<String> _theList = new List<String>();     private Dictionary<String, Point> _theDict = new Dictionary<String, Point>();      // Die, clear it up! (free unmanaged resources)     public void Dispose()     {         _theList.clear();         _theDict.clear();         _theList = null;         _theDict = null;     }   My question is, does this make the garbage collector free memory used by MyCollection any faster than it normally would?  edit:  So far people have posted some good examples of using IDisposable to clean up unmanaged resources such as database connections and bitmaps.  But suppose that _theList in the above code contained a million strings, and you wanted to free that memory now, rather than waiting for the garbage collector.  Would the above code accomplish that?


A lot of reference is available for this question but I couldn't understand the difference.  That when to use congratulate on and when to use congratulate for.

He expressed congratulation to you for your election as president of America.   He expressed congratulation to you on your election as president of America.      Which preposition is good?


How can I change the chapter numbers in Bengali numerals/words. The chapter numbers are coming in Arabic format by default, instead of specifying numeral in font option.  \documentclass[12pt]{book} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage[numerals = Bengali, changecounternumbering=true]    {bengali} \setmainfont{Bangla Akademi}   \begin{document}  \chapter{ভূমিকা}  \end{document}   The above code give the following result    I expect an output like this  অধ্যায় ১  অধ্যায় ২ ...  or like this  প্রথম অধ্যায় (=First Chapter)  দ্বিতীয় অধ্যায় (=Second Chapter)

How i can give section numbers and page numbers with Bengali numerals in latex?


I have a Linux server with two monitors standing next to my Windows 8.1 machine. Since I won't be actually interfacing with server too much I would like to use its two monitors to extend my Windows desktop most of the time. I am thinking that getting my Windows machine to make use of 2 virtual monitors that stream their content over some remote desktop protocol to 2 viewers on my Linux machine. I basically need a free (DIY if needed) alternative to MaxiVista that has decent performance (so no ZeroDesktop). I have tried TighVNC with DFMirage but I could not get it to work right, it merely displayed the content of all my monitors in one scrollable window.  Any ideas?

Is it possible to make my laptop's screen act as a second monitor for my desktop computer?


I have been looking on project on behance and there are plenty of projects that show interfaces in a 3d way with depth and I can't find anything to reproduce something like this, so since I am not a native speaker I am wondering if I use the wrong terms.  This is what I am talking about :   Or another example :    Sometimes it is even like on a phone :    So you get the idea. Do you know what is the name of this ? When I search I always fall into google material design elevation thing which is not really what I am looking for. Do you have any links or tutorial on how to do this type of effect please ?

How do I create this type of effect with an image? I'm wondering how to get the thick edges and the tilted look. Is there an online tool that will convert a flat image to look like this?


I am new to linux and installed Ubuntu 16.04 LTS 64 bit on my machine. I was attempting to install "synaptic" and used this command:  sudo apt-get install   synaptic Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   docbook-xml libcairo-perl libept1.5.0 libglib-perl libgtk2-perl libpango-perl   librarian0 rarian-compat sgml-data Suggested packages:   docbook docbook-dsssl docbook-xsl docbook-defguide libfont-freetype-perl   libgtk2-perl-doc perlsgml w3-recs opensp libxml2-utils dwww menu deborphan   apt-xapian-index tasksel The following NEW packages will be installed: docbook-xml libcairo-perl libept1.5.0 libglib-perl libgtk2-perl libpango-perl   librarian0 rarian-compat sgml-data synaptic 0 upgraded, 10 newly installed, 0 to remove and 135 not upgraded. Need to get 0 B/2,888 kB of archives. After this operation, 16.4 MB of additional disk space will be used. Do you want to continue? [Y/n] Y dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/architectures:1: unknown option 'foreign-architecture' E: Sub-process /usr/bin/dpkg returned an error code (2)   I have seen some other solutions here, but seems not working in my case. Don't know how to solve or how do i install synaptic. Any help is highly appreciated  Thanks in advance.

I began the ubuntu upgrade before leaving for work and returned to something broken.  After some efforts to get more information to fix this problem I've done the following:  >sudo apt-get dist-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:  ia32-libs : Depends: ia32-libs-multiarch but it is not installable  libc6-dbg : Depends: libc6 (= 2.19-0ubuntu6.6) but 2.19-10ubuntu2.3 is installed  libpcre3-dev : Depends: libpcre3 (= 1:8.31-2ubuntu2) but 1:8.35-3ubuntu1 is installed  skype : Depends: skype-bin but it is not installable E: Unmet dependencies. Try using -f.   So try -f...  >sudo apt-get -f install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed:   libc6-dbg libpcre3-dev libpcrecpp0 The following packages will be REMOVED:  ia32-libs skype The following packages will be upgraded:   libc6-dbg libpcre3-dev libpcrecpp0 3 upgraded, 0 newly installed, 2 to remove and 1649 not upgraded. 160 not fully installed or removed. Need to get 0 B/3,799 kB of archives. After this operation, 242 kB of additional disk space will be used. Do you want to continue? [Y/n] y E: Sub-process /usr/bin/dpkg returned an error code (2)   Check dpkg...  >sudo dpkg dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'   Can someone advise please?


At the end of Lost in Translation (2003), Bill Murray whispers in Scarlett Johansson ear some inaudible words. What were those words if by any chance there was some kind of any speculation based on the movie plot and events breakdown.  Appreciate any help.

Bob Harris gets ready to leave Japan and initially bids goodbye to Charlotte near  the elevator in the hotel.  He sees her again on the way and they share a kiss and he whispers something in her ear to which Charlotte acknowledges. I cannot wrap my head around the significance of that scene, what does it mean?  Anyone explanation would be greatly helpful.


Is there a way to specify a warning in LaTeX which is thrown if and only if a specified text is not at the bottom (or near the bottom) of the page?  Use-case: manual column-breaking is needed due to some package shortcoming, the warning is there to warn the user if the column break has moved upwards or downwards on the page.  related:

Is there a way to compute the remaining space on the current page and issue an optional command?


I browse the hot network questions every day and for years I've been wondering why every individual Stack Exchange site has a mobile version, but  is not responsive.  Why is it like this? Seems like it should be fairly trivial to enable.

I have  bookmarked on my phone but unlike the rest of SE it isn’t responsive. Conscious choice or just overlooked?


I'm currently working towards a master's in mathematics, and I would like to continue with a PhD. I have good grades and I'm aiming at something equivalent to a first class honours, at a highly ranked university in maths.  The problem with applying for a PhD now (starting next fall) is that I have barely begun work on my thesis, and therefore wouldn't be able to get a reference from my advisor (at least not one that would describe my work on my thesis, the closest thing I'll have to research, and the crowning project of my master degree). I could try to solicit a couple of half-baked references now, send preliminary transcripts and detail my plan for my master thesis, but I feel my application would be much more convincing if I submit it after I get my degree. My transcript would be a complete diploma, and my references would be able to speak to the whole of my work, including the last (and most important) part.  Although this is what I'm inclined to do, it would inevitably result in losing a year. I would be ok with that: I could try to find a job/internship somewhere, prepare my applications with more time on my hands (including prepping for possible interviews) and maybe even work on a couple of independent research projects. However I'm afraid that time spent away from academia might be a big minus for my application, considering that if accepted, I would be starting my PhD at the age of 26, pushing 27 (and although this might not show up explicitly, it would be abundantly clear from my cv). I see that most of my class mates are applying before finishing their master, and I'm therefore also worried that my taking the extra year might be perceived as an unfair advantage to other applicants.  I'm also worried that submitting applications twice might also not work, since being rejected in this round might play against me next time.  I would be very grateful for any suggestions! Thank you :)

I am now in the middle of my master's degree and I plan to graduate in August 2015. I currently study in Germany and for most engineering students here it is common to finish the five-year program (3 or 3.5 years for the bachelor's degree and 1.5 to 2 years for the master's). I'm thinking about applying for robotics PhD programs at different US universities but I noticed that most of them have a deadline in December for programs starting 9 months later. I don't have any publications in any international journals because in Germany this is mostly done by PhD students. But I have worked a lot during my studies (1 year internship, part-time research in university).  I don't want to lose one year waiting to start my PhD but in the same time I think that my master thesis will be a great asset while applying for such a program, especially when I will be willing to continue my research and PhD thesis in the same field as my master thesis. Do you think I should take the GRE and apply for next December or wait until getting my master's degree? And how this would influence the selection process.


What actions need to do to come first boot installation with out usb?

I would like to see a full how-to guide on how to install Ubuntu.


Which one is correct?  "It is 50 square meters" or "It is 50 meters square"?  Google "50 square meters"-->600k  Google "50 meters square" --> 6k

One would assume it to be about 2 square meters, but this is obviously not the case. In fact, I'm reading Illium by Dan Simmons. A quote follows:     Much like the room they had faxed into, this space was windowless and about twenty feet square. But unlike the other room, this one was warm, lighted, and free of snow or ice. And unlike the other room, this one was almost filled with an oval metal machine about fifteen feet long.   By this description, "twenty feet square" seems to mean 20x20 feet aka 400 square feet or 40 square meters. Given that Dan Simmons is a renowned American writer, it's not likely that he just can't speak English correctly. So, who's right and who's wrong here?


I am trying to deploy a very simple & my first JSF application (following a ) on glassfish local server. I completed all the steps to create the application. And when I tried to deploy the application on the glassfish server, it just failed with the following exception message:-        cannot Deploy Playground     Deployment Error for module: Playground: Exception while deploying the app :      java.lang.IllegalArgumentException: Invalid URL Pattern: [xhtml]   Could anyone explain where is the fault and how can I amend it ?

<servlet>     <servlet-name>myservlet</servlet-name>     <servlet-class>workflow.WDispatcher</servlet-class>     <load-on-startup>2</load-on-startup> </servlet>  <servlet-mapping>     <servlet-name>myservlet</servlet-name>     <url-pattern>*NEXTEVENT*</url-pattern> </servlet-mapping>   Above is the snippet from Tomcat's web.xml. The URL pattern *NEXTEVENT* on start up throws     java.lang.IllegalArgumentException: Invalid <url-pattern> in servlet mapping   It will be greatly appreciated if someone can hint at the error.


I am working with two separate spreadsheets and i have dual monitors. I'm using MS Office 2010.  How can I get one SS to open on the primary monitor and the second SS to display on the secondary monitor?  Thanks!!

I have to do work between two spreadsheets and I need to view them side by side. I can't just open the workbooks in separate instances because I need to make use of features like paste formatting, and all of that goes away when the workbooks aren't in the same instance.  Is there anything I can do to get two windows open, each with a separate workbook, each maximized on a different monitor, and still have access to the advanced cut/paste features?


I have a first script for exemple :   test1.sh $1='world' var1="hello world" echo $var1   So, i want a script shell, which execute test1.sh according to condition :   for exemple :   if  [ $1= world ];    #execute test1.sh   i don't know how to rely the two shells, if you have any suggestions i ll be thankfull !

I am trying to write a bash script which run a command and compare the result with another string.   #!/bin/bash -x  STATUS=`/root/setup_ha show --password-file=/root/password | grep ">HA State" | awk '{print $3}' |  cut -c 2-`  TEST=`echo $STATUS` if [[ "$TEST" == "ON Master" ]]; then echo CLUSTER CRITICAL else   echo CLUSTER OK MASTER fi   As the Original string is on two lines, I echo it in a new variable TEST. The New variable have the output of the command on one line.  Here is the Bash debug output :  ++ /root/setup_ha show --password-file=/root/password ++ grep '>HA State' ++ awk '{print $3}' ++ cut -c 2- + STATUS='ON Master' ++ echo 'ON' Master + TEST='ON Master' + [[ ON Master == \O\N\ \M\a\s\t\e\r ]] + echo CLUSTER OK MASTER CLUSTER OK MASTER   I also tried the following test :  if [[ "$TEST" =~ "ON Master" ]]   The thing is bash is not able to compare the strings it is always false.  Any idea ?   EDIT :  Here is the output with the first answer :  + STATUS='ON Master' ++ echo 'ON' Master + TEST='ON Master' + '[' 'ON Master' == 'ON Master' ']' + echo CLUSTER OK MASTER CLUSTER OK MASTER   Still  not working ON seems weird on line 3, plus in my bash it takes green color !


I am very new to LaTeX.  A newline in the input file does not mean anything to LaTeX. An empty line in the input file means a new paragraph.  Trouble is, when I view my sources with different text editors on different displays, they look very different (and always bad). So I find myself chopping lines to the about 80-th character or so.   This brings the MS Word problem - introduce a line, or even a single word, and you need to edit the whole following paragraph in order that it is nicely  positioned on the display (talking about the .tex file).  Using --soft-wrap wraps lines around, but is not pleasing to the eye, plus a single move of the cursor could scroll a whole screen - hardly intuative.  How do I write .tex source file, so that anyone - using an IDE or just any editor, can view and edit them comfortable?

What do I mean by Convention? First of all, allow me to clear myself about the word 'conventions. As most of you already know, coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices and methods for each aspect of a piece program written in this language []. These conventions usually cover 'file organization', 'indentation', 'comments', 'declarations', 'statements', 'white space', 'naming conventions', 'programming practices', 'programming principles', 'programming rules of thumb', etc. An Example! As an example, consider Java (and other C-like programming languages). In Java Naming Conventions, class names should be in UpperCamelCase, methods and variables should follow lowerCamelCase and constants should be ALLCAPS. A Personal Experience: There are some of these conventions that I have realised while writing smaller reports. For example, the second time I wrote a report with LaTeX, I realized it's better to put each chapter in a separate file. Also, I learned about them reading other peoples code like  one that I learned about it recently: One-Sentence-per-Line. This looks very important for sake of readability of the latex source but I never thought about it until I read that answer. Here comes the Question! I'm about to write my master thesis and I want to know these conventions for LaTeX. My goal is to achieve a readable, reusable, easy to modify and standard source code. If you know any conventions, or if you have your own personal ones, regarding any aspect of LaTeX, please share with me and I would be delighted if you support your answers/conventions with reasons or examples.


In Magic the Gathering, I cast  on an opponent's commander. It is now a colorless forest land. My opponent has an  on the field which gains power if you control your commander. Is the colorless forest land still my opponent's commander? Does my opponent get the Lieutenant bonus?

Once and for all: Is there anything that can possibly be done to my commander that would cause it to cease being my commander?    All of these questions ask the same thing, but aren't general enough to be marked as a duplicate.      Is a commander still a commander if it gets turned into a forest?     Is a commander still a commander if it gets turned face down?


I compiled tmux from source on Ubuntu 12.04 and it is installed in /usr/local/bin/tmux by default.  However, when I type tmux in terminal I get the following message:  $ tmux -bash: /usr/bin/tmux: No such file or directory    How do I fix this? And how to install it in another location the next time? Is there any difference between putting it in /usr/bin or /usr/local/bin?

I am trying to get  to work. In the process, I seem to have two versions of it installed: A corrupt one installed in ~/bin, and another I just compiled and ran make install to put it in /usr/local/bin/npm. So, I moved the entire ~/bin folder into ~/old/bin ... but still when I run npm the system searches in ~/bin: $ which npm /usr/local/bin/npm $ alias npm -bash: alias: npm: not found $ npm -bash: /home/ubuntu/bin/npm: No such file or directory $ echo $PATH /home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games $  What causes Ubuntu to look for npm in ~/bin/npm ? I'm using Ubuntu 11.10. I don't know if the question is ubuntu-specific or not, it can be moved to askubuntu if needed. I do see ~/bin in the PATH, but as far I as understand this only means that if npm was present at ~/bin then it would have used it ... but why does bash insist to look for it specifically there? Why doesn't it find /usr/local/bin/npm, even though the which command does find it?


Let $a_1,...,a_n$ be a sequence of positive numbers.  Show that  $$(a_1+a_2+\cdots+a_n)\left(\frac{1}{a_1}+\frac{1}{a_2}+\cdots+\frac{1}{a_n}\right)\geq n^2$$  Hint:  Use the fact that for $x>0$ we have $x+(1/x)\geq 2$.  My idea is to use induction.  But I can't seem to make it work.  On the other hand, I don't see how the hint is going to take me where I need to go.

If $x_1,...,x_n$ are positive real numbers and if $y_k=1/x_k$, prove that $$\left(\sum^n_{k=1}x_k\right)\left(\sum^n_{k=1}y_k\right)\geq n^2.$$   I've been learning induction, and I've come across this problem that I really can't even break down and begin to think about. I've been told it has something to do with Cauchy-Schwarz, but I cannot figure out how to apply it. I would appreciate help figuring out how to go about and formulate this proof. Thanks!


Find the general solution of $\sin^2 x = \sin^2 \theta$.  My Attempt: $$\sin^2 x = \sin^2 \theta$$ $$\sin^2 x - \sin^2 \theta=0$$ $$(\sin x + \sin \theta) (\sin x - \sin \theta)=0$$ $$(2\sin \dfrac {x+\theta}{2}.\cos \dfrac {x-\theta}{2}).(2\sin \dfrac {x-\theta}{2}.\cos \dfrac {x+\theta }{2})=0$$.  ...

How would I verify the following double angle identity. $$ \sin(A+B)\sin(A-B)=\sin^2A-\sin^2B $$ So far I have done this. $$ (\sin A\cos B+\cos A\sin B)(\sin A\cos B-\cos A\sin B)  $$But I am not sure how to proceed.


Should one use an apostrophe when referencing a decade? For example, consider the following sentence:  I am looking for an antique pool table from the 1890s.  Should it be as shown above, or rather, as shown below with an apostrophe?  I am looking for an antique pool table from the 1890's.

I typically don’t use an apostrophe with plurals in any situation, but I always assumed that the use of an apostrophe in constructions like acronyms:     Forty BA’s were given out to students this year.   or numbers:     Though the greatest period instability occurred during the 1950’s when. . . .   was more or less ok. I would personally use BAs and 1950s here, but I've never thought the apostrophe in this case was necessarily “incorrect”. What say ye?


I am trying to calculate the width of a string defined by csname.  The MWE is here   \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{calc}   \def\EllipseDegrees{120} \def\EllipseOuterRadious{4} \def\EllipseInnerRadious{3}   \newsavebox\mybox \newlength{\mylengtho} \newlength{\mylengtht}  \begin{document}  \begin{tikzpicture}       \tikzset{       partial ellipse/.style args={#1:#2:#3}{           insert path={+ (#1:#3) arc (#1:#2:#3)}       }    }    \draw (0,0) circle (3);    \draw (0,0)    [partial ellipse={180+\EllipseDegrees/2}:{180-\EllipseDegrees/2}:\EllipseOuterRadious cm and \EllipseInnerRadious cm];    \pgfmathsetmacro\stepslines{5}    \pgfmathsetmacro\degsteplines{\EllipseDegrees/\stepslines}     \foreach \ellipsetext [count=\i from 1] in {First Value, Second Value, Third Value, Fourth value, Fifth value}{        \global\expandafter\let\csname Item\i\endcsname\ellipsetext        \xdef\myt{\csname LeftItem\i\endcsname}       \savebox\mybox{\myt}       \pgfmathsetmacro\myw{\wd\mybox}       \node at (5,0) {myw=\myw};       \global\expandafter\let\csname Item\i Width\endcsname\myw    }     \foreach \n in {1,...,5} {    \xdef\curdeg{180-\EllipseDegrees/2+(\n-1)*\degsteplines}    \pgfmathsetmacro\curdegfixed{\curdeg+(\degsteplines/2)}    \savebox\mybox{\fontsize{10}{12}\selectfont\expandafter\csname Item\n\endcsname}    \settowidth{\mylengtho}{\expandafter\widthof{\mybox}}    \settowidth{\mylengtht}{\usebox{\mybox}}    \global\expandafter\let\csname mylengthone\endcsname\mylengtht    \global\expandafter\let\csname mywidthof\endcsname\mylengtho    \pgfmathsetmacro\EllipseOuterRadiousfixed{\EllipseOuterRadious}    \pgfmathsetmacro\EllipseInnerRadiousfixed{\EllipseInnerRadious}     \node[rotate=180+\curdegfixed] at ($(0,0)+       ({\EllipseOuterRadiousfixed*cos(\curdegfixed)},{\EllipseInnerRadiousfixed*sin(\curdegfixed)})$)          {%           \fontsize{10}{12}\selectfont \csname Item\n\endcsname           };    }    \node at (5,1) {thewdmybox=\the\wd\mybox};    \node at (5,-1) {themylength=\the\mylengtho};    \node at (5,2) {mywidthof=\expandafter\the\csname mywidthof\endcsname};    \node at (5,3) {mywidthof=\expandafter\the\csname mylengthone\endcsname}; \end{tikzpicture}   \end{document}   The point is to add text radical (next to a circle) in elliptical way and alligned.  The result pdf is this:    I have done a part of the job described but I need length of every text of the  list (kept with '\csname') to add the distances and correct my variables.  As you can see... next to the diagram I print every try made and all are zero!  Any idea?

I just came to the following problem - using \settowidth on a length in a tikzpicture resets that length to 0? Here is a (totally command-line) MWE, compiled with pdflatex test.tex:   \documentclass[12pt]{article}  \usepackage{tikz}  \begin{document}  \newlength{\mypgVTitleWidth} \newbox\tbxa  \setlength{\mypgVTitleWidth}{1.0pt} \typeout{ = A: \mypgVTitleWidth is \the\mypgVTitleWidth }  \ %  \settowidth{\mypgVTitleWidth}{MMMMM} \typeout{ = B: \mypgVTitleWidth is \the\mypgVTitleWidth }  \setbox\tbxa\hbox{{MMMMM}} \mypgVTitleWidth\wd\tbxa \typeout{ = B2: \mypgVTitleWidth is \the\mypgVTitleWidth }   \fontsize{10}{10}\selectfont \ % \settowidth{\mypgVTitleWidth}{MMMMM} \typeout{ = C: \mypgVTitleWidth is \the\mypgVTitleWidth }  {  \fontsize{30}{30}\selectfont \ % \settowidth{\mypgVTitleWidth}{MMMMM} \typeout{ = D: \mypgVTitleWidth is \the\mypgVTitleWidth }  }  \begin{tikzpicture} \typeout{ = E: \mypgVTitleWidth is \the\mypgVTitleWidth }  \fontsize{30}{30}\selectfont \ % \settowidth{\mypgVTitleWidth}{MMMMM} \typeout{ = F: \mypgVTitleWidth is \the\mypgVTitleWidth } \end{tikzpicture}  \end{document}   first problem  With that code, with tikzpicture, the following log is generated:    = A: \mypgVTitleWidth is 1.0pt  = B: \mypgVTitleWidth is 53.83278pt  = B2: \mypgVTitleWidth is 53.83278pt  = C: \mypgVTitleWidth is 45.83344pt  LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <30> not available (Font)              size <24.88> substituted on input line 30.   = D: \mypgVTitleWidth is 105.74562pt  = E: \mypgVTitleWidth is 45.83344pt  = F: \mypgVTitleWidth is 0.0pt   Notably, trace F shows 0.0pt. Comment out the begin and end tikzpicture - and this shows in the log:   ...  = D: \mypgVTitleWidth is 105.74562pt  = E: \mypgVTitleWidth is 45.83344pt  = F: \mypgVTitleWidth is 105.74562pt   ... as expected.   second problem  If I use \fontsize..\selectfont in a group to make temporary changes to calculate a length; I get one length inside the {...} group - and the previous as soon as I exit:   = D: \mypgVTitleWidth is 105.74562pt  = E: \mypgVTitleWidth is 45.83344pt   ... Ok, this I guess is the very purpose of the group (to make sure changes are local) - but if I wanted to save this length for using further on in the code (say in the tikzpicture), what would I do? I tried also with second \newlength set to 0 and \addtolength, that resets itself as well.     Any ideas why this is happening, and how to: get \settowidth working also in tikz? - and read \settowidth from groups?


But my partition doesnt appear on ubuntu installation. It shows the whole disk as one and does not have my partition, What should i do ?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


Is it true that if $f:O_{\text{open}}\subset\Bbb R\rightarrow\Bbb R$ is continuous then it is locally Lipschitz?  Maybe the function $f(x)=\sin(1/x)\cdot x$ is a counter example because at $x=0$ we can find a sequence $x_n\rightarrow 0$ such that  $|f'(x_n)|\rightarrow\infty$ so there is no neighborhood of $0$ such that Lipschitz condition holds.  Is there an additional condition we could impose to make the statement true?

Let $A$ be open in $\mathbb{R}^m$; let $g:A\rightarrow\mathbb{R}^n$. If $S\subseteq A$, we say that $S$ satisfies the Lipschitz condition on $S$ if the function $\lambda(x,y)=|g(x)-g(y)|/|x-y|$ is bounded for $x\neq y\in S$. We say that $g$ is locally Lipschitz if each point of $A$ has a neighborhood on which $g$ satisfies the Lipschitz condition. Show that if $g$ is locally Lipschitz, then $g$ is continuous. Does the converse hold?  For the first part, suppose $g$ is locally Lipschitz. So for each point $r\in A$, there exists a neighborhood for which $|g(x)-g(y)|/|x-y|$ is bounded. Suppose $|g(x)-g(y)|/|x-y|<M$ in that neighborhood. Then $|g(x)-g(r)|<M|x-r|$ in that neighborhood of $r$. Therefore $g(x)\rightarrow g(r)$ as $x\rightarrow r$, and so $g$ is continuous at $r$. This means $g$ is continuous everywhere in $A$. What about the converse? I don't think it holds, but can't come up with a counterexample.