public class ElectronicCounter {      public ElectronicCounter(User user)throws IOException{         Scanner scanner = new Scanner(System.in);         boolean done = false;         loginName = user.getName();          System.out.println("--------------------------------------------------------");         System.out.println("Welcome to the Electronic-Sales Counter! ");          while(!done){             try{                 System.out.print("Please enter '1' to record sales or '2' to exit:");                 input = scanner.nextLine();                 System.out.println("bug");                 if(input=="1"){                     System.out.println("Please enter a list of purchasing-product ID and number");                     done = true;                 }                 else if(input=="2"){                     System.out.println("<LOG> User " +loginName+ " has successfully logged off! ");                     done = true;                 }                 else{                     System.out.println("<LOG> Invalid command");                 }             }             catch (NoSuchElementException e){                 System.out.println("<LOG> No Such Element");             }             catch (IllegalStateException e){                 System.out.println("<LOG> IllegalState");             }         }         scanner.close();     }      static String loginName;     static String input; }   The scanner doesn't stop to search the token when scanner.nextLine() is computed. I would like to ask how can I stop the scanner to wait input??Thanks


FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (invalid user or group: 005XXXXXXXXXXXX)

I've a object called myobject__c. This object is private in OWD Setting.  Now when admin create a new record of this object then I want to share this record with a user(community user). For this I've written a code in trigger to create a sharing record of this object (myobject__Share).  But I am getting a problem of :-      FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (invalid   user or group: 005XXXXXXXXXXXXX).   how can I solve this problem and second doubt is can we create share record for community user or not.


Science Fiction Book - lost colony from Earth where education and intelligence are a form of currency

Many years ago I read a sci-fi book about a planet that had been colonized by a group of earthlings sent to the planet from a doomed earth, a common theme.  In the book, Earth ended up pulling through troubles and had lost contact with the colony planet.  Earth sent a second expeditionary group out to the colonized planet to lay claim, but the expeditionary group, thinking it was going to have an easy time, met a very resistant and powerful colony.  One of the premises of the book was in the colonized planet's culture, education and smarts were a form of currency. I probably read the book between 1997 and 2000. It was paperback and in English. I bought it from a used bookstore. Does this story sound familiar to anyone?  If so does anyone know the name of the book?  I'd love to read it again.  Thx!


Is there a name for questions where the answer is not important?

A question where you don't care about the answer.  e.g. "how are you today?" where you don't actually care what the answer is. Is it a polite question?


Page numbering with \mainmatter and \frontmatter

I'm compiling my thesis want the initial page numbering to be roman and the following to be arabic. I divide the two sections using \mainmatter and \frontmatter. Any direction will be highly appreciated. Thank you  \documentclass[a4paper,twoside,11pt]{report} \usepackage{amsmath,amssymb} \usepackage{graphicx} \graphicspath{{/Users/Amaan/Desktop/REPORT_Amaan_Ghole_v2/pics/}} \usepackage[numbered, framed]{mcode} \usepackage{appendix} \usepackage{caption} \usepackage{natbib} \captionsetup{figurewithin=none}   \captionsetup{tablewithin=none} \setlength{\parskip}{3mm} \usepackage{enumitem} \usepackage{fancyhdr}       \pagestyle{fancyplain}     \parskip=0cm     \voffset=-0.54cm     \hoffset=0.46cm     \oddsidemargin=0pt     \evensidemargin=0pt     \topmargin=0pt     \headheight=0.5cm     \headsep=0.5cm     \textheight=23.7cm     \textwidth=15cm     \setlength{\headwidth}{15cm}     \setlength{\parindent}{0pt}                         % copied from DCSSS04 style file to stop indenting paragraphs (the default) %    \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}    % copied from DCSSS04 style file, spaces paragraphs and titles     \setlength{\parskip}{10pt}                          % makes a fixed space between paragraphs     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\bibname}{References}  \lhead[\fancyplain{\thepage}{\thepage}]{\fancyplain{\slshape \leftmark}{\slshape \leftmark}} \rhead[\fancyplain{\slshape \leftmark}{\slshape \leftmark}]{\fancyplain{\thepage}{\thepage}} \cfoot[\fancyplain{}{}]{\fancyplain{}{}} %\setlength{\headrulewidth}{0.4pt} %\setlength{\plainheadrulewidth}{0.4pt} \newcommand{\R}{\mathbb{R}} % real line  \begin{document} \pagenumbering{roman} \include{C&T_v2} \include{abstract&ack_v2} \listoffigures \listoftables \include{acronyms_v2} \tableofcontents \pagenumbering{arabic} \include{Intro_v2} \include{LitRev_v2}  \include{Kinematics_v2} \include{Control_v2} \include{smith_v2} \include{Robust_v2} \include{Comparison_v2} \include{Simulations_v2} \include{Conclusion_v2}  \appendix \include{appendixA_v2} \include{appendixB_v2} \include{appendixC_v2} \include{appendixD_v2} \include{appendixE_v2}  \bibliographystyle{dcu} \bibliography{THESIS_v2}    \end{document}


Create element in pdf that doesn't print to paper

I'm creating a fancy header with hyperlinks () for a large document. However, if/when this document is printed, this header is not useful and uses up ink and space. Is it possible to include an element in a pdf file such that it is not actually printed to paper but does display on screen?


Natbib -- change author conjunction in citation call-out from 'and' to '&'

I'm using natbib, german babel and natbib creates output of the form   Foo and Bar (1337)   I would like to get   Foo & Bar (1337) for citet and (Foo & Bar 1337) respectively for citep.


Infinite one time pads using a pseudorandom hash function

Paul Christiano writes ():     I’ll assume that we have some 256 bit cryptographic hash function F [...] The first important observation is that a 256-bit shared secret allows Alice and Bob to talk for as long as they want, by just using their secret to create a new pseudorandom pad for each message. That is, if Alice and Bob share a secret s, then Alice can send a message m by picking k at random, and sending the pair (k, F(sk) ⊕ m). It’s easy to confirm that Bob can still get the message, and if F is random then this is secure.   This is confusing to me. I was under the impression that there is no way of using a one time pad based on a shared secret of $n$ bits to transmit securely more than $n$ bits but this seems to imply it is possible by sending messages with $k=1,2,\dots$  What am I misunderstanding?


Should there be a comma in 'a 30-day, money-back guarantee'?

Is a comma needed in the following phrases?     30-day, money-back guarantee   90-day, no-risk trial   If so, why? If not, why not?  I've seen them written both ways — with and without the comma — but certainly one way has to be more correct than the other.


I wrote the following statement:  "...introduction of transition nodes for the reroutes, etc.). "  Somehow it looks awry to me. I know that separetely, having a period after "etc" or a period to terminate a sentence after a parentheses are correct, but not sure if when they appear simultaneously one of the dots should be suppressed


Like $\log(1+x)$? Is there any algorithms? I have read many materials but doesn't have an idea


Let $A$ and $B$ be square matrices of order $n$. Show that $AB - BA$ can never be equal to unit matrix.   How to approach above question. Please help.


Kate forces itself to be the default application for HTML

In the last few days, Kate took over opening HTML links and files. I want to get it back to Firefox, so I opened System Settings, went into Applications -> File Associations, found the text/html setting, and moved Kate below my browsers. Imagine my surprise when, after clicking Apply, Kate jumped back up to the top! Also, opening a link through xdg-open still launches Kate. That's not supposed to happen, right? Is this a bug? Or is there something else I need to do?  Environment:   Kubuntu 15.10 (current on updates) Kate 15.08.2


I just noticed that my profile on Programmers no longer shows my flag weight. Instead I see the number of helpful flags. At the same time, the definition for the Marshal badge has been changed to "500 helpful flags".  Does that mean there is no more flag weight? All that counts now is the number of helpful flags? Doesn't this also mean that there is no more penalty for declined flags?


I am able to draw a nice right triangle with  \begin{tikzpicture}[thick]   \draw (0,0)  -- (4,0) node[midway,below]{$f$} -- (4,2) node[midway,right]{$\frac{x}{2}$}-- cycle; \end{tikzpicture}   Now I want to label the left angle of the triangle and I am stuck on how to do this.


How to update column with ascending value column

I would like to add an order column wich will be position of my record. Positions are connected with name. If the name is S1 - order should be 1, for S2 - order should equal 2 etc. How can I do this?  Real state:   id       name     position -------  -------  ------- 1        S4       null 2        S2       null 3        S3       null 4        S1       null     Expected:   id       name     position -------  -------  ------- 1        S4       4 2        S2       2 3        S3       3 4        S1       1   I tried with update:  WITH x AS (   SELECT       id,       name,       ROW_NUMBER() OVER (ORDER BY name) position   FROM       stage ) UPDATE     stage SET     position = x.position FROM     x WHERE     x.id = stage.id;   Stage is the name of the table.


$\sup_{0 \leq M \leq I_{\mathcal{H}_1}} \frac{Tr[\rho M]}{Tr[\sigma M]}$ satisfies DPI

Let $\mathcal{H}_1, \mathcal{H}_2$ be a Hilbert spaces and $\rho, \sigma$ be density matrices on $\mathcal{H}_1$. Define $D(\rho||\sigma) := \sup_{0 \leq M \leq I_{\mathcal{H}_1}} \frac{Tr[\rho M]}{Tr[\sigma M]}$. (1) Show that $D$ satisfies the data processing inequality (2) Show that $D(\rho||\sigma) = \inf\{c \in\mathbb{R}: ~c \sigma - \rho \geq 0\}$  My attempts: For (1) we have to show that for any density matrices $\rho, \sigma$ and for any $\mathcal{E} \in \text{CPTP}(\mathcal{H}_1 \rightarrow \mathcal{H}_2)$ holds $D(\mathcal{E}(\rho) || \mathcal{E}(\sigma)) \leq D(\rho || \sigma)$. I tried to use the Kraus-decomposition of $\mathcal{E}$ and I tried to use some matrix inequalities to show the statement. My problem was that I couldn't find a suitable inequality for the denominator (in the direction we need). For (2) I tried to prove two inequalities and I think that I found a proof for one direction. Therefore, I considered some arbitrary $c$ such that $c \sigma \geq \rho$ holds. Then we obtain $\sup_{0 \leq M \leq I_{\mathcal{H}_1}} \frac{Tr[\rho M]}{Tr[\sigma M]} \leq \sup_{0 \leq M \leq I_{\mathcal{H}_1}} \frac{c Tr[\sigma M]}{Tr[\sigma M]} = \sup_{0 \leq M \leq I_{\mathcal{H}_1}} c = c$. This holds for all $c$ as defined above. Therefore, we can take the infimum (with respect to c) on both sides and obtain $\sup_{0 \leq M \leq I_{\mathcal{H}_1}} \frac{Tr[\rho M]}{Tr[\sigma M]} \leq \inf\{c\in \mathbb{R}:~ c \sigma \geq \rho \}$. On the first glance, the other direction looked easier, as we can choose $M=I$. But then we end up with $Tr[s \sigma - \rho] \geq 0$, where we denote the supremum by $s$. And I cannot argue why the same without the trace holds true.  I am grateful for any hint or help to solve this problem!


