I'm pretty new to Python and working on a one and two-player guessing game. Right now I'm working on creating a random number that is the length of digits that the user specifies. I can't seem to figure out a way to make all of the numbers print to one string. They only print out in new lines and one at a time. I think I have a decent concept idea but can't figure out how to make it work. Any advice and help is appreciated. Thank you!   import random import sys  def p(): #Prints new line quickly     print()  def error(): #Restarts the main     question = input("You have entered an invalid option. Would you like to try again? \n")     if question in ("Yes","yes","y"):         intro()     else:         sys.exit()  def oneplayer():     print("Welcome to the one player mode of the guessing game.")     p()     print("How many digits would you like your number to be?")     SecretNumber=0     FinalNumber = 0     digits=input()     count = 0     while int(digits) > count:         ProduceNewNumber=0         ProduceNewNumber=ProduceNewNumber+random.randrange(10)         count=count+1         SecretNumber=ProduceNewNumber         print(str(SecretNumber))         FinalNumber=(ProduceNewNumber) def twoplayer():     print("Welcome to the two player mode of the guessing game.")  def intro():     print("Welcome to the guessing game! Would you like to play one player or play with two players?\n")     players = input()     if players in ("1","2"):         if players in ("1"):             oneplayer()         if players in ("2"):             twoplayer()     else:         error()   intro()

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


Absolutely clueless, any help would be appreciated, especially if it can be understood by a grade $12$ student (me).  The answer is in the form $2^x$, and we are supposed to find value of $x$.

Find the value of the product $$(\sin 1°)(\sin 3°)(\sin 5°)\ldots(\sin 89°)$$ I tried multiplying and dividing by $2$ and then combining and then converting into cosine, but doesn't work out.


I have that $X_1, X_2, \ldots$ are independent random variables such that $X_n = n^2-1$ with probability $\frac{1}{n^2}$ and that $X_n = -1$ with probability $1-\frac{1}{n^2}$. If I define the sum to be $S_n = X_1+\ldots+X_n$, I would like to show that $\frac{S_n}{n} \to -1$ almost surely. My approach here is to use the Borel-Cantelli theorem. Ultimately, I would like to show that $P(\frac{S_n}{n} \to -1) =1$. To do this, it instantly implies by intuition and by backtracing that I would like the sum $\sum_n P(X_n \neq -1)$ to be convergent to some real number. However, I cannot fully understand why this is or how I can get such a sum. Am I missing something here? thanks!

In , $\exists$ this exercise.  What's fair about a fair game?  Let $X_i$, i = 1, 2, ... be indp RVs s.t. $X_i = i^2 - 1$ with prob $1/i^2$ and $-1$ with prob $1-1/i^2$.  I find it clear that $E(X_n)=0$. However, I do not understand why:  if $S_n = \sum_{i=1}^{n} X_i$, then $S_n/n \to -1$ a.s.  My attempt:  Proving $S_n/n \to -1$ a.s. is equivalent to proving $P(S_n/n = -1 \ i.o.) = 1$ or $P(S_n/n = -1 \ ev.) = 1$. I think?  If so, I just take the first one $P(S_n/n = -1)$, sum it over n's,hope it's infinity and use Borel-Cantelli 2...after proving the events $S_n/n = -1$ are independent, of course.  $P(S_n/n = -1)$  $=P(\sum_{i=1}^{n} X_i = -n)$  $=P(\bigcap_{i=1}^{n} X_i=-1)$ I think?  $=\Pi_{i=1}^{n} P(X_i=-1)$ by independence  $=0$ if I plug in i=1.  Help please?


In an application I load strings from configuration of this format stackoverflow.com?questionId={0}. Obviously they're populated at run-time and used in query strings.  I want to log these strings at startup using a method:  void log(string message, params object[] vars)         {             string s = String.Format(message, vars);             Console.WriteLine(s);         }   However as you would expect String.Format throws an exception because calling: log(String.Format("Adding new feed '{0}'", "stackoverflow.com?questionId={0}")) - String.Format tries to substitute {0} inside 'log()'.  Is there an easy way I can escape the { characters so substitution isn't attempted?

How can brackets be escaped in using string.Format? For example: String val = "1,2,3" String.Format(" foo {{0}}", val);  This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets?


How does physics explain the enormous disparity between the gravitational scale and the typical mass scale of the elementary particles? In other words, why is gravity so much weaker than the other forces, like electromagnetism?

My knowledge on this particular field of physics is very sketchy, but I frequently hear of a theoretical "graviton", the quantum of the gravitational field.  So I guess most physicists' assumption is that gravity can be described by a QFT?  But I find this weird, because gravity seems so incredibly different from the other forces (yes, I know "weirdness" isn't any sort of scientific deduction principle).  For relative strengths:   Strong force: $10^{38}$ Electromagnetic force: $10^{36}$ Weak force: $10^{25}$ Gravity: $1$   Not only does gravity have a vastly weaker magnitude, it also has a very strange interaction with everything else.  Consider the Standard Model interactions:    No particle (or field) interacts directly with all other fields.  Heck, gluons only barely interact with the rest of them.  So why is it then that anything that has energy (e.g. everything that exists) also has a gravitational interaction?  Gravity seems unique in that all particles interact through it.  Then there's the whole issue of affecting spacetime.  As far as I'm aware, properties such as charge, spin, color, etc. don't affect spacetime (only the energy related to these properties).


I have a MacBook Pro and need to test my apps integration with another developer's iOS app. They have provided an installation link (itms-services://), but I don't have an iOS mobile device.  Is it possible to install and test their app on my MacBook with some sort of emulator?

I use an application WeChat in my iPhone a lot, as typing on a smartphone is less convenient than typing on a keyboard, I would like to be able to use that application on my MacBook Pro.  The OS in my MacBook Pro is Mac OS X Lion 10.7.5 (11G63). I have also installed VMWare Fusion.  So I am thinking if it is possible to install a virtual iOS 7 on my MacBook Pro, then install WeChat inside?  Could anyone help?  PS: WeChat does provide a web version where we can chat in a web browser, but it is not as good as the iPhone application, it is unacceptably slow...


I have been to the US three times in the past, however I incurred a medical bill inndecember 2015, the bulk of the bill about $4500 has been paid by my insurance, however there is a small amount of about 500 dollars unpaid, was wondering if this would prevent me from getting another tourist visa? I do intend to settle my bill, have just been unable to as yet.   Do the consular official have access to medical bill information? And could my outstanding bill make seen as a public charge? I am currently a medical student so have a decent skill set, will this be in my favour?   Thanks and regards!   Urgent response required. Thanks.

While on vacation in the US last year, my wife and I was in a traffic accident. My wife had to spend more than a week in hospital before we could fly home. Our insurance is covering everything, but we keep receiving more bills in the mail. We are forwarding the bills to our insurance company, who tells us that they are taking care of them, but they are probably not paying them immediately (I expect there are a lot of paperwork involved). We can see that some of the invoices have strange addresses on them and have taken a long time to reach us, so we are a bit worried that there might be others that haven't reached us yet.  Also, since the accident was partly my fault, I received a ticket for careless driving, which I have paid.  We are going back to the US in a few weeks on vacation. Can any of this give us problems in immigration or elsewhere? Is there anything we should do or special papers we should bring?


I came across this sentence in a blog post:      "Write with so much passion and energy and enthusiasm they can’t stay asleep."   Shouldn't this be written as the following:     "Write with so much passion and energy and enthusiasm that they can’t stay asleep."   This sentence was written by one of the famous bloggers called Jon Morrow. Here's his blog:   Here's the complete paragraph:   When you sit down to write, don’t publish just another blog post. Don’t give your readers just another tip. Don’t tell just another cute story. Set their freaking hair on fire. Write with so much passion and energy and enthusiasm they can’t stay asleep. You want them to feel like somebody shocked them with a defibrillator.

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


I created a new iPhone album, later I moved some photos from Camera Roll to the new Album. The problem is that when I delete the moved photos from the Camera Roll, I can't find them in the new Album. Why!?  I just want to have these photos in the new Album without being in the Camera Roll, too.

I created a named album on my iPhone and placed photos from my camera roll in there. I would then like to delete these photos from the camera roll. However, when I try to do so an error messages warns that the photos (which currently reside in the the camera roll and named album) will also be deleted from the album.   Is there a way to delete the photos from the camera roll and leave them in the specific album?


In ArcGIS 10.3 Desktop, how do you replace field values with Null using the Field Calculator without selecting the rows first?  I'm able to select the rows that I want and calculate using the Field Calculator, e.g. field_value = Null. However, if I try to use replace() I get errors.  field_value = replace([field_value],0,Null)   Error:      Invalid use of Null:'replace'

I'm working with ArcGIS 10.2 for Desktop and OS Windows 7.   I need to set numeric vales from Zero back to NULL, but I can't from the field calculator.  I'm working with  a vector file and I need to display NULL in one column that shows 0 (Zero) as default value.  -------- Edit------- I am adding the error messages that he received  Translation:  An error occurred during the process.  Please consult the Geoprocessing Results Window to obtain more details.  Error at bottom, translation:  The values of the selected column can not be set to null because the field in the database is defined as "Not Null".


I want to add or remove lis to a list in javascript. For that purpose I found that I need to add data attributes and find the item with that value.   if ($('li[data-requestId=' + requestId + ']').length == 0) {     var element = getRequestElement();     var li = document.createElement("li");     li.setAttribute("data-requestId",requestId);     li.appendChild(element);     $('#requestsUL').append(li); }   but the first line gives this error:     Syntax error, unrecognized expression:   li[data-requestId=6.22.20]

Given the following classes and controller action method:  public School {   public Int32 ID { get; set; }   publig String Name { get; set; }   public Address Address { get; set; } }  public class Address {   public string Street1 { get; set; }   public string City { get; set; }   public String ZipCode { get; set; }   public String State { get; set; }   public String Country { get; set; } }  [Authorize(Roles = "SchoolEditor")] [AcceptVerbs(HttpVerbs.Post)] public SchoolResponse Edit(Int32 id, FormCollection form) {   School school = GetSchoolFromRepository(id);    UpdateModel(school, form);    return new SchoolResponse() { School = school }; }   And the following form:  <form method="post">   School: <%= Html.TextBox("Name") %>
   Street: <%= Html.TextBox("Address.Street") %>
   City:  <%= Html.TextBox("Address.City") %>
   Zip Code: <%= Html.TextBox("Address.ZipCode") %>
   Sate: <select id="Address.State"></select>
   Country: <select id="Address.Country"></select>
 </form>   I am able to update both the School instance and the Address member of the school.  This is quite nice!  Thank you ASP.NET MVC team!  However, how do I use jQuery to select the drop down list so that I can pre-fill it?  I realize that I could do this server side but there will be other dynamic elements on the page that affect the list.  The following is what I have so far, and it does not work as the selectors don't seem to match the IDs:  $(function() {   $.getJSON("/Location/GetCountryList", null, function(data) {     $("#Address.Country").fillSelect(data);   });   $("#Address.Country").change(function() {     $.getJSON("/Location/GetRegionsForCountry", { country: $(this).val() }, function(data) {       $("#Address.State").fillSelect(data);     });   }); });


