This is my full code:  from random import randint currency = float(5.0) while currency > 0:     start = input("Do you wish to gamble? Y/N ")     if start == "Y":         numbers = []         currency = currency - 0.2         di = randint (1,6)         numbers.append(di)         dice = randint (1,6)         numbers.append(dice)          thrice = randint (1,6)         numbers.append(thrice)         print(numbers[0])         print(numbers[1])         print(numbers[2])         if numbers[0] == numbers[1] or numbers[0] == numbers[2] or numbers[1] == numbers[2]:             currency = currency + 1.0             print("You win £1!","Your current balance is: £",currency)         elif numbers[0] == numbers[1] and numbers[0] == numbers[2]:             currency = currency + 2.0             print("Jackpot! You win £2!","Your current balance is: £",currency)         else:             print("Too bad!","You're currency is: £",currency)     elif start == "N":         print("Your final total was: £",currency)         break     else:         print("Invalid Response")   And the response I get after accepting as "Y" three times is:  Do you wish to gamble? Y/N Y 1 6 2 Too bad! You're currency is: £ 4.8 Do you wish to gamble? Y/N Y 2 4 2 You win £1! Your current balance is: £ 5.6 Do you wish to gamble? Y/N Y 1 1 6 You win £1! Your current balance is: £ 6.3999999999999995   I do not understand why this is happening, the code checks out, and this issue repeats consistently on the third run no matter the outcome of the RNG and will always end in number.999999999999995.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I've been revisiting my old hard drive where I backed up my files long ago. I used Ubuntu back then and had no troubles creating files with a ':' (colon) character in their names. Now, however, I cannot access it, nor move or delete, even from terminal.    Is there any way to rename this file under Windows 7?

I have an external hard drive on which I back up my files, and I've moved some files from an Ubuntu laptop to it as well. However, I can't find a way to open the folder containing these files with my main Windows 10 laptop. When I try to open the folder "VPC 3 : UBUNTU" (the "VPC" is just a name for the laptop  with no special implications), the following happens:  It responds with "___ is unavailable. Make sure the disk is inserted..."


When I launch an application from terminal related to the window system, for example gnome or kde, then usually these applications send all sorts of junk messages in my terminal. How do I make these applications shut up? For example if I type:  okular somepdf.pdf &   a window which shows the pdf file pops up and I can read the pdf next to my terminal, and when I am done I close. Here is a typical example: :~$ cd Documents :~/Documents$ okular equi.dvi & [1] 5823  and when I close it sends this junk to the terminal: :~/Documents$ okular(5823)/kdeui (kdelibs) KXMLGUIClient::~KXMLGUIClient: 0x2322528 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes.  d  d: command not found [1]+  Done                    okular equi.dvi [1]+  Done                    okular equi.dvi :~/Documents$   The only thing I would like to see is: :~$ cd Documents :~/Documents$ okular equi.dvi & :~/Documents$  Perhaps that message was some bug, I do not care and I do not want to know about it. Is it possible to suppress these messages? Some people flagged this question as a duplicate to a question on "how to suppress output", but this is only partially what I want: I want to automatically suppress all output of certain applications. For instance okular is a graphical application, so I will never care about what it has to say in my terminal. So like I said above, I want the behavior to be : :~$ cd Documents :~/Documents$ okular equi.dvi & :~/Documents$  and not something like :~$ cd Documents :~/Documents$ okular equi.dvi > whatever & :~/Documents$

I'm trying to write a simple script to monitor my network status, without all of ping's output:  ping -q -c 1 google.com > /dev/null && echo online || echo offline   The problem is that when I'm not connected, I'm still getting an error message in my output:  ping: unknown host google.com offline   How can I keep this error message out of my output?


I've recorded  in 1080p60fps, and I cannot for the life of me get a solve error of below 2. I've got the focal length set to auto, so I'm not sure what's going on. I've done motion tracking in Blender before and it worked out well, but I seem to be getting a bad track.

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


