Why am I getting a "dubious ownership of file" error when Launch Agent runs my .plist file?

I have a Launch Agent configured to run a .plist file for example: /Library/LaunchAgent/foo.plist. Inside this .plist, it is set to run during LoginWindow and Aqua.  When I attempt to launch my computer and get to the login screen, this plist should run but instead gives the following error (in the console):     launchctl: Dubious ownership on file (skipping): /Library/LaunchAgents/foo.plist   When I attempt to login in to a non-admin account, it gives the exact same error message. When I attempt to login with an admin account, it works fine.  I'll be honest, I don't know much about Mac OS X privileges and permissions.  To create the file, I opened it up in emacs, with sudo on the admin account (e.g. by using the su command since the other account doesn't have sudo privileges) and then saved it.  Which account do I need to use to create the file so that it works for all users? Do I need to use the sudo command? Do I need to change the file permissions (e.g. use chmod)? Is there an easy way to take an existing file and change its ownership instead of having to recreate the file? Could someone please explain why this error happens?


How to Self-Study Higher Math Without Solutions

I've been lurking on this site for several months, and as someone studying higher mathematics independently (i.e., outside of a college/institutional setting), this forum has probably been the best reference for gleaning general information about college-level math.  However, recently I've come to realize that few of the major/popular math textbooks tend to have solutions to the exercises contained within them or available for free/online. As someone without access to a professor or peers who can check the accuracy of my answers, working through book solutions becomes very tedious. How do I know if I am getting the right answers and thus understanding the material? I know people are encouraged to post here for help with challenging problems, but it doesn't seem appropriate to post in a forum such as this to simply check the veracity of answers. In addition, certain books (e.g., Pugh's Real Mathematical Analysis) contain hundreds of exercises throughout the text, and it would be neither plausible nor acceptable to constantly ask for help with problem after problem for an entire textbook.  I am not in school nor do I plan to enroll anytime soon, so there's not really an option of waiting until college to talk things over with someone more knowledgeable about mathematics. I am learning math out of pure curiosity and not in preparation for future classes or career goals, and while there are a plethora of resources available to the independent student of mathematics now more than ever before, being able to assess how well the material is being absorbed remains a difficult obstacle to overcome.


Was Yachiru real or just Zaraki's spirit?

In the final arc of Bleach, we see Yachiru going to a severely wounded Zaraki Kenpachi and talking to him. She couldn't physically be there, and she talks as if she were Nozarashi's manifestation. Yachiru is also reported has having a unique shikai.    Is Yachiru just a manifestation of Zaraki's Zanpakuto? Or did she really exists, and due to their bond, Nozarashi's spirit took her shape? or was Zaraki just dillusional?