My home page stack exchange widget will often recommend a trending question from one of my communities, but when I select it, the app opens at the last question I viewed in-app. When I navigate back to the home screen and select the same trending question again from the widget it leads me to the correct page.    App Version: 1.0.85 Device Manufacturer: samsung Device Model: SM-G920V   OS Version: 6.0.1 (G920VVRU4CPF4)


I'm trying to understand how to calculate IVs range in order to calculate Pokémon Max CP. I have the following info:  Pokemon: Exeggcute His base stats are 110/132/120 (Atk/Def/Sta) CP now: 176 HP now: 42 Dust cost: 600 -Not powered up Trainer level 11   What's the formula and calculations I have to do in order to get the Pokémon's INDIVIDUAL stats?  I'm trying to figure out the formulas used in      I'm not looking for automatic tools! I'm looking for the formula used for this calculations.


A small question on notation- $\delta_{ij}$ and $\epsilon_{ijk}$

I'm just reading through some vector calculus notes and it begins to assume knowledge of the notation $\delta_{ij}$ and $\epsilon_{ijk}$ in reference to tensors, but I am not familiar with this. It uses them as if they are constant and well-defined.  If someone could just explain this I would appreciate it.  Thank you.


Unable to change volume in command prompt

I am unable to change my volume using cd d: in command prompt using administrator rights. After typing this it just reopens c drive for me instead of opening d drive.  Edit   I came to a little solution that open the d drive using cd /d d: command but it is unable to open the e drive.


combination od 2 fields as composite key

trigger CheckDuplicate on Object_Configuaration__c (before insert,before update) {         List<Object_Configuaration__c> StaActiList = [Select Name, Operations__c from Object_Configuaration__c ];   for (Object_Configuaration__c staActnew : Trigger.new)   {           for(Object_Configuaration__c sa: StaActiList)         {                         if(sa.Name== staActnew.Name && sa.Operations__c == staActnew.Operations__c )                            {                      system.debug('sa.Name== staActnew.Name'+  sa.Name+'=='+ staActnew.Name    );                   system.debug(  'sa.Operations__c == staActnew.Operations__c '+  sa.Operations__c+''+staActnew.Operations__c );                     staActnew.addError('Duplicate record ');                           }             }    }      }   i want to restrict duplicates based on Name (standard field and Operation(pickliswt,custom field).suppose If Contact is Name and Create is selected from picklist,and if i enter Account and create it should save,but it is throwing error.,please help me how to do it.


What is the difference between sourcing ('.' or 'source') and executing a file in bash?

What's the difference between executing a script like this:  ./test.sh  and executing a script like this:  . test.sh?  I tried a simple, two-line script to see if I could find if there was a difference:  #!/bin/bash ls   But both . test.sh and ./test.sh returned the same information.


.change() vs .on( "change", handler ) in jQuery

I have an issue when I use jQuery to handle the trigger of change on my drop-down.  I use 2 pieces of code:  //---------- Case 1 $(document).on("change", "#drop-down-id", function () {     alert(this.value); }); //----------Case 2 $("#drop-down-id").change(function () {     alert(this.value); });   The first one running smoothly, but the second one is not triggered when I start the browser, but after I refresh my site, it works.  Do you have any idea?  My jQuery version: 1.11.1, and I've tested on Chrome 38, Firefox 32 and IE 11.  -- Edit: @JanR & Cheery: It seems like this:  <select id="drop-down-id">     <% arr.each do |option| %>         <option value="<%= option %>"><%= option %></option>     <% end %> </select>   I've used Rails 4.1 and arr is an array contains numbers.  -- Edit: I found out that the issue came from the Asset Pipeline of Rails, not the jQuery.  I put the JS code inside a script tag and it works in both case, but when I put it in the assets folder, the issue happens.  Thank you for your quick replies!


Will the Stack Exchange app be updated for the iPhone X's screen?

I was wondering if the app was going to be updated for the iPhone X screen.


What does it mean when someone say "you have attitude"?

I've heard many people say      He/she has attitude   What they really mean is that the person has ego or something like that.  I googled and find , which also suggest the same.  Are they correct in saying that?


In Dropbox there is a place you can see all the shared items in your account (i.e., all the items you have granted others access to).  Is there a similar feature in Google Drive?  I'm not only trying to find items that are shared with other "named people", but also documents that are shared on a "anyone with link can view / edit" or "public on the internet" basis.   Franck's  seemed to work back in 2013, but Google Drive's interface has changed quite a bit since, and I'm struggling to be able to perform the same task with the new interface. I wonder if anyone knows how to do it in the new interface.


Limiting number of decimal digits in ArcGIS to have exported file in CAD with same format?

I am supposed to have some numeric values in ArcGIS 10.2 for Desktop with 3 decimals Digits and then convert them to Microstation or AutoCAD. I did this Setting using field calculator and 'round' function in ArcGIS but when I convert it to CAD again it would come with more than 10 decimals which is not desired.


Replace Win 8.1 on Pipo W4 tablet with Ubuntu?

Windows 8.1 on a tablet with 1 GB RAM and a total of 16 GB memory!  Windows OS and a recovery partition occupies about 13-14 GB. So the space remaining for apps, downloads etc. is very limited.  So my question is: Is it possible to wipe the entire memory and install Ubuntu on this tablet? It has a Intel Atom Z3735G processor.  Regards  Miniisar


Sort posts by title, sort array by largest number

I am using the post to display attorney verdicts and case details.  The post title is the verdict amount entered as a string. (no $ "," or ".")  I am formatting the title using PHP number format:  EX: User enters 360137 in the post title.     $number = get_the_title();      $ammount = number_format($number);      echo '<h1>$'. $ammount . '</h3>';  Returns $360,137   This is working as expected.  Using get_posts() I can 'orderby' => 'title' and 'order' => 'DESC' or 'ASC'    $args = array(  'category' => 64,  'orderby' => 'title',  'order' => 'DESC' );   $myposts = get_posts( $args );  foreach ( $myposts as $post ) : setup_postdata( $post );   While this is working it does not recognize the length of the value. For example it will display 30,000 before 2,100,000. How do I get this list sorted by ASC or DESC AND by string length?  I want to show the largest verdicts first.  9,000,000  2,100,000  90,00  3,000


Are there only finitely many complex numbers $z$ with $|z|=1$? I think there are infinitely many such numbers.


I am running SysInternal's  and FireFox 3.6.2. I have noticed that while I can have Internet Explorer 8 open in multiple virtual desktops, you can not do the same with Firefox. If you try you get the error message:     Firefox is already running, but is not   responding. To open a new window, you   must close the existing Firefox   process, or restart your system.   I did a little digging around to work around this and came up with creating a second profile via the Firefox profile manager (accessed by starting Firefox with the "-p" switch). This unfortunately created a new problem which is my add-ons (of which I use many) do not stay synchronized between profiles.   Is there a better approach here?


A tank of 425 liters capacity has been filled with water through two pipes, the first pipe having been opened 5 hours longer than the second. If the first pipe were open as long as the second pipe, the first pipe deliver half the amount of water delivered by second pipe; if the two pipes were open simultaneously, the tank would be filled up in 17 hours. How long was the second pipe open?    a. 10 b. 12 c. 15 d. 18


Invertible elements in $Z/27Z$ form a cyclic group

From some lecture notes, it is also claimed that invertible elements in $Z/p^{3}Z$ is cyclic multiplicative group. How to show this?


i tried the below code to store the date output in variable.  read -p 'date: ' mydate date_month= date -d "$mydate" +%b echo $date_month   it is not printing the output. how to store the date output in variable?.


If random variables are drawn from an identical distribution, why doesn't this guarantee they are independent?

Having read a little about exchangeability, I went back to thinking about the iid condition required for the central limit theorem. It struck me that if two random variables are drawn from an identical distribution, the occurrence of one event does not make it more or less probable for the occurrence of another event. I have no doubts that I am wrong and there is a reason why both independence and identical distribution are required. I just don't know why!


Python code for NCR using memoization in recursive formula giving wrong results

Here's my piece of code. Say whay's wrong.  array = [[0]*101]*101 #To initialise a 2d array of size 101x101  def ncr(n, r):     global array     if r==0 or n==r:         return 1     if array[n][r] is not 0:         return array[n][r]     array[n][r] = ncr(n-1,r)+ncr(n-1,r-1)     return array[n][r]   print ncr(11,8)   Now the output of the program should be ncr(11,8) = 165. But it prints 9841. Whats wrong with the code?


Has DEV 401 been discontinued? what about dev maintainance exam? are we supposed to take it or not?  I answered platform 1 transition exam and have passed that. What is the whole new change, i am bit confused as the maintenance exam last date is approaching.


Error: "failed to connect to lvmetad" in Ubuntu 15.10

My computer has a error that is preventing it from booting to the desktop. The error message is      Warning failed to connect to lvmetad no such file or directory falling   back to internal scanning   It happened right after I installed GNOME, how to fix the error?


Under review since 9 months. Shall I send another email

First, I would like to mention that I saw that there are similar questions about this topic on this site but this one is very specific whose answer I could not find anywhere. The query is as follows.  I had sent a manuscript to a springer electrical Journal, 10 months back. For 3 months, the status showed "With Editor". Then finally it changed to "Under Review". For the past seven months, it is "Under Review". One month back, I had sent a polite enquiry to a person in editorial office about my paper. He replied that he was sorry and he has contacted senior editor to speed up the process. Today, exactly one month has passed since his reply and the status still remains under review. The average time taken for the first decision as mentioned on the official journal website is 3.5 months. My fear is that the article has already taken nearly a year since I had send it and if there is any more delay, I would not be in a position to send it to any other journal because the proposed approach will become old by then. Shall I send another email to the editorial staff, given that I had already sent another email just a month before? What kind of email can be sent in such a situation ?


Wrapping long tag names in question list

I know this isn't a big deal, but I thought I'd bring it up anyway.  When a question has a particularly long set of tags, it causes the user name to drop below the tag list:   This is a bit ugly IMO, so I recommend adding this CSS (or something similar):  .tags {     max-width: 450px; }   Which causes the tag list to wrap more gracefully:   Since the .tags class already has float: left, this might have been the intended behavior, but I'm tagging this as a feature request rather than a bug because it's so minor.  Update  After playing around with a user style sheet, I realized that in 'mini' question lists, , this tweak is not appropriate. The user style sheet I'm using right now is:  .tags { max-width: 450px; } .narrow .summary .tags { max-width: none; }   Although there's probably a better way to do this.


What is the most efficient way to increase my sneaking level early on?

I've created a new save in Skyrim and now I want to increase my sneaking level as fast as possible.   What is the most efficient strategy for powerleveling sneaking as a new character?


Can the Diplomat power be used against a player without an active race?

Tonight I gained Diplomatic Sorcerers, two of the other 3 players were in decline so had no active race.  A reading of the rules implied to us that the Diplomatic power could not be used against those two players as they had no active race.


Struggling with non-normality in generalized linear model

I am looking for correlations between certain measures of brain structural integrity (fractional anisotropy, given as ratio between two hemisphere ==> rational data range 0-1, normally distributed) and behavioral parameters from stroke patients which are not normal but in part extremely leftskewed.   Having read numerous posts on assumptions of GLZM which I'd like to apply to assess the data, I still struggle with the assumption of non-normality of Y.     ;  ;  ;  ;   For instance, it reads ".... In normal circumstances, the question isn't 'are my errors (or conditional distributions) normal?' - they won't be, we don't even need to check. A more relevant question is 'how badly does the degree of non-normality that's present impact my inferences?" I suggest a kernel density estimate or normal QQplot (plot of residuals vs normal scores). If the distribution looks reasonably normal, you have little to worry about. In fact, even when it's clearly non-normal it still may not matter very much, depending on what you want to do (normal prediction intervals really will rely on normality, for example, but many other things will tend to work at large sample sizes)...."   Moreover, here it says: ".... Strictly speaking, neither, though the second is the thing you check. What is assumed normal is either the unobservable errors, or equivalently the conditional distribution of Y at each combination of predictors. The unconditional distribution of Y is not assumed to be normal. –  Glen_b May 30 '13 at 13:38 "    or "....Since the residuals are just the y values minus the estimated mean (standardized residuals are also divided by an estimate of the standard error) then if the y values are normally distributed then the residuals are as well and the other way around. So when we talk about theory or assumptions it does not matter which we talk about because one implies the other."   So my question is: Is a GLZM applied to my data valid if the residuals look normally distributed but the Y is not? Would a non-significant Shapiro-Wilk test on the residuals together with a reasonable QQ plots allow to trust the confidence intervals estimated incl. the p-vals?  I would be very grateful if somebody could help and clarify how to face this problem of non-normality in a generalized linear model. Having talked to two colleagues more familiar with modelling I got two different perspectives, A saying that normality of Y is crucial, B saying look at the residuals, GZLM should be robust to non-normal distributions.   Now I am confused with discrepant views on assumptions of GZLM.   "


Create animations then update the model?

So basically I have a model rigged and set to animate. I have someone else that is going to work on the animations, while i finish the model (sculpting and textures). Would it be possible for him to finish or save his animations and simply apply them to the updated model (or vice versa)?


How to show that this function holomorphic in the given domain?

Let $Z\in \mathbb{C}$ and  assume we are in the principal logarithm branch,  show that $$\Gamma(z)=\int_{0}^{\infty} e^{(z-1)(\log(x))} e^{-x} d x$$ is holomorphic in the domain  $Re(z)>0$ We just started to study complex analysis, so far I have the tools to show that argument by  Cauchy-Riemann equations  Morera's theorem or Cauchy-Goursat theorem   I was mainly thinking about Morera's theorem but I have no clue how can I apply it here, what should I start with?


How in the world does this prank pen work?

Help here would be greatly appreciated: This question has been asked several times on this site and elsewhere, and it seems as if the posters became satisfied with inaccurate answers.  How on earth do the electric shock prank pens/bubble gum work? I have no intention of shocking anybody or recreating this circuit, I am simply baffled by how it operates. I have verified that all purported explanations readily available online are inaccurate or incomplete.   The above image shows the only two components in the circuit. I do not know for a fact what the white component is, but I have to assume it is a high value capacitor.   The above image is a literal layout of the circuit. The 50k load is the user's hand. Both switches are closed upon pressing the button. The switch is before the capacitor. This is based on closely observing the circuit and is 100% accurate unless someone can prove otherwise. I tested this with varying capacitance and inductance values and was unable to induce a significant current in the load for more than dozens of miliseconds. When testing I moved the virtual switches from the ground to the positive wire. When I move the switch after the capacitor I can have a long lasting current through the load, but the voltage/current are very low. Edit: It is beginning to appear as if the white piece (Shown as cap above) is an active component/IC. There may not even be a capacitor in this circuit.  What I know: 1. The device behaves as follows: When the pen is held and the button is pressed a mildly painful electric shock is felt. After about 3 seconds, the pain gradually decreases until it is not longer felt. Upon releasing and pressing again the full shock is felt once again, even if only released for the slightest moment. The button and grip are the electrodes. 2. It uses 4 1.5V button cells in series (with high internal resistance) 3. The shrink wrapped component is a tightly wound step up transformer. The   secondary uses extremely thin wire. It apparently is an autotransformer, as it has three leads and is wrapped around one ferrite column.  What I think I know: 1. I measured the frequency on the primary with a primitive oscilloscope. It was equal to a couple hundred hz, which is reasonable considering the pain of the shock. 2. If the frequency is ~200hz, the capacitor (if the white component is a cap) would have to be over 100uF non polarized. This may be possible as I have discovered high capacitance low voltage smd caps. The primary inductance would have to be several mH.  3. The turn ratio would (I believe) have to be at least 1:90. This surprised me because I read that most autotransformrs have a low ratio. I then encountered higher ratio custom ones (which is more reasonable if varying wire gauges are used).   What I want to know: 1. What the white component is. Is it merely a capacitor? Does it serve other functions? 2. How on earth does this circuit work. It seems so simple and then again I can't explain or emulate its behavior accurately in a simulator...   Help will be greatly appreciated, as this has kept me occupied for a long time.


I'm trying to answer this question  True or false? T is a diagonalizable linear operator on a finite dimensional vector space V. Then every linear operator which commutes With T is a polynomial of T.  I think the statement false but unable to find a counter example. So any help is appreciated


If $P(x)$ is a polynomial over the Real Field such that for an integer $k$, $P(k)$ is an integer, then show that $n!P(x)$ is an integer polynomial

Statement:      If $\mathcal{P(x)} \in \mathbb{R}[x] \ni~ \forall~ k\in\mathbb{Z}, \mathcal{P(k)}\in \mathbb{Z}$, then show that $n!\mathcal{P(x)}$ is an integer polynomial.     I have the following question regarding the question:  1) The question doesn't seem complete for some reason. Isn't it that $\exists$ particular $p$ such that for any $n\geq p, ~n!\mathcal{P(x)} \in \mathbb{Z}$?    I tried proving the statement. But it was quite unsuccessful. I tried to construct another polynomial $\mathcal{Q(x)}$ with rational coefficients so as to show that both are equal. But that wasn't going the way I wished. And I wasn't getting the $n!$. Please check Point $1$ above as well.