OUT OF MEMORY ERROR ON THE LINE THAT ADDS THE OBJECT TO THE ArrayList - LAST LINE  I want every time I click the button saveScore, the name of the first team selected from the first spinner, the name of the second team selected from the second spinner, the score from the first editText  and the score from the second editText to be the arguments of my class object.  teamOneScore & teamTwoScore are two EditText where I enter the score for each team selected from the spinners and arrList is my ArrayList of objects .  I have a class - TeamsViewModel with 4 members of type String:  team1Name, team2Name, team1Score, team2Score.   saveScore.setOnClickListener(new View.OnClickListener() {      @Override      public void onClick(View view) {         boolean resultAddTeamOneScore = addTeamOneScore(weakActivity, teamOneScore.getText().toString().trim(), teamTwoScore.getText().toString().trim());         boolean resultAddTeamTwoScore = addTeamTwoScore(weakActivity, teamTwoScore.getText().toString().trim(),teamOneScore.getText().toString().trim());       if (resultAddTeamOneScore && resultAddTeamTwoScore) {           dialog.dismiss();           }       /** save the teams selected from the spinner */      String selectedT1 = teamOneSpinnerSelected(teamOneSpinner);      String selectedT2 = teamTwoSpinnerSelected(teamTwoSpinner);      while (!selectedT1.equals(selectedT) {         /** add to the ArrayLists of objects the teams selected and their's score*/         arrTeam.add(new TeamsViewModel(selectedT1, teamOneScore.getText().toString().trim(), selectedT2, teamTwoScore.getText().toString().trim()));                     }                 }             });

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


public class MapKeyExample {     public static void main(String[] args){          //Initializing a Map of type HashMap         Map<Integer, String> map = new HashMap<>();         Set<Integer> s = new HashSet<>();         map.put(1, "One");         map.put(3, "Three");         map.put(5, "Five");         map.put(7, "Seven");         map.put(9, "Nine");         System.out.println(map);         s = map.keySet();         System.out.println(s);     } }   Now the output is   {1=One, 3=Three, 5=Five, 7=Seven, 9=Nine} [1, 3, 5, 7, 9]   The expected output of s is:  [1, 5, 3, 9, 7]   Can someone show me how to modify this to Linkedhashmap or treemap? Many thanks.

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


I have a 16GB flash drive for almost seven years. It was all good before not long ago, when I tried to write a Ubuntu image onto it. I made it many times before and had no issues about. But this time, something happened, and my 16GB drive turned into 1GB. Any operating system on any computer I tried to use my USB drive with has shown me that it's strictrly 1GB and nothing to be changed.  I had a similar issue before, when this flash drive was somehow hurt by static so it wouldn't be recognized by any PC I plugged it into. That time, I used a utility to rewrite low-level chip so, as the latter contained information about what flash drive it appears (not true but similar: the drive is originally Kingston, but from that moment became Netac), the former would work again. I don't remember what that utility was but I'm pretty sure it provided options to turn any flash drive of A real storage size to A/k virtual storage size (perceived by a computer), where k≥1.  I remember that using this utility was risky since one only has exactly one chance to bring her flash drive back to life. I suppose it's worth risking in my case. After all, it isn't very expensive today to buy a 16GB usd flash drive. But I would rather scold myself to insanity for not trying.  Right this moment, I'm searching for that utility but cannot find it nor create a proper search query to help me do that. Please help me find the right utility. It may be for PC or Mac or Linux, doesn't matter.  Any disk utility app on Ubuntu or Mac (not to say of Windows) doesn't help me reach my goal. Those only can format or partition it but within the storage size perceived by an operating system, 1GB.

My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive.


I specifically remember that those buoyant explosive gas filled balloons were an annoyance for flying ships. This is mentioned several times in the book. At the end they seemed to play a very important role in the plot. I also remember ground based predators named Dashers, other named Swifters and the like. I read it in the '90s, it but could be older.

Plot Summary/Details  The sharpest memory I have of this one is that it was unusually dense reading. Much more difficult going than most of the sci-fi stuff I'd read by that time (I was 10 or 11, I think).  What I remember in terms of plot is that there is a starship, sent either to explore, or colonize, a distant star system.  I don't remember the names of any of the characters, but I think maybe they discover they are clones?  In any case, something happens to the computer system that the onboard AI becomes sentient and develops a measure of omniscience and omnipotence.  It effectively becomes a god of sorts.  The next part I can remember, and I'm not sure this is the same book or not, is that the ship has forcibly settled the crew on a hostile planet.  All sorts of nasty indigenous life forms live here, and guards are post on the wall outside the settlement to destroy them as they try to enter.  I remember there is a female character standing watch, and she goes over the bestiary in her mind.  One particularly nasty creature paralyzes you, and then burrows up your spine into your brain (or something like that) if it gets a hold of you.  That's all I can recall.  Not a lot of detail, unfortunately, but I'm having a tough time remembering much about this one.  I never finished the book(s), as they were mostly "over my head" at that age.


total Web Dev noob here, but I've been working on a website that involves logging in- The user puts his/her username and password. That's all fine and dandy, but the way that cookies work here can be a bit of a pain-Everytime I enter something in the text box, log in, and then go back to the log in page, whenever i want to type something in the login text box, there is a drop down menu for usernames and it can be really annoying- is there a way to prevent this in the actual code?

How do you disable autocomplete in the major browsers for a specific input (or form field)?


I have tried to search the solution alot but no one really helped me.   I have a javascript object:  trucks_obj = Object {95: _.Kd, 96: _.Kd}  95: _.Kd 96: _.Kd __proto__: Object   If the if condition is true, I just want to remove element from trucks_obj with specific ID. e.g. I need to remove element with 95 index.  I have already tried splice() as well as slice() but nothing worked.   Deletion Code:  $.each(trucks_obj,function(i,e){             if(($.inArray(i, trucks_arr)) === -1){                 trucks_obj.splice(i,1);             }         });

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


As the title says. There's a history of all our queries and it would be good to be able to delete the lousy queries and keep the useful ones.   Is there a way to do this?

Is it possible to delete or at least hide your own data explorer query when you know you've only been testing something and don't want it to show?


The light that near the camera on my laptop is lighting although I'm not using it. Seems it's a virus or an unknown application. How can I detect the application/process that's using the camera ?

Yesterday I was working on my laptop. Suddenly I noticed that the indicator light of the webcam was on, despite the fact that I wasn't making a video call or using the webcam in any other way at the moment.  It freaked me out.  It freaked me out that some unknown application on my computer was using my webcam without my permission, and possibly sending that video stream to god knows where on the Internet.  In the end, it turned out to be Skype which was in the process of crashing. (Despite me making no calls at the time.) So that story ended well.  But next time I see the webcam indicator light, I want to be ready. I want to be able to know exactly which app is using the webcam so I could destroy it.  Does anyone know how I can find out which app is using the webcam?  (I'm on Windows XP.)


I've been trying to track the game footage in the link below I tried tracking everything myself, and the detect new features method when some tracks are starting to disappear, the lowest I got was a solve error of 17 with both methods...  It's probably because of the obstructions, but those are important for my scene. So I tracked different things before and after the obstructions and joined the tracks, also didn't work. Since the camera goes in a circular motion, there's no track that stays during the entire clip. What I'm trying to do is put a robot in the middle and the camera goes around it (I also put bottles on that spot on the ground for more tracking information) I also uploaded some pictures to get an idea how I tracked it.

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


$$\sum_{n=0}^{\infty} n \left( \frac{2}{3} \right)^n = ?$$  How to find it? If it lacked n before fraction, I would use formula for the sum of geometric series.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


We trying to implement decent social sharing module for our app and have 2 question, which are pretty much related:   Is it important to have visible text which directly say to user what to do, like Share with friends, Tell friends, share near the social media icons (facebook, twitter, instagram) V.S. just having social icons alone is enough trigger for an action? (this is a main question) Was there any actual study about how it's affect sharing if   a User see options already on the screen (let's say fb, twitter,    instagram)     b There is single share button, and when user click on it, there is dialog with actual sharing options appear, or just additional icons appear on the screen.    If there is no any research regarding this, what is your personal     opinion regarding preferable way to go, if the idea is to get more     content shared.    Yes, I saw relative questions, but they seams about web, not mobile, which I think kind of important. But anyway, my main problem is to have actionable text or not.

I continually run into this issue on sites that want to offer social media links to share content on Facebook, Twitter, etc., and often to share via email or text message as well. Showing all of these icons gets busy very quickly. Often they are grouped under a "share" button that then reveals the individual tools, but my general impression is that this seems to be slowly becoming deprecated in favor of just having the individual links all visible.  I have no data to back this up though and just my gut instinct, but I'm wondering if anyone has heard any best practices/studies on "hiding" share functionality behind a share button?


How    $\lim_{h\to 0} \sin h$ when divided by $h$ gives the value $1$ ? Does it also follows with other ratios that for example. $\lim_{h\to 0} \cos x/x = 1$

How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated.


How can I access the html element div.card as shown below, the div returns as Proxy{}  in lightning and I cannot manipulate the DOM. The div comes from the content in controller because it is in rich text format, so I had to use lighting formattedText. Is there a way to access it in lightning? Thank you.

I am loading a JavaScript object between Lightning Components   var model = {} model.user = {} model.caller = {} model.caller.name = 'Batman'; model.other = {} // etc   And then into component attributes.  <aura:attribute name="model" type="Object" /> <aura:attribute name="caller" type="Object" />  cmp.set("v.model", model); cmp.set("v.caller", model.caller);   Then I use then like this:  <lightning:input value="{!v.caller.name }" label="Caller name" />   Then I get data back out:  model.caller = cmp.get("v.caller");      My question is:  Why do my JavaScript object sub-objects sometimes get set to Proxy when I inspect them in the console:  caller: Proxy [[Handler]]: e [[Target]]: Object [[IsRevoked]]: false   And other times I get the values I expect...  caller { name : "Bruce Wayne" }


I have more then 200 reputations on 3 sites          and    .   All sites are included in the combined flair. I don't want to show my Stack Overflow account on flair.  Is it possible to exclude it from the flair? Thanks!

It would be nice if you could pick which profiles to show on your combined flair image. Or to create multiple combined flair images with different associated profiles.  I'm suggesting this because I believe not all SE sites are relevant to each other. I'd like to use a combined flair for SO, Programmers.SE and Code Review, but not other SE sites I'm active on.


When I was in high school (6 or 7 years ago), one of the short stories that we read out of the text book had to do with an alien civilization that had discovered time travel.   They had managed to land on and explore the surface of their sun, and had found a gate there that allowed travel into the future. They copied this technology and it formed a large part of their society. The main character was an agent of an organization meant to keep paradoxes and such from occurring.   I remember that he explains that his job is strange, because since a successful mission means the erasure of the event that caused it, he had no memories of ever actually doing his job. He simply knew what it was and received payment for it. The story also mentions that the "last gate" at the "end of time" was so named because no one who went through it had ever returned. The era that this gate existed in was constantly in a state of flux due to minor changes in the timeline.  If anyone knows the name of this story or the author, it would be a great help. I've been trying to figure out what it is for around a year now, and no one I've spoken to about it has ever heard of or read it.

I am looking for some help remembering this book series I listened to on audiobook many years ago. It was a good story I just for the life of me can't remember the name, author or any of the character names lol I think this is a long shot as I don't remember many details but I really would like to read it again.  Some of the details I do remember: the story is set in a medieval time, not on this planet.  It's told from the viewpoint of a man, I believe he was a soldier. The main character meets him in a war torn world and allows him to travel with her.  The main character is a woman. She is a wanderer and carries a sword that only she can hold. If I remember correctly the magic is too powerful for anyone else to bear and it physically hurts them.  This sword allows her to pass through portals into other worlds. The portals are stationary and they need to travel to them.  There was also something special about her horse.... Ugh.  Each book is set on a different world.I only remember two of the worlds.  One is doomed world. It's land is sinking and towards the end there is a rush to get to the next portal. The book is set in a bog filled environment.  The other world I remember is more lush. Open plains and dense forest. The man is separated from the woman for some time. He stays with tribes-people, elves maybe? When it's time for them to go to the next world the man is torn between staying with his new friends and leaving.  So that's really all I remember. At the time I remember noting after I had read a few of the books that the author never really finished the series.  Any help would be appreciated :) throw me some guesses so I can do some research!


What is the correct form of following sentence: We helped him finsh/finishing/to finish/in finishing the work. Please help me giving right answere.

Duplicate of:                    My sentence fragment possibilities are        ... can help rule out false alarms   ... can help to rule out false alarms      I feel like both are technically correct, and that the latter sounds somewhat more formal while the former may be a little more clear.  I often come upon the general issue of when to use "to [verb]" or just "[verb]" — is there a general rule?  Is only one of them actually correct?  (Even if someone can explain how to describe the difference between these cases would be appreciated, i.e. "infinitive vs. ____" )


I want to make a trading card game like Yu-Gi-Oh or Magic. I have a lot of cards in my game and even the user can make new cards. Cards are objects and they have attributes like HP and Mana ,etc but they also has special power which is another object and has different types some of them activate when a card is played into the field, some of them activate at death and etc. One way is simply hardcoding all the different cards in different classes but This way, I cannot implement a user-built card. I am going to use enums for the essential cards but I don't know what to do for user defined cards.  Is there any standard way to implement things like this?  I am very new to Java and OOP. I think maybe Databases could help but I don't know what should I use or search to find the appropriate choice for this matter.

I'm trying to create cards for a ccg/tcg that are completely "data-driven" from an xml/json/external file. I've read multiple articles on this issue already, even here on stack exchange, but i can't figure out how to actually code this. I have a simple example:  My two cards have the following abilities   1) "Increase the value of all adjacent red cards by 1"  2) "Increase the value of this card by the amount of all adjacent red cards"  In my code i have the following functions (pseudo) that i need to accomplish these effects:  Increase(targetCards, byValue) // increases a card's value by another value FindCards(filter=adjacent) // returns all adjacent cards FilterCardsBy(filter=isRed) // returns only red cards Count(targetCards) // counts the number of cards   To create effect 1 i would use the functions like this:  Increase(FilterCards(FindCards(adjacent), isRed), 1);   and to create effect 2 i would use:  Increase(this, Count(FilterCards(FindCards(adjacent), isRed)));   So here's the problem: I have no clue how i can describe these functions in my external file and also i have no clue how i actually tell my functions to work in this combination to achieve the desired effects.  Maybe i'm misunderstanding the concept here but as far as i understood and described  i can create some pseudo script/code in my external file that then my code can interpret and execute on. But i feel i somehow missing the middle part where i write code to interpret these commands i'm defining in the external file.  Anyone with experience here that can give me some super simple starter ideas on how to takle this. Especially the part where i can combine several functions into one.


.Hello,everyone. I am studying the influence of one biomarker on multiple disease characteristics, and I would like to calculate its cutoff point. I created univariate ROC curves to investigate the diagnostic accuracy of this biomarker for each characteristis, and it's obviously that I have obtained different cutoff values. Could I combine this AUCs in order to obtain one general, optimal cutoff point? (something like multivariate analysis with multiple outcomes?)  Thank you in advance for you help!  Thank you for your attention and your answers! But your answers consider the case when we have MULTIPLE independent variables (predictors) and ONE dependent variable (outcome). However, I have MULTIPLE outcomes.