What is Dynamic Code Analysis?  How is it different from  (ie, what can it catch that can't be caught in static)?  I've heard of bounds checking and memory analysis - what are these?  What other things are checked using dynamic analysis?  -Adam


Word for obscuring bad or immoral acts with verbiage

I have been in many scenarios where people try to obscure/reduce the intensity of a seemingly bad or immoral act using grammar. E.g. Assuming Thomas killed a dog, you could hear something like:     There's essentially nothing wrong about palliating the miserable life   of a despondent being. If there was any issue here, I'd say it's not   consulting a veterinary doctor first but I've come to understand that some people are just straightforward.   How does one react to the above mumbo jumbo? I think there are similar situations also found in law courts. What can this be referred to as? Grammatification, obscure tactics?


I am experiencing DNS resolution issues. I can ping an I.P. on my LAN but when I type it's URL into my browser it does not resolve to the I.P. and I can't access the webpage.  I took a look at the resolv.conf file   vi /etc/resolv.conf   This shows me two entries:  nameserver 8.8.4.4 nameserver IP_ADDRESS_X   I logged into my router and found that there are 5 name servers listed:  127.0.0.1 8.8.4.4 8.8.8.8 IP_ADDRESS_Y IP_ADDRESS_Z   I can ping Google.com or ping Facebook.com etc... and everything works fine. I assume this is because of the 8.8.8.8 and 8.8.4.4 name-servers (i.e. I am able to resolve I.P's outside my local network.)  However, my issue pertains to a VM sitting on some server on my LAN. I can ping this VMs I.P. however I can not access it using it's URL in my browser.  I have also check checked the following files:  /etc/resolvconf/resolv.conf.d/head      nameserver 8.8.4.4  /etc/resolvconf/resolv.conf.d/tail      Empty  /etc/resolvconf/resolv.conf.d/base      Empty   The resolv.conf and resolv.conf.d bot contain comments which state " DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN"  The following describes my attempt at adding the five nameserver addresses found in my router to the resolv.conf file:  (1) vi /etc/resolvconf/resolv.conf.d/base  (2) Added the following I.P's      127.0.0.1     8.8.4.4     8.8.8.8     IP_ADDRESS_Y     IP_ADDRESS_Z  (3) Closed the file :wq  (4) Did a resolv.conf update      resolv.conf -u  (5)  Restarted the network-manager service      service network-manager restart   But when I check /etc/resolvconf/resolv.conf all I find is the original two I.P's:   nameserver 8.8.4.4  nameserver IP_ADDRESS_X   How can I update the resolv.conf file such that it will contain the I.P's of all the nameservers which are listed in my router?


I have a layer with many points on a country, for example, Peru, and I have done a grid grouping all the country. Each hole of the grid has an ID so it's easy to differentiate them. My idea is to set that ID for each point from the other layer that way I can work with all the point on the same hole. In SQL it would be to make a new column called 'ID_Hole' and write the grid ID, but I'm not getting it on QGIS.  Any idea about what should I do?  I attach a more explicative image  The point is obtained from a.csv where I can see the name of the settlement(city) and its located by latitude and longitude on the map.


Where are Cinnamon Desktop Themes Stored?

Background I have Ubuntu 16.04, with Cinnamon 3.2.2 Desktop. I am trying to install a new theme inside Cinnamon. In the Settings panel, I find themes, but when I try to install them I get a 404 error:  I tried looking up the themes online from the "More Info" link, and I can download a zip file. However, I don't know where to put it. Question Where do I put the themes that I have downloaded?


Blender Cycle .jpg texture not rendering properly

I made a calendar. I have .jpg texture that should be one page.   I just painted it with various colours because this is what it looks like in rendered view.    While .png texture works fine   The only thing I change in material setup is the image texture. Does anyone know what is happening here? It seems like blender has problems reading the .jpg or something.  EDIT: I did not post material setup, because it has nothing to with it 100%. Blender clearly has some issues with .png and .jpg formats.    I continued on my project and I came across another problem. Now I have this image, which is .png  Material setup is THE SAME, just texture to diff shader. This is what it looks like in viewport.   UVs are just faces covering the whole picture, like this:   But render looks ok, so I have no idea what is happening, I can work around it obviously, but it's strange at least :). Render:


What are some of the better English reference grammars?

What is your favorite English reference grammar, particularly in terms of accuracy and completeness? Please note: I am not asking for usage guides. What are the strengths and weaknesses of the best ones?


Group view by term without listing terms multiple times

I have a view of nodes where the nodes have terms that I want to group them by, but I want to list each term only once and have any node that has multiple terms, listed under each appropriate group. What I have been able to do is group the view by term, but if a node has multiple terms, I get a group that has both terms listed. For example, this is the results I'm getting currently:   Term 1 node1node2 Term 2 node3node4 Term 1, Term2 node5   I need it to look like:   Term 1 node1node2node5 Term 2 node3node4node5   Is there an easier way to accomplish this besides this:   This seems like the same problem I'm having, but I'm not experienced enough to understand this solution.


A while back in my Dynamics & Relativity lectures my lecturer mentioned that an object need not be accelerating relative to anything - he said it makes sense for an object to just be accelerating. Now, to me (and to my supervisor for this course), this sounds a little weird. An object's velocity is relative to the frame you're observing it in/from (right?), so where does this 'relativeness' go when we differentiate?   I am pretty sure that I'm just confused here or that I've somehow misheard/misunderstood the lecturer, so can someone please explain this to me.


convergence of $\sum_{n=1}^\infty \left[\frac{1}{n^s}+\frac{1}{s-1}\left\{\frac{1}{{(n+1)}^{s-1}}-\frac{1}{n^{s-1}}\right\}\right]$ (new methods)

The series $\sum_{n=1}^\infty \left[\frac{1}{n^s}+\frac{1}{s-1} \left\{ \frac{1}{{(n+1)}^{s-1}}-\frac{1}{n^{s-1}}\right\}\right]$ is said to converge when $0<s<1,$ which seems impossible, for $s-1<0,$ $\frac{1}{{(n+1)}^{s-1}}-\frac{1}{n^{s-1}}<0$, and so $$\sum_{n=1}^\infty \left[\frac{1}{n^s}+\frac{1}{s-1} \left\{ \frac{1}{{(n+1)}^{s-1}}-\frac{1}{n^{s-1}}\right\} \right]>\sum_{n=1}^\infty \frac{1}{n^s} \quad (>0),$$ which diverges. So is the series really convergent? PS: I would prefer a method without using integral. And this series is an example of a series whose ratio of nearby items tends to 1.


How do I pre-install Ubuntu for someone (OEM install)?

I would like to pre-install Ubuntu on a computer for someone. I may want to customize it for them, but in the end they need to be able to choose a username, password, etc. when they first boot it up. (Also called an OEM install).  How do I do this?


$\arctan (x) + \arctan(1/x) = \frac{\pi}{2}$

How can I show that $\arctan (x) + \arctan(1/x) =\frac{\pi}{2}$?   I tried to let $x = \tan(u)$. Then   $$ \arctan(\tan(u)) + \arctan(\tan(\frac{\pi}{2} - x)) = \frac{\pi}{2}$$  but it does not seem useful.      I'd appreciate most a proof that gives intuition and / or uses geometric   insight.


I still don’t understand how these sentences are interchanged

I eat too much = I eat food too much I eat too much food = I eat too much food  ‘Too much’ in the first sentence modifies a verb. ‘Too much’ in the second sentence modifies a noun. They have certainly different meanings, but how are ‘I eat too much’ and ‘I eat too much food’ able to be interchanged?


Is there a word for the satisfaction of finding what you were looking for?

Basically, Title. Is there any word for that feeling when you finally find what you've been looking for? Be it a definition for a word, or your long lost brother, or some rare bird.  Edit: To clarify, not necessarily a new discovery, but perhaps something lost, or that you know is out there, you just didn't know where until you found it. I guess it would be some variant of 'satisfaction'


How is gravity proportional to space-time curvature in the rubber-sheet analogy?

In General Relativity, Einstein established that gravity is due to the curvature produced by objects in space.  We all know that gravity is proportional to mass. The picture Einstein painted looks like this: The bigger the object, the bigger the curvature and hence the stronger gravity.  Let's say that the material inside the Earth is taken out and Earth is made less dense. Now the gravitational pull will be decreased according to Newton's formula due to reduction in mass.  But as per Einstein's picture the dimensions of curvature will be same, as the size of Earth is the same still and the gravity of Earth should not be altered.  I've pictured the scenario something like this:   Please clear up my confusion.


Confusion between register size, address size, data size

I started learning about pointers in C++ and I figured I should educate myself a bit on how memory works and is accessed. I read that when we say a processor is 64-bit, it has a 64-bit register and can access 2^64 address locations. I also read that it can fetch 64/8, so 8 bytes of data at a time, but the data bus is not the same thing as the register right? Do they need to be the same size or does that just happen to be the case usually? And is it the size of the register or the data bus size that determines what we refer to it as, such as 32/64-bit? Also is there a difference between register size and address size?


I was just curious for the proof/theorem for a very close decimal (so when you keep adding a decimal) to equal the next integer such as .999999999999....=1. Thank you.


I received the following exception when I was using the Regex class with the regular expression: (?'named a'asdf)  System.ArgumentException: parsing \"(?'named a'asdf)\" - Invalid group name: Group names must begin with a word character.   What is the problem with my regular expression?


What the heck is this invisible question and and answer post?

Sorry to cross-post this between here , but this is very strange and seems to be something larger than what SuperUser mods usually handle.  I honestly don’t know  to even link to it, but what the heck is this about?


#include <stdio.h> struct test {     unsigned int x;     long int y: 33;     unsigned int z; }; int main() {     struct test t;     printf("%d",sizeof(t));     return 0; }   output     24  size of long int is 8 byte but here it is taking 16 byte why?


Is it unreasonable to ask too many questions on Stack Overflow?

I find myself asking a lot of questions (like 500 or so over the past 5 years). Honestly, I feel like I abuse it. My backgroud though is that I code but I manage off-site developers in technologies that I'm not so familiar with.   Also, I often have to analyze something to see how well it would work in an environment (like today I've asked about 5 questions on Ember.js which I'm evaluating). I usually Google for an answer but often it's really difficult to find something that matches exactly what you're looking, especially when you don't have a deep understanding of the technology to start with. I guess my question is "Is this behavior ok?" Or is this really frowned upon?


\paragraph does not act as \section, the body text continues on the same line

Hi My \paragraph after \subsubsection does not act as a section, the text continues on the same line as title. Please help.


Test if the distribution of a discret sample came from a known distribution

Hello    I have a sample and I want to test if it is drawn from a discrete distribution (Binomal for example), I read that the KS test is more used, but as you know, the KS test can only be used for continious distribution.     I found a paper that solve this issue, the only problem is it's applicable only when the sample size is less then 30 ( and my sample size is greater than 30). Does anyone know how to perform the test? Thank you :)


How to download and where to save a style package

I´m new to Latex. I use Texmaker with Miktex and Texworks. I have to submit an article to the American Mathematical Monthly. I´d like to know, step-by-step how to download and where to save  the files I need to use a new package that is not stored. Concretely, I have to use a template from:    and from    I go to both urls but I don´t know what do after that. Both are the urls to which The Amercian MAthematical Monbthly send me to be able to use their template.  Thanks a lot.


What purpose does the 'Take Picture' function serve in the Far Cry 3 Camera?

The camera in Far Cry 3 is useful for tagging enemies from a distance but also includes the ability to take pictures.  This does not seem to do anything useful when used on animals or enemies.  Is there a purpose?


With a whole slew of new TLDs becoming available how will they affect SEO?   While I realize some of these domains are fairly general, such as .ninja others are very specific such as .dental and this leaves me curious as to how this new TLDs will ultimately affect SEO?


Should it be for example "product prices" or "products prices"

I don't know what are the correct terms for this question. Which form is correct for cases of multiple plural nouns, both should be plural or only the second one, for example:     product prices   or     products prices   or even maybe:     products' prices


Best way to have script start up for all users in Mountain Lion?

We are trying to have a simple drive mapping script start up for ALL users on a Mac Mini. What's the simplest way of going by doing this? I've tried creating a .plist in Lingon and adding it to the Library LauncherDaemons and LauncherAgents folders, but it's not starting up. Any ideas? Is there a way to do this in the Terminal? The script by itself works fine and works if we add it to the Startup Items in System Preferences, but we want this to be automatic and for all users.  Thanks.


Prove that $\frac{\sin(a)}{\sin(b)} < \frac{a}{b} < \frac{\tan(a)}{\tan(b)}$ where $0 < b < a < \frac{\pi}{2}$

Prove the following:     $\frac{\sin(a)}{\sin(b)} < \frac{a}{b} < \frac{\tan(a)}{\tan(b)}$ where $0 < b < a < \frac{\pi}{2}$   Hello everyone, I am trying to create some sort of function or maybe see an application of the mean value theorem, but I am just not getting it. Any help would be greatly appreciated!


How can I run a second user session from windows on my local screen (with Raspberry Pi)?

We hav geot only one computer at home that is working with enough power for streaming or other CPU-heavy things. It is down in the living room, so I had the Idea to crate another user session and let it run on my desktop in my room.  I have a reaspberry pi 3 and thought of a remote desktop connection, but that would mean that I connect to the same user that is already running downstairs, wouldn't it? I want to know how to make a remote desktop connecion and to connect to another user session runnign on the comuter dowstairs.


Remove duplicate arrays in multidimensional array in PHP

How can I remove duplicate arrays in a multidimensional array?  This is my original array with [1] and [2] being identical.  $array = Array (     [0] => Array         (             [0] => Walter             [1] => White         )      [1] => Array         (             [0] => Marie             [1] => Schrader         )      [2] => Array         (             [0] => Marie             [1] => Schrader         )      [3] => Array         (             [0] => Hank             [1] => Schrader         )  )   What I like to achieve:  $array_without_duplicates = Array (     [0] => Array         (             [0] => Walter             [1] => White         )      [1] => Array         (             [0] => Marie             [1] => Schrader         )      [2] => Array         (             [0] => Hank             [1] => Schrader         )  )


What is the difference between "necessary" and "sufficient"?

What is the logical difference between something being necessary in order for something else to be true; as opposed to something being sufficient to make something else true.  i.e.  Fuel is sufficient to make an internal combustion engine run.  vs  Fuel is necessary to make an internal combustion engine run.  and what are some subtle examples of how the difference between these two things can greatly impact the meaning of a sentence, discussion, or conclusion.


How to inner function variable can access outer function variable using closure in javascript

Inner function variable can access outer function variable, it is possible or not in java script.I am confusing for the closures.  function a(){ var x=10; console.log(x,y); return function b(){ var y=20; console.log(x,y); } }


Just started blender, following the donut tutorial. Using Blender 2.8. made another donut to practice, when adding Lights I can't find the 'Use Nodes' in the Light settings. Some help would be appreciated <3


What is the name of an 80s TV Movie where a man gains self-healing and endurance powers after a crash with a vehicle containing radioactive material?

What is the name of an 80s TV movie where a man acquires endurance powers and quick self-healing ability after a crash with a vehicle containing radioactive material?


What is "usernoted" and why is it eating my CPU?

For the past couple of weeks, a process identified as usernoted appeared to "take over" my machine after a few hours of use, eating over 99% of available CPU.  Force quitting the process doesn't help; only a system restart puts usernoted to sleep for a while.  What is this process and how do I get it under control?  I am running OS X 10.10.5 (build 14F1021).


There's a great question on , and there's even a question on , but the question I'm after:  Question: Where can one sell those blasted Dragon Bones and Scales? Is there a list of merchants that will buy them?  Edit: I'm not looking for just a vendor, but preferably a list of vendors (as I've collected about 25 of the them). The ultimate answer would also have an indication of (approximate) amount of gold available on the merchant.  After some searching I found  on the Skyrim Wiki, but that doesn't answer my question. The  gives a little bit of info on selling them, but no clue on where to sell them.  My follower would certainly be very thankful for any answer to this question, as she's probably getting tired of hauling this loot around...


How do I protect front-end javaScript code from being stolen?  I have an underscore, jQuery, and Backbone application.  It is a prototype and doesn't have many users and the back-end code is pretty trivial.  Hence any value is in the front end code.  How can I protect this code from being stolen/cloned.  Is minifying enough?  There are tools such as beautify that can be used to un-minify the code, but is this something that can be used to steal code?  What is best practice to protect front-end JavaScript code?


how to subtract a constant value from a data file?


Travel in the Schengen area with a residence permit but no passport

We live in Germany and have residence permits (Aufenthaltstitel). Unfortunately, my wife lost her national passport. She applied for a new one, the process will take about three months.  Now, we need to travel to Spain. I am aware that the residence permit itself is not sufficient to travel even within the EU. This is sometimes checked by the airline companies.  My question is: if we decide to go for it (flying to Spain with the residence permit and copy of the passport only), what are the possible consequences?    She is denied boarding the flight from Germany. That only means she doesn't go anywhere. She is denied boarding on our way back. This is more problematic, but we could try to book the next flight to check out luck. Otherwise, we can go back by train/car. She is controlled by police (be it Spanish or German on our way back). Here I'm not sure what happens. In theory, she can easily prove her ID (residence permit + scan of the pass), but in the worst case, what will happen? Will she be deported to Germany or to her home country?   The most important question is, will she be able to come back to Germany and is there any risk that she loses her residence permit?


Hopefully this not to frivolous to ask, I have wondered it for years. There is a strange pattern in the differences between various power.   For example if you square the numbers from one to ten the difference between each square is the odds numbers. Similar patterns exist in the powers through 6 (and I assume all of them).   I attached an example of what I mean. Does anyone know why this occurs. For each higher power the pattern moves one to the "right"


How can I install qTox on (k)ubuntu 17.04?

I tried to compile qTox, but nothing to do.   I tried using , but they are only for uTox, not qTox.  Could you help me?


How to prove that $\lim_{h\to 0} \, \frac{e^h-1}{h}$

when I try to show that the derivative of exp function is  $$\frac{\partial e^t}{\partial t}=e^t$$ I need to prove firstly that this limit is equal to 1.  $$\lim_{h\to 0} \, \frac{e^h-1}{h}=1$$  If you try to use L'Hospital's rule then you need firstly to know what is the derivative of exp function that we want to prove it.  If you want to use approximation of $e^\epsilon \simeq1+\epsilon$ you well found the answer '$1$' but I don't want to use this approximation because it based on the Taylor series that required also to know the derivative of exp function that we don't have it yet   The only way that I can prove it, is with the definition of $e$ number  $$ \lim_{x\to\infty}\left(1+\frac{1}{x}\right)^x=e $$ so I ask if there are another way to show this limit.


Polynomial in $\mathbb{Q}[x]$ with root $\sqrt[3]{2}+\sqrt[3]{3}$

What is a polynomial $P(x)\in \mathbb{Q}[x]$ with root $\sqrt[3]{2}+\sqrt[3]{3}$?   I write $x=\sqrt[3]{2}+\sqrt[3]{3}$, so $(x-\sqrt[3]{2})^3=3$, but the expansion of the left side contains two cube roots again. What can we do?


Consider this MWE:  \documentclass[a4paper]{article}  \usepackage{graphicx} \usepackage[dvips]{hyperref} \usepackage[noabbrev,nameinlink]{cleveref}  \begin{document} \section{Abc} \begin{figure} \label{fig:a} \centering \rule{20mm}{20mm} \caption{abc} \end{figure} In \cref{fig:a} $\ldots$ \end{document}   From this example you expect an expansion of the sentence      In \cref{fig:a} $\ldots$   into      In Figure 1 ...   however on my system this compiles to either ?? (for unknown reference) or gets a chapter, section or subsection 1 reference depending on other labels used in the text. However other types of cref references like references to a table, section, listing, etc work as expected even when used with other classes and compilers. Is this a bug in cleveref, are there solutions, or is their an error in my setup?


In the following example conversation, what will be the best way to ask if the given resources help the person?  Example conversation:     John: Hey Joe, I need to improve my chess, please help.   Joe: Hello John, please check these links:  and .   Let me know if [those, they, that] help(s).   Thanks!


How to install google gadgets on Ubuntu 14.04?

I've been looking for a way to make my desktop more interactive and I found two packages:   google-gadgets-gtk screenlets   After reading a bit about both I decided to give google gadgets a go. However, to my surprise, they're not in Ubuntu Software Center anymore. It seems the blog post I read was written around Ubuntu 10..  I've googled for it, and did not find any tutorial metioning how to install google gadgets on Ubuntu 14.04 Trusty Tahr.  Is there a reason they are no longer in software center? Are they no longer maintained or something like that?  Is there a way to get them up and running on Ubuntu 14.04?


"add/show X comments" link on mobile scrolls, zooms and opens keyboard

On the mobile-web version of Stack Exchange sites, clicking the "add / show X more comments" link always zooms the "new comment" field into focus and opens the keyboard.  It also scrolls the page towards the top a bit so the new comments appear off the bottom of the screen.  Most of the time, when clicking on that link, I just want to read the hidden comments.  It's annoying when I have to dismiss the keyboard, zoom out and scroll back.  It should simply reveal the new comments and the keyboard should not show up unless I decide to tap inside the "new comment" field.  This is observed with the latest version of Mobile Safari in the latest iOS, although it's likely an issue on all mobile devices whenever the mobile version is displayed.    EDIT:  This question was closed with this reason:     "This question has been asked before and already has an answer. If those answers do not fully address your question, please edit this question to explain how it is different or ask a new question."   However, the original question does not already have an answer with a solution nor even an explanation.  like mine.  I don't dispute that I accidently posted the same complaint.  However, based on the wording of the closed reason, it would seem to imply that duplicates are allowed in situations when the original does "not fully address" the question.


How can I update my existing world map in Minecraft?

I've been playing on a world since 1.6.4 and I have quite a bit of stuff built up (a massive subway network, a castle, a huge village, etc) and I don't want to start a new map, but I haven't seen anything from the new updates.  No horses, painted deserts, or nary a new flower anywhere to be seen.  Is there a way to update my world map so that it'll include the new stuff into it?  I'm playing single player locally.  Thanks!


Python: the result of (8%3) is 2 but (-8%3) is 1. shouldn't it be -2? and why?

Here is the proof:  -8 == -2 * 3 - 2   that means -8%3 should be equal to -2.  but python returns 1 and it's driving me crazy


What scrutiny to expect if making large purchase with physical cash?

I tried googling this but most answers that came up were regarding "cash" as bank deposits that a check is normally issued against.  Not "cash-cash" or physical cash, as a bunch of bank notes.  Say one were to buy a $200K home or a $40K car in the U.S. but wished to pay in physical cash.  Is it even legal past a certain amount?  What kind of scrutiny can (s)he expect from regulatory agencies, IRS etc. if such a transaction surfaces up?


Is it possible to define the width/height of a Terminal window with this command: osascript -e \'tell application "Terminal" to do script

I am using this command to do some magic for my personal use:  osascript -e \'tell application "Terminal" to do script   Is it possible to precisely define the width and height of the popup Terminal window?  If not, is there anyway I can do it after it's opened? (Precisely adjust its size value)


The Legend of the stackexchange.com/sites grid view

The  represents the set of sites via an intriguing arrangement of squares of varying size and color when using the default "grid" view.  But a legend for the layout has not been found. ![enter image description here][1] [1]: http://i.stack.imgur.com/fw3tj.png A previous question here () established that the order is determined by the site creation date, shifted by the  as needed for the layout.  It also clarifies that the sizes are hard-coded based on some officially "fuzzy" relationship to site traffic and "Jin's whims".  Assuming this is a misspelling of Jinn / Djinn / Genie, I take this to be confirmation that magic is involved :) It prompts this follow-up question:  What determines the color of site boxes? When did the grid view make its debut? When will the legend be revealed in its proper place, for all to see?  Thanks to @BenLee for supplying the image that my title yearned for :)


Convergence of $\sum_{n=1}^{\infty}{\sqrt[n]{n}-1 \over n}$

I am trying to conclude about the convergence of $$\sum_{n=1}^{\infty}{\sqrt[n]{n}-1 \over n}$$ If I take ${\sqrt[n]{{\sqrt[n]{n}-1 \over n}}}= {\sqrt[n]{\sqrt[n]{n}-1} \over \sqrt[n]{n}}$ this looks like it converges to $0$ but I am suspicious about the numerator. At the same time, other techniques I know like the ratio test, $n(\sqrt[n]{n}-1)$ and comparisons don't yield meaningful results. Any hints?


So, I'm having a really difficult time trying to evaluate the following integral via contour integration (please, no other methods):  $$\int_0^\infty{\frac{\log{(x^2+1)}}{1+x^2}} dx$$  Obviously, we're going to have branch cuts at z= +/- i which extend to infinity, and I'm having trouble coming up with a nice contour to evaluate this.  I already tried a double keyhole contour and split up the logarithm function, but this does not recover the real function I'm trying to evaluate.  Could anyone please provide some insight?


apt-get problem while installing , removing and updating

I tried to install ZTE's software for mobile broadband but it got error while installing itself.  Now I was ok with the network-manager which itself detects my USB modem. But, everytime while installing or removing or updating, I'm seeing this.  Actually here, I'm trying to remove crossplatformui which is part of ZTE: software:  sudo apt-get --purge remove crossplatformui Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED:  crossplatformui  0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.  1 not fully installed or removed.  After this operation, 0 B of additional disk space will be used.  Do you want to continue [Y/n]? y  (Reading database ... 480896 files and directories currently installed.)  Removing crossplatformui ...  ztemtvcdromd: no process found  dpkg: error processing crossplatformui (--remove):    subprocess installed post-removal script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: crossplatformui E: Sub-process /usr/bin/dpkg returned an error code (1)   Can anyone help me how to remove that crossplatform?  And can anyone give me a simple idea to auto reconnect my USB modem to Internet?


Number of ways an answers sheet can be fill with at least two consecutive answers?

A student is taking a $12$-question multiple choice test. Each question has $5$ choices. How many ways can the student fill out the answer sheet so there is at least one place where two consecutive answers are the same?  This is what I did:  Total possible ways the student can fill the answer sheet: $5^{12}$ (because he has $5$ options in the $12$ questions).  Total possible ways the student can fill the answer sheet with no consecutive answers: $5 \cdot 4^{11}$ (In the first question he can answer any of the $5$ options, however, in the remaining questions he can only answer $4$ options to avoid choosing consecutive answers.)  Total possible ways the student can fill the answer sheet with at least two consecutive answers: $5^{12}- 5 \cdot 4^{11} = 223,169,105$.  I doubt about the total possible ways the student can fill the answer sheet with no consecutive answers... is my logic right?


How do I attach an event listener to a dynamically added input?

I'm trying to assign functionality to some buttons that have been added from an object. I'm hoping to have all the functions inside the object too but I'm not sure if this is possible. The functions should fire when I click the buttons, but they're being called when I click the button that adds them. I've tried assigning the buttons an ID each and then trying to add the event listener afterwards, but I get the same result, naming the functions and various other things, but nothing has helped. var event = {   TQ1: {     title: "Title Here",     body: "Lorem ipsum dolor sit",     options: {       opt1: {         text: "Pick option 1",         effect: function() {           alert("Option 1 picked");         }       },       opt2: {         text: "Pick option 2",         effect: function() {           alert("Option 2 picked");         }       }     }   } };  function newEvent() {     $("#eventTitle").text(event.TQ1.title);   $("#eventBody").text(event.TQ1.body);   $("#eventOptions input").remove();   addOptions(); //This is where the buttons are added.    function addOptions() {     var i;     for (i in event.TQ1.options) {       console.log(event.TQ1.options[i]);       var newButton = $('<input/>').attr({         id: i,         type: "button",         class: "btn btn-secondary optionButton",         value: event.TQ1.options[i].text,         onclick: event.TQ1.options[i].effect(),       });       $("#eventOptions").append(newButton);       }     }   }  Thanks in advance for any help.


Travel to Macau from Hong Kong Airport via Ferry

I am travelling to Macau with friends. We land at Hong Kong. Will we need to get any kind of visa for Hong Kong (Indian Nationals require PAR/ Visa) if we want to directly transit to Macau via the ferry?


How to match any string that's not a specific string in regex?

Imagine a string "Hello World".  The regular expression for that is "Hello World".  In my regular expression class, I was told that a complement of a regular expression is a regular expression.  Say I want to check that a string doesn't contain Hello World. How do I do so?  I can do that for one character  [^a] for example will match anything that's not the letter a  How to do so for longer strings?  What's the equivalent of ^ for a string with length more than 1  Note: the other questions is not really a match.  In fact, one of the answer says that regular expression cannot really do this. Academically speaking academic regular expression CAN do this. It's complement.  I don't look for a look around. I look for complement.  For example. Say I am parsing html. Say I want to match the content of table. I want to match something between contentsome other table  Basically a pattern would be (not )  Now how would I do (not )?


Is the collection of finite subsets of $\mathbb{Z}$ countable?

The collection of all subsets of $\mathbb{Z}$ is uncountable, due to   But how can I prove that the collection of all finite subsets of $\mathbb{Z}$ is countable?


tmux select-pane -LDUR command - disable auto-cycling behavior

Is it possible to disable the behavior which causes selecting a pane on opposite side of a tmux window if there are no more panes left in a direction select-pane command was originally triggered at?  If not, is there a way how to determine if any other panes exist in a specific direction?  If a tmux window doesn't have a (v)split active window and a select-pane command is triggered, an error message is thrown - this is expected behavior.  Thank you for response


I tried to install a newer version of the python and associate with the /usr/bin folder. Hence, in the configure file of that newer version I modified initialization location from /usr/local to /usr.  When I tried to install python in that manner, the compilation failed during the "sudo make install command" . Now the python executable /usr/bin/python has some issues. When I use python executable it says "ImportError: No module named time". Is there a way to recover the python library?


What is going on with this Java array passed to a method?

I've learned that in Java, arrays are passed by reference, meaning that they can be modified within functions. However, I recently came across this piece of code that confused me, because it seems to show inconsistent behavior. import java.io.*; import java.util.*;  public class TestProgram {      public static void fMethod(int[] f){         f[0] = 9;         f[1] = 7;         f = new int[4];     }      public static void main(String[] args){         int[] fParam = new int[3];         fMethod(fParam);         System.out.println(Arrays.toString(fParam)); // prints [9, 7, 0]     } }  Because the function fMethod() seems to reset f to a new int[4] at the end, I expected to see [0, 0, 0, 0] printed to the console. However, it seems that only the f[0] = 9 and the f[1] = 7 lines were actually executed, while the last line was ignored. I find this strange. Can somebody please point me in the right direction?


Difference between "much, many, a lot of and lots of"  What is the difference between them?  Are they synonyms or not?


Have new line between paragraphs, no indentation

Possible Duplicate:          I am sure that this must be a dup, but I can't find the right keywords to search for.  So I am posting.    Right now my latex paragraphs look like this:  The paragraph does not start out with an indent.  But when you make a new  paragraph there is an indent.        This is a new paragraph.  Can  you see the indent?        This is another paragraph.    I would like to have no indenting but and an empty line between paragraphs. This is what I am using to remove the indents:  \setlength{\parindent}{0}   But I am not sure how to add in new lines.  I think it is something like this:  \setlength{\parskip}{1}   Happy Canada Day!


In the following code, the Month Variable is always entering the else statement block.What changes do i need to make for it to run correctly?

Action performed here and the month is always executed with the else condition.  public void actionPerformed(ActionEvent e) {     tmonthin.setText((((JComboBox) e.getSource()).getSelectedItem()             .toString()) + "   ");     Month = tmonthin.getText();     System.out.println(Month);     System.out.println("aby");     int n;     System.out.println(Month);     if (Month.equals("March") || "January".equals(Month)             || "May".equals(Month) || Month == "July" || Month == "August"             || Month == "October" || Month == "December") {         System.out.println("abd");         n = 31;     } else if (Month == "February") {         n = 28;     } else {         System.out.println("bnbn");         n = 30;     } }


Pass parameters to constructor when using System.Type.newInstance()

I have created an Apex InterfaceFactory that the user can use to get an instance of a specified implementation of an interface. For this I use the System.Type class. The actual name of the class can be set in a custom setting. I wanted to be able to pass some parameters to the constructor of the dynamically instantiated class. In short; this is the code I'm talking about:  public static MyInterface GetMyInterfaceImplementationByClassName(String settingName){     String implementationClassName;     Type t;     MyInterface implementation = null;      //get the actual class name from the custom setting     Interface_Implementations__c settings = Interface_Implementations__c.getInstance(settingName);      //just make sure there actually is a className found     if (settings != null && settings.Class__c != null) {         implementationClassName = settings.Class__c;         //get the type object for the class name retrieved from the custom setting         t = Type.forName(implementationClassName);         //this line is where my question comes in; how can I pass parameters here         implementation = (MyInterface)t.newInstance();     }      return implementation; }


Why doesn't a \foreach variable work in \draw in an \axis?

I'm finding some weird behavior with TikZ's \foreach within an \begin{axis} environment.  This works:  \foreach \x in {-2,-1,...,2} {   \addplot[thick, domain=0.05+(\x*2-1)*pi/2:+(\x*2+1)*pi/2-0.05] (x, {tan(deg(x))});  }   but this doesn't:  \foreach \x in {-2,-1,...,2} {   \draw (\x,-5) -- (\x,5); }   It gives the error  ! Undefined control sequence. <argument> \x                ,-5 l.771     \end{axis}   Here's the really weird part: it only fails when the axis has defined bounds. For example, here's a MWE that works (but doesn't draw anything):  \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}   \begin{axis} % [ ymin=-3, ymax=3, xmin=-5, xmax=5]     \foreach \q in {-2,-1,...,2} {       \draw (axis cs: \q,-5) -- (axis cs: \q,5);     }   \end{axis} \end{tikzpicture} \end{document}   but removing the comment causes it to fail.  Why is this and how can I prevent it?  (My end goal is to draw five segments of the tangent function and their verical symptotes.)


Make "who flagged this" data available to moderators for chat offensive flags

This has been , but never got a response. I'm bringing it up again (rather than simply reusing the last post which is effectively dead now) for a number of reasons, including that lack of response and the fact that there have been a few recent occasions where seeing this data would have made a significant difference in effective chat moderation.  Currently, there are two types of chat flag: offensive flags, and mod flags. On mod flags, moderators can see all the data about them: what message they were cast against, what the flag says, and who cast the flag. On offensive flags, we see only what 10k users see - which is only which message the flag was cast against.  It's a pretty well accepted fact that chat moderation is... not all it could be, shall we say. Well, this would make an improvement: there have been a number of cases that I've seen in my tenure of spam-spam-flagging (i.e. spamming spam/offensive flags). These events disrupt rooms by bringing in a Mjolnir of mods, and a plethora of 10k chat users from all over the network, all trying to get at the flags and (sometimes) have a dig at the room where they're cast.  Allowing mods to see who cast the flag would enable us to stop these cases in their tracks - we've got the tools to do it, but we don't know who to use them on.


What do I call an extra word or phrase that is habitually added but means nothing?

Some local dialects add phrases or words that add no meaning to the sentence or question.    Minnesota speakers add 'now'. 'Who was that guy died in Duluth, now ?' Irish speakers add 'so I am/was/etc'. 'I'm going to be on telly, so I am.' Jewish speakers add 'already'. 'I'm single; so get over it, already.' Scots add 'd'ye ken (know)'. 'He died yesterday, d'ye ken.'   What do I call these little snippets of language that are added, locally ?  I don't accept that they can be called 'catch phrases', which are individual, not a part of a local dialect.


Any software to resume a copy of a huge file when there is network disconnection?

I would like to know if there is a software for Windows which allows me to copy a huge file from a remote desktop network to my local PC, and if this copy gets interrupted, I would like to resume the copy process. I have tried Teracopy but its Resume feature does not work when network connection gets interrupted.  This is the scenario:   I connect to a remote computer using Remote desktop, sharing a local drive, so the remote computer can see my shared drive (such as U:) On the remote computer I want to copy the remote file to the shared drive (U:). Local computer has Windows 8, remote computer has Windows 2003 There is no internet connection available in remote computer   The problem:    connection is really slow from remote computer and when there is a disconnection, I cannot resume the copy process   is there a software which offers a resume feature to avoid copying the whole file again from scratch?


How can I reflect a transparent background?

I'd like to make a glossy surface which reflects objects above it, but that also reflects a transparent background in the final render.  So in effect, the final render would contain only the reflections, not the surface itself.  Is this possible please?


This suggests, as a shortcut notation, the concept of lowering indices; from any vector we can construct a (0, 1) tensor defined by contraction with the metric: $$A_\nu ≡ g_{\mu\nu}A^\mu$$  so that the dot product becomes $$g_{\mu\nu}A^\mu B^\nu = A_\nu B^\nu$$  We also define the inverse metric $g^{\mu\nu}$ as the matrix inverse of the metric tensor: $$g^{\mu\nu}g_{\nu\rho} = δ^\mu_\rho$$  where $δ^\mu_\rho$ is the (spacetime) Kronecker delta. (Convince yourself that this expression really does correspond to matrix multiplication.) Then we have the ability to raise indices: $$A^\mu = g^{\mu\nu}A_\nu$$ Note that raising an index on the metric yields the Kronecker delta, so we have $$g^{\mu\nu}g_{\mu\nu} = δ^\mu_\mu = 4$$  I don't understand why $δ^\mu_\mu = 4$. Shouldn't it equal 1?


How is /etc/default/grub generated during installation?

I'm currently working on a project that needs kernel boot parameters added during a custom adapted Ubuntu installer (based on 14.04.3).  I know that   they belong into GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. one can add configuration files to /etc/default/grub.d in order to influence the generation of /etc/default/grub. the default grub seems to be available as /usr/share/grub/default/grub. grub-mkconfig then takes the scripts from /etc/grub.d and settings from /etc/default/grub and generates /boot/grub/grub.cfg.   My current problem is the following: Two of my packages and mdadm place files into /etc/default/grub.d, all of them altering GRUB_CMDLINE_LINUX_DEFAULT. But for some reason, one of my files gets ignored. And I can't really find when or by what /etc/default/grub is created initially created or how I could regenerate it.


Error message + Ubuntu Software Center down

I'm new to Ubuntu, and despite all what I could read, I cannot find, or I'm just unable, to fix my problem.   In the upper right corner of the screen I have a "stop" sign, that says:      An error occured. Please run Package Manager from the right-click menu or run apt-get in a     > terminal to see what is wrong. The error message was:   'Unknown error: '<class 'SystemError'>  > (E:Malformed line 57 in source list/etc/apt/sources.list(dist parse))'.   This usually means     > that your installed packages have unmet dependencies"    When I run "Apt-get", here is what I have:   girouxn@girouxn-ThinkPad-X220:~$ apt-get apt 1.0.1ubuntu2 for amd64 compiled on Oct 28 2014 20:55:14 Usage: apt-get [options] command        apt-get [options] install|remove pkg1 [pkg2 ...]        apt-get [options] source pkg1 [pkg2 ...]  apt-get is a simple command line interface for downloading and installing packages. The most frequently used commands are update and install.  Commands:    update - Retrieve new lists of packages    upgrade - Perform an upgrade    install - Install new packages (pkg is libc6 not libc6.deb)    remove - Remove packages    autoremove - Remove automatically all unused packages    purge - Remove packages and config files    source - Download source archives    build-dep - Configure build-dependencies for source packages    dist-upgrade - Distribution upgrade, see apt-get(8)    dselect-upgrade - Follow dselect selections    clean - Erase downloaded archive files    autoclean - Erase old downloaded archive files    check - Verify that there are no broken dependencies    changelog - Download and display the changelog for the given package    download - Download the binary package into the current directory  Options:   -h  This help text.   -q  Loggable output - no progress indicator   -qq No output except for errors   -d  Download only - do NOT install or unpack archives   -s  No-act. Perform ordering simulation   -y  Assume Yes to all queries and do not prompt   -f  Attempt to correct a system with broken dependencies in place   -m  Attempt to continue if archives are unlocatable   -u  Show a list of upgraded packages as well   -b  Build the source package after fetching it   -V  Show verbose version numbers   -c=? Read this configuration file   -o=? Set an arbitrary configuration option, e.g. -o dir::cache=/tmp  See the apt-get(8), sources.list(5) and apt.conf(5) manual  pages for more information and options.                   This APT has Super Cow Powers.  girouxn@girouxn-ThinkPad-X220:~$   On top of this, when I open Ubuntu Software Center, it opens blank for 1 second and closes right away.   Can a good soul please help me understand and fix this issue?   Thank you very much,  Nicolas    Extra info / responses  thanks for the answers. @Steeldriver: here is how my line 57 looks like:  deb http://archive.canonical.com/ partner   What is wrong with it?   @Mikolaj: here is what I get, I think it just confirms my error:  girouxn@girouxn-ThinkPad-X220:~$ sudo apt-get clean [sudo] password for girouxn: girouxn@girouxn-ThinkPad-X220:~$ sudo apt-get -f install Reading package lists... Error! E: Malformed line 57 in source list /etc/apt/sources.list (dist parse) E: The list of sources could not be read. E: The package lists or status file could not be parsed or opened. girouxn@girouxn-ThinkPad-X220:~$ ^C girouxn@girouxn-ThinkPad-X220:~$    Do you guys see something wrong in my line 57?


blurred background effect with my canon eos 70d with 18-55 mm lens

How do I take a picture with a blurred background with my canon eos 70D using the 18-55 mm lens


I want to say that:  There exists a subset $X$ of $\mathbb{N}$ for which $|X|$ $= 5$.  Can someone explain to me why one would choice either of these three forms over the other ones?   ($\exists$$X$)(($X \subseteq$ $\mathbb{N}$)($|X| = 5$))   "There exists a $X$ such that $X$ is a subset of the natural numbers such that its cardinality is equal to 5."   ($\exists$$X$)(($X \subseteq$ $\mathbb{N}$) $\implies$ ($|X| = 5$))   "There exists a $X$ such that $X$ is a subset of the natural numbers implies that its cardinality is equal to 5."   ($\exists$$X$)(($X \subseteq$ $\mathbb{N}$) $\land$ ($|X| = 5$))   "There exists a $X$ such that $X$ is a subset of the natural numbers and that its cardinality is equal to 5."


If a series converges, then the sequence of terms converges to $0$.

Following the guidelines suggested in , I am going to post a proposed proof as an answer to the theorem below. I believe the proof works, but would appreciate any needed corrections.  Theorem If a series $\sum_{n=1}^{\infty}a_n$ of real numbers converges then $\lim_{n \to \infty}a_n = 0$


reload the mainActivity by using a dialog from another class

I'm new and learning android studio and understanding it more, but I'm stuck here. I can't reload my mainActivity using a button in a different class which has a custom Dialog. I've searched many solutions but none of them work, it always end up 'NullPointerException' error. Can anyone please help me understand this problem more.  this is my mainAcitivity  `  public class MainActivity extends AppCompatActivity {  DialogHandler dialogHandler; Context mainContext; Dialog dialog; @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      mainContext = this;     dialog = new Dialog(this);     dialogHandler = new DialogHandler(MainActivity.this);      Button showButton = (Button) findViewById(R.id.showButton);      showButton.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             dialogHandler.showDialog(mainContext);         }     }); }   `  and this is my second class (DialogHandler)  '  public class DialogHandler {    Activity activity;    MainActivity mainActivity;    Dialog dialog;  public DialogHandler (Activity activity) {     this.activity = activity; }  public void showDialog (Context context) {     mainActivity = new MainActivity();     dialog = new Dialog(context);       dialog.setContentView(R.layout.activity_dialog);     dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));     dialog.show();      Button changeButton = dialog.findViewById(R.id.changeButton);      changeButton.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             mainActivity.finish();             mainActivity.startActivity(mainActivity.getIntent()); // error occurs this line         }     }); }   } '  This is my error  '  E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.dialogpractice, PID: 30511 java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.ActivityThread$ApplicationThread android.app.ActivityThread.getApplicationThread()' on a null object reference     at android.app.Activity.startActivityForResult(Activity.java:3843)     at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)     at android.app.Activity.startActivityForResult(Activity.java:3804)     at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)     at android.app.Activity.startActivity(Activity.java:4114)     at android.app.Activity.startActivity(Activity.java:4082)     at com.example.dialogpractice.DialogHandler$1.onClick(DialogHandler.java:41)     at android.view.View.performClick(View.java:4781)     at android.view.View$PerformClick.run(View.java:19907)     at android.os.Handler.handleCallback(Handler.java:739)     at android.os.Handler.dispatchMessage(Handler.java:95)     at android.os.Looper.loop(Looper.java:160)     at android.app.ActivityThread.main(ActivityThread.java:5541)     at java.lang.reflect.Method.invoke(Native Method)     at java.lang.reflect.Method.invoke(Method.java:372)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)   '


