I writing ASP.NET MVC web app.  I have webpage here is design of it    Here is DropdownListFor   Also I have model , here is code:   public class Companies {     [Key]     public int CompanyID { get; set; }        [Display (Name = "Компания")]     public string CompanyName { get; set; }   }   I need to display CompanyName in DropDownList CompanyName 's is in table (over 10)  I try to do it like this  @Html.DropDownListFor(m => m.Company,                  new SelectList(Enum.GetValues(typeof(Companie_s))),                  "Select Company")   But this right when I have enum and static values. Like this  public class Companies {     [Key]     public int CompanyID { get; set; }        [Display (Name = "Компания")]     public Companie_s CompanyName { get; set; }     public enum Companie_s     {         Ciklum,         Luxoft     }  }   How I need to write code in my case?  Thank's for help.

I'm trying to use the Html.DropDownList extension method but can't figure out how to use it with an enumeration.  Let's say I have an enumeration like this:  public enum ItemTypes {     Movie = 1,     Game = 2,     Book = 3 }   How do I go about creating a dropdown with these values using the Html.DropDownList extension method?  Or is my best bet to simply create a for loop and create the Html elements manually?


The  feature gives a monk the ability to use Dexterity instead of Strength with unarmed strikes and monk weapons. It also gives the monk the ability to make an additional unarmed strike as a bonus action. A monk must be unarmed or wielding only monk weapons to use Martial Arts.  The  feature gives a monk the ability to spend one Ki point to use Flurry of Blows, which lets the monk make two additional uarmed strikes as a bonus action.  If a monk is wielding a weapon that is not a monk weapon (ignoring the question of whether it is wise for the monk to do this), can s/he still spend a Ki point to make two additional unarmed strikes as a bonus action? If so, must the unarmed strikes use Strength rather than Dexterity? I believe that the answer to both is yes, but am I missing something?

Reading over the Monk I saw that for Martial Arts:     When you use the Attack action with an unarmed strike or a monk weapon on your turn, you can make one unarmed strike as a bonus action.   This implies that non-monk weapons do not count towards being able to make this single unarmed strike. However, when looking over Flurry of Blows:     Immediately after you take the Attack action on your turn, you can spend 1 ki point to make two unarmed strikes as a bonus action.   The requirement doesn't seem to be there anymore, and I didn't see where this discrepancy was covered in . This  says that you can use flurry of blows as a bonus action on any form of attack.   So does the limitation really only exist on a single unarmed strike, but you can use whatever attack action you want to trigger Flurry of Blows?


I have this simplified jquery :  $(document).ready(function(){     $( ".product_imgfiles a" ).click(function(event) {         event.preventDefault();         alert ("you just click it");     });      //some codes cut here      if (rejected == "" ) {         $.getJSON("controller/ctrl.dropzonejs-imgfiles.php?dir='.$product_token.'",function(json){                                       $.each( json, function( key, val ) {                 if (!$("#product_imgfiles_container img[src='"+val+"']").length){                     $( "#product_imgfiles_container" ).append( "

delete

" );                 }             });         });     } });   the problem is... $( ".product_imgfiles a" ).click(function(event) only works on elements which loaded when document is ready. not new element which just added by conditional json under IF statement.  how to make it works for both situation? thank you

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


I'm playing a "Monster of the Week" style campaign with friends based on shows like Supernatural but with lots of gritty combat, using Savage Worlds as our system because of the fighting scenes.  I've used some horror "Savage Tales" for our Plot Point Campaign. The adventures don't have an "If the players fail the check" scenario, which is kinda hard to create for me since Savage Tales usually give "important" information this way.  I've also tried to hand them the important information without rolls, but that makes scenes less meaningful, and the roleplay part drags on too much; if Savage Tales are somewhat linear this "hand them info" solution just makes them completely pointless.

Well guys, following previous recommendations here I was able to build a Horror Themed Savage Worlds campaign that has made my players excited. However they're still getting used to the style, as well as I am. In order for them to hurt the major evils of the adventures they have to find their Form (physical appearance, name), Truth (How the creature came to be) and Reason (What the creature wants to), so they have to do research, kill lesser creatures, and run away from the big baddie of the adventure as they seek what it is.  Well, this is my problem:  How can I make them use skills significantly?  I'm used to railroading my players, even with mysteries, and I don't know how to put their skills for significant use. An example is, they usually require Streetwise or Investigation to gather clues and such, however, I wonder what to do if they fail the roll... If they fail they're not supposed to find anything, so chances they never finish the adventure are well, high, that and I have no idea how to give them additional, interesting ways for them to find the truth. So do I give it no matter what they rolled? How do I make use of their skills important and not just busy-work without having a failure on a roll completely stop their progress in the investigation?


I downloaded Norton for my MacBook Pro 2018 13 inch a few months ago, and after uninstalling it, according to the instructions given by the official Norton FAQ, some files remained in my computer that couldn't be deleted by dragging them to the bin. I ran another program designed by Norton to exclusively eliminate any leftover files from the antivirus program itself, and I still can't get rid of one final file: NortonForMac.kext. My MacOS is in Spanish, so the directory in which it appears to be stored in is /Macintosh HD/Biblioteca/StagedExtensions/Library/Extensions. Can someone help me delete it?

I have a 2014 MacBook Pro experiencing . Catalina does not allow kexts to be deleted via this method. Unless I am able to delete or disable this kext my laptop will shut down randomly. Anyone know how to remove kexts in Catalina?


I'm struggling to extract F-values and/or p-values from an ANOVA with all random effects or an ANOVA with both mixed and random effects.  I would expect to be able to get F- and p-values regarding the variance of the random effects based on the expected mean squares. Maybe the  aov() function just doesn't return what I'm looking for? Or I'm specifying my model incorrectly?  Here's a simple example where I want to have cyl as a fixed effect and carb as a random effect:  data(mtcars) summary(aov(formula = mpg ~ cyl + Error(carb), data = mtcars))   But no p-values for the random effect are reported.  Error: carb     Df Sum Sq Mean Sq cyl  1  341.8   341.8  Error: Within           Df Sum Sq Mean Sq F value  Pr(>F)     cyl        1  492.1   492.1   48.85 1.1e-07 *** Residuals 29  292.2    10.1                     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

I use lme4 in R to fit the mixed model  lmer(value~status+(1|experiment)))   where value is continuous, status and experiment are factors, and I get  Linear mixed model fit by REML  Formula: value ~ status + (1 | experiment)    AIC   BIC logLik deviance REMLdev  29.1 46.98 -9.548    5.911    19.1 Random effects:  Groups     Name        Variance Std.Dev.  experiment (Intercept) 0.065526 0.25598   Residual               0.053029 0.23028  Number of obs: 264, groups: experiment, 10  Fixed effects:             Estimate Std. Error t value (Intercept)  2.78004    0.08448   32.91 statusD      0.20493    0.03389    6.05 statusR      0.88690    0.03583   24.76  Correlation of Fixed Effects:         (Intr) statsD statusD -0.204        statusR -0.193  0.476   How can I know that the effect of status is significant? R reports only $t$-values and not $p$-values.


Translating from german, the word "rather" (as replacement for "ziemlich") sounds kind of wrong to me, but I would like to check with an example: "Rather innovative", shouldn't it be "Quite innovative" or "Fairly innovative" instead? The context here is a basic rating (in english), with 4 values (imagine a dropdown):  "Not innovative" "Somewhat innovative" "(Rather) innovative" "Very innovative"  "The project is rather innovative" The word "rather" is also used in other 4-tier choices like that. It has been translated by a colleague and just sounded wrong to me, but I wanted to double check since neither of us is a native english speaker. Translation software offers "rather" as a possibility. What is the most naturally sounding choice here? Is "rather" the right word, or would another word be a better fit?

Is there any logic to this or just decision? I would use the following combinations:   quite amazing rather large pretty good   I would not use the following combinations:   pretty amazing quite large rather good   There're also the words pretty and fairly and of course we say "pretty good" instead of quite good/rather good. Is there any grammar rule that states which word to select to give strength to an adjective without depending on the adjective for no appearant reason?


I have installed the package texlive-scheme-full. Occasionally, when I perform OS updates (via dnf update) I need to update n > 5000 packages. This sometimes takes about half an hour or longer and requires hundreds of MB of download volume.  Is there a way I can update my OS, installing only the most important updates, when I don't have the time nor the bandwidth to install everything?  By "most important" I mean packages relating to core functionality of the OS, especially kernel and security relevant packages. Especially unimportant I consider the updates of my tex-distribution.  I have noticed this related question, whose answers appeared a bit cumbersome to me:       Is this the only way to go?

yum update --security installs only security updates. I think it's an extension from the yum-security plugin.  Is there an equivalent dnf command? (dnf replaced yum in Fedora 22)


I have a 2018 MBP running 10.14.x  I had it connected to a thunderbolt / USB-C to ethernet hub,  Which i was using as a USB hub and ethernet adaptor.   I recently moved desks and started using another thunderbolt / USB-C to ethernet hub the same model as the one above, but a different physical unit.   As soon as i did this the network connection to this machine was patchy, it kept dropping connection, even though the rest of the office was fine. Currently im working using wifi only, but the laptop keeps losing its IP. I can temporary fix the issue, but either renewing my DHCP lease, or turning off wifi and turning on wifi again. But this only lasts a while before the problem comes back. Any ideas ?   So far ive tried the following, but to no avail :    Ive delete the USB LAN bridge from system preference > network. Run the computer using a wifi connection only Changed the location in system preferences > network, from "auto" to custom, to try and reset any network specific pre-sets.    Ive had this issue in the past when moving computers between desks and connecting them to new USBC ethernet adaptors, but in the past deleting the connection type in system preferences > network seemed to solve the issue.

I recently switched from my beloved MacBook Pro Retina (Late 2013) i5 2.6/16/512 to MacBook Pro (2017) Non-TB i5 2.3/16/512.  I purchased what from the build-quality looked like a good USB-C-to-DisplayPort cable with 4k/60Hz support, just to run into the very problem the Logicboard repair guru Louis Rossmann had described in : As soon as you plug in the USB-C dongle, the (2.4 GHz) Wifi stops working despite full antenna signal. Unplug the USB-C connector and you are immediately back in the game.  The big question I'm asking myself now: Who is to blame? Is this a design flaw in the current generation MacBooks with improper shielding or is it a design flaw in the various dongles?  I mean the fact that even Apple’s very own USB-C Digital AV Multiport Adapter is causing these WiFi issues (as you can learn from the many horrific ; but AFAIK have been fixed through a ), show that there’s something going horribly wrong.


Just testing for const support in browsers, so I need to catch syntax errors, which you can only do with eval.  var const_support = true; try{     eval("const test = 'test';"); } catch(e){     if (e instanceof SyntaxError) {         const_support = false;     }     else{         throw ("Something crazy happened.");     } }   Cheers.   Edit: Sorry for duplicate. Like epascarello solution better anyway. Avoids eval.

I'm writing some JavaScript code to parse user-entered functions (for spreadsheet-like functionality). Having parsed the formula I could convert it into JavaScript and run eval() on it to yield the result.  However, I've always shied away from using eval() if I can avoid it because it's evil (and, rightly or wrongly, I've always thought it is even more evil in JavaScript, because the code to be evaluated might be changed by the user).  So, when it is OK to use it?