How does Dwarf Fortress keep track of so many entities without losing performance?

In Dwarf Fortress you can have hundreds of Dwarves, animals, goblins, etc in game at any one time, each with their own complex AI and pathfinding routines. My question is how does this not produce noticeable slowdown? Does each Dwarf run in its own thread?


What happens to folks who get question banned, by and large?

There is a steady stream of duplicates of  coming in lately. It's got me wondering. Roughly speaking, out of say 100 folks who get this ban, how many    wander away and never interact with SO again?   do the sorts of things that might lift a ban, but don't get it lifted? do the sorts of things they should, and lift the ban? post a question of their own on Meta which we close as a dupe?   Among the continue-to-interact folks, is there a difference in success rate between those who post on Meta about it (motivated, but not good rules-readers, who nonetheless get customized advice) and those who do not (better rules readers, but working to some extent blind) - which do better?  Is there a reasonable chance of recovering from a ban, assuming you care enough to try?


Accessing instance variable from separate class in java

I'm working on programming my own tic tac toe game in javafx, but seem to have stumbled across some fundamental mechanic that I don't understand in dealing with classes. I tried to simplify my problem for this question. I just want to create a Game object containing a two dimensional string array and then print off the strings from that array through another class' method. I get a null pointer exception when I run this code. Any help would be greatly appreciated. Cheers.  package testing;  import javafx.application.Application; import javafx.stage.Stage;  public class Main extends Application {      @Override     public void start(Stage primaryStage) {         Game g = new Game();         g.addMove("X", 1, 0);         g.addMove("O", 0, 1);         GUI.printBoard(g);     }      public static void main(String[] args) {         launch(args);     } }   package testing;  public class Game {     private String[][] board;      public Game() {         this.board = new String[3][3];     }      public String[][] getBoard() {         return this.board;     }      public void addMove(String s, int row, int col) {         this.board[row][col] = s;     }   }   package testing;  public class GUI {      public static void printBoard(Game g) {         String[][] board = g.getBoard();          for (int row = 0; row < 3; row++) {             for (int col = 0; col < 3; col++) {                 if (board[row][col].equals("X"))                     System.out.println(board[row][col]);                 else                     if (board[row][col].equals("O"))                         System.out.println(board[row][col]);             }         }     } }


Does the "right endpoint rule" yield the same definition of the Riemann integral?