I'm trying to understand how to compute the optimal cut-point for a ROC curve (the value at which the sensitivity and specificity are maximized). I'm using the dataset aSAH from the package pROC.  The outcome variable could be explained by two independent variables: s100b and ndka. Using the syntax of the Epi package, I've created two models:  library(pROC) library(Epi) ROC(form=outcome~s100b, data=aSAH) ROC(form=outcome~ndka, data=aSAH)   The output is illustrated in the following two graphs:     In the first graph (s100b), the function says that the optimal cut-point is localized at the value corresponding to lr.eta=0.304. In the second graph (ndka) the optimal cut-point is localized at the corresponding value to lr.eta=0.335 (what is the meaning of lr.eta). My first question is:   what is the corresponding s100b and ndka values for the lr.eta values indicated (what is the optimal cut-point in terms of s100b and ndka)?   SECOND QUESTION:  Now suppose I create a model taking into account both variable:  ROC(form=outcome~ndka+s100b, data=aSAH)   The graph obtained is:    I want to know what are the values of ndka AND s100b at which sensibility and specificity are maximized by the function. In other terms: what are the values of ndka and s100b at which we have Se=68.3% and Sp=76.4% (values derived from the graph)?  I suppose this second question is related to multiROC analysis, but the documentation of the Epi package does not explain how to calculate the optimal cutpoint for both variables used in the model.  My question appears very similar to this question from , which says in short:     The determination of cut-off score that represents a better trade-off   between sensitivity and specificity of a measure is straightforward.   However, for multivariate ROC curve analysis, I have noted that most   of the researchers have focused on algorithms to determine the overall   accuracy of a linear combination of several indicators (variables) in   terms of AUC. [...]      However, these methods do not mention how to decide a combination of   cut-off scores associated with the multiple indicators that gives the   best diagnostic accuracy.   A possible solution is that proposed by Shultz in his , but from this article I'm not able to understand how to compute optimal cutpoint for a multivariate ROC curve.  Maybe the solution from the Epi package is not ideal, so any other helpful links will be appreciated.


I am trying to create a VF page on the Account object that will display open opportunities. I have it working in the sandbox but am unable to move it to production because the code coverage is 0%. This is the first time I've worked with VF/Apex and I'm wondering how I can set up a test class. Any help would be greatly appreciated! Class/Extension: public class OpptyListController {     public OpptyListController(ApexPages.StandardController cont){}     List<Opportunity> results = [             SELECT Name,              StageName,              NextStep,              Amount,              CloseDate              FROM Opportunity          WHERE accountId=:ApexPages.currentPage().getParameters().get('id')             AND StageName IN ('Contracting', 'Prospect', 'Discovery', 'Negotiation')];     public List<Opportunity> getresults(){         return results;}          }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


Is there any advantage using one over the other:  class Foo { public:     const int& get() const     {         // stuff here         return myInt;     }      int& get()     {         return const_cast<int&>(static_cast<const Foo*>(this)->get());     } };   Or  class Foo { public:     int& get()     {         // stuff here         return myInt;     }      const int& get() const     {         return const_cast<Foo*>(this)->get();     } };   I only used the first one, but I just saw the second one used somewhere, so I am wondering.  The comment // stuff here could be a non-trivial check like retrieving the index of a table in order to return a ref on a member of the table (for example: myInt = myTable[myComputedIndex];) so I cannot just make it public. Thus table and any member are not const.

Let's say I have the following class X where I want to return access to an internal member:  class Z {     // details };  class X {     std::vector<Z> vecZ;  public:     Z& Z(size_t index)     {         // massive amounts of code for validating index          Z& ret = vecZ[index];          // even more code for determining that the Z instance         // at index is *exactly* the right sort of Z (a process         // which involves calculating leap years in which         // religious holidays fall on Tuesdays for         // the next thousand years or so)          return ret;     }     const Z& Z(size_t index) const     {         // identical to non-const X::Z(), except printed in         // a lighter shade of gray since         // we're running low on toner by this point     } };   The two member functions X::Z() and X::Z() const have identical code inside the braces.  This is duplicate code and can cause maintenance problems for long functions with complex logic.    Is there a way to avoid this code duplication?


Yesterday,  I installed netbeans by downloading it from website  I ran the .sh file which installed it  Now i want to remove it   It does not show in the installed panel in ubuntu software center  what should i do ?

Since I did not install NetBeans via the Software Center (I installed it as an .sh file) I can't see an easy way of uninstalling the program.  How can I safely uninstall the program?


How do you remember(if you really do :-)) all the different levels and what each level does? Can anyone suggest an easy way to remember?

This is a  about RAID levels.    What are:   the RAID levels typically used (including the RAID-Z family)?  deployments are they commonly found in? benefits and pitfalls of each?


I have a template class that has a big member function in generic form, so it is not very easy to read it through. I decide to move this function outside of the class body, and implement it in a ".cpp" file that with same name as the ".hpp", but I can't pass the compiling. If I implement it in a specialized form rather than a generic form, it can be compiled/linked, even though it be saved in the "*.cpp" file too.  The codes is following:  ClassC.hpp:  #pragma once template <typename T> class ClassC { public:    ClassC( T* p ) : d( p ) {};    void show(); private:    T* d; };   ClassC.cpp  #include <iostream> #include "ClassC.hpp" #include "ClassD.hpp" using namespace std;  // this is a specialized version, and can be compiled/linked. template <> void ClassC<ClassD>::show() {    cout << "This is a specialized ClassC." << endl; };  // this is my generic version, and can not be compiled. template <typename T> void ClassC::show() {      cout << "This is a generic ClassC." << endl; }; /* */   ClassD.hpp  #pragma once #include "ClassC.hpp" class ClassD { public:    ClassD(): c( this ) {};    void show(); private:    ClassC<ClassD> c; };   ClassD.cpp  #include <iostream> #include "ClassD.hpp" using namespace std; void ClassD::show() {    c.show();    cout << "This is ClassD" << endl; };   main.cpp  #include "ClassD.hpp" int main() {    ClassD d;    d.show();    return 0; };