I am trying to write a greek letter in bold using \mathbf{} but it doesn't work and I don't understand why. I wrote: \mathbf{\pi} = (\pi_1, \dots, \pi_k)^{T}  What am I getting wrong?

To make Latin-letter variables bold I can use e.g. \mathbf{a}, but while putting Greek letters or symbols such as \nabla inside \mathbf doesn't cause any errors or warnings, it also doesn't do anything else.  What is the best way to make bold math symbols, in particular Greek letters and \nabla?


I am trying to show that $\sum_{n=1}^{\infty} \frac{ (-1)^{n-1} }{(2n -1)^3 } = \frac{ \pi^3}{32 } $. I can use the following fact: IF $f(z)$ is meromorphic with finite number of poles none which lie on the integers, then   $$ \sum_{n= - \infty}^{\infty} (-1)^n f(n) = - \sum \left( residues \; \; of \; \; \pi \csc( \pi z ) f(z) \; \; at \; \; poles \; \; of \; \; f(z) \right) $$  Notice, back to the problem, that   $$ \sum_{n=1}^{\infty} \frac{ (-1)^{n-1} }{(2n -1)^3 } = \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1-2n)^3}$$ and  $$ \sum_{n=- \infty}^{\infty} \frac{ (-1)^n}{(1-2n)^3} = 1 + \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1-2n)^3} + \sum_{n= - \infty}^{-1}  \frac{ (-1)^n}{(1-2n)^3} = $$  $$ = 1 + \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1-2n)^3} + \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1+2n)^3} $$  So, I know I can find the left hand side of above equations using the result in the first line. However, I am still suck on trying to see how to evaluate $ \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1+2n)^3} $. Any suggestions? Should I add the two series on the right hand side ?

Prove that : $$\sum_{k=0}^{\infty} \frac{(-1)^{k}}{(2k+1)^3}=\frac{\pi^3}{32}.$$    I think this is known (see ), I appreciate any hint or link for the solution (or the full solution).


I am trying to explain what implicit time dependence is and how it differs from explicit time dependence, but I'm unsure how "sound" my explanation is. Here is what I said:  Suppose I have a function $T(x,y,z,t)$ which is a temperature field of a room. If $T$ has explicit time-dependence, then even though I may stay at a fixed point, $(x,y,z)$, in the room, the value of $T$ at that point can change over time, the temperature may increase or decrease over time. Now, suppose for simplicity that the temperature at each point in the room doesn't change in time, i.e. $T$ has no explicit time dependence such that $T=T(x,y,z)$.   Then, suppose that I start walking around the room, now the temperature at each point remains fixed, but now my position $(x(t),y(t),z(t))$ is time dependent, i.e. it changes in time due to me walking around the room. As such, the temperature function $T$, that I use to measure the temperature at each point, is said to have implicit time dependence since its value changes over time, not due to the value at each given point changing over time, but because the position, $(x(t),y(t),z(t))$, at which it is evaluated, is changing over time.  Hence, for explicit time dependence, we have that $\frac{\partial T}{\partial t}\neq 0$, since even if my position remains fixed, the temperature at that point is changing over time. For implicit time dependence (and no explicit time dependence), we have that $\frac{\partial T}{\partial t}= 0$, since the value of the temperature at each point is fixed in time, however, $\frac{dT}{dt}\neq 0$, since my position is changing over time and so the temperature will implicitly change over time due to my movement around the room.  Would this be a correct explanation at all, or would something else be better?

What is the difference between implicit, explicit, and total time dependence, e.g. $\frac{\partial \rho}{\partial t}$ and $\frac{d \rho} {dt}$?  I know one is a partial derivative and the other is a total derivative. But physically I cannot distinguish between them. I have a clue that my doubt really might be understanding the difference between implicit, explicit and  total time dependence.


Trying to center a div containing some text in a very simple website I'm doing. Managed to get in centered vertically but cannot get in centered horizontally:   #welcome-section{     border: 10px solid blue;/*temporary for control*/     display: block;     height: 100vh;/*U.S. 10 100% viewport height*/     width: 100vw;/*100% viewport width*/     background-color: red;     color: white; } .hellotext{     position: absolute;     top: 50%;     border: 10px solid pink; }

¡Hola! I'm Carlos

text text text

              I would want the h1 and h4 to be horizontally and vertically aligned, and ideally responsive, and always stay bang in the middle. Thanks in advanced!

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I keep hearing that neural net training is non-convex. The objective function is non-convex.  My question is:   What is the proof that the learning process is non-convex? How can you prove it is non-convex for say max likelihood training?  Is training wrt all objective functions non convex?    I am unable to find answers to these questions as most online resources never care to explain the non-convexity and take it for granted.  Thanks.

The  of neural network is $J(W,b)$, and it is claimed to be non-convex. I don't quite understand why it's that way, since as I see that it's quite similar to the cost function of logistic regression, right?  If it is non-convex, so the 2nd order derivative $\frac{\partial J}{\partial W} < 0$, right?  UPDATE  Thanks to the answers below as well as @gung's comment, I got your point, if there's no hidden layers at all, it's convex, just like logistic regression. But if there's hidden layers, by permuting the nodes in the hidden layers as well as the weights in subsequent connections, we could have multiple solutions of the weights resulting to the same loss.   Now more questions,   1) There're multiple local minima, and some of them should be of the same value, since they're corresponding to some nodes and weights permutations, right?  2) If the nodes and weights won't be permuted at all, then it's convex, right? And the minima will be the global minima. If so, the answer to 1) is, all those local minima will be of the same value, correct?


I am sure that this is a very basic question but I'm afraid that I have been unable to get it to work or understand what is going on.  I have a node project that I usually run with  sudo npm start   and I am trying to create a bash script that will launch this for me.  I have tried a few variations:  su myname -c "npm run start" sudo su myname -c "npm run start" su myname -c "sudo npm start"   but they all seem to execute the command without superuser rights. From the research that I have done it seems that  sudo su myname -c "npm run start"   is the correct one but it doesn't work (it runs but without permissions). Can someone please point me in the right direction?

To do a patch manually I must type this command   sudo ./playback_delete_data_patch.sh 09_delete_old_data_p.sql     There is a space just before the 09:   sudo ./playback_delete_data_patch.sh [space] 09_delete_old_data_p.sql   How can I run this inside a script?  There are also several other commands but this one is giving trouble.


Sample variance is calculated according to:  $s^2=\frac{\sum{(x-\bar{x})^2}}{n-1}$  Population variance is calculated according to:  $\sigma^2=\frac{\sum{(x-\mu)^2}}{n}$  Why denominator for sample variance is $n-1$ and not $n$?  Any help is appreciated.