Android java - Can someone let me know what should I read to understand this code?

I am new to ANDROID DEVELOPMENT. I learnt java before jumping in to Android. I see this code in a book and I am stumped.  How does this even work?  I get the part that the setbutton method of progressDialog class is receiving parameters.  But the 3rd parameter is a class? I though new keyword is used to create a new type (a class). how is that a method (.OnClickListener) is being referenced when the class is being created on top of all, there is another method(onClick) being created inside it. Obviously, there is something in java I am not aware of. Can someone tell me if there is a tutorial on this concept in java? I am not worried about a button being created and being clicked on. I am talking about the concept of this programming used in here.   Thank you so much.  progressDialog.setButton(DialogInterface.BUTTON_POSITIVE, “OK”,     new DialogInterface.OnClickListener() {         public void onClick(DialogInterface dialog,int whichButton)         {             Toast.makeText(getBaseContext(),“OK clicked!”,                  Toast.LENGTH_SHORT).show();         } });


I have recently falled into an  because I didn't use % when I was supposed to. My question is now: When do I have to use % at the end of the line and when should I leave it out?


Roaming around terminals at Dubai intl' Airport(DXB)

I'm flying a flydubai to DXB terminal 2. My flight arrives and leaves from terminal 2. I wanted to ask if I could go around to other terminals since terminal 2 is disappointing... I heard you're restricted etc... That's why I'm asking.