In an analysis class I'm teaching, I stated a different definition of the Riemann integral, which I thought was equivalent to the usual one.  But now I'm not so sure.  Notation: let $f : [0,1] \to \mathbb{R}$ be a bounded function.  A partition $\pi$ is a finite sequence $\pi = \{0 \le x_0 \le \dots \le x_n \le 1\}$.  The mesh $|\pi|$ is defined as $\max_i |x_i - x_{i-1}|$. For a partition $\pi$, define:   the upper sum $U_\pi(f) = \sum_{i=1}^n \sup_{x \in [x_{i-1}, x_i]} f(x) \cdot (x_i - x_{i-1})$ the lower sum $L_\pi(f) = \sum_{i=1}^n \inf_{x \in [x_{i-1}, x_i]} f(x) \cdot (x_i - x_{i-1})$ the right sum $R_\pi(f) = \sum_{i=1}^n f(x_i) (x_i - x_{i-1})$.   A standard definition of Riemann integral (see, e.g., Baby Rudin) goes as follows:     $f$ is Riemann integrable, with integral $I$, iff $\inf_\pi U_\pi(f) = \sup_\pi L_\pi(f) = I$.   The definition I gave, which here I'll call "right Riemann integrable", is this:     $f$ is right Riemann integrable, with integral $I$, iff for every $\epsilon > 0$ there exists $\delta > 0$ such that for every partition $\pi$ with $|\pi| < \delta$ we have $|R_\pi(f) - I| < \epsilon$.  (In other words, $\lim_{|\pi|\to 0} R_\pi(f) = I$.)   The idea is to mimic the "right endpoint rule" definition given in introductory calculus classes.  Now it's well known that $f$ is Riemann integrable iff it is continuous almost everywhere, in which case the Riemann integral equals the Lebesgue integral.  I can prove that if $f$ is continuous almost everywhere, then it is right Riemann integrable, and the right Riemann integral equals the Lebesgue integral.  Hence, every Riemann integrable function is right Riemann integrable, and in this case all integrals agree.  What I can't prove is the converse.     Is it true that every "right Riemann integrable" function is Riemann integrable?   I thought of doing something like the following: given a partition $\pi$, for each $i$ let $t_i \in [x_{i-1}, x_i]$ be a point at which the supremum $\sup_{x \in [x_{i-1}, x_i]} f(x)$ is almost attained.  Then refine $\pi$ to a new partition $\pi'$ by throwing in all the $t_i$.  I would like to say that $R_{\pi'}(f)$ is then close to $U_\pi(f)$.  But if $t_i$ was very close to $x_{i-1}$ then the effect of throwing it in to $\pi'$ may not affect the right sum very much.


I have Windows 10 with Office installed (utilizing Office365).  I have never installed OneDrive explicitly, but every now and then I see this popup on my laptop:    I don't want to use OneDrive.  How do I get rid of it permanently?  In Add/Remove programs I don't see an option to uninstall OneDrive.


Search is incorrectly adding tags to search criteria

This search should not be searching in any tags:    But it "helpfully" adds the [wpf] tag to my search criteria.  I can't seem to get it to f**k-off-and-do-what-I-say, either.


I have this object that many insrances using from different threads:  Private static var _selectedIntrerface;  public static Interfaces SelectedIntrerface {     get { return _selectedIntrerface; }     set { _selectedIntrerface= value; } }   So my question is very simple: should i declare it this way:  Private static volatile var _selectedIntrerface;  public static volatile Interfaces SelectedIntrerface {     get { return _selectedIntrerface; }     set { _selectedIntrerface= value; } }    Update   This object not modified, only accessed.


I have to calculate the order of the ring $\mathbb{Z}[i]/(1+i)$. This is how far I am: If $a+bi\in \mathbb{Z}[i]/(1+i)$ then there are $n,m\in \mathbb{Z}$ such that $a+bi\equiv 0+ni$ or $a+bi\equiv m+0i $. This means that $\mathbb{Z}[i]/(1+i)=\{x\in \mathbb{Z}[i]: Re(x)=0 \text{ or }Im(x)=0\}$. So the order of this ring has to be infinite. I have a feeling I have something wrong, but cant figure what. Is there something wrong in this calculation? Thanks.


What is pressure at microscopic level in a liquid? how can I imagine it?

what i mean to say is that, in a liquid (ideal) pressure gets transmitted undiminished, what it means is that a molecule applies equal amount of force to all the molecules in its vicinity how? how do non ideal liquids not satisfy this condition.


Is it essential to use comma in a big number?

Is it necessary to use comma in a big number? For example, if anyone writes one million four hundred thousand and two as 1400002 instead of 1,400,002 on answer sheet of listening section of IELTS test, will it be considered incorrect?  Thanks in advance.


Trying to localize a Underscores starter theme

I finished translating the .pot file(larehev.pot) and created a .mo file(larehev_he.mo) with my translation and i can't make it to work on my theme.  in functions.php there is a setup function and i changed  load_theme_textdomain( 'larehev', get_template_directory() . '/languages' );   to  load_theme_textdomain( 'larehev_he', get_template_directory() . '/languages' );   Any idea whats the problem? where else i need to change?  I'm using the underscores starter theme.


I know the question is really basic but I just started magic yesterday and I have this land card that I don't understand  On , it's written that when the card is untapped I need to add a mana fire or light, from where should I add it ? from a land already in my hand?  Thank you


How do I programmatically open a MS Word document without invoking the Document_Open macro

I am trying to use Office Automation to open a word document.  The problem is that I would like to open it without invoking the Document_Open macro.  Is there a way to do this?  The relevant line below is wordApp.Documents.Open()  Imports Microsoft.Office.Interop  Public Class WordFunctions   Public Shared Function ConvertToDoc(ByVal file As String) As Boolean     Dim wordDoc As Word.Document     Dim wordApp As Word.Application      Try         wordApp = CreateObject("Word.Application", "")     Catch ex As Exception         Return False     End Try      Try         wordApp.Caption = "Automated Word Instance"         wordApp.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone         wordDoc = wordApp.Documents.Open(FileName:=file, Visible:=False, ConfirmConversions:=False)          wordDoc.SaveAs(FileName:=file + ".doc", FileFormat:=Word.WdSaveFormat.wdFormatDocument)         wordDoc.Activate()         wordDoc.Close()         Return True     Catch ex As Exception         Return False     Finally         wordApp.Quit(SaveChanges:=False)     End Try   End Function End Class


Its not duplicate. Where can i find old fligh status free of charge? I need to check BA 677 flight on 31 July 2016. Flightstats and flightAware are with payment.


How this infinite sum $\sum_1^\infty\frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$ equals 2/9?

I've tried several times but I don't know how to get the correct result. Can anyone please tell me what should I do with this sum? Thank you :)  $$\sum_{n=1}^\infty\frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$$


What precisely was the discovery facilitated at the end of Interstellar?

Near the end of Interstellar, (HUGE and nearly utter SPOILERS follow):      TARS, the robot, gathers data from the singularity that Cooper relays to Murph via Morse code on her watch. The outcome of this message allows for completion of the work that allowed for plan A, which, as in seen in the end, allows for a series of space stations to function as life rafts for the human race.   What was the discovery? What was the problem that needed to be solved?


How many questions on meta have asked, "Why can't I ask this question when that question is open"?

One of the main arguments against keeping old, fun posts in a locked state is that they create broken windows, which serve as an advertisement for the types of questions which are acceptable—notwithstanding the historical notice stating the opposite. I've never found that argument convincing, but I certainly wouldn't want to encourage behavior that makes Stack Overflow worse, so I'd honestly, sincerely, without any trolling like to ask those that do believe this to drop the hammer on me.   If this claim is true, I would expect Meta to be rife with posts from indignant users claiming that their question was closed, while that "weird programming feature" question over there exists. I would think coming up with about two dozen such meta posts from the last 6 months would be trivial; surely this problem is big enough to manifest itself at least once per week.  To be clear, I've seen Meta pages filled with posts containing "why question closed". I know plenty of questions get closed, and plenty of people complain. I'm talking about people specifically complaining that "old junk exists, so my new junk should, too".   Finally, let's not waste time digging through all the closed Stack Overflow questions looking for stuff that seems similar to these purported broken windows. There are tons of junk questions that come into the front door of Stack Overflow every day. This junk comes in many flavors: here's a wall of code, now find my error; here are my program requirements, now someone write it; spam; and, of course, non-constructive crap that might look similar to some of the old favorites. But just because some old junk questions exist, and some new junk questions get asked, doesn't mean the former caused the latter—post hoc ergo propter hoc.  No more rhetoric, no more arguments, no more anger. Just data.     EDIT  There's been a bit of confusion as to what I'm asking above, and it seems I could have been a bit clearer. A lot of answers and comments below deal with open questions on Stack Overflow and Programmers.SE creating broken windows, with one answer even quoting me to show how keeping questions open and active can create broken windows. The people writing these answers are correct; keeping off-topic questions open and active does indeed cause these problems.  This question is intended to ask whether broken windows would be created by keeping questions like the  closed and locked, delisted from "top question" pages, and with a big bright prominent banner proclaiming to all that the question exists for historical purposes only, and is not a good example of an on-topic question.  So the bottom line is, I was wondering just how many meta threads there were asking "why can't I ask X when Y exists" Where Y was locked at the time of asking (which would likely be reflected in the answers).


Why does creating a stack of linked lists cause issues with linker error and virtual deconstructor