I was asked today in class why you divide the sum of square error by $n-1$ instead of with $n$, when calculating the standard deviation.  I said I am not going to answer it in class (since I didn't wanna go into unbiased estimators), but later I wondered - is there an intuitive explanation for this?!


When I grab an object I move the originpoint of it, instead of the object itself. What has happened and how can I change it back?

I can only move the origin point of the mesh that I selected in object mode, but not the whole mesh Did I set anything up by accident?


With the dectection of gravitational waves, can it be assumed that gravity works in the same way as the other fields? If so, isn’t the gravitron a proven part of QFT? Because the wikipedia page says its “hypothetical”

Wikipedia lists the  as a hypothetical particle. I wonder whether graviton is indeed hypothetical or does its existence directly follow from modern physics? Does observation of gravitational waves amount to the discovery of graviton or could there be gravitational waves not composed of gravitons?


Is it possible to take the Ubuntu server iso and modify, so that you can create a custom installation routine?  The idea behind this is, that I'm going to deploy Ubuntu on a number of similiar PCs at work. They all need the same configuration, except for some variables, like network interfaces, etc. I don't really want to run the setup on 50+ PCs and then afterwards run around and make all changes over and over again.  So, is it possible to alter the installation routine of the Ubuntu iso? Thing I would like to be able to do:   Add new input fields, like "IP address" Add/Remove default packages change config files

I would like to know how can I customize the Ubuntu installer NOT customize Ubuntu, I just want to modify the installer.  We have a large environment here with lots of developers and since we don't use Windows, I want to customize the installer to automatically set the timezone to NYC, the keyboard layout to English USA, put the company logo in the installer etc...


I use svjour3 documentclass to write my paper, I can not put all author names in one line, how can I correct it? My code is below.  \documentclass{svjour3}     \smartqed  \journalname{Earth Science Informatics} \usepackage{multicol} \usepackage{hyperref} \usepackage{pifont} \usepackage{epsf} \usepackage{graphicx} \usepackage{float}   \usepackage[top=2.5cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}   \begin{document} \title{ Earthquake Magnitude ...} \author{{Mahshid Fahandezhsadi, Kamal Aghazade, Hamed Fahandezh Sadi}} \maketitle  .... \end{document}

I use svjour3 to write my paper, but I can not put all author names in one line, how can I correct it? My code is below. \documentclass{svjour3}     \smartqed  \journalname{Earth Science Informatics} \usepackage{multicol} \usepackage{hyperref} \usepackage{pifont} \usepackage{epsf} \usepackage{graphicx} \usepackage{float}   \usepackage[top=2.5cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}   \begin{document} \title{ Earthquake Magnitude ...} \author{{Mahshid Fahandezhsadi, Kamal Aghazade, Hamed Fahandezh Sadi}} \maketitle  .... \end{document}


I want to create a bootable USB and there are no ISO's online, so is there any way I can run the mediacreationtool.exr software without Wine ? Because not even Wine is loading that.

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


So I was thinking... If heat I feel is just lots of particles going wild and transferring their energy to other bodies, why am I not burned by the wind?  When I thought about it more I figured out that wind usually carries some humidity, and since particles of liquid are moving same speed as the wind, they are basically static relative to each other, so no energy is transferred between them (wind and water particles). And if that water sticks to my skin and wind blows, it'll evaporate thus taking energy from my skin and make me feel cold.  Thing is, I don't think that's really the case but even if it is, if I somehow dry out the wind, will it burn me if it's strong enough? And winds can reach some pretty high velocities (though I must admit I'm not sure if they are comparable to movement of atoms in warm bodies etc...).  So. Bottom line. Can I be burned by wind in some perfect scenario?

In (non-relativistic) classical physics, if the temperature of an object is proportional to the average kinetic energy ${1 \over 2} m\overline {v^{2}}$of its particles (or molecules), then shouldn't that temperature depend on the frame of reference - since $\overline {v^{2}}$ will be different in different frames?  (I.e. In the lab frame  $K_l = {1 \over 2} m\overline {v^{2}} $, but in a frame moving with velocity $u$ relative to the lab frame, $K_u =  {1 \over 2} m \overline {(v+u)^{2}}$).


i attempted to reset windows on a acer aspire one 14 and after letting die mid reinstall it wouldnt finish the install so i moved to install ubuntu and i got the grub menu that asks me to install ubuntu but if i select any option it is a blank screen and its not the nomodeset issue. its on uefi because the windows was on uefi so i cant disable the faast boot option and i was wondering if i could from either bios or grub command line. i was thinking the partial windows was effecing things but i have no idea how to fix it because it simply loops it will load a portion but once it restarts it starts from the first starting point please help

I had windows 10 but during a reset, it died ( I know my bad ). So I am attempting to wipe the drive and install ubuntu from a clean install but whenever I select to install ubuntu it only gives me a black screen. It's in UEFI and secure boot.  Can anyone tell me what I'm doing wrong?


I want to summon a baby villager in Minecraft Bedrock Edition, but my command isn't working because it summons a regular villager instead of a baby villager. I used the commands based off of  post, which is listed below, but it doesn't work. /summon villager ~ ~ ~ minecraft:entity_born

In Minecraft Java Edition, one can summon baby zombies and drowned using the IsBaby NBT tag: /summon zombie X Y Z {IsBaby:1b}  Likewise, one can summon baby breedable mobs (Pigs, Cows, etc.) by giving them a negative Age NBT tag (the number of ticks until the mob grows up): /summon cow X Y Z {Age:-100000}  Since NBT is inaccessible from commands in Bedrock Edition, the above commands will not work there. How do I summon baby mobs in Minecraft Bedrock Edition?


I have developed android project and published to a google playstore. In this app, for tab use, at one activity, calling frameLayout.setVisibility(View.INVISIBLE) for showing other layouts. It is working perfectly on my android devices.  But when i check crashlytics, i can see applications crashed on that function.  I tried many google searches but i did not found the solution and did not fix yet.  Please help me on this issue.

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've read several times that modern cryptography is based on the fact that multiplying two primes is easy, whereas getting the prime factorization of a random big integer is very hard. (see )  Does it mean that the largest prime numbers known are kept secret, for cryptography purposes ?  If they were not, one could compute the product of every pair of known prime numbers and decode the public keys ?

I have some thoughts on this. First, I want to say I am no expert on cryptography, I just know some stuff, and I took a cryptography class in University. I am very interested in this topic.  I understand that many security experts out there might get angry just by the discussion of these things, but I hope you can spare me :)  My Questions:  Would it be possible to break an RSA key, in for example 1 week of time, if the cracker have already spent X number of years building an index of primes by performing every permutation of existing prime keys up to 2^2048 ?  I understand this would take an immense amount of time to do, but it would only be done once.  Given the public key, you would be able to look up what the two primes are, and hence retrieve the private key instantly.  When I consider who might break such a code, I am primarily thinking about NSA and other Governments that might have spent years in research and have the resources and interest in doing so.  Breaking an 256 AES would then be easier, as AES keys are often generated using the RSA private key.  Would it be possible to build such an index ? How long would that take in permutations, and perhaps with the fastest computer in the world ?  I hope we can have a nice chat about this. We are just discussion theory here. I hope you can offer me some insight on this topic.  Thanks!


Using advice from this , (using a LAMP on Ubuntu 10.04) I have edited the  /etc/apache2/sites-available/default file and originally changed both the Document Root and Directory lines from  /var/www to /home/me/sites  in my home folder, with no sudo or root privileges.   I've always just developed my sites here in this home folder, and create multiple sites and point apache to the active one using the same settings.    Is this a notable security risk?  How could I make my development process more secure using this method?

I have the following directory setup:  /var/www/html   and  /home/tim/Website/files_here   The folder html is actually a link to /home/tim/Website. This means all my Website files are in my home area (they get included in the backup etc).  Is there anything wrong with this method? Is there a better way to get the homepage to be in /home/tim/Website?  Are symbolic links on a web server ever incompatible with users not on linux?


I am trying to solve the following exercise.      Assume that $m$ and $n$ are co-prime positive integers, and that $k$ is a field. Prove that the ideal generated by $x^{m} - {y^n}$ is a prime ideal in $k[x,y]$.   I tried the following approach : Consider the ring homomorphism ${\varphi}:k[x,y]\rightarrow{k[t]}$ defined by $\varphi(x) = t^n$, and $\varphi(y) = t^m$, and extend $\varphi$ to $k[x,y]$ to ensure that it is a ring homomorphism. Then the ideal $(x^m - y^n)$ is clearly contained in the kernel of $\varphi$. It remains to prove the reverse set inclusion. i.e. to prove that this ideal is exactly equal to the kernel of $\varphi$. I don't know how to go about this!

I am trying to show that $X^n-Y^m$ is irreducible in $\Bbb{C}[X,Y]$ iff $\gcd(n,m)=1$ where $n,m$ are positive integers.    I showed that if $\gcd(n,m)$ is not $1$, then $X^n-Y^m$ is reducible. How to show the other direction. Please help.


While reading Think Bayes, one of the books by Allen B. Downey, in chapter one, he mentioned an example known by the name The Monty Hall problem :     The Monty Hall problem is based on one of the regular games on the show. If you are on the show, here’s what happens:       Monty shows you three closed doors and tells you that there is a prize behind each door: one prize is a car, the other two are less valuable prizes like peanut butter and fake finger nails. The prizes are arranged at random.     The object of the game is to guess which door has the car. If you guess right, you get to keep the car.     You pick a door, which we will call Door A. We’ll call the other doors B and C.     Then Monty offers you the option to stick with your original choice or switch to the one remaining unopened door.     Before opening the door you chose, Monty increases the suspense by opening either Door B or C, whichever does not have the car. (If the car is actually behind Door A, Monty can safely open B or C, so he chooses one at random.    He then explains the problem, that we are supposed to understand :     To start, we should make a careful statement of the data. In this case, D consists of two parts: Monty chooses Door B and there is no car there.   Next we define three hypotheses: A, B, and C represent the hypothesis that the car is behind Door A, Door B, or Door C. Again, let’s apply the table method :     Figuring out the likelihoods takes some thought, but with reasonable care we can be confident that we have it right:   If the car is actually behind A, Monty could safely open Doors B or C. So the probability that he chooses B is 1/2. And since the car is actually behind A, the probability that the car is not behind B is 1. If the car is actually behind B, Monty has to open door C, so the probability that he opens door B is 0. Finally, if the car is behind Door C, Monty opens B with probability 1 and finds no car there with probability 1   What I don't understand is How is p(D|H) = 1 in C? Because Monty could also open door A. So the  p(D|H) should be equal to 1/2 in C. Also, I don't think I fully understand the reasoning behind case A and B either. Can someone explain this in more details ?

From Wikipedia :     Suppose you're on a game show, and   you're given the choice of three   doors: Behind one door is a car;   behind the others, goats. You pick a   door, say No. 1, and the host, who   knows what's behind the doors, opens   another door, say No. 3, which has a   goat. He then says to you, "Do you   want to pick door No. 2?" Is it to   your advantage to switch your choice?   The answer is, of course, yes - but it's incredibly un-inituitive. What misunderstanding do most people have about probability that leads to us scratching our heads -- or better put; what general rule can we take away from this puzzle to better train our intuition in the future?


I am writing a Cocoa application with multi monitor support. It has a window controller which loads a UI from a NIB file. I would like this window to appear on the secondary monitor rather than the primary one. Is it possible to achieve this programmatically ? Please note that it is not a full screen window, and the window does not have a menu bar.

I'm working on a Cocoa Mac app where I need to display a window/view on a secondary monitor, full-screen.  I know how to create a window that could be dragged onto the secondary monitor, but I was wanting to programatically create the window and make it full screen on the external monitor.  Thanks for the help.


Given the linear system: $$\begin{cases}  x_1 + kx_2 − x_3 = 2\\  2x_1 − x_2 + kx_3 = 5 \\ x_1 +10x_2 −6x_3 =1 \end{cases}$$ for which values of $k$ has the system (2): (a) No solutions (b) A unique solution. (c) Infinitely many solutions. I've been trying echelon form where i switched $R_1$ with $R_3$ and then i switched $R_2$ with $R_3$ So I have $\left[\begin{array}{ccc|c}1&10&-6&1\\1&k&-1&2\\2&-1&k&5\end{array}\right]$ but then I'm stuck and don't know how to get any further.

$\begin{cases}x_1 + kx_2 - x_3 = 2\\2x_1 - x_2 + kx_3 = 5\\x_1 + 10x_2 -6x_3= 1\\ \end{cases}$ I've been trying echelon form where i took $R_2 = R_2 - 2R_1$ and $R_3 = R_3-R_1$ So I have $\left[\begin{array}{ccc|c}1&K&-1&2\\2&-2&K&5\\1&10&-6&1\end{array}\right]$ I've been trying echelon form where i took $R_2 = R_2 - 2R_1$ and $R_3 = R_3-R_1$ and reduced it So I have $\left[\begin{array}{ccc|c}1&K&-1&2\\0&-1-2K&K+2&1\\0&10-K&-5&-1\end{array}\right]$ But now I am not sure how i could remove $10-K$ with $-1-2K$ any help would be appreciated


My laptop is not support x86_64. Can i install 64bit lubuntu on it?  CPU:Intel(R) Atom(TM) CPU N270   @ 1.60GHz

Possible Duplicate:          My computer has a 32 bits processor, when I install from a clean version Ubuntu 11.10, I download a 32 version, but wubi request me a 64 bit, I don't know by a agree with this and now I have a 64 bits Ubuntu on a 32 bits processor with a lot of errors how can I fix this since I try later to installed again and happened the same.


If a complex function is analytic on D and its point lie on a line, it is constant with respect to x and y. How does one prove this?

I wonder if this is correct: there is a holomorphic function on an open connected subset $G$ of $\mathbb{C}$ which maps $G$ onto a subset of a straight line, and I have to show that the function is constant.   I thought I can suppose that the straight line is the real axis (otherwise I can find a rotation and a traslation that will do so) and so using the Cauchy-Riemann equations I find that the function is constant since its imaginary part is zero. Is that correct? Thank you


I'm trying to understand how Newton formulated his corpuscular theory of light when he was surrounded by evidence of light's wave-light properties. Specifically, the effect that we now call , which he discusses in Optiks.  Newton discusses the Rings in Part 1, Book 2 of Optiks (page 160 of ), but having read it, and various other parts, I can't figure out how he jumps from the observation of refraction to the conclusion that light must be made out of corpuscles, and not a wave-like phenomena.

What was Newton's own explanation of ? Newton advocated a corpuscular theory of light, but his rings would most conveniently be explained by a wave theory. How did he explain his own discovery?


I'm looking for a sunny escape from cold European winter. Therefore I was thinking about the canarian islands, more specifically Tenerife. As there are direct flies from my nearest airport.  Because I didn't make it to the beach this year, I would like to be able to do that. And there comes my question. I found very different information on what the weather and temperatures will be like. Most say it will still be "bikini weather" during the day. But I also read that the sea will be rather cold (below 20). So at least for me not very inviting for a long swim in the sea.  So can anyone help me with personal experience? What will the situation be like in lat's say Costa Adeje or nearby area?  Edit Thanks for the links to historic weather data. I already checked those. I'm really more looking for personal experience as mentioned. Numbers alone can be misleading or not cover all microclimas. And I heard there can be big differences on Tenerife

I am interested in hiking this fall in France and camping along the way. In order to figure what gear I need to pack to camp (particularly for the sleeping bag), I would like to know what temperatures to expect.  I am interested in historical temperatures to figure the usual temperature and I might look at them for other seasons. If that matters, I am thinking about hiking in the Pays Basque (South West of France), the mountainous part.  Where (ideally online and for free) can I find such data? Are there resources that cover Europe, or even the whole world?


Exists intel graphics for ubuntu 15.10? If not, when is the launch date?

Can someone help me out and explain or point me in the right direction on how to check video drivers and see if my video card running okay?  I had 10.04 installed on my Thinkpad r61 with Compiz Manager and life was great, until the machine took water damage. I bought an ASUS (X54H) since and am trying out 12.04, but the desktop just doesn't look right.  I always struggled with video driver installation. There are no proprietary drivers available in the hardware manager.  When I run lspci | grep VGA:  00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)   I will greatly appreciate your help. I want to use Linux more, but like I said video drivers appear to be my biggest concern. I have also tried 12.04 on my desktop PC, but again failed to configure video card, so switched back to Windows 7.


Sometimes I see this error on this site.   width=0 height=0 style='position:absolute;left:0px;top:0px;'>

I have many times found CSS written on my screen besides images from Stack OverFlow.   It is associated with the advert from Rackspace  Here is a screenshot:


Does there exist function $ f $ that is smooth but not analytic for all $x\in \Bbb{R}$? ($f $ is a Real-valued function)

Smooth means has derivatives of all order, and analytic means can be given as a convergence of power series.


I recently switched to Ubuntu 12.04 LTS 64-bit and I installed many essential softwares the  terminal by using this command:  sudo apt-get install <package_name>  Is there any difference in installing softwares through terminal or via software center (i.e. does the actual working of installation varies)?

I would like to ask a very basic question but I have never thought about it before. Well, when someone installs an application from terminal, he has to add the repository first, right? On the other side, when someone installs an application from the Ubuntu Software Center, is the repository then added automatically?  I am asking those questions to figure out this: When I run update and then upgrade, will this application be upgraded or not? Is the result same in two options?


Let $ A$ be $n \times n$ matrix all of whose main diagonal entries are 0  and elsewhere $1,$ Find $A^{-1}$•   For such matrix we can write $A = B - I$ Where $B$ is a matrix with all its entries $1$ and $I$ is identity matrix. Then nullity$( A + I) = n-1$  So algebraic multiplicity corresponding to $-1$ is $≥ n-1$ Since the row sum for $A$ is $n-1$, so this must be an eigen value.  Characteristic equation I got is $ (x+1)^{n-1} (x-(n-1))$ now how to get $A^{-1}$ from here$?$

Hi guys I am working with this and I am trying to prove to myself that n by n matrices of the type zero on the diagonal and 1 everywhere else are invertible.  I ran some cases and looked at the determinant and came to the conclusion that we can easily find the determinant by using the following $\det(A)=(-1)^{n+1}(n-1)$. To prove this I do induction  n=2 we have the $A=\begin{bmatrix} 0 & 1\\  1 & 0 \end{bmatrix}$ $\det(A)=-1$ and my formula gives me the same thing (-1)(2-1)=-1  Now assume if for $n \times n$ and $\det(A)=(-1)^{n+1}(n-1)$  Now to show for  a matrix B of size $n+1 \times n+1$. I am not sure I was thinking to take the determinant of the $n \times n$ minors but I am maybe someone can help me. Also is there an easier way to see this is invertible other than the determinant? I am curious.


I would like to know how to install Touchwiz apps on Cyanogenmod 12.X.

I got my Galaxy S4 today (i337M), it's wayyy better than my old SII hehe.  I immediately removed the stock Bell firmware and put the latest snapshot available from CyanogenMod.  I'm wondering if it's possible to convert apps like S Planner, S Note, S Health to CyanogenMod.  Current stock android version available for i337M is 4.2.2. Latest Android version for CM is 4.4.  If I install CM 4.2, can I import/install the APKs and then upgrade to 4.4?  Hope you'll be able to help me :)


For theme development purposes, I'd like to have both GNOME 3.12 and Unity installed at the same time, and without the inconvenience of a virtual machine/dual boot. I know that the project Neon ppa for KDE 5 installs in it's own folder in /opt so as not to mess with existing KDE installations, and installing Trinity does the same. Is there any way to install GNOME 3.12 so that all of it's files are in it's own folder in /opt, or a different install setup so that Unity won't be destroyed? Thanks for any input.

I tried installing gnome 3 , but it broke Unity and I had to reinstall Natty from scratch.  Does anyone know if there is a way to install Gnome 3 without breaking Unity?


char$(K) = p$, $|K|= p^n$, $|K^{\times}| = p^n-1.$  We know that $K^{\times}$ is cyclic group. Let $H$ be a cyclic subgroup of $K^{\times}$. Subgroup of cyclic group is also cyclic, so $H$ is cyclic and $|H|\mid|K^{\times}|$.  Let $|H| = r,\ r\mid p^n-1, \ p^n-1 = r q,\,\, q \in \mathbb{Z}$.  Each element in $H$ has inverse element (from definition on cyclic group). I just add $0$ and we have subfield. So, $l = r + 1$, where $r \mid p^n-1$.  How to show that $r = p^k - 1$ for $k \leq n$?

We know that if a finite field $F$ has characteristic $p$ (prime), then $F$ has cardinality $p^r$ where $r = [F:\mathbb{F}_p]$.   I'm now trying to say something about the possible cardinalities of subfields of $F$. I can see that there is a subfield of cardinality $p^s$ for each $s$ that divides $r$, given by the fixed field of the group generated by $\phi^s$, where $\phi$ is the Frobenius automorphism.  Now suppose $K$ is a subfield of $F$. Then (since both are additive groups), Lagrange gives us that $|K|$ divides $|F|$, so $|K| = p^t$ for some $1 \leq t \leq r $ (alternatively, $K$ contains $\mathbb{F}_p$ and so is a vector space over $\mathbb{F}_p$ and is thus isomorphic to $\mathbb{F}_p^t$, where $t = [K:\mathbb{F}_p]$). By considering the multiplicative group of units of $K$ and $F$ respectively, we get that $ p^t - 1$ divides $p^r -1$. I want to make the leap to $t|r$, but I'm failing to see why this needs to be true. Any help would be appreciated.


Describe the curve in the complex plane determined by $z = e^{(-1-i)t}$ where $0\leq t \leq 2\pi$.

Sketch complex curve $z(t) = e^{-1t+it}$, $0 \le t \le b$ for some $b>0$   I tried plotting this using mathematica, but I get two curves. Also, how do I find its length, is it just the integral?  This equation doesn't converge right?  Edit: I forgot the $t$ in front of the $1$ so it's not a circle of radius $e$


Last week my daughter turned 13. The following day my mom left with my daughter to go babysit my 12 year old niece while her parents are out of town. I didn't see my daughter again until Saturday but she did text me that she wants to talk in private and kept bringing up going home Saturday in which I explained I was staying the night at her other uncles. The girls and my mom joined us for the cookout and the weekend went by great. On the way home I brought up her wanting to talk. In which she gave me an embarrassed smile and promptly said, "I've been thinking about this a lot and I want to be a boy." She looked into the surgery costs in which I said not until after graduation, she also said she sometimes looks at boy clothes and such. But that's just it... my daughter grew up wearing dresses, skirts, and leggings. She wore tiaras, princess gowns,  and fairy wings. Just a month ago she wanted a $60 bikini from H&M along with a bracelet from Walmart. She wears a little makeup, has hair she can almost sit on and now she suddenly wants to chop it off into a boy style like that boy band BTS. I'm definitely in shock. I am hoping this is a phase and passes quickly or I don't know what we're going to do. I don't want her growing up feeling unloved but I've heard the way my family talks, I can already hear the arguments we'd have. I just do not know what else to do but to get us both therapy. As far as I see it... I have until spring to see where this goes and hope like crazy I can gain some kind clarity. It does sound like some of this came on because she plays a lot of online games with a preference of being a boy but I don't see how this translates to her now wanting surgery to be one. It is so sudden and I've read other articles about this sudden transgender trend going on among teens. I want to limit her internet use but that would be hard. This is a child that can't stick to anything. She grew up loving horses, playing horses, and running around pretending to be a horse but anything besides that it never sticks. Whether it be playing the violin or trombone, now she wants to play guitar. We are only just now getting rid of her barbies and my little pony dolls... this is not a child the has been born a female but feels like a boy her entire life... the only boyish things she likes is mudding with her uncle and skateboarding. She enjoys playing tennis as well. These days she wears leggings, cut up skinny jeans, crop tops, a little makeup, keeps her hair tidy, and like baggy sweatshirts. I didn't expect this in a thousand years. She grooms and styles her hair, wants scrunchies and hair crowns. Is this common? Is there a specific psychiatrist I should have her see? She refuses to speak to a stranger but I'm putting foot down on this. Do I call her by her new boy name and let her chop off over two feet of hair? I still can't wrap my mind around that, she has only ever let me trim it... I'm not even sure how I should address her.

My daughter, 13, has said she wants to be a boy. A little background: we moved to a new state a year and a half ago. In her new school, she felt isolated among her peers until she met a girl in art, and became good friends. She joined the drama club, and made  friends with some 8th graders. They joined “the diversity club”. This club is a LGBT club. The kids put on a play they wrote and starred in, which had homosexual connotations. “Romeo and Juliet”, but script  rewritten to include  2 females as the couple, for instance.   My daughter got so wrapped up in it, that her life was as if she was copying the play. She’s no longer friends with the friend from art, but remains close with the 8th grade crowd. They all labeled themselves. One week, my daughter said she was gay, then, changed to bi, then onto pan. (I had to google that one). Now she is emphatic about being disgusted with her body and wants to be a boy. She wants to donate all the “girly” clothes she picked out last year, and tossed out all the makeup she bought a few months ago.   All her life, she was the classic girly girl. She had crushes on boys, and she and this boy were inseparable since first grade. She was sad when it came time to move away. When we settled here, she became sullen and angry, putting herself down. She now sees a therapist who she really likes. We’ve been working on her self esteem issues. She’s wanting us to call her “he” and by a male name. I can’t do that. She’s my daughter. She is female. Had we seen this coming, maybe I could come to accepting. But it happened out of the blue.  Sometimes the old her comes back-I got a makeup sample and she was interested in trying it, looked at me, then quickly put it down and said “ewww, makeup”—just a few months ago, she bought a bunch. She’s now wanting to wear boys clothes and talks of wearing a suit to her prom. She is very impressionable, and seems affected by viral YouTube videos about kids coming coming out to their mothers, and the mothers gleefully embrace with happy tears. She has told me when she’s 18, she’s having her breasts removed.    Nothing seems normal to me anymore-in terms of how she always was-this new situation just doesn’t fit.  My gut tells me this is a phase.  I’m hoping it’s a phase. But with all I’m seeing in the media about this, I’m not sure. I love her; this is too much for me to process. I’m a stay at home mom; we were inseparable. I knew her. Until now.:(  She cut off all her beautiful hair, and wears boys shorts, baggy tee shirts, and bought this awful men’s deodorant spray. Please help me sort this out. I’m at my wits end.  Do you think this is a phase? Is this common?


I successfully mounted a Windows share folder by editing /etc/fstab. Now I'm trying to rsync Ubuntu folders to the mounted Windows share folder in Ubuntu system.   I'm using the command rsync -av --delete /sourceFolder/ /Mounted cifs format windows share folder/. Everything works fine without the option for the permissions.  The copied file permissions follow the uid, gid, dir_mode options in /etc/fstab file, not the rsync -a option.   Is there a workaround to preserve the file permissions when backing up? Or is my approach wrong fundamentally?

Our Ubuntu Server 12.04 system has a remote NTFS filesystem mounted via Samba at /media/blarg.  One of our users had problems writing to the remote system, but not reading from it.  Since the auto-mount script we've set up has a different user (we'll call it sagaba) mounting the remote system, I figured I'd change the permissions for /media/blarg to 774 sagaba:sagaba, and make our user a member of the sagaba group, so he can go about his business.   Unfortunately, when I attempt this (even as root), I get a permission denied error.   chown: changing ownership of `/media/blarg': Permission denied   Does this have to do with root squashing? I can't understand how it would, since the mount point is a directory on the local system.


Let $u_1$=2 and $u_{n+1}=2+\frac{1}{u_n}$ for $n\geq 1$. Prove that the sequence converges to $\sqrt{2} +1$. I have no clue how to do it,probably using Cauchy sequence definition. The hint given in textbook is: $|u_{n+2}-u_{n+1}|<\frac{1}{4}|u_{n+1}-u_n|$ Any help is appreciated!

Can anyone recommend a good self-contained reference for completion of rationals to get reals using Cauchy sequences?


I am not able to login in my Drupal admin panel, i have tried to truncate sessions, watchdog and cache table from database, also tried to reset password from database directly, but there is no luck for me. Can you please suggest how can i login and what steps i need to follow ?

I can't login My drupal website (D 7.23) now. I have changed the password and tried to login back, but still the problem exists. After I reset the password by using the one time password and can log in, but when we log out and try again to login, it will be a failed one.  Please help me to solve it.


I started learning Java recently so I decided to make a simple sign up/log in form.  private JTextField username; private JPasswordField password; private JButton check; private JButton addToDb; ArrayList<String> dbUser = new ArrayList<String>(); ArrayList<String> dbPassword = new ArrayList<String>();  public trial(){     super("Title");     setLayout(new FlowLayout());      username = new JTextField("",10);     password = new JPasswordField("",10);     check = new JButton("Login");     addToDb = new JButton("Sign Up");     add(username);     add(password);     add(check);     add(addToDb);      addToDb.addActionListener(             new ActionListener(){                 public void actionPerformed(ActionEvent event){                     if(!username.getText().isEmpty()                         && !password.getText().isEmpty()){                          dbUser.add(username.getText());                         dbPassword.add(password.getText());                         username.setText("");                         password.setText("");                         System.out.println(dbUser + "/" + dbPassword);                      }else{                          System.out.println("Please fill the fields and try again!");                     }                 }             }                    );      check.addActionListener(             new ActionListener(){                 public void actionPerformed(ActionEvent event){                      for(int i=0; i<dbUser.size();i++){                          if(username.getText() == dbUser.get(i) && password.getText()== dbPassword.get(i)){                             JOptionPane.showMessageDialog(null, "Access Granted!");                         }else{                             JOptionPane.showMessageDialog(null, "Access Denied!");                         }                                            break;                                               }                 }             }     );                         } }   As you can see, I've made two text fields (username and password), two buttons, one that stores the values in two different arraylists (I tried with a HashMap but that didn't work either). And one that compares the values in the arrays to the values in the text fields. The problem is that when I use the login button, it always says access denied. Any ideas how to fix this?

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