Image Texture Node : separate image file as a socket - to make it more reusable - in Eevee

I have a shader node tree like this.  It works well even in Eevee.  ^ All of the yellow circles use the same image file. This is inconvenient when I want to :-  change the file later create a reusable node group that have image file as input e.g. to create an awesome blur/high-pass node  How to split the file-text-box to an input socket? I wish for something like :-  Edit (reason to reopen this question) :-  A duplicate question and answer suggested by Gorgious Timaroberts♦ () forces me to use OSL.  Unfortunately, OSL is currently not supported by GPU-rendering / Eevee at all.      Thus, such solution has heavy negative impact on rendering/preview time.  How to solve the problem without negative impact on rendering/preview time?    Moreover, I still want to achieve it in Eevee.


I came across one of my mother's cookbooks from 1954.  A lot of the baked goods call for "1 cake of yeast".  What would be the equivalent of this in today's supermarket?


What does "hit me like a two-by-four" mean?

What does this sentence mean?     This observation hit me like a two-by-four   .


What happens if my order exceeds the bid or ask sizes?

What will happen if my order exceeds the bid or ask size? For example, if the bid or ask is 100 shares, but I want to buy 100,000 shares, is it possible to do so?


No Badge Progress color for Golden Badges?

Update #2: Seems that it was my secondary screen the one that didn't show the color! Tried with another screen and I could see the progress clearer... perhaps a stronger color will make it easier to see across different devices?  Update: Seems to be an issue in Firefox, as I tried on Chrome and the progress is visible.    I just noticed that the badge progress on your user profile had it's style changed (don't know when but it seems that recently).  However, seems that the progress of gold badges is not working properly. If we see the Bronze and Silver badges, they are "filled with color" as you progress on the badge, however golden ones are not colored (just the border).   Here a picture illustrating what I say:    Is there a reason for this behavior?