I have some template code that I would prefer to have stored in a CPP file instead of inline in the header.  I know this can be done as long as you know which template types will be used.  For example:  .h file  class foo { public:     template <typename T>     void do(const T& t); };   .cpp file  template <typename T> void foo::do(const T& t) {     // Do something with t }  template void foo::do<int>(const int&); template void foo::do<std::string>(const std::string&);   Note the last two lines - the foo::do template function is only used with ints and std::strings, so those definitions mean the app will link.  My question is - is this a nasty hack or will this work with other compilers/linkers? I am only using this code with VS2008 at the moment but will be wanting to port to other environments.


I need a way to know in my Chrome extension when running the content script that the frame being loaded is not an iframe. I am trying to construct an array of objects containing the URL's that the user has traveled to (see below). I need to set all_frames to true in my manifest file because I also have to be able to access elements inside iframes. Does anyone know how I can know if the frame currently running my content script is the window and not an iframe?  //if(window is not iframe)     sendData({Task : "Load Page", Path : location.href});

I am writing an iframe based facebook app. Now I want to use the same html page to render the normal website as well as the canvas page within facebook. I want to know if I can determine whether the page has been loaded inside the iframe or directly in the browser?


In basic atomic physics of light-matter interaction, very often we assume the atom is quantum mechanical with quantized atomic levels but assume the electromagnetic field to be a classical wave. It is true that this cannot explain the phenomenon of spontaneous emission and many other effects but is this framework mathematically consistent? The reason I am asking this is as follows. Someone told me that one cannot live with a quantum theory of electrons and a classical theory of gravity. His reasoning was this. On one hand, an electron is a quantum mechanical object but since it has mass, in principle, it also gravitates (no matter how minuscule its gravitational influence be). Therefore, it is not internally consistent to treat the electron quantum mechanically and its gravitational interaction classically. Does this argument has any merit? If it has any, then treating the atom quantum mechanically and electromagnetic field classically must also be internally inconsistent. Am I wrong?

What I am interested to see are specific examples/reasons why gravity should be quantized. Something more than "well, everything else is, so why not gravity too". For example, isn't it possible that a quantum field theory on curved space-time would be the way treat QFT and gravity in questions where the effects of neither can be ignored?


I was wondering if there was any way to hide the disc information message (the one that says X blocks available, X blocks safe or something to that effect. Not sure what that's called.) that I get on start-up. Not that the information isn't helpful, it's just a message which causes unnecessary worry by reminding me of when my previous hard drive was failing. So, like, is there a way to either hide this behind a fancy start-up animation, or even have it buried within the wall of text that just confirms the computer's capabilities (again, not sure what it's called. It's the one that just says [OK] USB Keyboard and stuff like that).

Is there a way to easily turn on/off showing the boot messages (loading the services) when Ubuntu starts? Is it something in Grub2?  I am running 10.04.


Our Professor said that : "A, an and the can all be used to indicate that a noun refers to the whole class which individual countable nouns belong"  which I didn't quite understood. doest that mean I can use a for example with the plural noun people if I'm talking about people in general? or what exactly?

In English, generic reference takes three possible forms:  A. Cats are cute. B. A cat is cute. C. The cat is cute.  But the names of nationalities seem to me to make an exception to this rule. As far as I know, when referring to all the members of a nation, you can only use the C version: The Italians are musical, or The French are posh, or The British are cold. Why is it that in this case only C is considered grammatically correct? If all the Italians, or all the French, or all the British are musical, posh, or cold, why can't we also say:  A. *Italians are... // *French are... // *British are...  or  B. *An Italian is... // *A French is... // *A British is...  ?


I have an entity and i am creating object for it. object is created and i can set the values. But reference shows null. I am not getting why. Please check my code:  @Entity @Table(name = "a_table") public class A {  private static final long serialVersionUID = -8674959693713707364L;  /** The id. */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "IdOrGenerated") @GenericGenerator(name = "IdOrGenerated", strategy = "foo.IdOrGenerated") @Column(name = "id") private Long id;  private Creator creator;  public A() { }  public A(Creator pCreator) {     this.creator = pCreator; }  //setters and getters for id and creator  }   In class B i am creating object A a = new A(); when i debug and see 'a' value is null.

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


I have studied Do Carmo diff.geometry chapeter 2.2 about regular surface. Of course I saw all examples of textbook but cannot apply to this problem. This is image for exercise 2.2.2, which I don't know how to solve.  In my guess, I thought that only first surface is not able to become regular surface because it is not possible to make map between open set and closed set with regular surface options. But I don't have any specific proof and idea. ( By searching in Wikipedia, I found that homeomorphism is map from open set to open set, but I don't know how to prove it also...) How can I solve this exercise with clarified proof??

I'm reading "Differential Geometry of Curves and Surfaces of Manfredo Docarmo" I'm doing  the exercises of the chapter 2. Here is the definition of regular surface that we are following:   I have problems with this exercise:   Is with the first part, I think that it's not true that it's a regular surface (the second it is). I don't know how to prove that something is not a regular surface.


seems to suggest that people are developing Operating Systems for the Arduino platform.   What Arduino OS projects are you aware of?   Please list only one project or OS per answer, and give a short list of goals or features of that OS.  For the purposes of this question software frameworks, task handling utilities, and similar projects are considered Operating Systems.  While there are many AVR frameworks and OS projects that work on Arduino hardware, please only list those that work within the Arduino software development tools and platform without modification.

is there any project of an rtos that works on arduino ?


I wish to insert a black boundary box around a graph. I have searched through the forum but I couldn't find a way to do so. The image attached is how my graph looks like.   Below is my document code:   \documentclass[11pt]{article} \usepackage{graphicx} \usepackage{float} \usepackage{grffile} \begin{document} \begin{figure}[H] \centering \includegraphics[height = 3in]{/Users/kusha/Desktop/graphs/kden_2011.pdf} \caption{Kernel density curves of male and female wages in 2011} \label{fig:kden_2011} \end{figure} \end{document}

I use \includegraphics command to insert image to the document. But how can I add a border around this image w/o any margin between border lines and image? It seems to be very easy, but I can't find it in the documentation.


Forgot my password for wireless.  How do I get it or change it.

If you have a laptop running XP that is able to connect to a wireless network fine, but you don't know the password it's using, is there any way to find it out so that a second laptop can also connect?


Since some recent update, when copying stuff from Terminal into Gmail compose window, it's pasted as formatted text, retaining all my terminal colors and fonts.     How to stop them (Chrome, Gmail, Terminal or whoever is to blame) doing that? This is really annoying.

After the update to Mavericks (10.9), anything copied from Terminal is pasted in the target app with the same formatting as in Terminal, in my case, white monospaced letters on a black background, e.g.:    (I pasted some text from Terminal into a New Mail window.)  Previously (10.8 and earlier) only plain text was copied, without any formatting at all.  This happens in apps that are capable of receiving rich text formatting. In plain text apps, e.g. TextWrangler or TextEdit in plain text mode, only the content is copied, of course.  Can formatting copying be disabled for the Terminal app?  The same happens in Yosemite (10.10) and El Capitan (10.11) as well.


Forgive my newbness, but how do I get the .NET ArcGIS SDK?  I can't access any of the ArcGIS templates when I create a new project in Visual Studio.  I'm using Visual Studio 2010, SP1 and ArcGIS 10.1.  I'm VERY green WRT to programming with ArcObjects and I think I'm missing something really simple!

Can anyone can suggest where I can freely download ArcObjects SDKs for ArcGIS?  I am using version 10.2.


Lets say I have a variable name = "Jack". I can check it like this  if name:     return name else:     name = None     return name   Is there any way to handle it in one line like:  new_name = name if not return none  Which simply return the variable value if available and if not then it should return None

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


So I want to make a scoreboard that makes it so when you hold a certain item it changes to 1 and when you're not holding it the score becomes 0 again?

I'm trying to make a command block that spawns an item in front of you if you are holding an item with a specific name. I've got these two working scripts;  /testfor @p[r=10] {Inventory:[{tag:{display:{Name:"Item Name"}}}]}  /testfor @p[r=10] {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:diamond_sword"}]}   but I can't get them together. The block should only look for an item in the active slot.


Intuitively, the covariance of two nondecreasing functions of a random variable should be nonnegative. However I can't seem to come up with a proof for this. Here is the formal setup: Let $X: (\Omega, \mathcal A)\to (\mathbb R, \mathcal B)$ be a random variable defined on the probability space $(\Omega, \mathcal A, P)$ and let $g$ and $h$ be nondecreasing functions $\mathbb R \to \mathbb R$. To make sure that everything is well-defined assume that $E[g(X)^2]<\infty$ and $E[h(X)^2]<\infty$. Question: Is is always true that $$\mathrm{Cov}[g(X),h(X)]\ge 0\,?$$  Some notes:  Note that the assertion is equivalent to showing that $E[g(X)h(X)]\ge E[g(X)]E[h(X)].$  I tried reducing the problem to showing that $$E[Xf(X)] \ge E[X]E[f(X)]$$ holds for every nondecreasing $f$ whenever $E[X^2]$ and $E[f(X)^2]$ are finite. To do this, I defined $Y=h(X),$ $f = g \circ h^{-1}$ and wrote $$E[g(X)h(X)]=E[g(h^{-1}(Y)Y] = E[f(Y)Y].$$ But this assumes that $h$ is strictly increasing, which is not necessarily true. Moreover, even in this case I'm not sure how to start.

Let $X$ be a random variable and let $g,f$ be real-valued, nondecreasing, and bounded.   Show that $\mathbb{E}[f(X)g(X)]\geq \mathbb{E}[f(X)]\mathbb{E}[g(X)]$  Having a hard time seeing where to start for some reasons, any hints?  I managed to write:  $\mathbb{E}[f(X)g(X)] = \frac{1}{4}\mathbb{E}[(f(X)+g(X))^2 - (f(X)-g(X))^2]$  But I'm not sure if this is in the right direction or not.


I know that Minecraft spawn cages only spawn when you are near them, and the mob can spawn there naturally - but is there a way to keep them spawning? I need the spawner to work when I am away.

I am playing a custom map and I have 2 mob spawners in which I have set up traps for. These traps lead to the same place, however both spawners are considerably far away from each other and therefore only one spawns at a time (when I am near).   I was wondering if there was some sort of way to "mimic" a player position without a player actually being there. What I would usually do is start up another computer and simply open it to LAN and have another account be somewhere next to the spawner, however I was wondering if there was a way to not have to do this? Is this possible? Are there any mods that allow this?


Let $(x_n)$ be a sequence of real numbers.  Prove that if there exists $x$ such that every subsequence $(x_{n_k})$ of $(x_n)$ has a convergent (sub-)subsequence $(x_{n_{k_l}})$ to $x$, then the original sequence $(x_n)$ itself converges to $x$ .              Thanks for any help.

Is the following true? Let $x_n$ be a sequence with the following property: Every subsequence of $x_n$ has a further subsequence which converges to $x$. Then the sequence $x_n$ converges to $x$.  I guess that it is true but I am not sure how to prove this.


Could someone kindly tell me if the following picture illustrate a LaTeX font? If yes, what font is it? It looks like the characters are more dense and thicker (which is what I want) compared to a normal LaTeX font. Thanks in advance.

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


I am trying to find the closing event of the browser. whenever the browser is close I need to clear the local storage value. also the local storage value didn't clear when the browser/tab is refresh.   this is for javascript.  window.onbeforeunload = function (e) {       window.onunload = function () {         localStorage.removeItem('sessionTime');     }      return undefined; };   When I am using the above code "sessionTime" local storage value was clear when I refresh the tab/browser. I need to clear the local storage only when I close the browser.

When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event. When we close the browser (X on right top icon),It will trigger ONUNLOAD event. Now when ONUNLOAD event is triggered, there is no way to distinguish between refresh the page or close the browser.   If you have any solution then give me.


Our handicapped users really cannot live without this extension:  Gnome 3 Addon:    Just as DashToDock will be adopted into the new Ubuntu, can we please do the same for this extension? The extra space it saves for using a web browser (the pixels at the top of the screen being merged into the top Gnome 3 bar) is really important for our work on small screens. (This will help my handicapped staff members as well)  Can anyone help for this? (I attached a photo using Fedora, but Ubuntu is the same way with it will be released with Gnome3).

Where can I send feature requests? Both for Ubuntu as a whole and individual (supported) apps?


Is there a valid antisymmetrized two-electron wavefunction which is not an entangled state i.e. writable as a product of a state of the first particle and a state of the second particle? If the answer is YES, an example will be sufficient.

Aren't the states of two identical particles always entangled even if they are not interacting? The states of two identical particles are either symmetric or antisymmetric i.e., cannot be written as product states.


I'm using Windows 10 in english with a pt-br keyboard, but sometimes it randomly adds an US keyboard in my tray area input list. The input doesn't show in my configurations -> input list, as show in the image below:   This just annoys a bit when I cycle through the languages, but doesn't seem to affect anything else. And it appears to be random, sometimes I log in and there's no US keyboard, only my PTB2 one. What could be causing this?

I have 2 languages installed on my computer, both with a single input method.  I have 2 keyboards: CES-CSQ and ENG-US.    However lately (maybe after the last Win10 update) I started to see 2 additional keyboards in my systray  - namely CES-CS and ENG-CSQ.    Is there there a way to remove those 2 input options (CES-CS, ENG-CSQ) which I do not see in the Control panel's Language options?  Solution described at  question does not apply to my problem because I do not see input options that I want remove in Control panel's Language options.


I am comfortable with the idea that 'pure energy' cannot be observed, only different forms in which it manifests. I can also understand that matter-antimatter interactions result in fundamental particles that ultimately conserve energy. So forgive my amateur question, but is there any conception of what energy was like prior to the big bang?   It implicitly seems that it would still have existed as particles of some kind, but my understanding is there would have been no space for them to exist in. That leaves me in a position where it seems that it might have just been energy in a state that perhaps can't be observed in our universe, which seems eerily similar to the idea of what 'pure energy' might be. Is it conceived to have been in some undefinable state, or did it exist in a way similar to how it manifests in our observable universe?

Did spacetime start with the Big Bang?  I mean, was there any presence of this spacetime we are experiencing now before big bang? And could there be a presence/existence of any other space-time before the big bang?


Many monsters have access to the Action, teleport.  MM, various statblocks Teleport. The [creature] magically teleports, along with any equipment it is wearing or carrying, up to [distance] to an unoccupied space it can see.  It is known that spells that grant a teleportation effect target a point that the caster can see. Because a point is targeted, the caster would need not only sight of the destination, but also clear a line of effect per the spell rules in the PHB on casting spells.  PHB p. 204 A Clear Path to the Target To target something, you must have a clear path to it, so it can’t be behind total cover.  Are monsters that teleport using the above quoted Action required to have a clear line of effect to their destination?

Does the Wall of Force spell in 5e block teleportation? This does not seem to be addressed in the 5e spell description.


I simplified the inequality , but I didn't get anything that may seem useful.  I got   $$^\sum_{cyc} 4a^2b+8ab+4ab^2\le abc+ab+ac+ab+a+b+c+1$$

If $a$, $b$ and $c$ are real numbers such that $a^2+b^2+c^2=1$ , then how to prove that  $ \dfrac {b^2c^2}{1+a^2} +\dfrac {c^2a^2}{1+b^2}+\dfrac {a^2b^2}{1+c^2} \le \dfrac 14 $  ( don't apply Schur's inequality )? Thanks.


With looping I mean that the identity is returned after deriving a function $n$ times.  I know the following examples: n=1: $$f(x)= e^x = f'(x)  $$ n=2: $$f(x) = e^{-x} = f''(x) $$ n=4: $$ f(x) = \sin(x) = f''''(x)$$ with $$f''''(x) = f'''(\cos(x)) = f''(-\sin(x)) = f'(-\cos(x)) =\sin(x)$$  What about $n=3$ in particular? Do you know other loops that work?

Consider (non-trivial) functions that are their own nth derivatives.  For instance  $\frac{\mathrm{d}}{\mathrm{d}x} e^x = e^x$  $\frac{\mathrm{d}^2}{\mathrm{d}x^2} e^{-x} = e^{-x}$  $\frac{\mathrm{d}^3}{\mathrm{d}x^3} e^{\frac{-x}{2}}\sin(\frac{\sqrt{3}x}{2}) = e^{\frac{-x}{2}}\sin(\frac{\sqrt{3}x}{2})$  $\frac{\mathrm{d}^4}{\mathrm{d}x^4} \sin x = \sin x$  $\cdots$  Let $f_n(x)$ be the function that is it's own nth derivative.  I believe (but I'm not sure) for nonnegative integer $n$, this function can be written as the following infinite polynomial:  $f_n(x) = 1 + \cos(\frac{2\pi}{n})x + \cos(\frac{4\pi}{n})\frac{x^2}{2!} + \cos(\frac{6\pi}{n})\frac{x^3}{3!} + \cdots + \cos(\frac{2t\pi}{n})\frac{x^t}{t!} + \cdots$  Is there some sense in which this function can be extended to real n using fractional derivatives?  Would it then be possible to graph $z(n, x) = f_n(x)$, and would this function be smooth and continuous on both $n$ and $x$ axes?  Or would it have many discontinuities?


Could one explain  this?  Technically a kilogram (kg) is now defined: […] by taking the fixed numerical value of the Planck constant h to be 6.626 070 15 × 10–34 when expressed in the unit J s, which is equal to kg m2 s–1, where the metre and the second are defined in terms of c and ΔνCs.  Does that mean that 1 kg = 1 Planck constant? And what exactly is the new definition of the second and the meter?

The metrology world is currently in the middle of overhauling the definitions of the SI units to reflect the recent technological advances that enable us to get much more precise values for the fundamental constants of nature than were possible when the SI was drawn up. This has already happened to the second and the meter, which are defined in terms of a caesium transition and the speed of light, and it is being extended to the other units. Thus, in the new system, known as the ,     four of the SI base units, namely the kilogram, the ampere, the kelvin and the mole, will be redefined in terms of invariants of nature; the new definitions will be based on fixed numerical values of the Planck constant ($h$), the elementary charge ($e$), the Boltzmann constant ($k$), and the Avogadro constant ($N_A$), respectively.   The  gives more details, but it stops short of describing the recommended mises en pratique. For example, for the kilogram, the definition goes     The SI unit of mass, the kilogram         The kilogram, symbol kg, is the SI unit of mass; its magnitude is set by fixing the numerical value of the Planck constant to be exactly 6.626 069 57 10−34 when it is expressed in the SI unit for action J s = kg m2 s-1.         Thus we have the exact relation h = 6.626 069 57 10−34 kg m2 s-1 = 6.626 069 57 10−34 J s. Inverting this equation gives an exact expression for the kilogram in terms of the three defining constants $h$, $\Delta \nu$(133Cs)hfs and $c$:   $$ \mathrm{kg} =\left(\frac{h}{6.626 069 57\times10^{−34}}\right)\mathrm{m}^{2}\:\mathrm s^{-1} =1.475521\ldots\times 10^{40}\frac{h \Delta \nu\left(^{133}\mathrm{Cs}\right)_\mathrm{hfs}}{c^2} $$   The Planck constant is a constant of nature, whose value may be expressed as    the product of a number and the unit joule second, where J s = kg m2 s-1. The effect of this definition is to define the unit kg m2 s-1 (the unit of both the physical quantities action and angular momentum), and thus together with the definitions of the second and the metre this leads to a definition of the unit of mass expressed in terms of the value of the Planck constant $h$.      Note that macroscopic masses can be measured in terms of $h$, using the    Josephson and quantum-Hall effects together with the watt balance apparatus,    or in terms of the mass of a silicon atom, which is accurately known in terms    of $h$ using the x-ray crystal density approach.   However, the brochure is pretty scant as to what the specific realizations through watt balances actually imply in terms of a route from measured physical quantities to values of fundamental constants or to inferred masses. For the specific case of the watt balance, for example, the physical constants at play are much more naturally the  and  constants, $K_J=2e/h$ and $R_K=h/e^2$, if I understand correctly, so there is some re-shuffling of experimental results to be done.  The SI brochure is similarly vague for the other three base unit / fundamental constant pairs.  This brings me, then, to my specific questions. For each of these four base unit / fundamental constant pairs,   what are the proposed experimental realizations, what are the basics of their operation, and what physical effects do they rely on? what other fundamental constants are used to go from experimentally measured values to inferred parameters? (i.e. the meter depends on the second. Does the kilogram depend on the value of the electric charge?) what specific natural constants are measured by the experiment, and how are they reshuffled to obtain final results?   Additionally, what is the dependency tree between the different definitions of the base units? What units depend on what others, either directly or indirectly?


My txt entry for my domain is as follows:  "v=spf1 a ip4:aspmx.googlemail.com ptr:aspmx.googlemail.com include:aspmx.googlemail.com -all"  I have also tried to use ptr in addition to a. However, I'm not sure I fully understand the difference between them. PTR seems to do a reverse lookup on the domain, whereas A simply references the A record in the zone file? The header response from Gmail is:  Received-SPF: unknown (google.com: domain of do-not-reply@example.com uses a mechanism not recognized by this client. unknown  mechanisms: )) Authentication-Results: mx.google.com; spf=permerror (google.com: domain of do-not-reply@example.com uses a mechanism not recognized by this client. unknown  mechanisms: )) smtp.mail=do-not-reply@example.com; dkim=neutral (no key) header.i=@example.com

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


doing this in bash script ./Execute_program > MyOutput I get a log file from the output, however this causes the output not to be displayed on the terminal screen. Is there any way to do the same but at the same time the output can be displayed on the screen?

Okay. If I wanted to redirect the output of a program to a file, I'd do something like this  prog > file   If I wanted to redirect both stdout and stderr to that file, then I'd do  prog > file 2>&1   This is all well and good if you want the output to go to the file. But what if you want the output to go to the file and yet still go to stdout/stderr? So, the output is saved in the file, but you can still see it on the console as the program is running. Is there a way to do that? And if so, how?


I want to list my host server's history commands time.  I know use the export HISTTIMEFORMAT="[%Y.%m.%d %H:%M:%S]" in /etc/profile I can record the time in history, but if I want to list the command time before configured to /etc/profile.  Is there other method to find the command time? or a file changed times?

I just know that ls -t and ls -f give different sorting of files and subdirectories under a directory.   What are the differences between timestamp, modification time, and created time of a file? How to get and change these kinds of information by commands? In terms of what kind of information do people say a file is "newer" than the other? What kinds of information's change will not make the file different?   For example, I saw someone wrote:     By default, the rsync program only looks to see if the files are different in size and timestamp. It doesn't care which file is newer, if it is different, it gets overwritten. You can pass the '--update' flag to rsync which will cause it to skip files on the destination if they are newer than the file on the source, but only so long as they are the same type of file. What this means is that if, for example, the source file is a regular file and the destination is a symlink, the destination file will be overwritten, regardless of timestamp.   On a side note, does the file type here mean only regular file and simlink, not the type such as pdf, jpg, htm, txt etc?


I know there is a way to  from the app, but I cannot find a practical way to  follow the activity on the questions I favorited.  The only way I found was to type infavorites:mine into the search box and sort by active. But there is no way to bookmark a search, and repeatedly typing this search command on a small screen is no fun.   I understand not all desktop site features can be built into the app. But following the activity on my favorite questions is precisely the sort of things I'm likely to do from a mobile device.

I haven't been able to find my favorite questions in the official Stack Exchange Android app.  Looking at my accounts page gives nothing on them.


It's stupid how Snape didn't resist Nagini when Voldemort ordered Snape's death.

I do believe that Severus knew he was in danger in the Shrieking Shack. Harry even wondered if he sensed danger. Voldemort said to him,     I have thought long and hard, Severus… do you know why I have called you back from the battle?   If you put two and two together, Snape must have known that he was in danger. He must have known that the fight was almost over, because Dumbledore told him to tell Harry (indirectly) that he was a horcrux. He had orders, so why couldn’t he just disapparate into the castle?


sudo apt-get update Err:1 http://your.repo.domain/repository bionic InRelease   Could not resolve 'your.repo.domain' Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease                                                                                Hit:3 http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04 ./ InRelease                                                                                Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease            Err:16 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release   404  Not Found [IP: 2001:67c:1560:8008::15 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


module name: .  module version is: 7.x-1.0-alpha5  whenever i try to add relationship type or edit it give me this error:  Strict warning: Only variables should be passed by reference in theme_user_relationship_implications_form_table() (line 103 of C:\wamp\www\drupal\modules\user_relationships\user_relationship_implications\user_relationship_implications.module). Strict warning: Only variables should be passed by reference in theme_user_relationship_implications_form_table() (line 104 of C:\wamp\www\drupal\modules\user_relationships\user_relationship_implications\user_relationship_implications.module). Strict warning: Only variables should be passed by reference in theme_user_relationship_implications_form_table() (line 105 of C:\wamp\www\drupal\modules\user_relationships\user_relationship_implications\user_relationship_implications.module).   the code in user_relationship_implications.module is as follows:  function theme_user_relationship_implications_form_table($variables) { $form = $variables['form']; $headers = array(t('Relationship Type'), t('Strict'), t('Reverse')); $rows = array();  foreach ($form['opts'] as $rtid => $elements) { if (!is_numeric($rtid)) {   continue; } $rows[$rtid] = array(   drupal_render(array_shift($elements)),    drupal_render(array_shift($elements)),   drupal_render(array_shift($elements)), ); } return theme('table', array('header' => $headers, 'rows' => $rows)); }   in the above code line 103-105 is:  drupal_render(array_shift($elements)),  drupal_render(array_shift($elements)), drupal_render(array_shift($elements)),   Can you please help me solve the error and also bring to my knowledge why does this occur?

I get the following error:     Strict warning: Only variables should be passed by reference in include() (line 18 of /home/sites/dev/theparce/sites/all/themes/parce/block--block--3.tpl.php).   This is the block code which is causing that error.  if ($user_gallery) {   print render(node_show($user_gallery));  // Line 18   print drupal_render ($user_gallery_edit);  } else {   print drupal_render($user_gallery_new); }   Why do I get that error, even if I get all printed as expected?


I have a wall desk that hides away 2 power outlet on the wall.  How do I drill a grommet hole that is wide enough to run cables through and cover it with plastic wire cover.  What sort of tool do I need? Can this be done with a hand held electric drill and the right drill bit?

I have a computer setup that I would like to improve. My plan is to drill a hole through pretty much the MIDDLE of the desk in order to pass wires and make my overall setup look cleaner.   What I'd like to know is if I can drill a proper hole without damaging the desk when the table top is made of: particleboard, Ash veneer, Stain, Clear acrylic lacquer, Foil, Clear acrylic lacquer, and ABS plastic. To be specific, this is the .


I have had hard time to show that     $$G=\left<a,b,c : a^2=b^3=c^5=abc  \right>/\left< abc \right>$$ is a finite group.   I guess that $G=\mathbb{Z}_2*\mathbb{Z}_3*\mathbb{Z}_5$. Even in this situation, it is not clear if it is finite or not. Could anybody help me for this problem?  Thanks in advance!  Edit  :   Apparently, this question has been answered in . However, the answer given in the link used the property of triangle group which is not given in Dummit and Foote algebra. Since the prerequisite of the given problem is the Dummit and Foote's Algebra book, I think there should be another way to solve it. So.. does anybody know how to solve this in different way with the answer of given link?

Given the group $G = \langle a, b, c : a^2 = b^3 = c^5 = abc\rangle$, I want to show that $H = G / \langle abc\rangle$ is a finite group.   I tried to find a canonical form for elements of $H$. That didn't work. Then I tried to find a finite normal subgroup of $H$ of finite index, but this didn't work either. I'd be grateful if someone could show me a correct method to solve this problem.


I read recently that Cyclops' optic blasts don't produce heat. I found this very surprising. I watched X-Men: The Animated Series growing up, and re-watched it not that long ago as an adult. I definitely came away with the impression that he was shooting eye-lasers, which burnt and melted things.  Then, in X-Men: Apocalypse, Scott blasts apart a tree when asked to fire at an archery target. Xavier's favorite tree. I recall the tree burning, or at least glowing. But I can find neither a picture of the tree nor a clip of the scene to confirm my memory.   I believe there are other examples of this sort of thing occurring in other comics, shows, and movies. I'd appreciate additional examples, if anyone is aware of any. I'll add any more I come across.  So what's the deal? Do the blasts produce heat or not? If not, why was the tree burning?

They occupy the same universe so we have to assume the same physics apply. Iron Man's repulsor tech is described as an inertia-less one-way kinetic blast. At higher energy levels, it can can even disintegrate matter in front of it. Cyclops’ eye beams are described exactly the same way. Is there any place in comics or the animation where the two beams are shown to have different powers?


I ran across the following problem in my Advanced Calculus class:  For a fixed positive number $\beta$, find  $$\lim_{n\to \infty} \left[\frac {1^\beta + 2^\beta + \cdots + n^\beta} {n^{\beta + 1}}\right]$$  I tried manipulating the expression inside the limit but didn't come up with anything useful. I also noted that the numerator can be rewritten as  $$\sum_{i=1}^{n}i^\beta$$ which is a well-known formula with a closed form (Faulhaber's formula) but I don't fully understand that formula and we haven't talked about the Bernoulli numbers at all, so I think the author intended for the problem to be solved a different way. Any suggestions on how to tackle this would be much appreciated.

What is the result of the next limit:   $$ \lim_{n \to \infty} \frac{ \sum^n_{i=1} i^k}{n^{k+1}},\ k \in \mathbb{R} $$  Why (theorem)?


Hi my girlfriend works in Dubai and i ll be traveling there, so can i stay with her in a hotel? also can any one suggest good hotel to stay in dubai?

I'd wish to visit Dubai with my girlfriend, but after reading  and  I started to get a little worried about it. How should I book an hotel? Must I book two singles? Could it be a problem if we walk together in the city and go together to restaurants and malls without being married?


In indirect speech we generally backshift the tense. For ex - Direct speech : "I am the most powerful person." Indirect speech : "He said that he was the most powerful person."  What if someone reports like -  He denied the charges claiming that he is/was the most powerful person. So here which is correct- is or was ?  Thanks in advance.

In the sentence: "I didn't know she had a son,"   Can I say "I didn't know she has a son" instead, because he is a teenager now?  Or are both correct?


I am trying to add a Python script in a toolbox to discover the number of records of some shp files stored in a folder.  I wonder that the script works pretty good as stand-alone in the Python command line of ArcMap; but it returns an error when imported in a toolbox.  From the stand-alone script I changed only the workspace as arcpy.GetParameterAsText(0).  I am aware that the point should be somehow WHERE to print the results (I learned in the geoprocessing results(?)), as there is no command line; and I also tried to use AddMessage instruction instead of 'print', but unsuccessfully. This is the script imported in the toolbox:  >>> import arcpy #define workspace arcpy.env.workspace = arcpy.GetParameterAsText(0) #create a list of objects to loop through FC = arcpy.ListFeatureClasses() #loop throw every object for SingleFC in FC: #call function  count = arcpy.GetCount_management(SingleFC) #print results  print('{} has {} records'.format(SingleFC, count[0]))

I am looking to get a count on the polygonNieghbor and if it has polygons in it then I want to move to the next step MakeFeatureLayer. and If it doesn't have any features I would like it to finish.   Is there any other way to do this?      arcpy.GetCount_management(PolygonNeighbor_TableSelect) arcpy.AddMessage(arcpy.GetMessages())  if arcpy.GetCount_management(PolygonNeighbor_TableSelect) > 0:     arcpy.MakeFeatureLayer_management(MapUnitPolys, inFeatures_lyr)  else      print "done"


I am trying to use in DD-WRT iptables to block an ip range Ex: I want to block  iptables -I FORWARD -s 192.168.2.105-192.168.2.110 -j DROP   but it does not work.

How could I filter a single IP address or a range of IP addresses to prevent them from accessing my computer?  Examples:   Block 31.13.76.102 Block from 216.58.192.0 to 216.58.223.255 Block from 173.194.0.0 to 173.194.255.255 Block from 74.125.136.0 to 74.125.136.255   I would like to block them from accessing my computer without additionnal conditions.  I know that one can use iptables in this situation, but I am unaware of the exact syntax, how to make the changes permanent, and which command to run in order to launch the iptables service at startup. I also don't want to make mistakes that may break my access to the Internet.


I tried to return all python-scripts (textfiles) which contained both main() and plt.style.use somewhere within the file, i.e. not in the same line. I found some documentations like  explaining how to use logical operators with grep on single lines in textfiles, but nothing was mentioned regarding entire textfiles. What I tried out was the following: grep -Rinw /home/andylu/Desktop/Python/Scripts/ -e 'main()\|plt.style.use'  This command returned all textfiles which contained any of the terms like a logical OR. As a logical AND doesn't exist with grep, one could match any order per line of the multiple expressions as mentioned in :  grep -E 'Manager.*Sales|Sales.*Manager' employee.txt  This wouldn't help me either, because the terms I'm looking for are coded in different lines within the python-scripts, but must occur both in the same textfile to be relevant for me. These are the textfiles I would like to filter out and return in the console via grep, or whatever alternative tools.  OS: Lubuntu 20.04 LTS

I'm looking for a way to search files where two word instances exist in the same file.  I've been using the following to perform my searches up to this point:  find . -exec grep -l "FIND ME" {} \;   The problem I'm running into is that if there isn't exactly one space that between "FIND" and "ME", the search result does not yield the file.  How do I adapt the former search string where both words "FIND" and "ME exist in a file as opposed to "FIND ME"?  I'm using AIX.


My codes are follows: \documentclass[]{book} \usepackage[natbib,authordate,backend=biber]{biblatex-chicago}% \makeatletter \AtEveryBibitem{\global\undef\bbx@lasthash}% \setlength{\bibhang}{5\p@}% \setlength{\bibitemsep}{3.5\p@}% %\setlength{\biblabelsep}{-10\p@}% \def\bibfont{\footnotesize}% %\setlength{\bibhang}{1cm} %%% \newlength{\bibleftadd}% \setlength{\bibleftadd}{-5\p@}% %% \defbibenvironment{bibliography}   {\vspace{-2\p@}\markboth{\bibname}{\bibname}\list%      {}%      {\setlength{\topsep}{\z@}\setlength{\leftmargin}{\bibhang}%       \setlength{\itemindent}{-\leftmargin}%       \addtolength{\leftmargin}{\bibleftadd}%       \setlength{\itemsep}{\bibitemsep}%       \setlength{\parsep}{\bibparsep}}}   {\endlist}   {\item} \makeatother  \addbibresource{test.bib}  \begin{document}  This is for test \citet{antibayes} and \citep{pijnacker2}  \chapter{Chapter 1} \end{document}  %%content of test.bib% @incollection{antibayes, Address = {The Press}, Author = {G. Author1 and K. Author2 and M. Author3}, Booktitle = {The {U}niversity}, Date-Added = {2014-02-06 15:25:25 +0100}, Date-Modified = {2014-02-06 15:28:59 +0100}, Editor = {M. Editor1 and P. Editor2}, Publisher = {The {U}niversity}, Title = {The {C}ognitive {I}nterface}, Year = {2021}}  @article{pijnacker2, Author = {J. Author4 and B. Author5 and M. Author6 and J. Author7 and P. Author8}, Date-Added = {2014-02-06 15:14:32 +0100}, Date-Modified = {2014-02-06 15:17:39 +0100}, Journal = {Journal of {T}ext}, Number = {2}, Pages = {471--480}, Title = {Study}, Volume = {23}, Year = {2010}}  And the output is:  I want to change the brackets from round to square, please advise how to fix this.... I meant the similar option which are available with natbib.sty by \setcitestyle{square} and \setcitestyle{round}...

I need to customize the author-year citation in biblatex for a template at work. Right now biblatex cites like this:     Ruschmeyer u. a. 1995, S. 123   They way I was told it needs to cite is:     [Ruschmeyer u. a. 1995, S. 123]   This seems pretty simple and I thought it would be done in a second, but after reading through the biblatex documentation for the second time, I still don't really have a clue.


I have managed to create a bizarre problem in my file system and I don't know how to recover. In my home directory I had a Dropbox folder and I decided to change the scope of the Dropbox folder to include my complete home folder as well as any home folders for other users on this system. Before starting this procedure I closed Dropbox.  The Dropbox folder contained directories that had been symlinked from the home directory as well as normal directories. I then started to move directories out from the Dropbox folder to the home directory. I successfully moved all but one folder. The last folder was truly bizarre. It had a file name of "~" only and was created about two months ago so I have no idea what managed to create it. If I do an ls on it I get the contents of the home directory. I have thus created a loop in the file system since since the Dropbox folder is a sub-folder of the home folder and the dropbox folder effectively contains the home folder as a sub-folder, meaning that I am unable to remove the Dropbox folder from the home folder as it is not empty.  What I would like to do remove the directory entry for the "~" folder from the Dropbox folder, using the command line, without removing the directory contents which are actually the contents of the home folder but I have no idea how to do this.

I managed to make a directory literally named ~.  (Apparently, Python's os.mkdir('~/something') does this.)  How do I remove it without nuking my home?  Also, if it helps, I have my real /home on a separate partition. And the duplicate ~ is located in (the real ) ~.


Is there any way to get broken hero swords easier, or multiply them

Some items in Terraria drop only very rarely from certain enemies. It's a pain having to farm so many enemies to try to get these rare items. Is there any way to make them drop more often?


I can't transform vertices, edges or faces without affecting the surrounding areas as well.

I created a thick glass bottle and duplicated the interior faces to make a new object to create the liquid inside.   I went in the edit mode, selected the faces I wanted to copy and duplicated them with ShiftD. Then I pressed P to  separate the duplicated faces.   Now I try to make a duplicate of that liquid to make it flow out of the bottle, and I simply need the duplicate of one face of it. So I go to edit mode and do as I did to make the liquid from the bottle faces... but as soon as I'm back to the object mode and I want to move the duplicated faces, every thing moves with it...   I played around and tried things, and while doing so I realized that if I dupe the liquid object in object mode using ShiftD and press 0 to place it where the original is, they move together if I duplicate it and place it somewhere else so that they are separated.   Also if I pick one of the two separated objects and make it intersect with the other one, release my left mouse button to place it there, and then try to move it again, they both move together, but not at the same speed.  I really don't understand what is going on and I'm sure it's really badly explained, so what I'll do is make a screen capture of my Outliner and record the behavior of the objects and upload those to help you understand.


I want to make a theorem's header stands in a separated line like (as style break in ntheorem)  Examples 1   (1) GL(n)   (2) SL(n)   I copied the solution from , but it doesn't work if I begin the theorem by  \begin{enumerate}.  \documentclass[12pt, a4paper]{amsart} %a minimal example \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \newtheoremstyle{mystyle}% name   {3pt}%Space above   {3pt}%Space below   {\normalfont}%Body font   {0pt}%Indent amount   {\itshape}% Theorem head font   {.}%Punctuation after theorem head   {\newline}%Space after theorem head 2   {}%Theorem head spec (can be left empty, meaning ‘normal’) \theoremstyle{mystyle} \newtheorem{exam}{Examples}  \begin{document} \begin{exam} \begin{enumerate} %If I begin with enumerate, the results are not good   \item $GL(n)$   \item $SL(n)$ \end{enumerate} \end{exam}  \begin{exam} Groups % if I begin with normal text, it works. \begin{enumerate}   \item $GL(n)$   \item $SL(n)$ \end{enumerate} \end{exam}  \end{document}

How can I suppress vertical space between a theorem head and an enumitem environment? I would like the output to look like version 3 below, but I hope there is an automatical solution without ~ and \vspace.  \documentclass{article} \usepackage{amsthm} \usepackage{enumitem} \newtheoremstyle{mythmstyle}% {0.5em}% space above {0.5em}% space below {}% body font {}% indent amount {\sffamily\bfseries}% head font {}% punctuation after head {\newline}% space after head {\thmname{#1}\ \thmnumber{#2}\ \thmnote{(#3)}}% head spec \theoremstyle{mythmstyle} \newtheorem{Theorem}{Theorem} \begin{document}  %% version 1: vertical spacing correct \begin{Theorem} Dummy text \begin{enumerate}[label=(\arabic*),leftmargin=*,align=left] \item Item 1: More dummy text \item Item 2: More dummy text \end{enumerate} \end{Theorem}  %% version 2: vertical spacing too large \begin{Theorem} ~ \begin{enumerate}[label=(\arabic*),leftmargin=*,align=left] \item Item 1: More dummy text \item Item 2: More dummy text \end{enumerate} \end{Theorem}  %% version 3: desirable output, but ugly solution via \vspace \begin{Theorem} ~\vspace{-1.4em} \begin{enumerate}[label=(\arabic*),leftmargin=*,align=left] \item Item 1: More dummy text \item Item 2: More dummy text \end{enumerate} \end{Theorem}  %% version 4: does it work with enumitem alone? (no, topsep seems to be ignored) \begin{Theorem} ~ \begin{enumerate}[label=(\arabic*),leftmargin=*,align=left, topsep=-1.4em] \item Item 1: More dummy text \item Item 2: More dummy text \end{enumerate} \end{Theorem} \end{document}


my solution is---->  NUMBER can be 777210 this i denote by aaabcd                 ------   this can be done in ---> 10*1*1*9*8*7*[6!/3!]                   {1 for a thrice}  NUMBER can be 772210 this i denote by aabbcd ------  this can be done in ------------> 10*1*9*1*8*7*[6!/(2!*2!)]            {1 for a and b }  and then multiply the answer by 0.9 to remove 0 case at unit place  but correct solution is  C(10, 4)* [C(4, 2)* 6!/(2!)2 + C(4, 1)* 6!/3!]  294840

How many 6-digit numbers contain exactly 4 different digits?  My approach is: For any 3 digis same and the remaining 3 different(aaabcd)  4*9*8*7*6  For any 2 duplicate digits(aabb) and the remaining 2 different (aabbcd)  9*8*7*6*3  But I don't know how to add cases where there can be 0's can be as any digit but not the initial ones.  Can someone please help me if there is any simpler approach?


Can anyone please provide me the proof of the following?  When a planet is made stop at its orbit supposed to be circular with time period $T$ around the sun then it will hit the sun after a time which is equal to the $\frac{\sqrt{2}}{8} T$.

If a planet was suddenly stopped in its orbit supposed to be circular, show that it would fall onto the sun in a time $\left( \frac { 1 }{ 4\sqrt { 2 }  }  \right) $ times its time period.   I am getting stuck with this problem. I have applied conservation of energy and I think it may solve it. Please help. Here's my research on the problem:   Firstly, ${ T }^{ 2 }=\frac { 4{ \pi  }^{ 2 }{ r }^{ 3 } }{ GM } $. Assuming $v$ to be the velocity of the planet at a distance $s$ from the sun, we get: $\frac { m{ v }^{ 2 } }{ 2 } +\left( \frac { -GMm }{ s }  \right) =-\frac { GMm }{ r } $, where $r$ is the radius of the planet's orbit.


So at some point in the new Doctor Who, The Doctor mentions that he would be able to sense whether or not there were any other Timelords across time and space. However, throughout the series, he doesn't sense any of these Timelords and part-Timelords:      The Master, Jenny, River Song, The Doctor-Donna, Rassilon and his council, etc.   Is there any reason for this besides "timey-wimey" or "Doctor Who has no canon"?  Also, can anyone give me the episode name and the exact quote?

So after it was established that Missy is actually both      the Master, and the "woman in the shop" who gave Clara the TARDIS number...   ...why didn't The Doctor or Clara recognize her right away? I remember the Tenth Doctor in The Sound of Drums stating that Timelords had a way of recognizing other Timelords no matter if they had regenerated. And Clara should have recognized her as well...  I'm hoping for a better explanation than "Moffat screwed up", and that I actually missed something after two watchthroughs of the episode.


I have two divs #apparatusSection and #firefighterSection  #apparatusSection is a static div but #firefighterSection is dynamically created when I click the Add Apparatus button. When i do this, the Add Firefighter button doesn't do anything as I presume it cannot read the dynamic div which was just created. The add apparatus works as expected. I can also get the add firefighter to work if I statically set up the div.  HTML:

             <button id="addApparatus" name="addApparatus" class="btn btn-primary">Add Apparatus</button>

   JQuery:      var countApp = 0;     var countFF = 0;     $(function () {         $('button#addApparatus').click(function () {             countApp += 1;             $('#apparatusSection').append(' \
 \
 \                          \
 \                             Apparatus \
 \                             <select id="apparatusID" name="apparatusID" class="form-control"> \                                 <option value="1">Option one</option> \                                 <option value="2">Option two</option> \                             </select> \
 \
 \                     <button id="addFirefighter" name="addFirefighter" class="btn btn-primary">Add Firefighter</button> \
 \
 \             ');         });     });      $(function () {         $('#apparatusSection').on('click', '.addFirefighter', function () {             countFF += 1;             $('#firefighterSection').append(' \                  \
 \                     FireFighter \
 \                     <select id="member" name="member" class="form-control"> \                         <option value="1">Option one</option> \                         <option value="2">Option two</option> \                     </select> \                     <input type="checkbox" name="firefighter" id="firefighter-0" value="Driver">Driver \                     <input type="checkbox" name="firefighter" id="firefighter-1" value="UBA">UBA \                     <input type="checkbox" name="firefighter" id="firefighter-2" value="Bott">#Bott \                     <input type="checkbox" name="firefighter" id="firefighter-3" value="WBA">WBA \                     <input type="checkbox" name="firefighter" id="firefighter-4" value="MFR1">MFR1 \                     <input type="checkbox" name="firefighter" id="firefighter-5" value="MFR2">MFR2 \                     <input type="checkbox" name="firefighter" id="firefighter-6" value="Pump">Pump \                     <input type="checkbox" name="firefighter" id="firefighter-7" value="SecOff">SecOff \                     <input type="checkbox" name="firefighter" id="firefighter-8" value="Casc">Casc \                     <input type="checkbox" name="firefighter" id="firefighter-9" value="AerO">Aer O \
 \
 \             ');         });     });   Any thoughts as to how to get my script to read the dynamically created div so i can add the multiple firefighters?

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


My car can go about 400 miles before it needs gas.   How far or long can Star Trek ships go between 'fill-ups'?  I seem to recall a couple times where the dilithium needed to be recrystallized, or they needed it or another element for some power system.  I thought dilithium wasn't really the source of energy (e.g. gasoline) but just what kept the reaction running smoothly (oil).

Assuming a Galaxy class starship were to work on a regular schedule (i.e. exploring, diplomatic missions etc. but NO battle), how long can it last before it has to return to a starbase for servicing?  I appreciate this may be difficult finding a series of episodes from TNG where the Enterprise-D does not battle between going to a Starbase, so, if it is absolutely necessary, battle can be included, but no major damage...


when i go into terminal and type in sudo apt-get update, the response is: E: Malformed line 64 in source list /etc/apt/sources.list (dist parse) E: Type ‘  can this be fixed?

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


How is $$\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}= \log 2?$$  I haven't done sequences in a long time, therefore proving this seems almost impossible. How is this sum gotten. Help very much appreciated.

I know that the harmonic series $$\sum_{k=1}^{\infty}\frac{1}{k}  = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \cdots + \frac{1}{n} + \cdots \tag{I}$$ diverges, but what about the alternating harmonic series   $$\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k}  = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \cdots + \frac{(-1)^{n+1}}{n} + \cdots \text{?} \tag{II}$$  Does it converge?   If so, what is its sum?


I am trying to show why the OLS estimator in time series models is not conditionally unbiased when using a zero-mean strong AR(1) model. From what I've read so far, this can be done through a Monte Carlo simulation as in ,, and . Is this the only way we can prove it?

I am trying to understand why OLS gives a biased estimator of an AR(1) process. Consider  $$ \begin{aligned} y_{t} &= \alpha + \beta y_{t-1} + \epsilon_{t}, \\ \epsilon_{t} &\stackrel{iid}{\sim} N(0,1). \end{aligned} $$ In this model, strict exogeneity is violated, i.e. $y_t$ and $\epsilon_t$ are correlated but $y_{t-1}$ and $\epsilon_t$ are uncorrelated. But if this is true, then why does the following simple derivation not hold? $$ \begin{aligned} \text{plim} \ \hat{\beta} &= \frac{\text{Cov}(y_{t},y_{t-1})}{\text{Var}(y_{t-1})} \\ &=\frac{\text{Cov}(\alpha + \beta y_{t-1}+\epsilon_{t}, y_{t-1})}{\text{Var}(y_{t-1})} \\ &= \beta+ \frac{\text{Cov}(\epsilon_{t}, y_{t-1})}{\text{Var}(y_{t-1})} \\ &=\beta.  \end{aligned} $$


The sentence is: It is important that he learn French. What is the rule or guideline that says to drop the "s"? I am tutoring a non-native English speaker.

Why is this sentence correct?     She suggested that he go to the cinema.   I would definitely use goes instead of go.


I'm an amateur photographer. I am an APS-C camera owner and I'm willing to upgrade to a FF body. There is a shop in my neighborhood offering a second-hand Canon Eos 6d for €1150, with a four-year warranty. I recognise is is a good bargain, though the camera has got 14000 shots.  Is the number of shots taken too high for the camera to be reliable? Could it affect perhaps image quality or durability of the camera?

When looking at used camera bodies, a question that comes up a lot, is "how many shutter actuations, or clicks, does it have?"   What I am wondering is, how many is too many. In other words, is there a reference for knowing when a sensor is more likely to go? How should I judge a camera body with 20000 vs 5000? Is that a significant difference, or is that not even relevant.  Obviously this might something that is dependent on model, so if there is some information based on model that would be even more interesting.  One of the guys at Canon Tech Support said that this is completely irrelevant for the Rebel series cameras, but he is obviously slightly biased. :)


I am new to the US banking system and it makes me wonder how easily third parties like xoom.com can withdraw money from your checking account with only the account number and routing number. I understand that somewhere in xoom.com toc and signup process I give permission for xoom.com to debit my account, but from the bank's end they do not do any validation. (In India, for auto debits most third parties would need you to submit a cancelled check to make sure the applicant is the account holder)   Can any other third party get hold of my account number and routing number alone and do transactions with that? If so, how easy is it to get it invalidated from the bank's side and get my money credited back to my account?

I'm managing the utility of the house and I'm sharing with another person. He asks me to provide my bank account number, so that he can transfer his money to my account when paying the utility.    I wonder if it is safe to give out my bank account number?   For example, if I'm correct, many online payments just need the account number to draw money out of it. Is giving out the bank account number safer than handing a check to another person, since there is also the account number printed on the check?


I currently try to use the following template    and I am having trouble using greek letter commands in siunitx (which I added to the template). Is there some conflict that I am not aware of? I appreciate any help.  Minimal example in template:  \documentclass[journal,article,submit,moreauthors,pdftex,10pt,a4paper]{Definitions/mdpi}  \usepackage{siunitx} \begin{document} \SI{1}{\tau} \end{document}   translates to   1 ø  I am using pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) on MacOs

When I use mathpazo and siunitx (version 2.3h) together, if I use \pi inside the numerical argument to \SI, it will show up in the output as "ß".  \documentclass{article} \usepackage{mathpazo, siunitx} \begin{document}     $\pi + \SI{\pi}{\ohm}$ \end{document}   Produces:    But when I don't use mathpazo:    Why does this happen and how can I fix it?