What is the underlying data structure of the three common python data structure: list, tuple and set?  I heard from someone that list in python is implemented as linked list. How about tuple and set? To be specific, how is the true memory of the computer allocated for their implementation?  I tried to time the task of looking for a number in the collection of number and found that tuple shows the best performance. Why is that the case?  from timeit import timeit timeit('238478 in (x for x in range(1000000))', number = 100) #time ~ 2s timeit('238478 in {x for x in range(1000000)}', number = 100) #time ~ 7s timeit('238478 in [x for x in range(1000000)]', number = 100) #time ~ 7s   I tried to read the documentation but it doesn't describe the underlying architecture.  Edit: I want to study the speed of Python vs other languages. For example, array in C surely outperform list in Python. But what if I compare tuple vs array? To study these, I would like to understand more on how these data structures in Python are working in the computer.

When should you use generator expressions and when should you use list comprehensions in Python?  # Generator expression (x*2 for x in range(256))  # List comprehension [x*2 for x in range(256)]


installing Ubuntu Studio OS 18.10 or 19.04 what linux desktop i install ... ?  To install additionally Cinnamon desktop in Ubuntu Studio ... what Commands needed in Terminal... ?

I have read that there is a new Gnome-2 like interface called Cinnamon produced by the Linux Mint developers.  Is this available for Ubuntu users - and if so how do I install it?