how to remove the end newline characters using c++?

I have a string which contains some newline character in the end. I am wondering how I could remove the new char using c++. The new line can be \r\n or \n


"You have starred and pinned this message"—no I haven't

When I click the dropdown arrow from the transcript next to , I see:  However, I've only starred it, and the message isn't pinned at all:  I can reproduce this for any message that I've starred.


How do you define JavaScript functions?   For example:  string.doSomething(); // OR element.getSomeInfo();   I couldn't find anything on this, but maybe that's because it has a name I don't know.  EDIT.  About four years later, let me rephrase this question to explain what I meant. I didn't know about objects, but essentially my question was "How do I define a function as a property of an object?". I wasn't necessarily differentiating between extending native Javascript classes (which is a bad idea) and just defining my own object with functions as properties.  So, to answer my own question, these are some different ways to do that:  let foo = {     bar: x=>1/x; }   so that, for example, foo.bar(4) returns .25. Another one:  function Rocket(speed){     this.speed = speed;     this.launch = ()=>{         this.speed = 'super fast and upwards';     } }   So now one could define let Apollo = new Rocket('standing still'); and call Apollo.launch();  We can additionally extend such classes (including native ones) by  Rocket.prototype.stop = function(){     this.speed = 'Standing still'; }   and then call it using Apollo.stop();.


Trying to evaluate $\prod_{k=1}^{n-1}(1-e^{2k\pi i/n})$ for my complex analysis homework