Say, I have several files in a directory.  How do I rename all of them to "001", "002", etc., saving their current file extensions?

I have a ton of files, all named stuff like 1.jpg, 2.jpg, 3.jpg, and so on up to 1439.jpg, however, I have a problem with one of my projects and alphabetizing. It will usually go in the order 1.jpg, 10.jpg, 11.jpg and so on.  What I need is some way to name the files so they are in the format such as 00001.jpg all the way up to 01439.jpg.  How would I be able to do this quickly and efficiently?


I want to print number of variables based on mode value. Here is example: char format[64] = {} int mode_1, mode_2, mode_3; int a,b,c,d,e,f;  ... // Get mode value here .... ...  // Build the format first sprintf(format, "%s-%s-%s\n", mode_1 == 0 ? "a=%d,b=%d" : "a=%d",                               mode_2 == 0 ? "c=%d,d=%d" : "c=%d",                               mode_3 == 0 ? "e=%d,f=%d" : "e=%d");  // Print value here printf(format, mode_1 == 0 ? (a,b) : a,                mode_2 == 0 ? (c,d) : c,                mode_3 == 0 ? (e,f) : f);  When I tried a simple example, the value printed when mode value is zero seems not right. What am I doing wrong here?


Can I update my Ubuntu 16.04 to 17.10  Yes/no  If yes. How can I update my Ubuntu  Thanks in advance :)

What are the different ways I can use to upgrade Ubuntu from one release to another?


I am relatively new to the stock market and might not know all the useful terminology, so bear with me as I will do my best to explain what I am trying to grasp and hopefully I will be able to learn what's actually happening in this scenario. So let's say, a stock is trading at the price range from 1300 to 1400 on a specific day. Towards the end of the day, however not after close, you can see a mysterious dip in the price trendline of the stock - it is so sharp that it only is represented by a single price point, let's say at 400 for one time interval, and then it immediately goes back to the initial trading range. What happens there? Does it mean that someone was lucky enough to fulfill a limit buy at such a low price, and in such big volume that whoever was selling the stock at the market price had to fulfill it as it was the only volume being traded, at "the market" - and therefore the limit buy had to be honoured? I am at my wits here, especially since I dont know the name of it I am unable to find an image to attach, however I have often noticed it with TSLA, when there is literally a split second, enormous dip in the stock price for it to only go back to the same range it was trading before that. If I see it next time I will definitely add it onto the post.

So why did the price tank all of a sudden and then came back to normal? What does it mean?


I have requirement where in WhatId should be able to display parent name(label) in formula field, i have tried using what.Name in formula field but it displays an error.  The below code fetches the 15 digit id of respective parent. IF( NOT(ISNULL(WhatId )), WhatId,  '')   so far the solution given in the other links are possible by using trigger but i dont want to use triggers.

I want to show a mobile on the tasks. So i thought of creating a formula field on tasks, But i am not sure on how do i set the formula as the task could be related to a contact or lead.  How do i set it based on the WhoId so if a lead is selected then the mob of the lead is displayed or if a contact is selected then the mobile of contact is displayed?


Is there EVIDENCE (proof) that time dilation actually occurs in the case of relative UNIFORM mottion (i.e., where no acceleration or decelleration occurs)? By proof, I don't mean mathematically but, instead, in observerable reality. No one answered this simple question. I raise this because to say in such a case that, from BOTH reference frames, the "moving" cliock is ticking slower than the "stationary" clock is a LOGICAL CONTRADICTION . Even invoking relativity of simultaneity where one clock begins ahead of the other, the period of supposed dilation is overlapped by both frames.

It is said that we can verify time dilation by flying a very accurate clock on a fast jet or spaceship and prove that it registers less time than the clocks on earth. However, the clocks on earth would be moving relative to the clock on the spaceship, and since time always dilates and never goes faster regardless of the direction of relative motion,  the clocks on earth should register less time than the clock on the spaceship.  Is this true? Whenever there is a fast-moving object such as a rocket do all clocks on earth really become slow?  If the rocket with the clock landed after moving at relativistic speed, would its clock and the earth's clock again show the same time since during its travel both appeared slow to each other?  Or is all this just an illusion, ie. the clocks just appear to be slow to each other but in actually run at normal speed, and neither is behind when the rocket actually lands?


Basically, the question asks us to find the nth digit in the following sequence:  $$12345678910111213\dots9899100101\dots$$  where the 10th digit is $1$, the 11th digit is $0$, etc.  EDIT: Here are my workings: I was thinking about defining intervals in some way, for example, I know that there are 9 digits in this interval $0\dots9$ and $10\dots99$, and later try to find a sum. However, I am stuck on this point.

What's the $n$-th digit in the sequence $S$ of numbers formed by the natural numbers, i.e.,  $n$-th digit in the sequence 1 2 3 4 5 6 7 8 9 10 11 12... ? For example 11th digit in the sequence is 0.


I know Noether's theorem can be applied to symmetries of the action, which is defined within the Lagrangian approach to mechanics.  However, does the same theorem still apply if I use a Newtonian approach with vectorial laws of motion?  I know that these laws of motion have the same form for all inertial observers, and this sounds like a symmetry to me. However, this is NOT a symmetry of the action as well (different inertial observers will calculate different kinetic energy --> different actions for the same system).  So in conclusion we have a symmetry in Newtonian approach that is not a symmetry in Lagrangian approach. Should I deduce that Noether's theorem does not apply to Newtonian approach, but only to Lagrangian approach?

It is well known from Noether's Theorem how from continuous symmetries in the Lagrangian one gets a conserved charge which corresponds to linear momentum, angular momentum for translational and rotational symmetries and others.  Is there any elementary argument for why linear or angular momentum specifically (and not other conserved quantities) are conserved which does not require knowledge of Lagrangians? By elementary I mean, "if this is not so, then this unreasonable thing occurs".   Of course, we can say "if we want our laws to be the same at a different point in space then linear conservation must be conserved", but can we derive mathematically the expression for the conserved quantity without using the Lagrangian?  I want to explain to a friend why they are conserved but he doesn't have the background to understand the Lagrangian formalism.


I already made and rigged a character. When I make keyframes in the dopesheet to time my animation, the graph editor does not show any of my keyframes, for any of my animated parts. Even when I go to check the drivers, the driver pane is completely blank, just an empty graph as well.   The weird part is, a couple of sessions ago, it was working completely fine, because I know I was able to edit drivers then. So what could possibly be happening here? I unfortunately cant share the blend file due to the fact that it belongs to the project group I work with, but I was hoping for some general pointers on how I can figure this out. Keep in mind my dope sheet and NLA editor works completely fine, it's just the graph editor.  Here is an image of what it currently looks like:    and here is the corresponding dope sheet for the same animation:

I created a couple of LocRot keyframes but the rotation path and keyframes aren't shown in the graph editor (no, they aren't hidden).


I would like to alert users that their caps-lock is pressed. I am using HTML/HTML5 no Java (applets) nor Flash. Is there a way to know that?

How do you tell if caps lock is on using JavaScript?  One caveat though: I did google it and the best solution I could find was to attach an onkeypress event to every input, then check each time if the letter pressed was uppercase, and if it was, then check if shift was also held down. If it wasn't, therefore caps lock must be on. This feels really dirty and just... wasteful - surely there's a better way than this?


I have been trying to install wine but I encountered issues like  The following packages have unmet dependencies:  winehq-stable : Depends: wine-stable (= 3.0.1~xenial) E: Unable to correct problems, you have held broken packages.   and got solutions from  and  but nothing solved it.  So I read somewhere that you can  from. So I installed wine using . However, I am unable to figure out how to install wine from playonlinux.  So I found it from  and ran  sudo apt-get install wine   but I get this error:  The following packages have unmet dependencies:  wine : Depends: wine1.6 E: Unable to correct problems, you have held broken packages.   How to resolve?  UPDATES  -   @Norbert    @ David      The output of the commands is below:  sudo apt-get install playonlinux   ...  sudo apt-get install -f   ...  $ apt-cache policy "$(dpkg -S "$(which wine)" | cut -d : -f 1)" ... N: unable to locate package  $ wine --version ... wine: command not found

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I want to write the values of bars in a bar chart (ybar) inside each bar, except for when there is not enough space. In that case, I want to write the value above the bar.  This is my code:  \documentclass[border=1cm]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest}  \usepackage{filecontents}% write data file to make make MWE self contained  \begin{filecontents*}{test.txt} aa  bb  cc  dd A   7304.91 12713.3 13748.95     B   13628.96    14912.36    19002.29 C   15158.99    29120.11    31566.62 D   23459.77    26894.28    39129.52 E   23095.17    45234.5 50103.37 F   35540.84    38491.29    55900.97 \end{filecontents*}  \begin{document}  \begin{tikzpicture} \pgfplotstableread{test.txt} \datatable \begin{axis}[ ybar, nodes near coords, every node near coord/.append style={xshift=0.05cm,rotate=90,anchor=east,/pgf/number format/.cd,fixed zerofill,precision=2}, bar width= 0.4cm, /pgf/number format/.cd, use comma, width=0.9\textwidth, height=7cm, ymajorgrids,    xtick={data}, scaled y ticks = false, xticklabels from table={\datatable}{aa}, ymin=0,ymax=60000, enlarge x limits = 0.1, ] \addplot[fill=black!20] table [y=bb,x expr=\coordindex] {\datatable}; \addplot[fill=white] table [y=cc,x expr=\coordindex] {\datatable}; \addplot[fill=black!10] table [y=dd,x expr=\coordindex] {\datatable}; \end{axis} \end{tikzpicture} \end{document}   And this is the result:    What I would like now is for the values of the 1st to 5th and 7th bar to be written above the bars, not inside them. What to do?