This question is related to a previously asked question found : I'm able to invoke another executable within my runProgram() function. However, before this runProgram() function returns back to main() and closes the handle for the process. I need to retrieve the value that the executable returns when it exits... Here is my current application: #include <Windows.h> #include <exception> #include <stdio.h> #include <tchar.h> #include <cstdint> #include <iostream>  uint32_t runProgram(LPCSTR lpApplicationName) {     STARTUPINFOA si;     PROCESS_INFORMATION pi;      // Set the size of the structures     ZeroMemory(&si, sizeof(si));     si.cb = sizeof(si);     ZeroMemory(&pi, sizeof(pi));      // Run the program     CreateProcessA(         lpApplicationName,  // the path         NULL,               // Command line         NULL,               // Process handle not inheritable         NULL,               // Thread handle not inheritable         FALSE,              // Set handle inheritance to FALSE         CREATE_NEW_CONSOLE, // Opens file in seperate console         NULL,               // Use parent's environment block         NULL,               // Use parent's starting directory         &si,                // Pointer to STARTUPINFO structure         &pi                 // Pointer to PROCESS_INFORMATION structure     );      uint32_t error = GetLastError();      if ( error != 0)         std::cerr << error << "\n";      // How to retrieve and store the result from the exiting program above...?     uint32_t cache_size = 0;      WaitForSingleObject(pi.hProcess, INFINITE);      CloseHandle(pi.hProcess);     CloseHandle(pi.hThread);      return cache_size; }  int main() {     try {         const uint32_t cache_size = runProgram("CacheQuerry.exe");         std::cout << cache_size << '\n';     }     catch (const std::exception& e) {         std::cerr << e.what() << "\n\n";         return EXIT_FAILURE;     }     return EXIT_SUCCESS; }  And I want to store the return value from this executable into runProgram()'s local variable: cache_size. Here is the main.cpp from the invoked program: #include "CacheQuerry.h"  int main() {     int error = cache_info();     if (error != 0)         std::cout << error << '\n';     else         std::cout << '\n';     std::cout << "l1d_cache_size = " << l1d_cache_size() << std::endl;     std::cout << "cache line size = " << cache_line_size() << '\n';     return l1d_cache_size(); }  The invoked program will return the value produced by l1d_cache_size() when this program exits. This is the value that I want to store within runProgram()'s cache_size variable. How do I get this return value after the program exits? The implementation of the function call found in "CacheQuerry.h" shouldn't be relevant here, but if you need to see it's implementation don't hesitate to ask. These are two separate projects within the same solution. The 1st main.cpp which is in its own project relies on the 2nd main.cpp within its own project.