For my complex analysis homework, I am trying to show that the integral of the real function $1/(1+x^n)$, for integer $n\ge2$, along the positive real line is $$\int_0^{\infty}\frac{dx}{1+x^n} = \frac{\pi}{n\sin(\pi/n)}.$$ The suggested approach is to consider the contour integral $$\int_{\gamma}f(z)dz = \int_{\gamma}\frac{dz}{1+z^n},$$ where $\gamma$ is a contour construced such that it traverses all of the positive real line, but only a single simple pole is included. So I started out by factoring the polynomial in the denominator, which has (distinct) roots $\omega_k=\exp(i[\pi+2k\pi]/n)$, so that $1+z^n=(z-\omega_0)(z-\omega_1)\cdots(z-\omega_{n-1})$. Using this, I attempt to find the residue at $z=\omega_0$ (which is the single pole included in $\gamma$ by construction) by $$\text{Res}_{\omega_0}f=\lim_{z\rightarrow\omega_0}\frac{1}{(z-\omega_0)\cdots(z-\omega_{n-1})}(z-\omega_0)= \frac{1}{(\omega_0-\omega_1)\cdots(\omega_0-\omega_{n-1})}.$$  I have found that for every $(\omega_0-\omega_k)=\exp(i\pi/n)-\exp(i\pi/n+2k\pi i/n)$, I can extract an $\omega_0$ from the $\omega_k$, yielding $(\omega_0-\omega_k)=\exp(i\pi/n)[1-\exp(2k\pi i/n)]$ such that we are left with $$\text{Res}_{\omega_0}f=\frac{1}{\prod_{k=1}^{n-1} e^{i\pi/n}[1-e^{2k\pi i/n}]}=\frac{1}{e^{i\pi(n-1)/n}\prod_{k=1}^{n-1} \left(1 - e^{2k\pi i /n}\right)}.$$  Now, since I know the final answer, I strongly believe that  $$\prod_{k=1}^{n-1}(1-e^{2k\pi i/n} )=n,$$ but I am having a very hard time trying to evaluate this product. Any pointers would be greatly appreciated.


why reading from `/dev/random` put `1;2c` character behind the cursor?

when I run command dd if=/dev/random count=1 bs=32 I get some random junk binary data but after receiving them, there is still some characters (as I see always 1;2c) after termination of dd process. [amirreza@localhost ~]$ dd if=/dev/random count=1 bs=32 ¾¿܄ÌYLÔAëEÔr/f&-È<>ýø1+0 records in 1+0 records out 32 bytes copied, 3.5878e-05 s, 892 kB/s ^[[?1;2c[amirreza@localhost ~]$ 1;2c  what is this character and why it's thrown after the termination of dd ?


I am trying to prove that the cardinality of P(N) (the set of all finite subsets in N) is equal to the cardinality of N.

Here, N refers to the set of all natural numbers, and P refers to the power set of N. Let the number of finite subsets be equal to F. I am having trouble representing the cardinality of the power set. :)


Minecraft Test If A Chest Contains An Item

I've seen a lot of questions for finding specific items in chests using commands using testforblock but how would you test if any block/item has been placed in a chest?  Thanks


So we have been given a table for the Maclaurin series of $\cos(x)$ but I'm not sure how to even start with this problem.    Here is the problem:  Use the Maclaurin series for $\cos(x)$to compute the value of $\cos(5^\circ)$ correct to five decimal places.  And we were giving the following hint:  Hints: Remember that the Maclaurin series assumes that the angle is in radians, not     degrees. Also, since the Maclaurin series for $\cos(x)$ is alternating and decreasing in     magnitude for small $x$, the error in using a partial sum of the series for the sum is less     than the first term in the series omitted.  Can you please help me to get started on this?


Yours sincerely or Your's sincerely which one is correct when yyandou write complimentary close and how?


How does password salt help against a rainbow table attack?

I'm having some trouble understanding the purpose of a salt to a password.  It's my understanding that the primary use is to hamper a rainbow table attack.  However, the methods I've seen to implement this don't seem to really make the problem harder.  I've seen many tutorials suggesting that the salt be used as the following:  $hash =  md5($salt.$password)   The reasoning being that the hash now maps not to the original password, but a combination of the password and the salt.  But say $salt=foo and $password=bar and $hash=3858f62230ac3c915f300c664312c63f.  Now somebody with a rainbow table could reverse the hash and come up with the input "foobar".  They could then try all combinations of passwords (f, fo, foo, ... oobar, obar, bar, ar, ar).  It might take a few more milliseconds to get the password, but not much else.  The other use I've seen is on my linux system.  In the /etc/shadow the hashed passwords are actually stored with the salt.  For example, a salt of "foo" and password of "bar" would hash to this: $1$foo$te5SBM.7C25fFDu6bIRbX1.  If a hacker somehow were able to get his hands on this file, I don't see what purpose the salt serves, since the reverse hash of te5SBM.7C25fFDu6bIRbX is known to contain "foo".  Thanks for any light anybody can shed on this.  EDIT:  Thanks for the help.  To summarize what I understand, the salt makes the hashed password more complex, thus making it much less likely to exist in a precomputed rainbow table.  What I misunderstood before was that I was assuming a rainbow table existed for ALL hashes.


Is there a fundamental reason that plants cannot fix their own nitrogen?

Plants must have nitrogen to grow. According to the answer to , there are no plants that can fix their own nitrogen (without the help of bacteria).  Plants get their nitrogen in the form of nitrates (NO3-) or ammonia (NH4+). Nitrates and ammonia get into the soil through    lightning (causing N2 and O2 to combine to form NO which then reacts with atmospheric water and is brought to earth by rain) nitrogen-fixing bacteria associated with leguminous plants fixed nitrogen from dead plants/animals (ammonification), urine, etc. ammonifying and other bacteria   The answer also states that it seems to be possible to engineer plants to be able to fix nitrogen.  So one could think plants could have evolved to be able to fix nitrogen, but did not.  Maybe it just did not happen based on it's probability to happen. Is there any other explanation?    Maybe the ability to fix nitrogen would have a harmful effect on plants? Or fixation requires a complex set of related mutations? Are there enough areas with soil depleted of nitrates to exert a selection pressure for nitrogen-fixing plants?


Does installing Ubuntu 16.04 in 10.04 system erases anything?

I would like to install Ubuntu 16.04, I already have 10.04,so is there a chance of my files being lost in installing Ubuntu 16.04 over 10.04?


I've attached an image below of artifacting that happens with 3D text when you push the 'depth' parameter to extremes.  The artifacts look as if a vertex on the letters has been pulled out really far resulting in large spikes. I want to understand why this is happening because  I would like to know how to fix this issue If I ever wanted to use this effect for stylistic purposes I want to know how to recreate it.   Thanks!


English speaker but this still gets me...     It is   Is this a complete sentence?


Sending Email using Gmail Api in dot net with Multiple gmail accounts and without using SMTP link, without port

I am looking for an example code or tutorial for sending Email through Gmail API. User is able to provide his gmail credentials and authorizing my app to access his compose email option. But from that point I don't know how to send email. I have got the messages and all the details but do not know how to link those with my project currently and for future use. Please read this before posting anything. Please note that using the gmail Host, smtp, port and working with less secure api is not required. As I am already using this for sending the email from single email address. I need the sample code which is using Gmail API to send the email of the account holder after authorizing the application. Note: This is not related to the simple codinging which are linked with smtp,http, post. Any help can be appreciated.


Extract Values from HTML via HTML parser

I initially asked about a way to use grep/awk directly from an HTML file. I got some feedback but I see that people did not have the whole HTML and so the solutions suggested failed.   Some have mentioned that HTML parsing would be a much better option. I work on Raspberry Pi with standard Linux/Debian Wheezy.  The HTML mentioned is found here, simple HTML...but I guess it's important to see the whole file to be able to help:    So what is required is to:   Extract the two values, Pplus and Pminus (18.0000 and 0.00000) and provide them, plus providing the SUM.  Both values come from a smart meter (energy meter) that provides the energy generated P- and energy/power taken from the network P+. P- in case of sun and solar plant working, so 18W is at night, 0.0000 means no generation as no sun, just to give you some background information.   I tried to update and ask for support in the original thread but seems that nobody's seen it again since there hasn't been any new feedback the last few days. This is my attempt now to bring this back to the experts here.


Error on sudo apt-get update, 404 Not Found

Upon entering sudo apt-get update in terminal, the following error is given:  Reading package lists... Done W: The repository 'http://dl.bintray.com/aluxian/deb stable Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://dl.bintray.com/aluxian/deb/dists/stable/main/binary-amd64/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.


Why does null == undefined evaluate to true?

I have a code below which is not clear to me  var a = null;  if(a==undefined) alert("true"); else  alert("false");   When I ran above code it alerts true.  Can anybody explain whats the reason or concept behind this?


Router to router setup via 49 meter long cat-6 cable

once again I am repeating my question, Reliance ISP--> connected with ADSL Modem-->connected with TPLINK Router (First Router)--->connected with second Router), Straight cable connected first router lan port is not recognizing to my lapotp as it has 49 meter long,   same thing is working brilliant when connected via Patch cord- 2mtr,   router setting is fine, as it works via patch cord


Solving a fractional inequality without trial and error

Find the smallest integer $n$ such that $\frac{11}{15}>\frac{m}{n}>\frac{7}{10}$ and $m$ is an integer. There are multiple ways to solve this problem. We can get rid of the fractions by multiplying by $30n$ and do casework, we can convert to decimals and do casework, heck, we can graph and do casework. I know that this problem is really simple, but I am just looking for a way to solve this problem without casework.


uk visa refusal ( add new documents will it help)

I applied for UK standard visit visa (6 months) for tourism and i got refused for some reason can be seen in the picture , can any one explain to me why i got refused and if the new documents i will provide will help ?  new provided documents  1-i bought a land and i will provide documents proving that. 2-i will add my father as a sponsor and will get a 6 month bank account statement for him and documents showing he owns his own pharmacy .   before applying for the first time i added 2000 pounds to my bank account , got my bank account statement then withdraw the money to convert it to pounds , should i add a letter about that?  there is about 3000 pound in my bank account and it can be noticed they are my pay check and no large deposits , i will added father bank account with( 2000 pounds to 3000 pounds) as a sponsor , will that be sufficient knowing i am staying for a week in uk?  Documents I applyed at first application  1-6 months bank statements 2- papers from my company proving I still work there  3-parentes house documents  4-document showing I am still with family not married or anything 5-fathe pharmacy papers  That's all I believe


I need to do a very simple terrain with texture map

I know nothing about Blender and I need to do a very simple 3D terrain with texture map.  I have a 1000 x 700 height map:   And I have a 1000 x 700 texture map:   And I want to combine them into a 3D model that I can view. I have done this before, about 8 years ago, in XNA but none of my old code will compile anymore under Visual Studio 2010.  I apologize that this is a very simple question. I'm not a CGI artist and I don't anything about Blender but I know that it can do this simple thing.  What are the steps to do this with Blender?  Thanks for posting the steps but I don't have Import -> images as planes. I just have this:   Am I in the wrong place? Thanks in advance!