I created this style that shifts the labels and put them on the bottom of the ybars.  However, I have a problem with the bars that have too short length (for example, see the 8.7 and 5.1 in the example below). I want to check if the values are less than some threshold, or the length of the bar is shorter than the label (number) then change its color.  How can I overlay another label on top of the one in white when the bar is shorter? or maybe change the color of the label to a gradient color? or just overlay the part that is outside of the bar?    \documentclass{standalone}  \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{calc}  \begin{document} \makeatletter \begin{tikzpicture} \begin{axis}[ ybar, every node near coord/.style={   check for zero/.code={ % If meta=0, make the node a coordinate (which doesn't have text)     \pgfmathfloatifflags{\pgfplotspointmeta}{0}{         \pgfkeys{/tikz/coordinate}     }{}   },   check for zero, color=white, text opacity=1, font=\footnotesize, inner ysep=0.5pt, },% % Bottom nodes  calculate full offset/.code={     \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}     \pgfmathsetmacro\testmacro{((\pgfplotspointmeta-\pgfkeysvalueof{/pgfplots/ymin})*10^\pgfplots@data@scale@trafo@EXPONENT@y)*\pgfplots@y@veclength}     \pgfkeys{/pgf/fpu=false} },% nodes near coords bottom/.style={     every node near coord/.append style={         /pgfplots/calculate full offset,         yshift=-\testmacro,         rotate=90, anchor=west,%I need the rotate text here and not in the          %general style, as the ybar redefines the style     } },% ymin=0, nodes near coords={\pgfmathprintnumber[fixed zerofill,precision=1]{\pgfplotspointmeta}}, nodes near coords bottom, ] \pgfplotstableread{ % set real imag mag 1 8.7 2 5.1 3 91.8367  }\mydata \addplot table[x index=0,y index=1,header=false] {\mydata}; \end{axis} \end{tikzpicture} \makeatother \end{document}   * EDIT *  I need to create some special gradient on each label that is below the bar height. For example, I need to adapt something like  to each label that is not showing. However, I cannot find a way to put the macro in the style section of the codes. Or is there any equivalent solution?


My hard drive on my smartphone has 100 MB free, and the app I'm trying to install is 2 MB.  I just recently deleted apps totalling to about 88.3 MB, and the computed size has already been adjusted, and is displayed on the screen.  However, I have to wait 10 or 15 minutes to install it.  It's as if the updated, computed space is not registered in some way to the operating system immediately.  It's Android 2.3.4 Gingerbread, no root, no unlocked; factory pre-set all the way(not for long though).  So, basically, is that the problem? Why do I have to wait a while after uninstalling apps, and re-computing space availability to above par to install a new, extremely small app, to actually work?  Is this all the OS's fault, or is something else at play here(e.g., hard drive or circuit-level operations reigning outside the control of just the OS software)?  Because if the re-computed size is what it's going to be, at least let the end-user know that rather than give the impression that you have the available space, but it won't install anything.

After one of the latest updates (not sure if it was the last one or a previous one) of the Google Play app, I am having an error trying to update a large app (42MB). It says:     Error Downloading . There is insufficient space on the device.   My device is a Samsung P1000 running Froyo. It's rooted, but the error was there before rooting it.  A quick Google search showed several Samsung users having the same problem (the app in question that was giving me the headache is Smurf's village). Some said that removing the updates to the Android Market (Google Play) app would fix it, but to me it was of no avail.  I also tried the procedure in  to no avail.  Now I am stuck with a prehistoric version of the Market (that works on small apps) and still cannot update Smurf's Village or install big apps. How can I fix this?  EDIT: device has over 2GB of internal SD storage, 27GB of external SD card, so space is not an issue.


I understand that an Inner Class it's non-static and a static method from the Outer Class can't reference it.  I have this code, that doesn't work, and I understand why that doesn't work.  class OuterClass {     class InnerClass{}     public static void outherMethod() {         InnerClass i = new InnerClass();     } }   But then I have this other code, that DOES work, but I don't understand why it's different from the first one. Why does it work?  class OuterClass {     class InnerClass{}     public static void outherMethod() {         InnerClass i = new OuterClass.new InnerClass();     } }   Thanks in advance!  EDIT: it's not duplicated because it isn't the same question. I'm not asking about static nested classes, I'm asking about static methods and inner classes

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


I've stack with a selectItem() method. If I run it I get this error "java.lang.NullPointerException".  Definetly a problem with arrayList , but I  cant find out.  Any help, please.  Or an ArrayList better to create in a Dispenser class? If your need any more information I can give it. Thanks.      public class Dispenser     {        private String name; // Item name.        private int price; //Item cost.         private int stock; // Total quantity in stock.      /**     * Create a new dispenser with the given details.     * At the start it has 5 items in stock.     */     public Dispenser(String itemName, int itemPrice)     {         name = itemName;         price = itemPrice;         stock = 5;      }      /**     * Return an item name.     * @return Item name.     */      public String getName()     {         return name;     }   import java.util.*;      /**     * Main class for a vending mashine.      */      public class VendingMachine     {           private Dispenser disp;         private CoinBox box;        private int credit;        private ArrayList<Dispenser> items = new ArrayList<Dispenser>();           /**         * Constructor.         */         public VendingMachine()         {                 credit = 0;             items.add(new Dispenser("Snickers", 55));             items.add(new Dispenser("Mars", 50));             items.add(new Dispenser("Bounty", 75));       }         public void selectItem(String itemName)           {           for(Dispenser product : items){             if(disp.getName() == itemName){                System.out.println("Get Your " + itemName);          }      }          if((disp.getName() != itemName)){                System.out.println( itemName + " is Out of stock" );         }       }

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


I have no idea how to create a graph of a normal distribution. I'll attach an image of exactly what I'm trying to recreate.  Also, is there a way of undoing a PDF back to LaTeX code if LaTeX was used to make the pdf? otherwise I'll just be mindlessly copying...

I'm trying to reproduce the following diagram in TikZ and pgfplots.   My MWE with regenerated graph is below:  \documentclass{standalone} \usepackage{pgfplots}  \begin{document}  \pgfmathdeclarefunction{gauss}{2}{%   \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}% }  \begin{tikzpicture} \begin{axis}[   no markers,    domain=0:6,    samples=100,   axis lines*=left,    xlabel=$x$,   every axis y label/.style={at=(current axis.above origin),anchor=south},   every axis x label/.style={at=(current axis.right of origin),anchor=west},   height=5cm,    width=12cm,   xtick=\empty,    ytick=\empty,   enlargelimits=false,    clip=false,    axis on top,   grid = major   ]   \addplot [very thick,cyan!50!black] {gauss(3, 1)}; \draw [yshift=1.4cm, latex-latex](axis cs:2, 0) -- node [fill=white] {$0.683$} (axis cs:4, 0); \draw [yshift=0.3cm, latex-latex](axis cs:1, 0) -- node [fill=white] {$0.954$} (axis cs:5, 0);   \end{axis}  \node[below] at (1, 0)  {$\mu - 2\sigma$};  \node[below] at (2, 0)  {$\mu - \sigma$};  \node[below] at (3, 0)  {$\mu$};    \end{tikzpicture}  \end{document}     Issues   Nodes are not properly placed. How to remove y-axis? How to draw vertical dotted line?   Any help will be highly appreciated. Thanks


I am recieving mails sent to here in spam folder .I  have shifted our email services to google mail.And this started happening since.  <?php $message = "Our New app";         $to='myname@adapty.com';         $subject="New Mail";         $from = 'noreply@adapty.com';         $body='Just wanted to ask one thing as we are planning for release date, how long do you think it will take to test the android app?';         $headers = "From: " . strip_tags($from) . "\r\n";         $headers .= "Reply-To: ". strip_tags($from) . "\r\n";         $headers .= "MIME-Version: 1.0\r\n";         $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";  mail($to,$subject,$body,$headers); ?>   I changed the from addres from noreply@adapty.com to myname@adapty.com still it was marked as spam.  Here is my  .Please help.Thanks

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I have old records and i want to reinsert it now.  i having a contacts and their spendings  e.g like by year  2006- abc                       2007 -abc   now i want to add 2005 records from excel sheet.  and excel sheet having acc name,accid,contact name,cotanct id and monthwise data like  jan to dec.   what will be the best approach? Please help...

I am switching from old CRM and looking for easy to use tools to import my data


I am missing an episode in season 5 of Game of Thrones. Suddenly, for me, Sansa is married to Ramsay. Why and how did Littlefinger allow this to happen?

This question is about the TV show only.  In the books, Sansa is still with Littlefinger and everything that happens between Sansa and Ramsay in the show actually takes place between Ramsay and Jeyne Poole in the books.  However I don't recall why Littlefinger sends Sansa north. Apparently, in the books, it's safer to keep her traveling. So why did he do it in the show?


I am a beginner wanting to learn Blender. I have a few different versions of blender with the latest being 2.82A  I would prefer to learn the recent blender but I have no problem learning one a version down from this. I prefer the recent version, as I would have to stumble my way thru where the new stuff is or not be aware of the new changes and get frustrated because I'm looking for something that no longer was needed with the older versions. Im especially interested in Second Life Body imports and exports and clothes modeling. My second choices would be making trees and plants and my last would be builds of any kind. My whole purpose, that interested me to learn blender was to make realistic looking clothing, as the Second Life Virtual Reality is changing and growing so fat, I would love to learn these things.  thank in advance for any help I can find in doing so Enchtris Byrd

Since asking for tutorials, videos, resources, links to other content or downloads is considered off topic here, this is a specifically created Community Wiki which gathers resources for Blender and it has been approved by the .  Just write in the appropriate answer/section. If you have concerns, questions, post a  question, so we don't clutter the comments, but you can link your meta question from the comments.  Questions regarding such resources are not allowed anymore, except for very specific and on topic requests (ask on  if you're unsure about your question). Follow the instructions made in the question about how to post, what can be posted, etc.  Learning             Assets    (also see: )   Reference Images/Blueprints (also see: )    Tools    (also see: )      Other   Special Interest ()     Also see the .


I have seen a couple posts here on email notifications (such as this one ), but none seems to answer my question. Is it possible to receive instantaneous email notification, as soon as the activity occurs, not 3 hours later (I'm not afraid of large numbers of emails). Also, I'd like to receive the email even when I'm logged in. Are these options possible?

I'd like to have Instant notifications by email of answers to my questions.  Can this be implemented?


I have a map view displaying the Openlayers Data Overlay. It's displaying a list of GPS tracks from a "Map Feature" content type I made.   Logged in with the Administrator, I can see all the tracks on the map fine. The preview for the Data Overlay shows all the data coming through great.   When I few the map as an Anonymous user, not logged in, none of the GPS tracks show up. The map displays on the page but none of the data from my Data Overlay.  I've looked all over the place trying to find content permissions that are wrong that are screwing things up but I can't find anything.   Why is the data on the map showing for the administrator and not Anonymous users?

I've made a new content type, and I've made a View that is a list of that new content type. Anonymous users don't get any content in that list but can see the individual content types. Admin users can see the content in the view fine. Is it a permissions issue?


I'm 22 years old and have some money saved up, sitting in the bank. The idea was to buy a house, but in my country (the Netherlands) the costs of properties have raised significantly.  If I would buy a house now, I might lose money due to the market crashing later. Therefor, my bet is to wait for 1 or 2 years and hope that the prices lower.  During this time I can save more money and hope to invest this in some assets.  What are some assets that I could invest in? Is this only limited to stocks/indexfunds/cryptocurrencies?

I am young, just started my career, and looking to begin investing so I can make my money work for me. I'm still living like I did in college (occasional purchase on myself, but most of it goes into savings) and I would like to take the extra money and invest it.   What would you suggest are the best options for me to begin? I was considering getting a personal investor [a financial advisor] for perhaps a year or so, but I've heard that they really are not worth the money. I wanted to get the input of the great minds here.


I am new to qqplot and trying to figure out the labels on the x-axis of this plot:  The left plot is the Verbal SAT score of 105 college students majoring in CS. The right plot is the GPA score.  I understand that the qqplot means "quantile vs quantile", the y-axis is each student's test score, but what is the x-axis and why it is from -2 to 2?  Update: For anybody whose looking for a more visual explanation of QQ-plot, check out this video on youtube:  After reading and watching dozens of articles and videos, let me explain what is the x-axis and the y-axis in layman's term. The y-axis is the values you recorded. Like the verbal SAT score in my example. Because there are 105 of verbal SAT sores, there should be 105 values on the x-axis as well. There are three steps involved in order to get these 105 values: Step 1 Sort the 105 values in ascending order and give each one of them an index number starting from 1, 2, 3 .... all the way up to 105. Let's use i to denote each index number. Step 2 Use this formula to find a list of percentages (I will explain what are they later, just keep on reading): $\left(\dfrac{i-0.5}{n}\right)$ So you will get 105 values that looks like this: $\left(\dfrac{1-0.5}{105}\right)$, $\left(\dfrac{2-0.5}{105}\right)$, $\left(\dfrac{3-0.5}{105}\right)$ ... $\left(\dfrac{105-0.5}{105}\right)$ Step 3 Find the z-score of the values we just calculated in step 2. These z-scores are the x-axis of the qq-plot Now, plot the verbal SAT scores as the y-axis and the z-scores as the x-axis, you will get a qq-plot.  Ok, now it is the time to explain the meaning of step 2 & 3. Let's start with the definition of cumulative distribution function. Let's say we have a test and the maximum score a participant can get is 100 points. After taking the test, 50% of the participants scored 60 points or less, 40% of the participants scored 50 points or less, 30% of the participants scored 40 points or less, and so on. The cumulative distribution function (aka. CDF) takes one input, a test score, and it outputs a percentage which tells you the percentage of people who scored less than or equal to that test score. With the example case above, If I put 60 points into the CDF function, I should get 50% back. If I put 50 points I get 40%. The inverse of the cumulative distribution function takes one input, a percentage and it outputs the corresponding test score. If I put in 50%, it should give me 60 points. It does nothing fancy other than reverse the function of CDF. Step 2 basically calculated a list of percentages and when we feed that list of percentages into Step 3  and get back a list of z-scores. So Step 2 + Step 3 = calculating the inverse of the cumulative distribution function. The list of percentages calculated in Step 2 looks like this: 0.005, 0.014, ... 0.995. The list of z-scores in Step 3 looks like this: -2.575829304, -2.197286377, ... 2.575829304. It means for participants who scored less than or equal to 0.5% (0.005 x 100) of the total participants, the corresponding z-score is -2.57. So what does the qq-plot tell us in our example: If the verbal SAT score indeed follows a standard normal distribution （mean=0, variance=1）, then the outline of the histogram of the test scores should resemble the bell curve of the standard normal distribution. But it is really hard to judge if a histogram matches the shape of a bell curve, a straight line is probably a better choice for the naked eyes. Let's match the observed values against the z-scores.


In this function, when it is compared the lenght of the array it is used != operator and when it is comparing all elements of the array it is using !== operator. Why?!  Thx.  var a = [1,2,3]; var b = [2,3,4];  function equalArrays(a,b){           if(a.length != b.length) return false;     for(var i = 0; i < a.length; i++)         if(a[i] ==! b[i]) return false;     return true;   }

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I have to share a pc with my brother, which is a big fan of Windows 10. I, on the other hand, want to write programs on Kali Linux. You see where this is going.  I first wanted to setup a dual boot system, but the hard drive is filled with games, so I was looking around and heard about Linux Live USB sticks. I quickly set one up, but all my data is removed after rebooting the system and the partition, the OS is running on, is just big enough to fit the filesystem and can't be resized.  Is there a way to install Kali Linux normally (no Linux Live stuff) on a standard USB stick?

Greeting's, to clarify; my question is not creating a Live USB drive or a persistence partition but creating a USB with GRUB bootloader (or other) and Kali which can be used on any machine. This is similar to running other linux OS directly from USB. I am currently running Ubuntu from a pen drive. I installed the OS (Ubuntu) and the bootloader on the pen drive and I can boot off it anywhere. Here is a video explaining the same (video is not by me: )  Since, Kali's installer doesn't give option to select which drive to write the booloader to and directly writes on the HDD (sda1). This means even if I partition and install Kali on a pen drive since the bootloader will be installed on the machines fixed primary drive, the USB drive will fail to boot on a different device.  I have two questions:   Anyone has any idea how to write bootloader to a USB drive and what parameters should be given so that it boots with Kali installed on it. I am using graphic install mode for installing Kali on the USB drive, however there is no option for the install to be encrypted (Full disk encryption or at least /home folder to be encrypted). Does anyone know how can I install Kali with full disk / home folder encryption? Or enable is post install?   Thank You!


should we include or exclude a variable in a logit regr. model which will only obtain values if a certain event takes place otherwise will show N/A? this variable tells whether or not a product will be bought based on calls made by the company. the variable tells: number of days that passed by after the client was last contacted from a previous campaign. the values (-1) are for users who

I have a dataset relating to humans completing reviews, the target variable is whether the review decision is correct / incorrect and one of my features is a trailing 4 week accuracy score for the reviewer. These accuracy scores are not always available however. My question is around how to model this data - the fact that there is no available accuracy score might be a signal. From my research into this - everything I see tells me that the missing values must be imputed or removed. I am wondering whether there are techniques to incorporate the fact that the data is missing into the dataset. Perhaps I could convert the score into a categorical variable {low, medium, high, not available] - would this be common practice? I am open to suggestions and would love to hear what is commonly done in these scenarios


So if we think about it they just poured/injected liquid Adamantium over Wolverines bones... but should it not have pooled in between his joints and locked them like glue does if you put it on something movable? Like a lego doll.

I've seen the  here before, as well as on many sites on the web.  I've also seen different info on what was covered.  I'm not a huge X-Men fan, but I do enjoy the characters and stories, so I know I'm probably missing out on a lot, and may have missed the obvious along the way because I didn't read a particular series or something like that.  I had a relative die from leukemia a few years ago and that reminded me of basic junior high science: that red and white blood cells are produced in the bone marrow and must be able to reach from the marrow into the blood vessels.  The leukemia my relative had was the kind where the "bad" cells would surround the marrow and prevent the new "good" blood cells from getting out to the rest of the body.  So just how much of Wolverine's skeleton is covered with Adamantium?  If it's the whole thing, there'd have to be openings for new red blood cells to get out if he is to remain alive.  I've never seen a reference to this issue, is it ever addressed?  That also raises another issue along the same line: Are hard to reach areas, such as ball and socket joints covered?  If not, then stress on other covered areas could be transferred to the weaker uncovered areas, which would lead to breakage there.  And if joints like that are covered, is there anything to say how it was done?  Are there openings or gaps in the Adamantium covering on his body?  Are there any references to any of these issues that deal with them?


we have redhat servers - 7.2  the following output from sar print all relevant details as the following  sar -p -d 1 1   07:16:35 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util 07:16:36 PM       sda     13.00      0.00    120.00      9.23      0.04      3.08      1.38      1.80 07:16:36 PM vg_livecd-lv_root     15.00      0.00    120.00      8.00      0.05      3.07      1.27      1.90 07:16:36 PM vg_livecd-lv_swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 07:16:36 PM vg_livecd-lv_home      0.00      0.00      0.00      0.00      0.00      0.00    we want now to add the hostname of the machine in the beginning of each line   first we found the hostname   hostname=` hostname `  echo $hostname  server_mng14   expected results   sar -p -d 1 1   server_mng14 07:16:35 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util server_mng14 07:16:36 PM       sda     13.00      0.00    120.00      9.23      0.04      3.08      1.38      1.80 server_mng14 07:16:36 PM vg_livecd-lv_root     15.00      0.00    120.00      8.00      0.05      3.07      1.27      1.90 server_mng14 07:16:36 PM vg_livecd-lv_swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 server_mng14 07:16:36 PM vg_livecd-lv_home      0.00      0.00      0.00      0.00      0.00      0.00    what we need to pipe after - sar -p -d 1 1 in order to get the hostname of the beginning of each line?

I'm collecting disk usage data and want to add the date, time, and hostname to this command. How can I do it in this format:   YYYY-MM-DD HH:MM:SS,HOSTNAME,DISK_USAGE_DATA   Command I have so far:   df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $2 "," $3 "," $4 "," $1 }'   Also, how can I get the output of the command to provide me the size in KB instead of the mixed GB/MB by default? That way I have a base to work off of when computing.


This is a puzzle asked in a contest. Given that encryption , decryption happens as per following rule/code:      Encrypt(PlainTextBytes, KeyBytes){          for(int i = 0;i < PlainTextBytes.length; i++) {              Cipherbytes[i] = PlainTextBytes[i] ^ KeyBytes[i];          }          return Cipherbytes;      }       Decrypt(Cipherbytes, Keybytes){          for(int i = 0; i < Cipherbytes.length; i++) {              Plaintextbytes[i] = Cipherbytes[i] ^ Keybytes[i];          }          return Plaintextbytes;      }       Send(message){          key=Read from file "SymmetricKey.txt"          Convert key to keyBytes and message to messageBytes using ASCII encoding          print "Message to be sent: ", encrypt(messagebytes, keybytes)      }       Receive(receivedmessage){          key = Read from file "SymmetricKey.txt"          Convert key to keyBytes and receivedmessage to receivedmessageBytes using ASCII encoding          print "Message for you : " , decrypt(receivedmessagebytes, keybytes)      }    Given 3 encrypted message sequences as follows      120, 84, 25, 1, 15, 17, 42, 21, 9, 12, 3, 49, 8, 29, 82, 31, 87, 118, 88, 92, 93       125, 87, 44, 7, 31, 41, 6, 8, 17, 51, 14, 17, 42, 27, 86, 19, 66, 92, 88, 86, 7       123, 84, 16, 28, 9, 10, 4, 2, 31, 55, 7, 6, 13, 61, 91, 62, 89, 91, 83, 87, 86    Some one has discovered that there is some flaw in encryption. IMO flaw doesn't lie with code it's in Cipherbytes. Cipherbytes may be having some patterns so that we can decrypt this message.          Is there a way I could get the source message of these three encrypted messages?  I have look at  That question is different from this since that assumed that cipher text uses same pattern to encrypt in this case it's not true . I wrote simple program to test nothing prints on output.  as  char a1[ ]={120, 84, 25, 1, 15, 17, 42, 21, 9, 12, 3, 49, 8, 29, 82, 31, 87, 118, 88, 92, 93 };      char a2[ ]={125, 87, 44, 7, 31, 41, 6, 8, 17, 51, 14, 17, 42, 27, 86, 19, 66, 92, 88, 86, 7};      char a3[ ]={123, 84, 16, 28, 9, 10, 4, 2, 31, 55, 7, 6, 13, 61, 91, 62, 89, 91, 83, 87, 86 };      for(i=0;i<256;i++){             for(int l=0;l<22;l++){                 s1[l] =  (a1[l]^i)^a2[l];                 s2[l] =  (a1[l]^i)^a3[l];             }             flag=1;             for(k=0;k<22;k++){                 if(s1[k]!=s2[k])flag=0;             }             if(flag){                for(int k=0;k<22;k++){                 cout<<(s1[k]^a1[k]^a2[k])<<" ";               }               cout<<"\n";             }     }

Suppose Alice wants to send encryptions (under a one-time pad) of $m_1$ and $m_2$ to Bob over a public channel.  Alice and Bob have a shared key $k$; however, both messages are the same length as the key $k$.  Since Alice is extraordinary lazy (and doesn't know about stream ciphers), she decides to just reuse the key.  Alice sends ciphertexts $c_1 = m_1 \oplus k$ and $c_2 = m_2 \oplus k$ to Bob through a public channel.  Unfortunately, Eve intercepts both of these ciphertexts and calculates $c_1 \oplus c_2 = m_1 \oplus m_2$.     What can Eve do with $m_1 \oplus m_2$?     Intuitively, it makes sense that Alice and Bob would not want $m_1 \oplus m_2$ to fall into Eve's hands, but how exactly should Eve continue with her attack?


Let $ f\in L^1(\mathbb{R}^3,\mathbb{C} ) $ be a function such that for $ x_1,x_2\in \mathbb{R}^3 $ such that   $ |x_{1}|=|x_{2}| $ we have $ f\left(x_{1}\right)=f\left(x_{2}\right) $. I have to prove that also for any $ \omega_{1},\omega_{2}\in\mathbb{R}^{3} $ we have $ \mathcal{F}\left\{ f\right\} \left(\omega_{1}\right)=\mathcal{F}\left\{ f\right\} \left(\omega_{2}\right) $. Here's what I have tried: Note that $ \mathcal{F}\left\{ f\right\} \left(\omega\right)=\frac{1}{\left(2\pi\right)^{3}}\intop_{\mathbb{R}^{3}}f\left(x\right)e^{-i\omega\cdot x}dx $ (where $ \omega \cdot x $ is the dot product of 3dimensional vectors). Now I want to switch to spherical cooredinates, so I'll note $ \omega=\left(R\sin\left(\theta_{1}\right)\cos\left(\varphi_{1}\right),R\sin\left(\theta_{1}\right)\sin\left(\varphi_{1}\right),R\cos\left(\theta_{1}\right)\right) $ and $ x=\left(r\sin\left(\theta\right)\cos\left(\varphi\right),r\sin\left(\theta\right)\sin\left(\varphi\right),r\cos\left(\theta\right)\right) $ So that $ \mathcal{F}\left\{ f\right\} \left(\omega\right)=\frac{1}{\left(2\pi\right)^{3}}\intop_{0}^{\infty}\intop_{0}^{\pi}\intop_{0}^{2\pi}f\left(r,\theta,\varphi\right)e^{-irR\left(\sin\theta_{1}\cos\varphi_{1}\sin\theta\cos\theta+\sin\theta_{1}\sin\varphi_{1}\sin\theta\sin\varphi+\cos\theta_{1}\cos\theta\right)}r^{2}\sin\theta d\varphi d\theta dr $ and since $ r $ is radial I can just write $ f(r) $. Also I will use trigonometric identities to get: $ =\frac{1}{\left(2\pi\right)^{3}}\intop_{0}^{\infty}\intop_{0}^{\pi}\intop_{0}^{2\pi}f\left(r\right)e^{-irR\left(\sin\theta_{1}\sin\theta\cos\left(\varphi-\varphi_{1}\right)+\cos\theta_{1}\cos\theta\right)}r^{2}\sin\theta d\varphi d\theta dr $ All I have to do is to show that the integral does not depend on $ \theta_1 , \varphi_1 $ But I got stuck here. Any help would be appreciated. Thanks in advance.

Let $f\in S(R^2)$ radial. Its Fourier transform is radial because the Lebeasgue measure is invariant under rotation?


I have been using neovim for a long time and I have been using Ctrl + s to save and Ctrl + q to quit.  nmap <c-s> :w<CR> imap <c-s> <Esc>:w<CR>a  nmap <c-q> :q<CR> imap <c-q> <Esc>:q<CR>   Due to the unexpected behavior of nvim with coc I switched to vim. It's using the same configuration but Ctrl + s freezes the editor and Ctrl + q is required to unfreeze it. I'm using Simple Terminal and it does not freeze for Ctrl + s.  NVIM v0.4.2 VIM - Vi IMproved 8.1

I have two different machines (home and work) running Ubuntu 18.04. Last night vim froze at home. I was in insert mode and typing and went to save (esc :w) and nothing happened. The status bar still reads -- INSERT --, the cursor is still blinking where it was. I was stuck. I couldn't find a way out. I couldn't type (nothing happened when I type), I couldn't move around (the up and down arrows did nothing). It was stuck in insert mode with the cursor blinking where it was.   I was definitely multitasking and probably hit some other keys in there, but I don't know what keys. It was late, though, so I closed the terminal window and tried again (I was entering a git commit message). It happened again partway through my typing so I switched to git commit -m "don't need an editor for this" instead. And then I shut down my computer and stopped working.  I figured I was just tired, but then it happened to me today at work on a different laptop altogether. Again I was multitasking and can't swear I didn't type any bizarro key sequence but if I did it was accidental. And other tabs in the same terminal aren't frozen.   I'm used to getting trapped in visual mode in vim. That's a trick I've learned. But stuck in insert mode? Any ideas on what I might've done and how to get out of it?   Per a comment suggestion I tried looking at .viminfo but the only .viminfo I see is owned exclusively by root and only appears to show things I would have edited with sudo:   # Input Line History (newest to oldest):  # Debug Line History (newest to oldest):  # Registers:  # File marks: '0  1  0  /etc/neomuttrc |4,48,1,0,1531789956,"/etc/neomuttrc" '1  1  66  /etc/apt/sources.list.d/signal-bionic.list |4,49,1,66,1530816565,"/etc/apt/sources.list.d/signal-bionic.list" '2  51  0  /etc/apt/sources.list |4,50,51,0,1530816531,"/etc/apt/sources.list"  # Jumplist (newest first): -'  1  0  /etc/neomuttrc |4,39,1,0,1531789956,"/etc/neomuttrc" -'  1  66  /etc/apt/sources.list.d/signal-bionic.list |4,39,1,66,1530816565,"/etc/apt/sources.list.d/signal-bionic.list" -'  1  66  /etc/apt/sources.list.d/signal-bionic.list |4,39,1,66,1530816565,"/etc/apt/sources.list.d/signal-bionic.list" -'  51  0  /etc/apt/sources.list |4,39,51,0,1530816531,"/etc/apt/sources.list" -'  51  0  /etc/apt/sources.list |4,39,51,0,1530816531,"/etc/apt/sources.list" -'  51  0  /etc/apt/sources.list |4,39,51,0,1530816531,"/etc/apt/sources.list" -'  51  0  /etc/apt/sources.list |4,39,51,0,1530816531,"/etc/apt/sources.list" -'  1  0  /etc/apt/sources.list |4,39,1,0,1530816447,"/etc/apt/sources.list" -'  1  0  /etc/apt/sources.list |4,39,1,0,1530816447,"/etc/apt/sources.list" -'  1  0  /etc/apt/sources.list |4,39,1,0,1530816447,"/etc/apt/sources.list" -'  1  0  /etc/apt/sources.list |4,39,1,0,1530816447,"/etc/apt/sources.list"  # History of marks within files (newest to oldest):  > /etc/neomuttrc     *   1531789952  0     "   1   0  > /etc/apt/sources.list.d/signal-bionic.list     *   1530816564  0     "   1   66     ^   1   67     .   1   66     +   1   66  > /etc/apt/sources.list     *   1530816454  0     "   51  0   It seems odd that I wouldn't have an unprivileged .viminfo but I did sudo udpatedb and locate .viminfo and still didn't surface more than the one root-owned file.


I'm wondering if there is keyboard shortcut to close terminal window?

Is there a command to close a terminal window via commandline?


I'd like to draw dashed lines from the right (east) border of one rectangle to the west anchor of two other rectangles, but the line should be horizontal. Is there an elegant way to decide where the line should start? See the following image as a clarification: the delta node should have two horizontal arrows pointing to the a_h and a_l boxes. I've played around with angles, which is almost impossible to get right because I can only estimate the correct value and it's unlikely to serve as a perfect match for the starting point of the arrow.  Current example code:  \begin{tikzpicture}     [         inverter/.style={rectangle,draw,inner sep=2pt,minimum size=6mm},         dot/.style={circle,inner sep=0pt,minimum size=0.5mm,draw,fill=black}     ]     \node (x) at (0,0) {$x$};     \node (delta) at (1,0) [shape=rectangle,draw,minimum height=18mm,minimum width=6mm] {$\delta$};      \node(ah)     at ( 2,  0.5) [inverter] {$a_h$};     \node(al)     at ( 2, -0.5) [inverter] {$a_l$};      \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.58.75) -- (ah);     \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.-58.75) -- (al); \end{tikzpicture}   This code is clearly ugly and broken. It is easy to see that at least the upper arrow is by no means perfectly horizontal. How do I do it correctly?

I'm trying to draw arrows with / marks and numbers like in the following picture:    My current solution looks like this:  \begin{tikzpicture}     [         inverter/.style={rectangle,draw,inner sep=2pt,minimum size=6mm},         dot/.style={circle,inner sep=0pt,minimum size=0.5mm,draw,fill=black}     ]     \node (x) at (0,0) {$x$};     \node (delta) at (1,0) [shape=rectangle,draw,minimum height=18mm,minimum width=6mm] {$\delta$};      \node(ah)     at ( 2,  0.5) [inverter] {$a_h$};     \node(al)     at ( 2, -0.5) [inverter] {$a_l$};      \draw [->] (x) -- (delta);      \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.58.75) -- (ah);     \node at ($ (ah) - (0.55, 0) $) {\scriptsize /};     \node at ($ (ah) - (0.5, 0.2) $) {\tiny 4};     \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.-58.75) -- (al);     \node at ($ (al) - (0.55, 0) $) {\scriptsize /};     \node at ($ (al) - (0.5, 0.2) $) {\tiny 4}; \end{tikzpicture}   which is pretty hacky and doesn't look nice. I tried strike out shapes but found the line to be much too long. However, positioning a / and a number manually seems like a pretty bad solution to me. I've seen a similar question that revolved around striking out lines or arrows, but without any numbering. Any input would be most welcome.


I am trying to figure out how to determine if a tuple has an exact match in a list of tuples, and if so, return the index of the matching tuple. For instance if I have:  TupList = [('ABC D','235'),('EFG H','462')]   I would like to be able to take any tuple ('XXXX','YYYY') and see if it has an exact match in TupList and if so, what its index is. So for example, if the tuple ('XXXX','YYYY') = (u'EFG H',u'462') exactly, then the code will return 1.   I also don't want to allow tuples like ('EFG', '462') (basically any substring of either tuple element) to match.

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?


My book (A Book of Abstract Algebra, Pinter) is asking me to explain why if $x^p-a$ factors in $F[x]$ then $x^p-a=p(x)f(x)$ where $\text{deg } p,f \le 2$, here $F$ is a field and $p$ is prime.   It seems to me that this question has a typo, since $\text {deg} pf \le \text{deg}p +\text{deg} f\le 4$ so all primes greater than $4$ would not be accounted for in the result. The book makes no further assumptions about the field $F$, and the goal of the exercise is to prove that either $x^p-a$ has a root or it is irreducible. If I assumed that a typo occurred, I would guess that the question would morph into   Explain why if $x^p-a$ factors in $F[x]$ then $x^p-a=p(x)f(x)$ where $\text{deg } p,f \ge 2$, here $F$ is a field and $p$ is prime.   However, this still does not make sense to me because I can think of counterexamples (in both directions of the inequality) where the fact does not hold. Am I misunderstanding the problem or is it ill-stated?

Hungerford's book of algebra has exercise $6$ chapter $3$ section $6$ [Probably impossible with the tools at hand.]:     Let $p \in \mathbb{Z}$ be a prime; let $F$ be a field  and let $c \in  F$. Then $x^p - c$ is irreducible in $F[x]$ if and only if $x^p - c$   has no root  in $F$. [Hint: consider two cases: char$(F) = p$ and   char$(F)$ different of $p$.]   I have attempted this a lot. Anyone has an answer?


I have a Herschel suitcase and the reset button is pressed in and now stuck, which means any combination will unlock the suitcase. does anyone know how to fix this?

I have a VIP skybag (I believe this does not matter). It has a 3-number TSA lock built into the suitcase. I know the combination to unlock, let's say it's 345. Recently it was locked and while there was a different number on the combination lock the reset/set lock button was pressed.  Since then the reset/set lock button is pressed (stuck) and the lock button also does not unlock. Any pointers on how to unlock it? I am thinking of unscrewing the lock from inside of the suitcase but it seems quite a hassle, as I may have to assemble it back. Let me know if there is any other option to unlock it from the outside.


I think it is ,"Shu, I love you." Because Chelly is in the persona of Inori. But I realized there was more code not only in the beginning but in other parts of the song. I don't know if it's just me, so correct me if I'm wrong.

The song Planetes in Guilty Crown begins with some telegraph encoding, which I think is . Here is the . My transcription is: -•-• -••-- •-- --•-- •- --•-• •-•-- -•--•  which decodes to this:  ni-yu-ya a-i-shi-te-ru  Niyuya didn't make sense. Did I get something wrong?


I removed the BB (Shimano BB-93) from my Canondale Trail and found the drive side thread is stripped on BB and frame. See  and  What are the options for me to replace the BB? Is there an alternative part which will reach the good thread or other alternative? I'm aware there could be a machining/welding/tapping option, but would guess that would not be worthwhile on an ageing bike. Are there any alternative parts I could use?  mentions a Velo-orange option that clamps in place, but if possible I'd like to keep my recently replaced Hollowtech II crankset if possible I'm baffled by all the combinations, hoping someone has been down this path already and can suggest if there's a practical solution.

The bottom bracket of my bike was completely stripped to the point that when you push the left side crank arm, the right crank moves and you can see the bottom bracket lock move out the frame. The bike shop tried putting Teflon tape but it's temporary. It's a 26' xc hard tail. For all I know both sides of the bottom bracket(square tapered) are stripped clean hence the Teflon tape put by the previous owner. Can I fix the problem by changing into a hallow tech cranks because it works like a thread less bb, or should I just buy a thread less square tapered bb? Any suggestion on what to do?


I have an associative array (object) in wich I store data loaded from a 3rd party.  // 3rdPartyData is also an associative array for(var key in 3rdPartyData) {   cookie[key] = 3rdPartyData[key]; }   My object gets stored into a cookie at the end and gets loaded form a cookie before (or created {} if no cookie exists).  Each page view the data from the 3rd party gets added or updated in my cookie array.  Question: If I wore to look the cookie, would the loop always get each key in the order they wore added to it or would the order be changed?  If so can anyone provide an idea on how to manage something like this?

Does the "for…in" loop in Javascript loop through the hashtables/elements in the order they are declared? Is there a browser which doesn't do it in order? The object I wish to use will be declared once and will never be modified.  Suppose I have:  var myObject = { A: "Hello", B: "World" };   And I further use them in:  for (var item in myObject) alert(item + " : " + myObject[item]);   Can I expect 'A : "Hello"' to always come before 'B : "World"' in most decent browsers?


Working on setting up private subdomains through end client. Marketing Cloud has a SAP sku provisioned but where do you obtain the SPF and DKIM to pass to client for DNS setup and how does one access/view the SAP information for the Marketing Cloud instance?

I cannot find where can I put the DKIM in the exacttarget portal.


I'm following a Ducky3D tutorial  The alpha clip in the material settings is supposed to show an array of see through planes. Without the alpha clip, it's not see through. How do I get the alpha clip to render? No matter what the alpha clip won't show in an Eevee render. I don't want to use Cycles because it looks weird. Viewport display Vs Eevee below Viewport Display:  Eevee Render:  Cycles Render:

When two objects -one of them transparent- intersects it creates some artifacts visible even in the alpha channel. Even with 1024 transparent bounces the artifacts remain.    In the example file there are two cubes in the same position, one transparent and one emission.    What is causing this? Any way to get rid of this artifacts?


What happens to the event horizons of each black hole as the two identical non-rotating black holes collide head on?  At a point exactly between them, is the curvature zero (do the individual curvatures due to each black hole cancel out)?  Does it mean that when the holes begin to merge (event horizons touch) the event horizon of each black hole recedes away because the curvatures cancel out?  Does that mean I would then be able to peer inside a black hole? [tantamount to information now escaping from the original insides of the black holes]

Will the event horizons of a two black holes be perturbed or bent before a collision? What will the shape of the event horizon appear to be immediately after first contact?


Soon I will be travelling from Europe to the US for a week. I have a plan to purchase a laptop online and have it ship to the hotel I am staying at.  My concern is, will I be able to take the laptop back to Europe with me as hand luggage without running into taxation/confiscation and/or other problems?

I am an American with residence in Belgium.  I came here to the USA for the holidays and brought my old, iPhone, iPad and my MacBook. Now, here, I want to buy a new iPad and also a surface pad, among some other stuff.   Assuming I leave the boxes at home, and boot these devices up, maybe downloading some stuff on them, before leaving to the airport, will it be safe to bring them without risk of paying tax?  I can't find any info on the limit of goods I can bring over. I suppose if they are not in their boxes, it's clear that I am not selling them (in fact they are Xmas gifts).  Is there some regulation about this?


I usually use sudo apt install <program> to install software but occasionally install via Ubuntu-software application if I want an app to appear in the Applications menu. From what I gather, the snap store is similiar but allows also to download/install from terminal, snap install <program>.  Is there a difference between the Snap Store and Ubuntu software?  Is there any reason to install via Snap rather than Ubuntu Software application?  Thanks

This is not a duplicate of the following questions     because:  My question specifically states that I am interested in end-user experience, not ease or efficiency of development, which is what the other question largely refers to.  As has been noted, development/deployment affects end-user experience, but it is not all there is to it, and neither of the referenced questions address issues that directly impact an end-user's ability to use the application (e.g. trouble accessing data on other partitions, sluggishness, etc.) Maybe "compelling" wasn't the right word to use; my intent was to ask about real-world, experiential consequences, i.e., things that happen or  don't happen, as opposed to theoretical/architectural statements that, while presumably accurate, don't appear to be backed up with any real-world examples to support the statement. I should have stated more directly that my intention was to get answers that consider the balance of "advantages" to snaps against the real-world downsides experienced by end-users. The "duplicate" question is largely theoretical, and doesn't discuss end-user experience at all. The "duplicate" question makes no mention of anything remotely similar to the example I used here, i.e., that there is an end-user downside to snaps (in this case, lack of access to data on other partitions and snap app performance) that isn't discussed in any available documentation that I can find.   While I understand that snap has a big advantage in making apps more widely available, is there any compelling reason to choose snap over apt, if the app is available for my distro/version via an apt package? I am curious because I've been doing some reading about snaps, and all the excitement about the method seems to be about things that are advantageous for app developers, but I've seen virtually nothing on how this makes life easier for end users (aside from the obvious; that they may be able to install apps that aren't otherwise available on their distro/version). I installed snapd and installed a couple of snaps and was really frustrated and disappointed.  The snap apps are slow and it's difficult, if not impossible, to access files on other partitions from within the snap. While I've seen plenty of info that says snaps are "faster," "easier," "safer," etc., I haven't been able to find anything that explains why or how this is actually the case. Being very new to Linux, I am wondering if maybe I'm just missing something obvious? To be clear, I understand why the technology might be useful overall, but I can't find anything that explains whether/why it is a better option even when the app in question is available for install via a more traditional method, and all dependencies are met.


The highest number that double can represent is extremely high, I thought. Though following code throws an exception. It's actually my full code.  public class Summe { public static void main(String[] args) {     System.out.println(summe(20000));   }  public static double summe(double s) {     return s == 0 ? s : s + summe(s-1);    } }   Thanks for the answers so far. My question is: How can I make my code work?

What is a StackOverflowError, what causes it, and how should I deal with them?


I compile C++ codes and get a problem. The problem shows as following:  The following are my codes:  Stack.h     #ifndef _STACK_H    #define _STACK_H    namespace myAlgo    {      namespace STK     {     template<typename T>     struct Stack_Node     {          T data;         Stack_Node<T>* next;          Stack_Node() {};         Stack_Node(const T& item, Stack_Node<T>* next) :data(item), next(next) {};          T add(T a, T b);     };   }  }  #endif   Stack.cpp  #include "Stack.h" using namespace myAlgo::STK; template< typename T> T Stack_Node<T>::add(T a, T b) { return a + b; }  main() function is in the following file:  AlgoStack.cpp  #include <iostream> #include "Stack.h"  using namespace std; using namespace myAlgo::STK;  int main() {    Stack_Node<int>* p = new Stack_Node<int>(67, nullptr);    std::cout << p->data << " " << p->next << endl;    int res = p->add(3, 4);    std::cout << res << endl;     system("pause");     return 0; }  So anyone who can help me, thank you!

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


Is there any Stack Exchange site where I can ask others to recommend me good web sites for solving specific problems?  For example I would like to know if there is any URL shortening website that can allow me to define the url.  For example instead of http://bit.ly/1gX2dD0 I would like it to be http://bit.ly/superflow - if "superflow" is not available then I will invent another word.  I can imagine that such services are paid but I don't need the link to last more than one day, and maybe there is such a website.

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


On a PC with a mouse one would use the hover state. On touchscreens what's the best way to provide this kind of information?

What are the best practices for tooltips on mobile websites? I'm designing the mobile version of a website for customers' accounts (where they can see their latest bill and settings for their accounts). The desktop site is filled with tooltips: to explain terms. For instance, on a page to edit customers' settings, there are tooltips for each setting (each setting can also be ticked). We also have customers' bill pages: accounting terms have tooltips.  We're considering tooltips (an 'i' icon next to each item, but each "i" will have to be quite small: not really usable), or a single tooltip button at the top or/and bottom of each page needing tooltip. Or a tooltip pinned to the bottom of the page.  I think we need to minimise the number of tooltips. In addition, I'm not sure what is the best practice, usability-wise, to present them on a mobile device.


I'm doing a couple of tests in my local computer and I noticed that the plan cache was being wiped every couple of minutes. After researching a bit I noticed on my error log that my instance was with memory pressure and paging out...  I really can't understand what's going on as I do have my perfmon open all the time and I do have 4.3GB available memory and the instance is not caped in memory limit.   Do you guys have any idea what's going on?  I also would like to take this opportunity to ask if anyone knows a way to catch when does the lazy writer gets executed ?Is there any way to track him down ?  Thank you all! @@Version: Microsoft SQL Server 2014 - 12.0.4100.1 (X64)  sys.dm_os_ring_buffers   <Record id = "101241" type ="RING_BUFFER_RESOURCE_MONITOR" time ="4419025954"> <ResourceMonitor>     <Notification>RESOURCE_MEMPHYSICAL_LOW</Notification>     <IndicatorsProcess>2</IndicatorsProcess>     <IndicatorsSystem>2</IndicatorsSystem>     <IndicatorsPool>2</IndicatorsPool>     <NodeId>0</NodeId>     <Effect type="APPLY_LOWPM" state="EFFECT_ON" reversed="1">1114779</Effect>     <Effect type="APPLY_HIGHPM" state="EFFECT_OFF" reversed="0">0</Effect>     <Effect type="REVERT_HIGHPM" state="EFFECT_ON" reversed="1">791590828</Effect> </ResourceMonitor> <MemoryNode id="0">     <TargetMemory>388744</TargetMemory>     <ReservedMemory>34086804</ReservedMemory>     <CommittedMemory>388740</CommittedMemory>     <SharedMemory>0</SharedMemory>     <AWEMemory>0</AWEMemory>     <PagesMemory>151288</PagesMemory> </MemoryNode> <MemoryRecord>     <MemoryUtilization>48</MemoryUtilization>     <TotalPhysicalMemory>16664584</TotalPhysicalMemory>     <AvailablePhysicalMemory>4534516</AvailablePhysicalMemory>     <TotalPageFile>30857376</TotalPageFile>     <AvailablePageFile>8330020</AvailablePageFile>     <TotalVirtualAddressSpace>137438953344</TotalVirtualAddressSpace>     <AvailableVirtualAddressSpace>137404308856</AvailableVirtualAddressSpace>     <AvailableExtendedVirtualAddressSpace>0</AvailableExtendedVirtualAddressSpace> </MemoryRecord>

I have received the email below that states that an alert has been fired and     a significant part of SQL Server process memory has been paged out   should I raise the Minimum server memory to 1740 too?     Microsoft SQL Server 2005 - 9.00.5000.00 (X64)    Dec 10 2010 10:38:40      Copyright (c) 1988-2005 Microsoft Corporation   Standard Edition   (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)     There are other applications, even monitoring applications running on that server.   You can have a glimpse of those applications by looking at the picture below.    We received an alert at 12:15:37 PM on the wrsleic1 default instance that "a significant part of SQL Server process memory has been paged out."  We've investigated the alert and found that SQL Server previously reported this condition last year on 13/04/2015. SQL Server is currently allocated a maximum memory of 1.7 GB while the server has 4 GB physical memory available to it (and a dynamically sized page file that is currently 5 GB).  At the time of the alert SQL Server had it's maximum memory reserved while not necessarily actively using the cached data. Therefore when the server detected memory pressures from an external process (potentially IIS but we can't determine this retrospectively), SQL Server trimmed its working set to accommodate the requirement and is currently utilising approximately 900 MB.  The OS is responsible for memory management and SQL Server is designed to respond to memory release requests as it did at the time of the alert. Therefore if there was no perceivable impact to performance on the application that uses the hosted databases on this instance then we don't recommend any further action.   Lock Pages in Memory   The lock pages in memory has not been enabled for any sql server account.    I was going to change this, however, I decided to leave this server as it is because:  1) it is running on standard edition sql server 2005 SP2 and       Standard Edition Up until SQL Server 2005 SP3 Cumulative Update   Package 4 and SQL Server 2008 SP1 Cumulative Update Package 2 'Lock   Pages in Memory' was not supported in SQL Server Standard Edition.   2) after enabling it - needs a reboot      Question:         “Weather we require Lock Pages in Memory in SQL   Server 64-Bit”?      Answer:            YES   3) We should (hope so) migrate this server to sql server 2014 soon    and a reminder:


UPDATE: None of the provided answer to this date (2017.10.16) have helped me solve the problem, so in a fair world no one should get the bounty. I should emphasis that the provided answer were either not in the direction of answering the question (like those who suggested installing Gnome) or their suggestion didn't work on the computer that I have this issue on. Nevertheless i appreciate the time and effort they have put into this.   This might look like a duplicate post but IT'S NOT since none of the suggestions and solutions in other posts worked in my case.  Problem description: Everything was going fine but I faces some sort of lags, so I rebooted the computer and after logging in to my account, Unity didn't load properly. I rebooted multiple times and ... Nothing.  What I did: I tried all the solutions and suggestion out there an none of the solutions out there worked. Things like:  the top 10 suggestions here:   or  unity-tweak-tool --reset-unity   or  unity --reset-icons   or  unity --reset   or  gconftool --shutdown sudo killall -r -I gconf sudo killall -r -I dconf rm -rf .compiz* .gconf* .config/dconf/ .config/compiz*   My Idea and question: Based on a suggestion of my friend, I tried to login with another user and it worked! everything was fine, which narrowed down that some settings in my account is corrupted!  The question is, Which files should I transfer from the other account that Unity works fine on to my own account?  When I try to run Unity from terminal I get the following:  $unity unity-panel-service stop/waiting unity7 stop/waiting unity-panel-service start/running, process 6549 unity7 start/running, process 6648

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I'm trying to evaluate the following limit...  $$\lim\limits_{x \to \infty} \frac{x-3}{\cos x+x}$$  My first thought was to use L'Hôpital's rule. The numerator obviously tends towards infinity, and so, I believe, does the denominator, because of the additive $x$ term. Applying the rule, then, we arrive at the following result: $$\lim\limits_{x \to \infty} \frac{1}{-\sin x+1}$$ It would therefore seem that the limit does not exist, since the denominator is an alternating trig function with periodic asymptotes. However, if we graph our original function, it's quite clear that the limit actually tends to 1. This can be shown be squeezing the function between $\frac{x-3}{-1+x}$ and $\frac{x-3}{1+x}$ respectively.  Why, then, does L'Hôpital's rule not seem to apply to this function? Is there some nuance or precondition for the rule that I'm missing?

Apparently, Rogawski's Calculus for AP contains the following problem:  108. Explain why L'Hôpital's rule does not apply to  $$ \lim_{x\rightarrow 0}\frac{x^2\sin\frac{1}{x}}{\sin x} $$  It seems to me that  does apply:  The L'Hôpital's rule says: if $\lim_{x\rightarrow c}f(x)=\lim_{x\rightarrow c}g(x)=0$ and both $f$ and $g$ are differentiable at $x=c$ and $g'(c)\ne 0$, then $\lim_{x\rightarrow c}\frac{f(x)}{g(x)}$ exists and is equal to $\frac{f'(c)}{g'(c)}$. (Note that nothing is assumed about differentiability of $f$ and $g$ other than at $x=c$).   Define the numerator $f(x)=x^2\sin\frac{1}{x}$ to be $f(0)=0$ at $x=0$. Now, both numerator $f$ and denominator $g(x)=\sin(x)$ are continuous at $x=0$ and their values are $f(0)=g(0)=0$. The numerator $f$ is differentiable at $x=0$ and the derivative is $f'(0)=0$ (the derivative itself is discontinuous at 0, but that is irrelevant - even the existence of the derivative at any point other than 0 does NOT matter). One can see that from the definition of the derivative: $f'(0)=\lim_{h\rightarrow 0} \frac{h^2\sin\frac{1}{h}}{h} =  \lim_{x\rightarrow 0} h\sin\frac{1}{h} = 0$ (see PS step 2 below). The denominator $g$ is differentiable at $x=0$ and the derivative is $g'(0)=\cos 0=1$. Thus the limit is $\frac{0}{1} = 0$.   What am I missing?  PS. Note that I am not asking why the limit is 0. That can be easily seen without L'Hôpital:   $\lim_{x\rightarrow 0}\frac{x}{\sin x} = 1$: this is the inverse of the standard limit $\lim_{x\rightarrow 0}\frac{\sin x}{x} = 1$. $\lim_{x\rightarrow 0} x  \sin\frac{1}{x} = 0$ because $\sin\frac{1}{x}$ is bounded and $\lim_{x\rightarrow 0} x = 0$, this follows from . the  implies that  $$\lim_{x\rightarrow 0}\frac{x^2\sin\frac{1}{x}}{\sin x} =  \lim_{x\rightarrow 0}x\sin\frac{1}{x} \times \lim_{x\rightarrow 0}\frac{x}{\sin x} = 0 \times 1 = 0$$   PPS Here is the scan from the textbook:


i have a 1TB external hdd but its showing some error in ubuntu   Error mounting /dev/sdc1 at /media/ubuntu/NAPSTER: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999,dmask=0077,fmask=0177" "/dev/sdc1" "/media/ubuntu/NAPSTER"' exited with non-zero exit status 14: Metadata kept in Windows cache, refused to mount.  Failed to mount '/dev/sdc1': Operation not permitted  The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

I cannot mount Windows 8 partition disk on Ubuntu 12.10.  My Windows 8 is installed on "C" partition, and I have another "D" partition.  I can easily mount "D" partition, see files and make changes on them. Actually I also have a problem with this: when I copy a file from ubuntu to "D", I cannot see this file on Windows 8.  My main problem is when I try to mount "C" partition I get this:     Unable to mount 121 GB Volume   Error mounting /dev/sda3 at /media/furkan/06DEC78FDEC77589: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda3" "/media/furkan/06DEC78FDEC77589"' exited with non-zero exit status 14: Windows is hibernated, refused to mount.   Failed to mount '/dev/sda3': Operation not permitted   The NTFS partition is hibernated. Please resume and shutdown Windows   properly, or mount the volume read-only with the 'ro' mount option, or   mount the volume read-write with the 'remove_hiberfile' mount option.   For example type on the command line:           mount -t ntfs-3g -o remove_hiberfile /dev/sda3 /media/furkan/06DEC78FDEC77589


In the following example of mine, is it possible to substitute "until" for "by" or not? - You must be home by 7 o’clock. I guess until doesn't work here.

I've watched 10 movies until now. He should have been here by now  I think in the first sentence, "by" doesn't work and using it will not be idiomatic. This applies to the using "until" in later sentence too. For me using "until" will not be be a correct usage. Instead the "until" in the first sentence and "by" in the second sentence fit the best. Am I right?


I recently installed an SSD into my computer and put a fresh install of Win 7 on it. I was going through the folders of my old HDD to try and free up some space, but it wouldn't let me delete the Windows folder. I even tried claiming ownership of it as per , but it still couldn't be deleted.

I updated my laptop's OS from Windows XP to Windows 7. There are some leftover files from Windows XP on the computer now. If I try deleting them I get the following error:     You need permission to perform this action.      You require permission from S-1-.... to make changes to this folder.   What's weird is that I am logged in with the only user account on this machine and I have administrator privileges. I tried turning UAC off, but I still can't delete the files.  How can I force removal of these files?


I have two notifications that haunt me on Kubuntu 13.10, and I would like for a way to suppress them, at any cost.   1.) Connection 'Netgear18' deactivated!  This comes from my crappy wireless card driver constantly de- and re- authenticating (known issue with the Broadcom 4313, but it works well enough for me to give up)  2.) Bell Session in Shell  My media player ncmpcpp sometimes throws a bell session when it switches songs, and I don't need to hear about it!  Removing the system tray just causes the notification to show up somewhere else on the screen. In a fit of rage I killed KNotify, but it respawns. Can I tell it to ignore certain types of message?

Is there a way you can disable or customize the notification bubbles on Lucid?


I am trying to test if a circle intersects a square. The best way I have figured out how to do that is to find if there is an x such that: x is between the minimum and maximum x values of the square;   abs(x-centerOfCircle) <= radiusOfCircle   The problem is I can't figure out how to translate this into code, can anyone help?

How can I tell whether a circle and a rectangle intersect in 2D Euclidean space? (i.e. classic 2D geometry)


I was wondering when should I use exit() function over return statement. I can end the program with either of the following statements:  exit(0);    or  return;   Which one should I use and when? Is there any advantage of using exit()?

Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's like reading any other function and the flow control when I'm reading the code is smooth (in my opinion). And even if I want to refactor the main() function, having return seems like a better choice than exit().  Does exit() do anything special that return doesn't?


I have a VAIO laptop, with a dual boot Windows 10 / Ubuntu 16.04.   I wanted to resize the partitions to increase the disk space allocated to Ubuntu, so I tried to shrink the Windows partition from Windows, using AOMEI partition assistant. After the software was done, the computer rebooted, but I ended on the GRUB command-line prompt, meaning (I think) that it was not able to boot either Windows nor Ubuntu. I tried using boot-repair on a live USB. It said that the repair was successful, but I still cannot boot my computer. It gave me a Ubuntu pastebin address to get help:  I tried to follow the instructions on the following threads:  ,  , but I don't remember on which partitions the two OSs were mounted, and I didn't want to make more damage. Finally I ran GParted from the live USB, here is what it gave me:   The size of /sda4 corresponds to the size that the shrunk Windows partition should have, and the size of the unallocated space corresponds to the size of the space left empty by the resizing of the Windows partition plus the size of the previous ubuntu partition.   Does someone have an idea of what I should do ? From what I can guess the Ubuntu partition has been quite damaged (if I remeber well, it was on /dev/sda7, but there is no such partition any more, and on line 236 of the boot-info file is written that there is no linux OS), but I hope that I am wrong!

I had Windows 10 and Ubuntu 14.04 installed in dual boot.  Roughly 125GB each.   After the Windows update the PC only showed me the grub rescue terminal. I could neither use Ubuntu nor use Windows.  I inserted the liveCD and ran boot-repair.  After that Windows appeared normally, but no GRUB and no Ubuntu.  This is what I get when I run sudo fdisk -l:    Ubuntu must be either /dev/sda2 or /dev/sda4, since they are the biggest partitions, but neither of them is recognized as a Linux system.  What should I do?


Also, what about in general, for some value p, which has the value 2 in the given formula?    MOTIVATION:  I was wondering the probability of never getting tails if one forever flipped a coin whose probability of landing tails decreased (in this case, geometrically) each flip.    The probability of tails on flip i is $\frac{1}{2^i}$, and the probability of heads on flip i is $1-\frac{1}{2^i}$. So, first flip the coin is 50-50, next it is 75-25, etc. And the probability of never landing tails is equal to the probability of always landing heads, which is the infinite product of the heads probabilities, yielding $\prod_{i=1}^\infty \left(1-\frac{1}{2^i}\right)$. => ($\frac{1}{2} * \frac{3}{4} * \frac{7}{8} ...$)

Suppose $|a|<1$ be a real number. How to solve the following limit? $$\lim\limits_{n\to \infty}(1-a)(1-a^2)\cdots(1-a^n).$$


See this  song     Baa, baa, black sheep, have you any wool?   Yes sir, yes sir, three bags full!   One for the master,   And one for the dame,   One for the little boy   Who lives down the lane   Baa, baa, black sheep,   Have you any wool?   Yes sir, yes sir,   Three bags full...   Baa, baa, black sheep, have you any wool?   Yes sir, yes sir, three bags full!     Why do they say "Have you any wool?"? why not "Have you had any wool?"?  Is it ungrammatical to say "Have you any wool?" in everyday conversation?

I've seen it on TV that a guy asking another man, "have you a map?"   If I were him, I would probably say, "do you have a map?"   I would like to know what grammatical rules it followed in this case.


This is probably is stupid question but I think it must clear up some misconception I have. Magnets, presumably have magnetic fields. But where are the moving charges? Don't we need a current?

From what I understand, the magnetic force is just a relativistic effect of the electric force, and I understand how this is can be the case when considering the magnetic field generated by a current- carrying wire (length contraction of space between the electrons so they appear to be more concentrated than the positively charged ions to a 'stationary' observer, so the observer sees the wire as being negatively charged). However I do not understand why there would be a magnetic field around a permanent magnet. My teacher's explanation of permanent magnets involved there being permanent dipoles inside the magnet, however If you have two oppositely charged particles close to each other you will have an electric field around them, and not a magnetic field. I don't quite understand how lined up dipoles will produce a magnetic field if there is no motion of charges?


In windows I can change screen orientation by "Ctrl + Alt + Arrow" as Arrow can be up, left, down or right.  What is the shortcut on Ubuntu? thanks!

I am the lucky owner of a pivot monitor, which screen can be rotated (physically). What is the easiest way to make my display turn when I turn my monitor?  For the moment I first launch the 'Displays' app, and then change the settings and confirm. But this is in fact quite a laboured procedure, since I want to switch my orientation up to a few times per minute.  So is there an indicator for this, or equivalent? Can I set a keyboard shortcut that would launch a dedicated command? In fact I am thinking of something similar to the Windows program .


I plan to travel to India on Jan 30, 2021, with a green card valid until Dec 18, 2029, and an Indian Passport valid until April 4, 2021. Will there be an issue with my passport to travel to India? I shall be returning to the USA on June 30, 2021, with a renewed passport and valid green card. Will there be an issue with my travel or passport?

My wife is travelling from Philadelphia to India in January 2019 and, on her outbound trip, she will only have 50 days validity left on her passport. However, while in India, she will be renewing her passport. The reply from a similar question seems to answer point 1 below, but I wanted a second opinion to be sure.  Here are the questions we have:  Can she travel from the US to India via Doha, Qatar with passport validity of only 50 days? Can we make a reservation on Qatar Airways for the roundtrip travel using her current passport and before the return from India to the US update passport information on the reservation?