I am trying to make a stack of linked lists and I am running into a error   Here is my deconstructor:  template <typename T> mystack<T>::~mystack() {     node_type* temp;     while (pTop != nullptr) {         temp = pTop;         pTop = pTop->getNext();         delete temp;     } }   The error is being thrown when I call this function   double process_line(std::istream& input) {   DS::mystack<double> stack;             //std::cout << stack.size();      if (isdigit((input.get()))) {         //stack.push(input.get);     }     else {      }      return 0; }   When I don't create a new stack I don't get the error but when I do I get this error code  Severity    Code    Description Project File    Line    Suppression State  Error   LNK2019 unresolved external symbol "public: virtual __thiscall DS::mystack<double>::~mystack<double>(void)" (??1?$mystack@N@DS@@UAE@XZ) referenced in function "public: virtual void * __thiscall DS::mystack<double>::`scalar deleting destructor'(unsigned int)" (??_G?$mystack@N@DS@@UAEPAXI@Z)  lob06   C:\Users\name\source\repos\lob06\processline.obj    1      Any help would be appreciated.


I used to run Windows 7 32 bit, but installed the 64 bit version because of a RAM upgrade. During the installation I got this message:      The partition you selected might contain files from a previous Windows installation. If it does, these files and folders will be moved to a folder named Windows.old. You will be able to access the information in Windows.old, but you will not be able to use your previous version of Windows.   The C:\ drive now has two (2) Windows folders:   Windows (15.3 GB) Windows.old (15.7 GB)     Don't see why I need the Windows.old taking over 15GB of space on my hard drive so I tried to delete it. It didn't work.  How can I safely delete this folder?


Change left Cmd key to Ctrl Key wihout changing the right Cmd key in Macbook Pro High Sierra?

I have two command keys on my MacBook Pro(High Sierra). I often use control with my pinky finger. Is it possible to map only right Cmd key with control key while the left Cmd key should function as it is? It would really help in removing the strain from pinky finger.  P.S. I looked at the solution of  and found that the  is not only outdated but doesn't contain the hex code for right and left command keys.  I also tried the following command by using key code from /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h file but it still doesn't works  hidutil property --set '{"UserKeyMapping": [{     "HIDKeyboardModifierMappingSrc":0x700000036,     "HIDKeyboardModifierMappingDst":0x70000003b}] }'


(Java) How to avoid null pointer exception when getting nested class element?

I have a class like this one:  class Tickets{     Data data;     class Data{         String departure;     }     public String getDeparture(){         return data.departure;     }  }   When I try something like this:  Tickets tickets=new Tickets(); if (tickets.getDeparture!=null)   I get nullpointerexception on this check. Why is that so? How can I avoid it? What to do instead? Thanks for help.


How to delete network namespace, no pids option available for ip netns

How to clean up network namespace, CentOS 6.5 does not have ip netns pids option, so can't use ip netns pids ns-2001 | xargs kill  ip netns list | grep ns-2001 ns-2001  ip netns pids ns-2001 | xargs kill Command "pids" is unknown, try "ip netns help". usage: kill [ -s signal | -p ] [ -a ] pid ... kill -l [ signal ]  sudo ip netns delete ns-2001 Cannot remove /var/run/netns/ns-2001: Device or resource busy  ip netns help Usage: ip netns list        ip netns add NAME        ip netns delete NAME        ip netns exec NAME cmd ...        ip netns monitor


Word or phrase for literally and figuratively?

Say, for example, you and a group of people were all sailing out in the ocean and something happens...then you say,  "I guess we are all in the same boat"  You are literally in the same boat with everyone else, and your current situation is the same as everyone else.  Now such a phrase can be applied literally and figuratively. I was wondering if there was a word that would mean both literally and figuratively. I know this is a tad bit of an oxymoron, but I was curious to see if there was such an "all encompassing" word for this.


There are users listed under the "Users" tab. How do I know who the moderators are? Is there any specific thing to look for on a user, I mean a icon or some other sign? How do I contact a moderator? Is the a way other than using "flag" link?


Turning my short sloppy proof that $G \blacktriangleright H \blacktriangleright K$ then $G \blacktriangleright K$ into a concise and neat proof?

Continuing to work on writing clean proofs while studying for a qualifying exam (1st try as I enter grad school so there are no stakes involved). I can "see" the rationale for the titular proof in my head and can explain it (sort of) in words but I'm at a loss for the cleanest and most concise way to write it out. Here's my attempt...     $\mathbf{Theorem}$:  group $G$, and subgroups $H$ and $K$ which form a   "chain" of characteristic subgroups $G \blacktriangleright H  > \blacktriangleright K$ show that $G \blacktriangleright K$.      $\mathbf{Proof}$: The groups of automorphisms on $G, H$, and $K$ are   denoted as $\operatorname{Aut}(G), \operatorname{Aut}(H)$, and   $\operatorname{Aut}(K)$ respectively.        Every element has $\operatorname{Aut}(H)$ is "embedded" in some   element of $\operatorname{Aut}(G)$ because $H$ is characteristic in   $G$.      Similarly every element of $\operatorname{Aut}(K)$ is "embedded" in   some element of $\operatorname{Aut}(H)$.      Since $K \blacktriangleleft H$ we have every element of   $\operatorname{Aut}(H)$ has some element of $\operatorname{Aut}(K)$   embedded in it.      Smiilarly, since $H \blacktriangleleft G$ we have every element of   $\operatorname{Aut}(G)$ has some element of $\operatorname{Aut}(H)$   embedded in it.      Clearly we have that every automorphism of $G$ has an automorphism of   $K$ embeded in it. Hence $K \blacktriangleleft G$, $\square$.   $\mathbf{Self Critique}$: I believe that speaking of "embedding" without being very clear about what that means is a problem but am unsure how to flesh it out for precision's sake (and possibly that might make this proof inaccurate?)  It was suggested that this is a duplicate of  which it is not. This question is tagged as "proof-writing" as in I needed feedback in writing a better version of my own proof and not simply copying another person's proof.


What if I don't know my previous visa number for the Indian e-Tourist visa application?

I have been to India before, but have since renewed my passport so have no record of previous visa details. What does one do about completing this question online? I am French and we are not allowed to keep old passports.


Are the "If you be my everything..." and "If I be wrong" structures correct? Thank you for the answers!


Using definition of derivative to find $\frac{d}{dx} (e^x)$ -- circular reasoning?

Using the definition of derivative, one can find that $\frac{d}{dx} (e^x) = e^x$ using the fact that $\lim_{h \to 0} \frac{e^h - 1}{h} = 1$. Fine.   However, the proofs that I have seen of that latter fact have all used the power series $e^x = 1 + x + x^2/2 + \dots$ which, to my knowledge, require all derivatives of $e^x$ to compute. So, is this proof circular? And if so, how can we correctly show that $\frac{d}{dx} (e^x) = e^x$ using the definition of a derivative?


Can I get back into the US with an expired US passport and a valid UK passport?

Good evening I booked a trip and realized my US passport is expired. I have a passport from another country (UK) and wanted to know could i use that to get back into the US now that the US is letting people with expired passports in till the end of the year .


Understanding string constant \s! in ConTeXt typescript files

I'm trying to write my own typescript, and was advised to look at the ones provided in the ConTeXt distribution. They contain lines such as the following: \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=\s!default,\s!fallbacks=\s!Serif]  I don't understand if and why the \s! parts are needed. The file syst-aux.mkiv says they are string variables, but then, where are those defined? What do they contain? Is \s!name the name of a variable that contains something, or is "name" the content? If it's easily explained in a manual I must have missed it, and would appreciate if someone could either point me towards the explanation or just explain it to me in simple words. I just want to understand how to make a typescript to get a downloaded font working, I don't need to fully understand all the finer points of system macros.


Can someone explain how does this slicing work?


Proving continuity of Logarithm using $\delta$-$\epsilon$

Say we wanted to prove the continuity of the logarithm using the $\delta - \epsilon$ proof (and using the definition of the log as the inverse of the exponential). For any log base $a>1$ Starting with $|\log_a({x_1}) - \log_a({x_2})|<\epsilon$, We can find that if $\frac{x_1}{x_2} < a^\epsilon$ (and $\frac{x_1}{x_2}<a$), then $|\log_a({x_1}) - \log_a({x_2})|<\epsilon$ as desired. But for the $\delta$ part to come in, we need it in the form of $|x_1 - x_2|$, not $\frac{x_1}{x_2}$.  So then I thought that maybe if $|x_1 - x_2| < \frac{x_1}{x_2} -1 < a^\epsilon -1$  then we would have $|\log_a({x_1}) - \log_a({x_2})|<\epsilon$ which would mean that the function is continuous at $x_1$ and since it was arbitrary it is continuous at all x (right?).   The reason I think this is true is because we want the distance between $x_1$ and $x_2$ to be very small, so $a^\epsilon -1$ (which we would call $\delta$) would get really small as $\epsilon$ gets small. Is there a better way to arrive at this value of $\delta$? Assuming it is a valid answer


When is it best to write "can't" versus writing "cannot"? Are they interchangeable in every situation?


In an application when you are showing a date to someone (and you don't know their preferred format), what date format should you use?  USA or Rest-of-the-world?     For reference if anyone is not sure what these formats are, today's date would be:   USA = 10/07/2011 or October 7, 2011   Rest-of-the-world = 07/10/2011 or 7 October 2011   Assuming an equal probability that a user is from the USA or outside the USA, which format should I use?  Note, this question was largely triggered by the comments in .


Loading multiple CSV files into QGIS 2.10

How can I load multiple CSV files into QGIS with Longitude/Latitude already included in it. I downloaded the "Load Them All" plug-in, however, the result loaded was converted as text files and cannot be visualize on the map canvass. Any help? Are there any available plug-ins that can load multiple CSV file that will work fine in QGIS?


Why force is negative gradient of potential energy? Why negative sign is involved in this definition?


A common result is that finitely generated modules over a PID $R$ are projective iff they are free.  Is the same true that an arbitrary projective module over a PID is free? I can't find this fact anywhere, so I suspect it is false, but I can't construct an example.  Does anyone have an example of a projective module over a PID which is not free? Thank you.


Pass value to a stored procedure in ms sql

This is how I get the value of the selected column in a gridview in my code behind(C#)     str += "'" + MyGridview.DataKeys[gvrow.RowIndex].Value.ToString() + "',";   This is the value of str  str='7','101','235','456'   My output here is correct.  My problem is i got error when i pass this value on stored procedure parameter.  This is the way I pass this value to my stored procedure;  : some other parameter here cmD.Parameters.AddWithValue("@Rec",str);   And on my stored procedure this is how i get this  Declare @Rec AS NVARCHAR(MAX)  Select col1,col2 where Record_no in ('' + @Rec + '')    My error is  Conversion failed when converting the nvarchar value


How to authenticate Data Loader with Single Sign On?

Hi is there a way to Sign in in Data Loader when is Single Sign On activated in my organization? If so what would be the steps?


Run a screen session on boot from rc.local

I am trying to run a detached screen under a specific user in rc.local on boot. The code below is what I have so far, but it is not working for me. The su part seems to be giving me an error.  su - username -c /usr/bin/screen -dmS test bash -c '/var/www/path/to/script/script.sh; exec bash'


What kind of error java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1OctetString is this?

I got some error from Struts based project in my Eclipse  java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1OctetString    What kind of error is this can any one explain it?


How to access a shared folder in VirtualBox?

I followed the steps for sharing folders between Windows 7 and Ubuntu in VirtualBox.  Despite that the folder appears with a X sign and gives me the following message when a try to open it:     The folder content could not be displayed   When I choose Shared Folder from the VirtualBox Device menu, the following warning is displayed:     On the system page, you have assigned more than 50% of your computer's memory (2.93 GB) to the virtual machine...   How can I successfully share folders between Windows and Ubuntu using VirtualBox?


If A is positive semidefinite, then $A+\alpha I$ with $\alpha\neq 0$ is positive definite?

If $A$ is a symmetric positive semidefinite matrix, then $A+\alpha I$ with $\alpha> 0$ is positive definite?  Or are there some conditions to $\alpha$  so that it verifies?  $I$ is the identity matrix


Proving existence of an encryption scheme that has indistinghuishable multiple encryptions in the presence of an eavesdropper, but is not CPA-secure

I got stuck in trying to find a solution to the 3.7 exercise of the Katz-Lindell book. The exercise also assumes the existence of a pseudorandom function. The problem is that a multiple messages encryption scheme has to be non-deterministic in order to be indistinguishable. So how is it possible for such encryption scheme to be CPA vulnerable, if it's non-deterministic as we are considering a multiple messages scenario and a pseudorandom function involved in the Encryption-Decryption process?


Splitting char array and storing into vector

I've searched online but can't find a way to way to split a char array by space (" ") and store each word into a vector.   int main() { string input; vector <string> splitInput;  getline(cin, input);  char* chararray = new char[input.length() + 1];  strcpy_s(chararray, input.length() + 1, input.c_str());  //code to split chararray by space and store into splitInput  }


How do I get the IP Address of server in homegroup?

I have a number of systems connected to a Windows computer that acts as a server in a Home Group. The problem is that if this local server turns off and on or restarts, its IP Address might change for that system.  How will the remain devices find out the new IP address of this server? I want to automate the entire process since I want to host software and there won't be any network administrators to help.


In QFT, it is easy to find resource on a free scalar quantum field theory. When I tried to search for a free conformal field theory, I could not find a good resource.   Can anyone either give some information with regards to how free conformal field theory would look like, or give some links that would help?


I am studying for my upcoming stats final exam and I come across this question:  Let X be a single observation from the uniform distribution:   $$f(x) = \begin{cases}       0 & \text{otherwise} \\       \frac{1}{\theta} &  0 ≤x ≤ \theta \end{cases}$$  Suppose we use $(X, 1.5X)$ as a confidence interval for $\theta$. What is the confidence level?  I have no idea how to start.  Since I am given a confidence interval, I believe I need to integrate the function from $X$ to $1.5X$, but I'm not sure what to do next, should I even integrate.  How can I solve this problem?


How to create function that takes in strings and converts to int if string equals 'one'

I have a function that looks like this:  def test(in1):    if in2 = 151:     print('error')     if in2 == 1:     in1 = 14     print(in1)   The function currently takes in a string value,   I was thinking:  if in2 == 'one':    in2 = 14   But that doesn't work for some reason  Thanks


“Hash sum mismatch” error due to identical SHA1 and MD5 but different SHA256

When running apt full-upgrade or apt update I'm getting several logs that are more or less the same as this one, where there is an identical filesize, SHA1 and MD5 but different SHA256:   E: Failed to fetch store:/var/lib/apt/lists/partial/jp.archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_Packages.xz  Hash Sum mismatch    Hashes of expected file:     - Filesize:5826751 [weak]     - SHA256:af226b4496cbb524bd4814d102047ae77769836203274dffc91cb543d5da13cc     - SHA1:aef5c36ce45bd5c3154a1bb03c62b6cfb33e2bc6 [weak]     - MD5Sum:7ef83228ec207df10acac48fbdd81112 [weak]    Hashes of received file:     - SHA256:e2c7fc5a2d86f75f03612fec614dcf84d3d502976558fbe40928c1dd120bb05e     - SHA1:aef5c36ce45bd5c3154a1bb03c62b6cfb33e2bc6 [weak]     - MD5Sum:7ef83228ec207df10acac48fbdd81112 [weak]     - Filesize:5826751 [weak]    Last modification reported: Thu, 23 Apr 2020 16:40:26 +0000    Release file created at: Thu, 23 Apr 2020 17:33:17 +0000   Whereas others have the same MD5, but different SHA1 and SHA256:   E: Failed to fetch http://jp.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-5.4.0-29_5.4.0-29.33_all.deb  Hash Sum mismatch    Hashes of expected file:     - SHA256:edde13dcd52c51e2404d37731948d491e6e215b22f599239326809754f8d5633     - SHA1:3e46354d6aaa92f82d5392a80f6b72c3fcc78a91 [weak]     - MD5Sum:4ccf38c666c836f29fc3602314de47b9 [weak]     - Filesize:10936232 [weak]    Hashes of received file:     - SHA256:9af606f85850ba3010ac8743f62dca91bbef3e5e60da5a7df62dac53eb5a4fb7     - SHA1:61c842d896676ac9af0fef9f9f48bc4a3c39cce6 [weak]     - MD5Sum:4ccf38c666c836f29fc3602314de47b9 [weak]     - Filesize:10936232 [weak]    Last modification reported: Thu, 30 Apr 2020 08:23:38 +0000    This problem is similar to what is asked , and indeed I tried several of the solutions offered there (and elsewhere) but they did not help. However I am wondering specifically about why the SHA-1 and MD5Sum are identical, and only SHA256 is different. Does this mean that there is a security problem somewhere along the line? Or is my system reading SHA256 incorrectly? Something else?  Thanks


What is this kind of security bolt head called, and how can I remove it?

A previous owner fitted the light fitting pictured above, and has not left me a tool to remove the bolt. The bulb has blown so I need to get in to the unit. The head diameter is about 12mm and the gap between the two notches is about 6mm. I would like to remove it with some technique involving more finesse than simply smashing up the fitting and/or drilling out the bolt.  I hope someone can recognise the bolt and give me a search term which will let me cheaply buy a bit for this bolt from somewhere like Ebay UK.


I really like the font/layout of the following article:  I've tried various fonts/packages, but I don't seem to find the right one. Can you help me identify it?


People are nested in groups, which in turn are nested in?

I am looking for a summary term for a collective of groups. Specifically, I would like to make a general statement that people are nested in groups, which in turn are nested in (?).   Some examples to illustrate:   Students are nested within classes (groups), which in turn are nested within a school (?).  Students are nested in sorority chapters (groups), which in turn are nested within a sorority (?).  Employees are nested in departments (groups), which in turn are nested within an organization (?).    I can summarize classes, departments, and sorority chapters with the summary term "group".   I have tried summarizing schools, sororities, and organizations with the summary terms "collective" and "society", yet I am not satisfied with either.    "Collective" appears to imply a common goal. While departments in an organization likely pursue a common goal (e.g., improve company performance), I feel the term "collective" draws away attention from the fact that departments may also have competing interests. I am thus looking for a more neutral term than "collective". "Society" seems unsuitable because its meaning is already : "A society is a group of people involved in persistent social interaction, or a large social grouping sharing the same geographical or social territory, typically subject to the same political authority and dominant cultural expectations." All people I talked to therefore found it confusing to refer to an organization as society.    Edit 1. I am hoping to find a term that is intuitive and descriptive. For example, I find that collective has an intuitive meaning (collection of items/people). While I like super-group, I feel the term does not convey the same intuitively graspable description for people who never encountered this term in mathematics.   Edit 2. Subgroup appears more intuitively graspable. However, I would like to start at the group level and find an overarching term from there (rather than going from group to subgroup).


How to fix square root symbol from deforming?

\documentclass{article}  \usepackage{amsmath} \begin{document}  $$\sqrt{\sum_{n=1}^\infty \frac{1}{n^2}}$$  \end{document}     The top left part of the root is not aligned with the rest. How do I fix it?  EDIT: I forgot to add that I have the old root setup in preamble, but the break occurs with or without the closed root.


About the point $P$ inside a square $ABCD$ satisfying $BP = BC$ and $\angle APD = 90^\circ$

I'm trying to solve the following problem from the Polish XI Olimpiada Matematyczna Gimnazjalistów, question 2 from . (The deadline of 12 October 2015 has now passed.)    I managed to solve it using analytical approach, but I have to solve it the "normal way" - in this case using angles.  I almost found the proof, but I need a help in showing 1 thing. Take a look at my approach, where I found almost all angles:    I don't know how to show, that angles $DCQ$ is equal to angle $PBC$. When we prove this, we'll prove, that $AP=2PD$.


Flash plugin or additional plugins in Firefox

I have been trying to read my online training on Yahoo, but when I click the icon for training, a message box appears saying that I should install additional plugins. I have tried to install the additional plugins by selecting Tools -> Add-ons in Firefox, but nothing seems to work.   Why can't I install the Flash plugin in Firefox? And why is Firefox unable to use Adobe Flash Player?


How to sort a list of instances of a class?

How can I sort a list that contains classes by a particular instance variable? I want to do alphabetically by the name of the animal in this case.    For example: my_list = [Animal('dog',3), Animal('cat',5) , Animal('bird',2)]  I want it sorted like this:  [Animal('bird',5), Animal('cat',3), Animal('dog',2)] (Alphabetically)   I don't want it like this:  [Animal('bird',2), Animal('dog',3), Animal('cat',5)] (Numerically)


Object do not show color in layout but shows in preview render

I am currently watching a beginner tutorial on youtube and in the middle of the video, my blender suddenly crashes. When I open up my saved blender file I only got a colorless object even I already apply color to the object. But when I go to preview render (F12) it shows the color.  BTW, I set the render engine to cycles. That is probably the cause of the crash


Permissions on private key in .ssh folder?

I changed my permissions in my .ssh folder and now when I use a piece of software that uses my private key, I have to type my password each time.  What should my permissions be on my id_rsa file to not have to type a password each time I use an app that uses it?  Currently my permissions are set to:  -rw-------@ 1 Jody  staff   114 Nov  4 23:29 config -rw-------  1 Jody  staff  1743 Oct 21  2009 id_rsa -rw-------@ 1 Jody  staff   397 Oct 21  2009 id_rsa.pub  -rw-------@ 1 Jody  staff  3855 Sep 13 22:35 known_hosts


Did the Sorting Hat see the Slytherin side of Harry Potter because of his status as a pseudo-Horcrux? Could it sense Voldemort's soul shard (who was a Slytherin) within Harry?


Why would $(x+1)$ transform the graph to the left?

Why do transformations for the $x$ variable in graphs work opposite as you would expect?   Example: $f(x) =(x)-1$ moves the graph down as you would expect but $g(x) = (x+1)-1$ moves the graph down (as it looks like) but instead of to the right one it's to the left one.   Note: I understand fully how to do graph transformations but don't understand why we just deem the x-value transformations as "doing the opposite". Thanks!


We will make the convention that exact categories be skeletally small.   Is this construction (used in a mathematical context) correct? There is something that strikes me as odd in that "be". Should it be "are"? I know I've seen a similar way of using "be" like that, without conjugating the verb, but I'm not completely sure when it should be used.


Consider the following theorem known as Baire's Category Theorem (BCT).   Theorem.[BCT] A non-empty complete metric space $X$ is not a countable union of nowhere dense sets.  I am interested on how to prove the following using BCT.  The intersection of every countable collection of dense open subsets of a complete metric space is dense.  My draft: Let $(A_k)$ be a sequence of dense open sets in $X$. Then for each $k$, we get $$ A_k \mbox{ is dense }\Leftrightarrow \overline{A_k}=X \Leftrightarrow \mbox{int }A_{k}^c=\varnothing.  $$ Since $A_k$ is also open, we get $$ \mbox{int }\overline{A_{k}^c}=\mbox{int }A_{k}^c=\varnothing   $$ and so $A_{k}^c$ is nowhere dense. We now consider the set $$\bigcup_{k=1}^{\infty}A_{k}^c.\qquad \qquad \qquad(*)$$  I am convinced that upon taking the complement of (*), the resulting set must be dense. But I don't know how to verify that step. Any tips?


Problem installing ubuntu over Windows 8

I have a hp laptop and pre installed windows 8 .  I download an iso of ubuntu 14.04 lts.  When i installed it using wobi, it reboot, install and again reboot and it shows two option for boot 1 windows 8 , 2- ubuntu .  I click on ubuntu then ubuntu start and shows an error like this "serious error found while checking drive/. Press i for ignore ,s for skip mounting ,m for manual setup" . Please help me what can i do ?  if i use bootable pendrive for install, it install on a partition of my pc's hard drive .it don't boot ? i am beginer on linux please help me


Executing a Bash Script Function with Sudo

I have a script that does a number of different things, most of which do not require any special privileges. However, one specific section, which I have contained within a function, needs root privileges.  I don't wish to require the entire script to run as root, and I want to be able to call this function, with root privileges, from within the script. Prompting for a password if necessary isn't an issue since it is mostly interactive anyway. However, when I try to use sudo functionx, I get:  sudo: functionx: command not found   As I expected, export didn't make a difference. I'd like to be able to execute the function directly in the script rather than breaking it out and executing it as a separate script for a number of reasons.  Is there some way I can make my function "visible" to sudo without extracting it, finding the appropriate directory, and then executing it as a stand-alone script?  The function is about a page long itself and contains multiple strings, some double-quoted and some single-quoted. It is also dependent upon a menu function defined elsewhere in the main script.  I would only expect someone with sudo ANY to be able to run the function, as one of the things it does is change passwords.


What is the remainder when $45!$ is divided by $47$?

What is the remainder when $45!$ is divided by $47$ ?    Is there any method to approach such questions ?


I am just studying triple integrals in my calculus class and I have the following problem as homework and I am not sure how to start: Let $P$ be a pyramid defined by the base [-2,2]x[-2,2] in XY plane and tip (0,0,5). Compute the volume in 2 ways using triple integrals:  once as $dzdxdy$ and then as $dxdydz$.  Since I am new in this type of problems I would appreciated some help. Thank you


I am not getting the difference between TeX and LaTeX. I have seen the answer  but I am not getting it completely. Is TeX a system or language or format or program and Is LaTex a system or language or set of macros(what is macro here) or library or engine. If I say, LaTeX is a TeX based-language then what is TeX ? In , it is written that "TeX is a macro and token-based language" and It is a Turing-complete language. So,It means TeX is a language. Now, the 3rd answer  is saying that TeX is an engine which loads the LaTeX format and then process it. It means TeX processes the LaTeX. Since, both TeX and LaTeX are the languages then how is it possible that one language processes the another language ? I am a beginner in this area. Please explain in simple words, "what actually the TeX is" and "what actually the LaTeX is" ?


Substituting words in parenthesis using sed

I have a basic python script that looks like this:  my_name = 'Zed' my_age = 35 my_height = 74 my_weight = 180 my_eyes = 'Blue' my_teeth = 'White' my_hair = 'Brown'  print "let's talk about %s" % my_name print "he's %d inches tall" % my_height print "he's %d pounds heavy" % my_weight print "actually, that's not too heavy"  print "he's got %s eyes and %s hair" % (my_eyes, my_hair) print "his teeth are usually %s depending on the coffee" % my_teeth  print "if I add %d, %d, and %d, I'd get %d" %(my_age, my_height, my_weight, my_age + my_height + my_weight)   I wanted to delete all of the instances of "my_" in this file so I ran the sed command:  sed 's/my_//' pythonscript.py > altered_mypythonscript.py   The outputs deleted all of the instances of "my_" everywhere except for the line at the end of the script right here:  print "if I add %d, %d, and %d, I'd get %d" %(my_age, my_height, my_weight, my_age + my_height + my_weight)   Why is sed not replacing the words in the parenthesis I want it to, and how can I fix this? Maybe my google abilities have failed me, but I haven't read anything about sed's substitute command being affected by parenthesis. I could be wrong though.


I'm trying to figure out how to mathematically derive the common points of two intersecting circles on earth's surface given a center Lat/Lon and a radius for each point.  For example, given:   Lat/Lon (37.673442, -90.234036) Radius 107.5 NM Lat/Lon (36.109997, -90.953669) Radius 145 NM   I should find two intersection points with one of them being (36.948, -088.158).  It would be trivially easy to solve this on a flat plane but I don't have any experience solving equations on an imperfect sphere such as the earth' surface.


Read Committed Snapshot Isolation vs Read Committed - pros and cons?

We have an application from JD Edwards, for which the database runs on SQL Server 2005 or 2008R2.  They have a new application vendor and he suggested to change isolation level to Read Committed Snapshot Isolation (RCSI) instead of default locking Read Committed to resolve a blocking issue:  Long story short, client was complaining about getting error & we involve application team to look logs on app server & at that same time we see blocking on database so then we send the SPID & app team for rollback or kill that connection & issue will disappear so they have few API cursors & users searching for data every now & then. As a maintenance we are doing rebuild index & update stats on weekly basis.  We see hundreds of cursors running on server & I give the SPID of first blocking happened & then application team find out rest, but what i am seeing is below:   FETCH API_CURSOR0000000000A4804D FETCH API_CURSOR0000000000A467E6 FETCH API_CURSOR00000000006AF7B0 Microsoft SQL Server JDBC Driver set transaction isolation level read committed   I told them by changing to RCSI, each update will hold a pointer if data is reading on that page or row, we also can get dirty reads and will use more tempdb in SQL Server. We have had a back and forth conversation and can't decide whether to make this change on the server.  Can anyone point out the pros and cons of using RCSI, or tell me if you have experience with the JD Edwards application running on SQL Server and best practices for the isolation level?


Situation:  Question A have close vote "duplicate of B" Question B has closed as duplicate of A.   (I seen 1 more before it)  It's at least strange. What will happen if it will closed?


In Star Trek, is there any in-universe mention of the redshirt effect or fatality statistics?

A little while ago, I read a novel called "Redshirts" by John Scalzi.  The novel specifically references Star Trek and the redshirt effect - with the statistics and narrative patterns (including fatalities) from Star Trek serving as an in-universe plot point.      Proving that the ship they're on has the same patterns, and for the same reasons (being in or influenced by the script of a tv show)   This got me wondering... Is there, in any version of Star Trek, some in-universe mention of the redshirt effect?  where the characters discuss or reference the fatality statistics among the crew, act superstitious over away missions, or react (whether predicting or denying them) to the kinds of narrative patterns people would react to in real life, but accept in stories?  I know there were a lot of out-of-universe references to, and jokes about, the redshirt effect, but I'm not familiar enough with the stories to recall any in-universe mention.  And the other questions I saw when I looked ask about fatalities, not how they're referenced in-universe - my apologies if I missed this being answered before!


Add the field "Subject" to moderncv letter

As discussed on this forum , I'd like to add an extra field "Subject: " to moderncv letter template.  \bigskip \textbf{Subject: \@subject} \bigskip\noindent   the new \makeletterhead command will be something like this:  \renewcommand*{\makeletterhead}{%   % recompute lengths (in case we are switching from letter to resume, or vice versa)   \recomputeletterlengths%   % sender block   \makehead%   \par%    % recipient block   \begin{minipage}[t]{.5\textwidth}     \raggedright%     \addressfont%     {\bfseries\upshape\@recipientname}\\%     \@recipientaddress%   \end{minipage}   % date   \hfill% US style %  \\[1em]% UK style   \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900" %_______________________ \bigskip \textbf{Subject: \@subject} \bigskip\noindent %_______________________   % opening   \raggedright%   \@opening\\[1.5em]%   % ensure no extra spacing after \makelettertitle due to a possible blank line %  \ignorespacesafterend% not working   \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}   Not to forget that the parameter \@subject should be retrieved somewhere.  EDIT  The question is how to add a "Subject" field in a way that when the command \makelettertitle is executed the subject text will be placed before the openning statement.


When do we say independence is the probability of intersection being equal to the product of probabilities?

This is something I never really got in either Elementary Probability Theory or Advanced Probability Theory because my professors mainly discussed independence between 2 objects. Please tell me if my understanding is right:   Events $A_1, A_2,\dots,A_n$ are independent: For any distinct indices $i_1, i_2, \dots, i_n$   $$P(A_{i_1}, A_{i_2}, \dots, A_{i_n}) = \prod_{i = i_1}^{i_n} P(A_i).\tag{A}$$   This is  $P(A_1, \dots, A_n) = \prod_{i = 1}^{n} P(A_i)$.   Sigma-algebras or Pi-systems $\mathscr{A}_1, \mathscr{A}_2, \dots, \mathscr{A}_n$ are independent: For any distinct indices $i_1, i_2, \dots, i_n$   $$P(A_{i_1}, A_{i_2}, \dots, A_{i_n}) = \prod_{i = i_1}^{i_n} P(A_i)\mbox{ where } A_{i_1} \in \mathscr{A}_{i_1}, A_{i_2} \in \mathscr{A}_{i_2}, \dots, A_{i_n} \in \mathscr{A}_{i_n}.\tag{B}$$  I'm guessing this is not the same as $P(A_1, \dots, A_n) = \prod_{i = 1}^{n} P(A_i)$ for similar reasons (where $A_{1} \in \mathscr{A}_{1}, A_{2} \in \mathscr{A}_{2}, \dots, A_{n} \in \mathscr{A}_{n}$).   However, I saw that in Stochastic Calculus when random variables $Y_1, Y_2, ... Y_n$ are independent, we CAN say that for all Borel sets $B_i$,   $$P\left(\bigcap_{i=1}^{n} (Y_i \in B_i)\right) = \prod_{i=1}^{n} P(Y_i \in B_i).\tag{C}$$  Apparently, that is equivalent to saying for any distinct indices $i_1, i_2, \dots, i_n$ and for all Borel sets $B_i$,  $$P\left(\bigcap_{i=i_1}^{i_n} (Y_i \in B_i)\right) = \prod_{i=i_1}^{i_n} P(Y_i \in B_i)\tag{$C_1$}.$$   I was surprised because I thought $P(\bigcap_{i=1}^{n} (Y_i \in B_i)) = \Pi_{i=1}^{n} P(Y_i \in B_i)$ does not establish $k$-wise independence, but apparently it does.  Is there an analogue of $C_1$ for A or B?  Note: I acknowledge the title may not be very good. Please suggest a better title if needed.


Current Sourcing Capability Of Voltage Divider Output Node

1) Why to use a LDO regulator when a simple voltage divider can do the job for stepping down voltage?  2) How do we set the current in voltage divider when use as regulator functionality ? Or   3) Can we calculate (theoretically) the current sourcing capability of voltage divider output ?  voltage divider output V(out) = Rb/(Ra+Rb) * V(in)  What is the current sourcing capability at V(out) node ?  Regards, Azlum


I am from India. I am attending a conference in USA. I have B1/B2 visa. Do I need transit visa if I am changing airport from EWR to LGA


Is it possible to backdate an Ubuntu restore to trick an expired password prompt

I use passwordless login with SSH to access my Ubuntu 18.04 DigitalOcean droplet, on which I've disabled root login, using a sudo-enabled account. I do not have a login password/sudo password. My password setting is ALL=(ALL) NOPASSWD: ALL, so that I never have to enter one. However, I tried logging in to my droplet today and it told me my non-existent password is expired. It wants the current password to change the password. But...I don't have a current password. As I said, the root login is disabled, so I have no other way in. I assume I'm screwed, unless you know of a way I can remotely login bypassing the expired password check. The only other thing I can think of is if I can restore a backup of the server but backdate it during restoration by 30 days or whatever, so that it thinks my password is still valid. Is it possible to do that, even if it means only a higher level of support has to do it for me?


I am writing my CV using moderncv package, everythig is nice but I have a problem with \cventry command. I have something like this:   (it means 2010 - now)  I would want to have this in one line, rather than in two lines. I tried looking into the moderncv style files but with no success. What can I do to achieve the effect I want?


Is there a downside to adding an anonymous empty delegate on event declaration?

I have seen a few mentions of this idiom (including ):  // Deliberately empty subscriber public event EventHandler AskQuestion = delegate {};   The upside is clear - it avoids the need to check for null before raising the event.  However, I am keen to understand if there are any downsides.  For example, is it something that is in widespread use and is transparent enough that it won't cause a maintenance headache?  Is there any appreciable performance hit of the empty event subscriber call?


How to calculate $\lim_{n \to \infty}\sqrt[n]{\frac{2^n+3^n}{3^n+4^n}}$

I came across this strange limit whilst showing convergence of a series: $$\lim_{n \to \infty}\sqrt[n]{\frac{2^n+3^n}{3^n+4^n}}$$ How can I calculate this limit?


guage_names is varchar incharge_id is integer table has a column option_id which is unique,primary and autoincreament.  There is a row in the table with incharge_id 86  But the query is failing.     Error Number: 1064      You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near 'option WHERE incharge_id = 260' at line 1   SELECT guage_names FROM option WHERE incharge_id = 86


How to fix Permission Denied (Public key) error?

While trying to communicate between my desktop Ubuntu 12.10 and Fedora 19 desktop, I am facing the error of Permission Denied (Public key). I am able to login through ssh from fedora to Ubuntu, but not vice-versa. I even performed telnet on both machines via port 22 and both machines are listening, but not through ssh. What to do? Any idea?  My sshd_config file is as follows:  # Package generated configuration file # See the sshd_config(5) manpage for details  # What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes  # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768  # Logging SyslogFacility AUTH LogLevel INFO  # Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes  RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile    %h/.ssh/authorized_keys  # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes  # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no  # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no  # Change to no to disable tunnelled clear text passwords PasswordAuthentication yes  # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes  # GSSAPI options GSSAPIAuthentication no GSSAPICleanupCredentials yes  X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no  #MaxStartups 10:30:60 #Banner /etc/issue.net  # Allow client to pass locale environment variables AcceptEnv LANG LC_*  Subsystem sftp /usr/lib/openssh/sftp-server  # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication.  Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM yes   This is sshd_config of ubuntu system.


Could not log in the ubuntu 16.04 after installing the nvidia geforce drive

I installed an nvidia driver (340, my display card is GTX970) but I could not log in to Ubuntu afterwards. I get a black screen after logging in. When I enter a tty, in the login part, it will continue showing:  None of the NVIDIA graphics adapters were initialized Nvidia init module failed   As a result, I could not type any command in the tty.


I have a div which has this list of suggestions. But i need to allocate it at the caret position of the textarea. Is this possible if yes, help me to do it.  function findOffsetPosition(obj) {     var posX = obj.clientLeft; var posY = obj.clientTop;     while (obj.offsetParent) {         if (obj == document.getElementsByTagName('body')[0]) { break }         else {             posX = posX + obj.offsetParent.offsetLeft;             posY = posY + obj.offsetParent.offsetTop;             obj = obj.offsetParent;         }     }     var posArray = [posX, posY]     return posArray; }


What is the best solution for database connection pooling in python?

I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework.    The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect.    What is the best "drop in" solution to switch this over to using connection pooling in python?  I am imagining something like the commons DBCP solution for Java.    The process is long running and has many threads that need to make requests, but not all at the same time... specifically they do quite a lot of work before brief bursts of writing out a chunk of their results.  Edited to add: After some more searching I found  which looks decent, but as I'm relatively new to python I guess I just want to make sure I'm not missing a more obvious/more idiomatic/better solution.


What can be done about a moderator who makes a practice of deleting comments or posts s/he apparently disagrees with?  (Note that these are generally factual answers, not just expressions of opinion.)  This has been the ongoing (years, IIRC) practice of one particular person, and is getting rather annoying.


The E. coli has a genome with approximately 5×106 bp. The main DNA polymerase involved in its chromosome duplication (DNA pol III , the one with highest processivity) can polymerize ~103 nucleotides per second. By a simple calculation, we would conclude that the whole chromosome duplication would take ~ 5000 seconds ( about 80 minutes, so more than an hour). The whole cell duplication would probably take much more than that, considering not only DNA Pol III is involved. However, in optimal conditions, E. coli can actually duplicate in ~30 minutes. How could that be possible?  OBS.: all the numbers used here are aproximate, but sufficient to account for the correct orders of magnitude.


Why does QGIS Vector OpenStreetMap import lose features?

I'm attempting to use OSM data in QGIS 2.8.2. I've imported my data into SpatiaLite layers using the following steps:   Vector -> OpenStreetMap -> Download Data... Vector -> OpenStreetMap -> Import Topology from XML... Vector -> OpenStreetMap -> Export Topology to SpatiaLite...   For the last step, I imported the polylines. I noticed that some of the primary highways have gaps in the middle. This isn't a case of a segment going outside my region--the gap is right in the middle of the region.  You'll notice that I put the primary highway on its own layer by selecting polylines with attributes I wanted. The light-blue lines beneath the primary highway are every single polyline. Notice that there is no polyline connecting the disjoint highway segments.  I'm assuming that when I chose "Vector -> OpenStreetMap -> Export Topology to SpatiaLite...", all polylines are exported no matter which attributes I check. Is that right? If not, is this a symptom of me not selecting "tunnels", for instance?  This is not a duplicate of . The aforementioned question is asking how to import OSM data. I've already demonstrated that I can import the data. The steps I listed are the same as in the accepted answer to . My question is about missing polylines.


Convert Spanish grades to English scale?

I'm a English citizen which has been living in Spain for the past 7 years (I'm currently 15 years old in case you're wondering) and I plan to move back to England at the end of this school year. Can anyone tell me what's classified as a C in percentage? And a B? A 50%? A 60%? In Spain the grade scale's from 1-10, 5 is classified as the minimum pass and 10 is classified as excellent. Thank you guys for helping me.


Can I install a Subpanel (in a seperate building) using a 3 wire connection (2 hots and 1 grounded neutral)?

Can I use a 3 wire connection (2 hots and 1 grounded neutral) to install a sub panel in a separate structure if I install a separate ground rod to the grounding bus in sub panel?   I have 8/3 w/o ground running from the main panel for an existing 240 connection in a separate shed. I plan on replacing the existing 30 amp double breaker in the main panel with a 50 amp double breaker and I want install a sub panel that would allow me to have a 240 and a 120 outlet running off a 30 amp double breaker and a 20 amp breaker in the sub panel.    If possible and appropriate, I would like to use the existing 3 wire connection (8/3 w/o ground) to make the connection from the main to the a sub panel using the grounded neutral wire to connect to the neutral bus.  I would install a grounding rod and connect the grounding rod to a separate grounding bus in the sub panel.  I anticipate keeping the neutral bus and the grounding bus separate in the sub panel and do not anticipate bonding these two buses.    Will this work or do I need to replace the 3 wire connection (8/3 w/o ground) with a 4 wire connection (8/3 w/ground)?


Unable to install QUCS (Quite Universal Circuit Software) on ubuntu 15.10?

$ sudo add-apt-repository ppa:qucs [sudo] password for hsthakar:  Cannot add PPA: 'ppa:~qucs/ubuntu/ppa'. ERROR: '~qucs' user or team does not exist.  $ sudo apt-get install qucs Reading package lists... Done Building dependency tree        Reading state information... Done Package qucs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'qucs' has no installation candidate


Prove $\mathbb{Z}^n$ is countable.  My attempt: We know $\mathbb{N}$ is a countable set (trivial)  Moreover, $\mathbb{Z}$ is a countable set because we can construct a bijective function in $\mathbb{N}\rightarrow \mathbb{Z}$ such that   I have stuck because i want prove $\mathbb{Z^n}$ is countable.  Can someone help me?


Do I need to always normalize before to feed it to the trained neural network?

When I trained a backpropagation neural network in MATLAB, I normalized the dataset with the z-score. When I use the trained neural network in Simulink I always normalize the new inputs with the same mean and standard deviation and it gives me good performance, I want to know if what I did is good?


How prove: for every convex polygon there exist three consecutive vertices which their circumcircle include all polygon?

How prove that for every convex polygon there exist three consecutive vertices which their circumcircle include all poligon?


linux bash script to create folder and move files

Hello I need to create folder based on a filename and in this folder create another one and then move file to this second folder  example:  cat.jpg create folder cat create folder picture move cat.jpg to picture    all my .jpg files are in      /root/Desktop/My_pictures   so it should look like this:  example picture "cat.jpg"   /root/Desktop/My_pictures/cat/pictures/cat.jpg   Sorry if I'm not precise but English is not my native language.  Best Regards and Thank You


Can somebody give me a hint for showing that:  The matrix $A+I$ is invertible if there is an integer $k\gt 0$ so that $A^k=0$.