The following code converts the float type  7.5 to an integer value 7, the remainder is lost. Here, the typecasting operator is int. I know it is valid typecast in C++.   int main() {         int i;         float f = 7.5;         i = (int) f; // Valid in C/C++ }   But another way to do the same thing in C/C++ is to use the functional notation preceding the expression to be converted by the type and enclosing the expression between parentheses:  i = int (f); // It is worked in C++ but not C   So, I have a question, Is it valid way to typecast in C++?


How does a Melee Spell Attack work if you are already touching your target (not fighting edition)

I recently asked this question about usage of a . although it's pretty must answered, I had a non-fighting situation in mind and ended up with several fighting situations answers.  So here I reiterate my question for a non-fighting situation : Can we get some kind of leverage from already touching or being in proximity of an eventual target?  Take this situation: You are a caster and you are in a parlay with a foe. Discussion goes pretty well and you keep talking and moving around while arguing as peacefully as possible. You get to a point where both you and your foe are now close to each other. You put your hand on his shoulder (or shake his hand) and your foe confesses an abominable betrayal. At that moment, you decide this parlay was useless and prefer to see your foe suffer rather than become your ally.  Since you are already touching you target, can you get any kind of advantage from the fact that you are already making a contact that would allow you to inflict the spell's effect on the target?


Using subcaption package but subfigures end up stacked rather than side by side

I'm trying to put two jpegs side by side using the subcaption package, but the images are consistently stacking on top of each other rather than side by side. All the solutions I've found simply state that the pictures have to be small enough to actually be side by side but I've tried making them smaller, too small even and they stay stacked. My code looks like this:  \begin{figure}[H] \centering \begin{subfigure}{0.5\textwidth} \centering     \includegraphics[width=0.3\linewidth]{inclusion.jpg}     \caption{inclusions}     \label{fig:inclu} \end{subfigure}  \begin{subfigure}{0.5\textwidth} \centering     \includegraphics[width=0.3\linewidth]{deform}     \caption{grain deformation}     \label{fig:deform} \end{subfigure} \caption{filler text} \label{fig:manmade} \end{figure}   Help would be greatly appreciated.


I have a set of files on which I would like to apply the same command and the output should contain the same name as the processed file but with a different extension.  Currently I am doing rename /my/data/Andrew.doc to /my/data/Andrew.txt I would like to do this for all the .doc files from the /my/data/ folder and to preserve the name.  I tried several versions but I guess I have something wrong in the syntax as I an new to linux.


I’m referring to the similar definitions of these four nouns – something raised and rounded.  Why do these four rhyming words have similar meanings?  I have not found very specific sources for these words on the  and . Hump is “probably from Dutch homp.” Rump is “from a Scandinavian source,” “from Old Norse rumpr” ultimately from Proto-Germanic “rumpo.” Lump is “perhaps from a Scandinavian source” and finally, Bump is “perhaps from Scandinavian,” “probably of North Germanic origin.”   Could these words come from the same root? Other than the fact that they all might come from northern Europe, the only hint I have in this direction is the following from , tracing the origin of Hump through Dutch, Middle Low German, Old Saxon and Proto-Germanic, to Proto-Indo-European *kumb-, *kumbʰ- (“curved”). Could this PIE root, which is not given in these online sources for any of the other three words, be a common root to all four words? I find myself looking at other –ump words and “seeing” a curved or rounded line: jump (a curved trajectory), grump (a downturned mouth), pump (the action of the pump handle), clump (a rounded clod of earth, not sharp), etc. Am I just seeing this because the words sound similar, or is there something more to my tendency? For example, the  suggests the origin of jump is "perhaps onomatopoeic (cf. bump)" although this view is not echoed on Wiktionary. Is it possible that these words do all share a common root and are simply onomatopoeic variations of each other? Are there other pairs or groups of words like these in English? (Wham! Bam! Ka-blam!) Does     this phenomenon have a name?


Are composite primary keys bad practice?

I want to know if composite primary keys are bad practice and if not, in which scenarios is their use beneficial? My question is based on this   Note the part about composite primary keys:  Bad Practice No. 6: Composite Primary Keys This is sort of a controversial point, since many database designers talk nowadays about using an integer ID auto-generated field as the primary key instead of a composite one defined by the combination of two or more fields. This is currently defined as the “best practice” and, personally, I tend to agree with it.  However, this is just a convention and, of course, DBEs allow the definition of composite primary keys, which many designers think are unavoidable. Therefore, as with redundancy, composite primary keys are a design decision. Beware, though, if your table with a composite primary key is expected to have millions of rows, the index controlling the composite key can grow up to a point where CRUD operation performance is very degraded. In that case, it is a lot better to use a simple integer ID primary key whose index will be compact enough and establish the necessary DBE constraints to maintain uniqueness.


Prove that if $X$ is Hausdorff, $\Delta$ is closed in $X\times X$

Prove that if $X$ is Hausdorff, $\Delta=\{(x, x)\mid x\in X\}$ is closed in $X\times X$ (with the product topology).  My attempt:  Let $x_1, x_2\in X$ s.t. $x_1\ne x_2$.  There exist neighborhoods $U_1$ and $U_2$ of $x_1$ and $x_2$ that are disjoint.  $U_1\times U_2$ is a basis element in the product topology on $X\times X$. So, $U_1\times U_2$ is open in $X\times X$.  Let $x\in X$.   $(x, x)\in U_1\times U_2\implies x\in U_1$ and $x\in U_2\implies x\in U_1\cap U_2$, which contradicts the fact that $U_1$ and $U_2$ are disjoint.  So, $(x, x)\notin U_1\times U_2$.  I feel that I'm on the right track but don't know how to proceed. Could someone please help me out?


NullPointerException with Graphics2D Translate

I'm not having any problems fixing this. I'm creating a game and I constructed a camera to follow a player when they are moving but when I use the method translate from the Graphics2D class I get a null pointer.  This problem doesn't happen all the time, sometimes when I run the game the error occurs?  All objects are created for Gr  Exception in thread "Thread-3" java.lang.NullPointerException at game.Game.render(Game.java:172) at game.Game.run(Game.java:126) at java.lang.Thread.run(Thread.java:745)   It's pointing at this line here.      g2d.translate(cam.getX(), cam.getY());     In my render method.      private void render() {     BufferStrategy bs = this.getBufferStrategy();     if (bs == null) {         this.createBufferStrategy(3);         return;     }      Graphics g = bs.getDrawGraphics();     Graphics2D g2d = (Graphics2D) g;       g.setColor(Color.BLACK);     g.fillRect(0, 0, WIDTH, HEIGHT);      g2d.translate(cam.getX(), cam.getY());            handler.render(g);      g2d.translate(-cam.getX(), -cam.getY());      if (gameState == STATE.GAME) {         hud.render(g);     } else if (gameState == STATE.MENU || gameState == STATE.HELP ||    gameState == STATE.END) {         menu.render(g);     }     g.dispose();     bs.show(); }   Any ideas?  cam is coming from this code:  public Game() {      tex = new Texture();      handler = new Handler();     hud = new HUD();     menu = new Menu(this, handler, hud);     this.addKeyListener(new KeyInput(handler));     this.addMouseListener(menu);      new Window(WIDTH, HEIGHT, "Let's Build A Game", this);      spawner = new Spawn(handler, hud);  //      loader = new BufferedImageLoader(); //      background = loader.loadImage("/level.png"); //       //      loadImageLevel(background);      cam = new Camera(0, 0);      if (gameState == STATE.MENU) {         handler.createMenuParticle();     } else {         handler.clearEnemies();     } }   This is the camera class I use.  public class Camera {  private float x, y;  public Camera(float x, float y) {     this.x = x;     this.y = y; }  public void tick(GameObject player) {     x = -player.getX() + (Game.WIDTH / 2);     y = -player.getY() + (Game.HEIGHT / 2); }  public float getX() {     return x; }  public void setX(float x) {     this.x = x; }  public float getY() {     return y; }  public void setY(float y) {     this.y = y; } }


How to show that $L^p$ spaces are nested?

Suppose $1<p_1<p_2<\infty$, then show $L^{p_1}[a,b] \supset L^{p_2}[a,b]$.  I was able to show $\|f\|_{p_1} \le \|f\|_{p_2} (b-a)^{1/p_1 - 1/p_2}$ but I'm not sure how to proceed from here.


Could you please explain me which option should I use?     I would like to have a green house with rare plants from all over the world. I could take care of them (myself / by myself)?   And why?


What is the sheet they attach in passport in tax-free shop?

So, I bought a laptop from Yodobashi Camera in Tokyo and since its a tax free shop, I got a discount of 8%(GST in Japan). However they attached a receipt in my passport showing the same. Why? Do I have to pay this amount when I return from Tokyo.   P. S- I'm from India, and we are allowed to bring back one laptop from abroad duty-free


Hypothesis testing on ratio of poisson means/rates with four parameters

I have two sets of count data, one with the application of drug and another without applying the drug. Let's assume the data at condition $1$ are $X_i^1$ and $X_j^1$. Similarly for condition $2$, the data is $X_i^2$ and $X_j^2$. Moreover we assume that the individual count data comes from a poisson distribution. So $X_i^1 \sim \lambda_i^1$, $X_j^1 \sim \lambda_j^1$, $X_i^2 \sim \lambda_i^2$, $X_j^2 \sim \lambda_j^2$. Now I frame my hypothesis as follows,  \begin{align} H_0 : \frac{\lambda_i^1}{\lambda_j^1} &= \frac{\lambda_i^2}{\lambda_j^2}  & H_1 : \frac{\lambda_i^1}{\lambda_j^1} & \neq \frac{\lambda_i^2}{\lambda_j^2} \end{align}  So the intuition is if the ratio of rates does not change across conditions then we accept the null hypothesis, otherwise we reject it. I am searching for a mathematical analysis on this framework, that is, what should be the estimates for $\lambda$ in this situation. Please let me know if there is any paper that explained it.


Can someone tell me how can I find all the subgroups of A4. I have the elements written down and I know there should be subgroups of order 2,3, 4 ( 6 is impossible ). I can't understand how to find the 3 and 4 order subgroups and I have surfed the internet but haven't ye found a satisfying answer.


I updated sudoers file with the following line sudo ALL=(ALL) NOPASSWD:/usr/bin/docker  after save the changes, I can't run any sudo command and I can't edit sudoers file I get the following error:  Sorry, user xxxx is not allowed to execute '/bin/bash' as root on xxxx.  How to fix the issue ?


deformation and displacement by a collison?

In an experiment by Emilie du chatelet metal balls were dropped from a height on a clay bed only to find that the displacement of the clay material was proportional to the square of velocity of the ball and the depression of the clay bed was linearly proportional to the velocity of the ball. Does depression here mean depth ?  Also Emilie reasoned the above facts by proposing that depression was due to potential energy and displacement due to kinetic energy ?  In an earlier experiment Willem Gravesande showed that the depth was proortional to square of velocity so it makes no sense to say that by depression emilie meant depth . Or was willems experiment proved false ?  In another incident newton says that the material displaces by the ball will depend on its momentum and it will essentially displace the same amout of material as equal to its mass.  Are all these above views contradictory to one another ?  And can you please say which of the above views for depth and material displaced are corret and please back it with a mathametical explanation ?


The Hatter secret hat is described below.   The Hatter        Post a question at a UTC time that has 00, 15 or 30 as minutes number, i.e. xx:00:xx, xx:15:xx or xx:30:xx. The question must have at least one upvote.   Why is it called The Hatter?  I cannot figure out the relevance of the name. From what I remember, it would make sense if it was granted at 6 PM. Is this 15/30 minute addition to deal with all possible Time Zones (15 minutes for Nepal?). In that case why is there no hat on the 45th minute -- for Nepal?


Desktop is restarting on any popup or tooltip

I updated the OS, after that every time I hover over any icon desktop is restarting, I tried to reinstall ubuntu-desktop, reinstalled unity, reinstalled compiz, nothing fixed it, this is the error logs:  [ 1579.610892] compiz[4943]: segfault at 0 ip 00007f6718b14eb6 sp 00007ffdcb440830 error 4 in i965_dri   .so[7f6718532000+82d000]


I just can't beat the Reaper on Rannoch in ME3

I have read all the tips and I just can't do this particular mission.  I am really looking for some kind of save game editor to allow you to finish the mission or something of that nature.  I've tried the only save game editor (gibbed) I can find but the option of completing a mission is not available.    Is there any kind of cheat that will get me through this?  I would even accept a save game from someone else understanding that I would have to use their Shepard to finish the game.


My Ubuntu 16.10 is a fresh install. But the Ethernet connection isn't connecting. Am I missing something?


How does this [t]ricky bracket expression in grep work?

I saw this one-liner recently:  $ ps -ef | grep [f]irefox   thorsen   16730     1  1 Jun19 ?        00:27:27 /usr/lib/firefox/firefox ...   So it seems to return the list of processes with "firefox" in the data but leaving out the grep process itself, and therefore seems roughly equivalent to:  ps -ef |grep -v grep| grep firefox   I can't understand how it works though. I've looked at the man page on grep and elsewhere but haven't found an explanation.  And to compound the mystery if I run:  $ ps -ef | grep firefox  > data $ grep [f]irefox data  thorsen   15820 28618  0 07:28 pts/1    00:00:00 grep --color=auto firefox thorsen   16730     1  1 Jun19 ?        00:27:45 /usr/lib/firefox/firefox ....   the [t]rick seems to stop working!  Someone here will know what's going on I'm sure.  Thanks.


I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that?


Prevent application to crash when unhandled exception in dll

I'm working on a C# WPF application. I'm using a DLL (not developed by me). I'm using it like this (simplified):  try {     Bitmap bmp = new Bitmap(filePath);      // Use the DLL     var worker = theDLL.loadImage(bmp);      status state = worker.start();      if (state = theDLL.sta.OK)     {         return "OK"     }     else     {         state = worker.tryOtherMethod();     } } catch (Exception e) {     // Do something with e }   Sometimes (not always) I have a Unhandled exception. This exception is not catch and my application crash :     An invalid parameter was passed to a function that considers invalid   parameters fatal.   I saw that this exception comes from C++ code but i'm unable to catch it (even with AppDomain.CurrentDomain.UnhandledException or Dispatcher.UnhandledException).   How can I prevent the crash ?  Edit:  I've try to catch the exception with catch alone and catch (Win32Exception e) but both didn't solve my problem.  I still have this error :


What does setting a global variable equal to "0x0" do in C?

I am currently going over some code that is written in C for a microcontroller and I am just trying to figure out why some of the variable are set equal to 0x0 and 0x1. Can someone explain what that does?  Here's the code:  // Global variables static bool volatile radio_busy; int xx = 0x0; int yy = 0x0; int zz = 0x1; bool flag = 1;


Is there any reference or simple proof to show that the group $\frac{\mathbb{C}\times SL(n,\mathbb{C})}{2\mathbb{Z}}$ is double cover of $GL(n,\mathbb{C})$.


Having issues on this program getting the output correct. I've included parameters that help decipher what is a valid date input (i.e. 3/22/2014) vs. an invalid input (i.e. 3/57/2014). These are located within my for loop in the if statement. However, when I run the program, I keep receiving the else statement's output and I'm not sure why. I've switched array types from String and int with no luck. Do you see my error? Thanks    import java.util.Scanner;   import javax.swing.*; public class ConvertDate     {     public static void main(String[] args)     {      String enteredDate, month, day, year;      final String[] monthID = {"January", "February", "March", "April", "May", "June", "July",               "August", "September", "October", "November", "December"};       final int[] monthIDArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};      final String[] monthValidSingleInputs = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10",           "11", "12"};      final String[] monthValidDosInputs = {"01", "02", "03", "04", "05", "06", "07", "08", "09",          "10", "11", "12"};      final String[] monthsDays = {"31", "28", "31", "30", "31", "30", "31", "31", "30", "31",          "30", "31"};      final int[] intDaysArray = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};       final int JANUARY = 1;      final int DECEMBER = 12;      int selectedDate;      int x;       enteredDate = JOptionPane.showInputDialog(null, "Enter a date in the format MM/DD/YYYY");   Using indexOf in order to distinguish inputs inside of /       int slashIndex = enteredDate.indexOf("/");   //Finding the month         month = enteredDate.substring(0, slashIndex);            int intMonth = Integer.parseInt(month);         enteredDate = enteredDate.substring(slashIndex + 1);         enteredDate = enteredDate.trim();   //Finding the day         slashIndex = enteredDate.indexOf("/");         day = enteredDate.substring(0, slashIndex);            int intDay = Integer.parseInt(day);         enteredDate = enteredDate.trim();         enteredDate = enteredDate.substring(slashIndex + 1);   //Finding the year         year = enteredDate.substring(0, 4);            int intYear = Integer.parseInt(year);         enteredDate = enteredDate.trim();   Output statements    for(x = 0; x < monthID.length; ++x) { if(((month == monthValidSingleInputs[x]) || (month == monthValidDosInputs[x])) && (intDay <=         intDaysArray[x]) && ((intMonth >= JANUARY) && (intMonth <= DECEMBER)))            JOptionPane.showMessageDialog(null, "Date is: " + monthID[x]             + " " + intDay + ", " + year);            else               JOptionPane.showMessageDialog(null, "Please re-run program, entries not valid.");               break;      }}}


How do I unit test code that includes a callout?

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.  How do I unit test code that includes a SOAP or REST-based callout, or indirectly calls code that makes a callout? I'm getting an error saying that callouts are not supported.


About two weeks ago, a friend of mine taught me the following game without his knowing the answer. It may be famous, but I haven't known it.  There are $N\ (\in\mathbb N)$ chocolate bars composed of $a_i\times b_i\ (i=1,2,\cdots, N)$ squares of chocolate. Here, suppose that $a_i$ is the length of the vertical edge of each square, and that $b_i$ is the length of the horizontal edge of each square. Also, let $a_i,b_i$ be natural numbers. (see below. $N=4$ case.)   $\ \ \ \ $  Two players $A, B$ take turns picking up a piece of chocolate and cutting it along the grid lines. A player cuts through and creates a new pieces. The first player $A$ always has to cut it horizontally. The second player $B$ always has to cut it vertically. One must not turn around the squares. A player that has no place to cut loses. (see below. $N=3$ case in which the game will be continued.)   $\ \ \ \ $  Examples : If there is a chocolate bar composed of $3\times 2$ squares of chocolate, then the player $B$ wins. If there is a chocolate bar composed of $4\times 2$ squares of chocolate, then the player $A$ wins.      Question : In what cases does the player $A$ win? Why?    I have a conjecture.   My conjecture : The player $A$ wins $\iff \sum_{i=1}^{N}\lfloor \log_2 a_i\rfloor\gt \sum_{i=1}^{N}\lfloor\log_2 b_i\rfloor$ holds.  This seems true for $N=1$ case and some other smaller cases, but I don't think I've succeeded in proving this strictly. Of course it may not be true. Can anyone help?  Edit : I edited the notation. I hope this time is not confusing.


Can a Muggle get through to Platform 9 & 3/4?

Suppose someone from "Harry's world" married a Muggle, and they want to escort their child. Can the Muggle parent get through to the Hogwarts platform?


Semigroup analogue to the classification of finite simple groups?

Is there a semigroup analogue to the classification of finite simple groups?  If so what are some of the major results?  --Edit, reference links---


I'm trying to fit a linear model on some data with just one predictor (say (x,y)). The data is such that for small values of x, the y values give a tight fit to a straight line, however as x values increase, the y values become more volatile. Here is an example of such data (R code)  y = c(3.2,3.4,3.5,3.8,4.2,5.5,4.5,6.8,7.4,5.9) x = seq(1,10,1)   I'm curious to know if there exists any power transform (Box cox perhaps?) that lets me get a better fit for the data than simply doing a linear fit as shown below.  fit = lm(y ~ x)


We know that Fibonacci Numbers start with 0 and next element is 1 and F(n)=F(n-1)+F(n-2) to find nth term where n>=2 and F(0)=0 F(1)=1 .  But what if we suppose the first 2 terms of fibonacci series be a and b then what will be its nth term?  Like if a=1 b=2 then if we want to find 4th term then it will be 5.


A few years ago I was told not to use that word because, in addition to its negative meaning, it comes from Latin denigratus, past participle of denigrare, which means to blacken. Therefore, "to denigrate someone" would be "to blacken that person". Considering its current definition (see below) and the wish to be politically correct, I wonder whether the word has come to acquire any racist overtone.   The reason why I'm asking is because I was reading "Language Myths" a book by Laurie Bauer recently, and came across this passage which contained that word  "...certain educational institutions denigrate the way certain ethnic minorities and lower-working-class children talk."  Then I remembered I was once told not to use "denigrate" as it might be misinterpreted by some people.      denigrate - from    1. to say very critical and often unfair things about (someone)   2. to attack the reputation of, to deny the importance or validity of, belittle   EDIT (on Dec 17th, 2017) - This article,  which Mari-Lou A mentions in one of the comments, shows very clearly the writer's feelings about this word, with very good arguments to bear him out.  Then again, there are those who think otherwise. For one, , the character played by Denzel Washington in the 2007 feature film "The Great Debaters", says the word has racist undertones. -  Edit (on May 6th, 2020)