I am running a program and want to see what its return code is (since it returns different codes based on different errors).  I know in Bash I can do this by running     echo $?   What do I do when using cmd.exe on Windows?


It seems like when I hover into my Tags section in my profile, I only see posts counting as questions. Shouldn't it count as answers as well?  I have 63 questions and 7 answers so shouldn't that be 70 posts in C#?  I know this is minor but I'm just curious that's all.

From my , I learned that all tag related info on profile will be updated daily at UTC 03:00.  However, something is wrong here. It's now UTC 05:00+, but my tag number, say 93 (c++) is not updated against yesterday. I am pretty sure about this and I did earn some more points throughout the day. Sorry for not be able to capture the screenshot yesterday, but I did check this number 10 hours ago (which belongs to yesterday, also 93).  Is there a bug happening here? Or updating time different?    UPDATE: As of 24 Jan, the tags are still not updated with the proper values.  UPDATE2: Fixed around 25 Jan, UTC 03:00, at least for me.


Currently I sign into my Stack Exchange account using my Google login. I'd like to replace this with a different login method, though, so I can still log in to Stack Exchange, but not with Google.  How can I do this?

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


my situation is, I have dual boot of windows 10 home 64 bits and ubuntu mate 18.04 64 bits, when I am in ubuntu I want to access my windows files, and I have to go to the file explorer, then I made a link (shortcut) ) from my document folder in windows to my desktop in ubuntu, but every time I turn on my laptop and access ubuntu this folder comes out in gray, and it is only enabled when I load disk C from the file browser, when I do this the folder is enabled and additionally the icon of my HDD appears on the ubuntu desktop, I think that what I do is mount the disk C, but how do I mount it automatically just enter ubuntu?

How do you make HDDs and partitions mount at startup on Ubuntu?  I always keep my media and data files on separate partitions - one 2tb HDD and a 400 odd gig partition.  I have been trying to swap the default folder location for the home directory to my other drives.  It works when I change the /home/user_name/.config/user-dirs.dirs file to the directories I want, but only until I reboot the system. I am only assuming that the drives not mounting is the problem with it, but it would be helpful either way.  If any one knows another reason for why the directories change back to default each time that would be good also.


My iPhone is saying I need to do billing but there is not a none button by the credit cards what do I do I need to download a app for my cheerleading

Ever since adding an iTunes gift card to my account, I'm getting verification requests like crazy. I can't even download free apps. It takes me to my payment info and when I try to select none, I continually get a message under the payment info that says "you must verify your payment info to continue"  I don't want a credit card on file and would really like the none option to work. My ID shows I still have iTunes credit.


I have an O365 publishing site that is mostly out-of-box except that it uses a custom master page which implements a little custom CSS. However when looking at the console in IE every time the site loads I see the following errors:  SEC7111: HTTPS security is compromised by res://ieframe.dll/forbidframing.htm SEC7111: HTTPS security is compromised by res://ieframe.dll/errorPageStrings.js SEC7111: HTTPS security is compromised by res://ieframe.dll/httpErrorPagesScripts.js SEC7111: HTTPS security is compromised by res://ieframe.dll/red_x.png SEC7111: HTTPS security is compromised by res://ieframe.dll/bullet.png SEC7111: HTTPS security is compromised by res://ieframe.dll/background_gradient.jpg   I've looked around online and found people discussing iframes and ajax queries but none of those are included in this site outside of what O365 does by default. Why would this environment be throwing these errors?

I've noticed that I get this string of errors in IE in my SharePoint Online sites.    SEC7111: HTTPS security is compromised by res://ieframe.dll/forbidframing.htm SEC7111: HTTPS security is compromised by res://ieframe.dll/ErrorPageTemplate.css SEC7111: HTTPS security is compromised by res://ieframe.dll/errorPageStrings.js SEC7111: HTTPS security is compromised by res://ieframe.dll/httpErrorPagesScripts.js SEC7111: HTTPS security is compromised by res://ieframe.dll/red_x.png SEC7111: HTTPS security is compromised by res://ieframe.dll/bullet.png SEC7111: HTTPS security is compromised by res://ieframe.dll/background_gradient.jpg   Anyone know what causes this and/or how to fix?    I've seen similar posts in SO not related to SharePoint, but always get the same ones in my SP sites (compared to other files in other sites) so thought it might be worth a post here.  I have tried some of the solutions I have found, but haven't had any luck.  I thought the most likely case would be something to do with Internet Security Options like this post mentions: .  I didn't have any luck with the answer there though.


I've been using the word 'quite' for a long time now. And I just learned its other meaning. Based on Google/Dictionary:  to the utmost or most absolute extent or degree; absolutely; completely. "it's quite out of the question"  to a certain or fairly significant extent or degree; fairly. "it's quite warm outside"    I guess the question is: how would you know which of these two different meanings is used in a sentence (both in written or verbal)? For instance, I was asked how's the exam. I would like to answer "It was a bit hard". Now if I use the word quite: The exam was quite hard!, how would the other person know if I mean: a. "it is absolutely hard!" or b. "it is not so hard"?

The adverb "quite" has the following meanings :     1: wholly, completely ("not quite   finished")      2: to an extreme : positively "quite   sure" —often used as an intensifier   with a "quite a swell guy" "quite a   beauty"      3: to a considerable extent : rather   ("quite near")   My understanding is that #1 and #2 conflict with #3. For example, when you say "She's quite right", do you mean "She's completely right" or "To a considerable extent, she's right"? Notice that in the latter case you're not saying that she is completely right.  Another example is "I'm quite sure". Does it necessarily mean "I'm completely sure"?   Does the word really have conflicting meanings that can possibly cause ambiguity? Or am I missing something?


Let $T:V\rightarrow V$ be a linear map. If $\lambda^2$ is an eigenvalue of $T^2$, then $\lambda$ or $-\lambda$ is an eigenvalue of T.  I have then $(T\circ T )(v) = T^2 (v) = \lambda^2 v$, but $\lambda^2 = (-\lambda)(-\lambda)$ or $(\lambda)(\lambda)$.  Any hints

$A$ is an $n\times n$ matrix of complex numbers. Prove that if $\lambda$ is an eigenvalue of $A^2,$ then $\sqrt{\lambda}$ or $-\sqrt{\lambda}$ is an eigenvalue of $A.$    If $\lambda$ is an eigenvalue of $A^2,$ we have $\lambda\alpha=A^2\alpha$ for some $\alpha.$ Then how can we find a $\beta$ s.t. $\sqrt{\lambda}\beta=A\beta?$


I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I love Ubuntu and I use it since 1985. I decided to download Ubuntu 13.04 but I'm a rookie. If you can send me a CD with that version I would be happiest.

I need to upgrade my existing Ubuntu system, and I also want to install Ubuntu on a new laptop.  I would like to have an installation CD or DVD to do both of these.  Where exactly I can order or request an Ubuntu installation CD/DVD/USB?


I came across an example in Casella and Berger's Statistical Inference (Example 10.2.1) where we have a random variable, $X$, that $(1-\delta)\times100$% of the time is equal to a $N(\mu, \sigma^{2})$ random variable, and the remaining $\delta \times 100$% of the time, $X$ is equal to a random variable with unknown distribution but whose mean is $\theta$ and variance is $\tau^{2}$.  The book claims:     $Var(X) = (1-\delta)\sigma^{2} + \delta \tau^{2} + \delta(1-\delta)(\theta - \mu)^{2}$     I'm having trouble deriving this same formula. My logic going into this is $Var(X) = E[X^{2}] - (E[X])^{2}$, where $E[X] = (1-\delta)\mu + \delta \theta$.  $E[X^{2}]$, I think, is just a weighted sum of the second moments of the two component random variables, i.e. $(1-\delta)(\sigma^{2} + \mu^{2}) + \delta(\tau^{2} + \theta^{2})$.  But when I compute $E[X^{2}] - (E[X])^{2}$, I don't get the simple expression in the book. Is my approach incorrect?  Moreover, how is this different than a traditional linear combination of two random variables? I don't think the variance expression in the book is derived from the traditional expression for the variance of a linear combination of two random variables, i.e. $Var(X) = (1-\delta)^{2}\sigma^{2} + \delta^{2}\tau^{2} + 2Cov(\text{component}_{1}, \text{component}_{2})$.

Say I have two normal distributions A and B with means $\mu_A$ and $\mu_B$ and variances $\sigma_A$ and $\sigma_B$. I want to take a weighted mixture of these two distributions using weights $p$ and $q$ where $0\le p \le 1$ and $q = 1-p$. I know that the mean of this mixture would be $\mu_{AB} = (p\times\mu_A) + (q\times\mu_B)$.  What would the variance be?    A concrete example would be if I knew the parameters for the distribution of male and female height. If I had a room of people that was 60% male, I could produce the expected mean height for the whole room, but what about the variance?


As i dependent on my father so my source of income is my family and spend 20,000 PKR each month in my living as i already submitted my university fee of full semester. so my question is that what should i mention in regarding to above question they asked  Do you have regular source of income or savings? how much money you spend each month?

I am a post-graduate student and I got a scholarship for a training course and to attend a conference in the UK. I totally depend on my father so how should I answer the question about whether I have any other income or savings?


I'm recently start learning blender and i have a trouble with crating cuts in cylinder with subsurf modifier without breaking up roundness. Anyone have a idea how to model this kind of piece(picture 1)?

Adding a loop cut to an object with a circular profile renders the object non-circular.  This is true for any object with a circular frame e.g. plain circles, UV-spheres, cylinders, cones, etc.  Top-left is the mesh of a plain circle with Subsurf modifier applied (bottom-left).  Notice how adding one additional vertex (top-right) makes the circle skewed (bottom-right). Is there a tool/transform/way to correct the circle? Knowing the solution to this should help solve the problem for all the aforementioned objects.  I tried selecting all points and applied the To Sphere transform in vain.  It didn't help. I thought putting the vertex r radius away from the circle's centre like the rest of the vertices will help, looks like it doesn't.


Let $(y_k)_{k\in\mathbb{N}}$ be a sequence in $\mathbb{K}$ with the property that for all sequences $(x_k)_{k\in\mathbb{N}}\in\ell^1$ the sequence $\sum_{k=1}^{n} x_k y_k$ has a limit in $\mathbb{K}$ for $n\to\infty$. Prove that $y\in \ell^\infty$. I tried to define an operator $T_y: \ell^1\rightarrow \ell^1, (x_k)_{k\in\mathbb{N}}\mapsto  (x_ky_k)_{k\in\mathbb{N}}$, but as I do not know about absolute convergence of $(x_k y_k)_{k\in\mathbb{N}}$, I am not sure if it really maps to $\ell^1$.

Let $a_n \subset \mathbb C$ is a sequence Show that if $\sum_{n=1}^{\infty} a_nx_n \lt \infty$ $\forall x_n \in \ell^1$   then $a_n \in \ell^{\infty}$  What did I do : $x_n \in \ell^1 \Rightarrow \sum_{n=1}^{\infty} |x_n| \lt \infty $ Since $\mathbb C$ is a Banach space $\sum_{n=1}^{\infty} x_n \lt \infty $ and from Leibnitz rule $x_n \to 0$ $\sum_{n=1}^{\infty} a_nx_n \lt \infty \Rightarrow$ $a_nx_n \to 0$ i.e. $\forall \varepsilon \gt 0$$ |a_nx_n| \lt \varepsilon $ $|a_n||x_n|=|a_nx_n| \lt \varepsilon \Rightarrow$ $|a_n| \lt \varepsilon /|x_n| $ and $|x_n|$ is a finite number thus terms of $a_n$ are bounded. So $a_n \in \ell^{\infty}$ I’m not sure about my writtens. It seems wrong to me. Could someone fix me please? Thanks a lot


I have a Dell XPS 13 9370 laptop with Ubuntu 18.04 and a Dell TB 16 Dock (Business Thunderbolt Dock). Since a few days ago, the laptop no longer works on the dock. When connected, it boots normally and I can log in. But about a minute after login, the laptop display and any externally connected monitor are turned off and the laptop seemingly goes to sleep. The power button light still indicates that it's on, and the keyboard backlight still goes on when I press a key (that's just a BIOS thing, I think), but the laptop otherwise doesn't react to keyboard input or mouse actions. The only thing that works is to press the power button for so long that the laptop powers off.  The same also happens immediately if I close the lid when the laptop is connected to the dock. (In the past, it would turn off the internal display and make the external monitor the primary screen, where the Gnome Shell Dash is shown, which is the desired behavior.)  A connection to the (powered) dock is enough to trigger this behavior -- it happens even if no devices are connected to the dock. Any suggestions what's wrong here and how to fix it?

I performed the most recent kernel update on my Dell 5290 2-in-1 earlier today.  But moments after I plug it into its docking station, the screen flickers, blanks and freezes.  The only item left on the screen is the mouse pointer, and it is stuck.   If I leave the tablet not plugged in, it runs just fine.  It seems to be the docking station that triggers the freeze.  That said, I can log into the tablet via ssh even with the screen frozen.  So the system is still running.  But if I try to reboot the tablet via the reboot command, nothing appears to happen. sudo reboot -f will reboot the system, while sudo reboot will not.  Any ideas where I should start looking to identify this problem?


Using a Ubuntu/Debian variant (Navigatrix) release based on Raring, which is no longer supported in the Ubuntu Repositories.  Current etc/apt/source.list is:  deb (http removed) pa.archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse deb (http removed) pa.archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse deb (http removed) pa.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse deb (http removed) security.ubuntu.com/ubuntu raring-security main restricted universe multiverse deb (http removed) archive.canonical.com/ubuntu raring partner deb (http removed) extras.ubuntu.com/ubuntu raring main   Need to install a couple of Gimp libraries (libgimp2.0-dev and libpcre3-dev) but attempts to apt-get install result in the expected 404 errors.   Know packages have been moved to old-releases.ubuntu.com/ubuntu/dists/raring/ but don't know how to rewrite etc/apt/source.list to point at the packages?   Updating to newer release is not currently an option.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I cook usually 1kg block at 65°C for 6 hours with 40g (4%) of salt, 10g (1%) of sugar, and a good amount of white and black pepper.  After cooking it, I cool it in an ice bath, then I store it in the fridge; first, one day uncovered, so it dries out a bit, and then in a Tupperware.  My question is: would this high content of salt increase the shelf life over the normal 3-4 days of a roast?  ADMINS: I am well aware of this . What I want to know is if making a dish salted would extend its shelf life, and if not, what would be the alternatives. If you don't have the answer, please leave the question open. Maybe someone else would have.

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I want to install it on a really small server and I want to see if it will be capable of running it with some dignity. So, does anyone have any memory and CPU consumption statistics of running logstash? I understand it depends a lot on the usage, but a reference on the usage could be helpful as well.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


Let $X$ and $Y$ be independent random variables defined on the space $\Omega$, with density functions $f_X(x)$ and $f_Y(y)$, respectively. Suppose $Z = X + Y$.    Find the density $f_Z(z)$ if $$f_X(x)=f_Y(x)= \begin{cases} \frac{1}2 &, & \text{if $0<x<2$,} \\ 0 &, & \text{otherwise.} \end{cases}$$   Attempt: I tried to take the integral $$\int_{0}^{z}\frac{1}2,\mathrm dx$$ then I eventually did the integral to get $(z/2)$ and $(1-(z/2)) $. unfortunately I was unable to figure this out

Let $X$ and $Y$ be independent and uniform random variables on $(0,1)$. Find the density of $X+Y$.  I know $$f_{X+Y}=\int_{-\infty}^{\infty}\,f_X(x)\,f_Y(z-x)dx$$  Now when $x\in(0,1)$, I know $f_X(x)=1$. Assuming $z\in (0,1)$, I need $z>x$ in order for $f_Y(y)=1$. In that case, $$f_{X+Y}=\int_{0}^{z}\,(1)\,(1)dx=z.$$   Now when $x\in(0,1)$,  $f_Y(y)$ can also equal $1$ if $z \in (1,2)$. In that case, I need $z-x<1 \implies x>z-1.$ So I have: $$f_{X+Y}=\int_{z-1}^{1}\,(1)\,(1)dx=2-z.$$   Does this all look correct?


I am currently using Ubuntu from a Live USB and in Gparted can see that my internal hdd has 1 partition /dev/sda1 size: 931.51 Gb, file system unknown.. I want to prepare this hard drive to install Ubuntu onto, but the disk utility tells me there are 798 bad sectors (which from doing a bit of research is approximately 0.00004%). Doing some reading in other forums, apparently running  mkfs.ext4 -c /dev/sda1   will create file system to which I can install Ubuntu and avoid the bad blocks in doing so. I really have no clue about this sort of thing, so just want to know if this will work or if it is the right way to go about it at least.   The reason I ask is because it is going to be a very time consuming process, as after 1h 35 mins it is only 0.08% done..  I am a complete linux n00b so please be as straightforward as possible in your responses, and thanks in advance for your help!

I tried to fix my hard drive using Ubuntu but I encountered an error message and didn't know how to proceed. I need to fix my bad sectors   fsck /dev/sdb   fsck from util-linux 2.20.1   e2fsck 1.42.5 (29-Jul-2012)   fsck.ext2: Permission denied while trying to open /dev/sdb   You must have r/w access to the filesystem or be root


I am trying to read and understand on what device would be a better switching element - BJT or MOSFET. From what I have read and my understanding is that: If the application requires faster switching, we need to go for the BJT because, the capacitance between the base and emitter is very less when compared to the capacitance between the gate and the source of the MOSFET. Since, charging the capacitance takes some time, and this capacitance in a MOSFET is higher, it is slower to switch than a transistor. Am I correct? And my other conclusion is that, the MOSFET has Rds(on) parameter. So, when in full conduction, there is an inherent power loss due to this internal resistance. Whereas in a transistor, there is no resistor. So, there is no big power loss. I am not sure about the cost part of the device. Which would cost us more? Is my understanding correct? Please let me know if my understanding is correct and if there are other critical parameters I have missed?

In my experimentation, I've used only BJTs as switches (for turning on and off things like LEDs and such) for my MCU outputs. I've been repeatedly told, however, that N-channel enhancement-mode MOSFETs are a better choice for switches (see  and , for examples), but I'm not sure I understand why. I do know that a MOSFET wastes no current on the gate, where a BJT's base does, but this is not an issue for me, as I'm not running on batteries. A MOSFET also requires no resistor in series with the gate, but generally DOES require a pull-down resistor so the gate doesn't float when the MCU is rebooted (right?). No reduction in parts count, then. There doesn't seem to be a great surplus of logic-level MOSFETs that can switch the current that cheap BJTs can (~600-800mA for a 2N2222, for example), and the ones that do exist (TN0702, for example) are hard to find and significantly more expensive. When is a MOSFET more appropriate than a BJT? Why am I continually being told that I should be using MOSFETs?


I used the anova function in R to get an ANOVA table for my model.  fit <- lm(open_time ~ sent_time + email_id + day, data=mydata) anova(fit)   I got the following output:  Analysis of Variance Table  Response: open_time               Df    Sum Sq Mean Sq F value Pr(>F) sent_time    1    222321  222321  2.2673 0.1323 email_id     1     15229   15229  0.1553 0.6936 day          1       798     798  0.0081 0.9281 Residuals 1996 195721653   98057     Can someone explain in basic terms as to how can I use this output to get useful information about my model (as in which independent variables are more significant in the prediction model, etc)?

I have a question on how a statistician would normally interpret an anova output. Say I have anova output from R.  > summary(fitted_data)  Call: lm(formula = V1 ~ V2)  Residuals:      Min       1Q   Median       3Q      Max  -2.74004 -0.33827  0.04062  0.44064  1.22737   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept)  2.11405    0.32089   6.588  1.3e-09 *** V2           0.03883    0.01277   3.040  0.00292 **  --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   Residual standard error: 0.6231 on 118 degrees of freedom Multiple R-squared: 0.07262,    Adjusted R-squared: 0.06476  F-statistic:  9.24 on 1 and 118 DF,  p-value: 0.002917   > anova(fit) Analysis of Variance Table  Response: V1            Df Sum Sq Mean Sq F value   Pr(>F)    V2          1  3.588  3.5878  9.2402 0.002917 ** Residuals 118 45.818  0.3883                     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    From the above, I guess the most important value is Pr(>F), right? So this Pr, is less than 0.05 (95% level). How should my "explain" this? Do I explain it in "association", ie, V2 and V1 are associated (or not) ? or in terms of "significance"? I always felt that I couldn't understand when people say "This value is significant....". So what is "significant"? Is there a more intuitive form of explanation? like "I am 95% confident that ...." .   Also, is the Pr value the only important piece of information? or can i also look at residuals and the rest of the output to "explain" the result? thanks


I was re-watching the Star Wars The Clone Wars Episodes about Darth Maul and Savage Opress and I realized that it was never explained how Maul actually got off of Naboo. I am not asking how he survived that can probably be guessed easily enough seeing as the force can probably be used by the writers to do basically anything they want it to. But I'm wondering how he got out if that huge pit and got off of Naboo. A task like that would be hard enough as is but it must be nearly impossible when he is cut in half. So how did he get off of Naboo and onto that junkyard planet? (Automatic up vote if you add the name of that junkyard planet in the answer)

From what I have read on , Darth Maul survived by using the Force, drawing from his hate to hang to a air vent, but then what? He crawled to a spaceship with his entrails sliding out?


How many 3 letter words can you form from 'EEAAP'   I think the answer is   ${3\choose 3} * 3!  + {2\choose 1} * 3 + {2\choose 1} *3=18$. Is this right?  ${3\choose 3} * 3!$  = You pick all distinct  ${2\choose 1} * 3$ = You pick 2 e's and either a or p  ${2\choose 1} * 3$= You pick 2 a's and either e or p

Given a string:  $AABBC=A^2B^2C^1$   I am trying to find the Total Permutations (this may be incorrect):  $\dfrac{5!}{2!\cdot2!}=30$  My question is how would I find the partial sums (perhaps the wrong choice in words) when added together would give an index such that:   $AABBC=1$ $ABABC=2$ $CBABA=29$ $CBBAA=30$   (30 might be the wrong number here but is suppose to be the last)   I have tried to draw out a tree structure to get an idea and thought with as the minimum:  $CAABB$  $4(\dfrac{4!}{2!\cdot2!})$ + 1  And:  $CABAB$  I would get something like:  $4(\dfrac{4!}{2!\cdot2!}) + 0 + 1(\dfrac{2!}{2!}) + 0 + 0$  But I am missing something here. How would I find the sums needed for $BACAB$ ?  More specifically I am trying to find the index of a word that is arbitrarily long in alphanumeric.  So the string may also be something like:  $AAAAABBBBDDEEFFFGGGGGHIIIIJJJJKLMOOOPZZZZZ$


I have two lists. How can I define a function "remove_repeat_element" to remove repeat elements from them ? ?   def remove_repeat_element(a, b):     ... ...  a = ['bd09fdf7-918e-4a5e-8338-0f6fe78fd238'] b = ['bd09fdf7-918e-4a5e-8338-0f6fe78fd238', '3c26f383-da50-446c-8613-64e1068bd57e']  result = remove_repeat_element(a, b) print result >>> ['3c26f383-da50-446c-8613-64e1068bd57e']   Could someone give me some advice ?? Thanks a lot!

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


I'm using jquery Ajax function to process a user login in a jquery pop up modal. Simplemodal. The script posts the username and password then displays the out come in a hidden div using jquery .show function. The question is in my login script it posts data back fine but how can I redirect the user if there login is successful. Normally I would use a php header but that doesn't reload tr close the modal popup just loads the header into the popup.  Can anyone help.  Thanks

How can I redirect the user from one page to another using jQuery or pure JavaScript?


Usually I start my terminal and login to some server with the following line:  ssh -X myuser@myserver.de   Now I would like to add a bookmark so that I can login while brousing through the folders with my mouse.   When I add network bookmark I can only edit the location, the following does not work  network:///myuser@myserver.de   I remember that I was able to add such a bookmark on a different computer. There I could add something like the username, host, port etc.   I use ubuntu 12.04. Please let me know how to add the bookmark.

In Ubuntu 11 I just dragged the folder there.  This seems to be not possible on my new Samsung ultrabook with Ubuntu 12.04   I've tried Ctrl+D and using the top menu but nothing happens and no error messages, just nothing.  How can I add a bookmark?


On an average Sunday, you might find yourself   In the sentence above, the possibility of the person reading finding themselves doing what it says is pretty high. It's almost certain. Should I use may instead? Might still sounds better when the sentence is read.  I often find sentences where may might be more appropriate but might sounds better. Even in this previous sentence I used might even though what I'm describing is much more likely than not.

I may not be coming in tomorrow...    I might not be coming in tomorrow...       When should I use "may" and "might"?


Say you have a hollow sphere with a uniformly distributed charge on the surface. Why is the electric field everywhere inside the sphere zero?  For the centre, its easy to add the vectors from the surface charges and show they sum to zero because of symmetry.   But can you show me how the field cancels out to zero for points other than the centre using vector addition?

It is quite easy to derive the gravitational field intensity at a point within a hollow sphere. However, the result is quite surprising. The field intensity at any point within a hollow sphere is zero.   What exactly is the reason behind this? Except for, of course, the mathematics behind it. Is there any logic why the field intensity should be zero within a sphere? For example, it is logical to say that the field intensity would be zero at the center, as all the intensities cancel out. However, this cannot be the case for any point within the sphere.


Whenever I open Firefox it doesn't open as a maximized window, just a rectangle. At first I didn't care but after some use it's been getting annoying and now I'm trying to fix it. I tried following  but to no avail.  (Ubuntu 18.04.3 LTS - Firefox 69.0 64-bit)

I am setting up Ubuntu with gnome for my grandma. How can I make firefox start ALWAYS maximized.


Question: Can anyone help to find closed form of following summation: $\sum_{i=0}^{20}(-1)^i\times\binom{n}{i}\times \binom{n}{n-i}$ ? I think this problem have a raltion with $\sum_{i=0}^{20}(-1)^i\times\binom{n}{i}$ ,but i can't prove this claim.

I know that the sum of squares of binomial coefficients is just ${2n}\choose{n}$ but what is the closed expression for the sum ${n\choose 0}^2 - {n\choose 1}^2 + {n\choose 2}^2 + \cdots + (-1)^n {n\choose n}^2$?


I know that sine is the ratio of the perpendicular to the hypotenuse of an acute angle. Similarly cosine is the ratio of the base and hypotenuse .  But now I found that there is sine and cosine of an angle over 90 degrees or negative degrees . I do not understand how they can determine the value of these sine and cosine . I have heard about the unit circle , and I find it is not convincing to determined the value of sine and cosine just by looking at the picture . I mean , is there any others method like using equations or theorems to calculate the cosine of an over 90 degrees?

Sometimes there are many ways to define a mathematical concept, for example the natural base logarithm. How about sine and cosine?  Thanks.


Given two points $A $ and $B $ in the  plane .  is it possible to draw the segment $[A,B] $ with only a ruler whose length is much smaller the the distance $\| \vec {AB }\|.$  I know the answer is yes and it uses the harmonic conjugate notion, but after many attempts, i still don't see how it is possible.  Thanks a lot for any help.

We want to join by a line two distinct points $A$ and $B$. We have only a ruler of length $l>0$ and a pen. If $AB>l$ how can we do this?


Let me give a bit of background to my question. I am using a terminal RSS reader newsboat which allows for the usage of macros to operate on links. For example, I have a macro running cd ~/videos && youtube-dl %u, which will download a youtube video to ~/videos. However, the output of youtube-dl will be printed in my terminal until the download is complete and for this time I cannot continue using newsboat.  I am wondering how I could phrase the command so that it is executed “somewhere else” so that I can immediately continue using the terminal from which it is run.

I'm writing a simple desktop initiation script which waits for disk idle, and then launches next external program (like Firefox, Skype or ) using &, like:  ps cax | grep conky > /dev/null if [ $? -eq 0 ]; then   echo "Conky is already running." else   wait-for-disk-idle sda   conky & fi   That's easy.   The problem is that some programs spew a lot of debug output to the terminal, which gets mixed with the messages produced by my initialization script.  The question:  Is there any way to asynchronously launch an external program so that its standard output is discarded?   What I already tried:   conky & >/dev/null 2>/dev/null  bash -c conky &     The correct answer:  bash -c "conky >/dev/null 2>/dev/null &"