Why wasn't Tony Stark more affected by this?

In Avengers: Endgame, when Tony Stark steals the Infinity Stones from Thanos and inserts them into his own ad-hoc gauntlet, there isn't much of an energy outburst and Stark seems to be able to wield the gauntlet fairly easily:                                  By contrast, there is much more energy when Thanos gets all the stones:                                  The Hulk seems barely able to survive wielding them:                                  I understand that the actual snap killed Tony, but it seems he wielded the stones too easily. Is his nano-suit particularly good at buffering the power from the stones? Why didn't the gauntlet he designed previously for the Hulk do this?


Equations behind mist formation around wings of fighter jet while doing acrobatic turns

Can some point me around equations to study for clouds formations around fighter jets while taking turns at high speeds as witnessed in Ace Combat 7 video game.  I want to implement this phenomenon in my own open source game in unreal engine or unity3d.


Achievements dropdown no longer listing earned badges?

I have just awarded my first bounty in stackoverflow and got the bronze "Benefactor" badge, but I somehow didn't got notified about this in my recent achievements dropdown. It used to do that with the other badges. That is how it looks for me, no more badge earned notice:    In fact I noticed the earning of the badge only because the bronze badge counter increased  For the case you say      "It is not a bug, we removed it"   I want this back :-) I think it is actually useful to see what badge has just been earned.


How to typeset a filepath as plain text?

I'm trying to typeset a manual with Texmaker for a computer program I've been working on, but I'm getting undefined control sequence errors when I try to insert a filepath in the format C:\Users\username. . .  There's probably an obvious solution, but it's been a long while since I used latex, and I can't find any answers online.  To make it clear, I'm trying to insert this filepath as plain text only, no fancy links, it's just text within  sentence.


Is there a word or term commonly used to describe the act of stating the obvious (or a person who continually does so)?     He constantly states the obvious, he is such a __.      She is always ___ing.


How to modify pattern of dashed line to not start/end with a space?

How can I force the pattern of a dashed line to be shifted/modified in such way that it does not start/end with a space?  Simple example:  \documentclass{article} \usepackage{tikz}  \begin{document}  \begin{tikzpicture} \draw coordinate (nw) (0,0) rectangle (4,4) coordinate(se); \path (nw)--coordinate (aux) (se);  \draw[dashed] (nw|-aux)--(aux-|se); \end{tikzpicture}  \end{document}   In the resulting output the line ends with a space.    If se is at (3,3) the line both starts and ends with no space:


How do I add a shortcut to a website to the Windows 8 start screen?

How can I add a shortcut to a specific website to the Windows 8 Start screen? Is this possible at all?


Prove or disprove that $f$ is an identity function if $f(f(f(x))) = x$ and $f$ is continuous

Let $f$ be a continuous function in $\mathbb R$ satisfying the relation  $f(f(f(x))) = x$, for all $x \in \mathbb R$.  Prove or disprove that $f$ is an identity function.


Prove\disprove: Let $F : \Bbb{R}^2\to \Bbb{R}$ a function s.t $\nabla F(x,y)=(0,0)$ for all $(x,y)$, so $F$ is constant. Intuitively this seems true, as this means that all partial derivatives are zero, which means the function is constant with respect to $x$ and $y$, but I find my intuition lacking when it comes to functions with more than one variable. Is this correct? or am I missing something?


Can a general-purpose AA charger be used for rechargeable AA lithium-ion batteries?

I recently learned that rechargeable lithium-ion AA batteries, 1.5VDC 3200mAh, have become available.  For instance:   Can a charger supporting >3V Li-Ion and 1.2V NiMH batteries, be used for these? And if not, what would be the necessary technical changes?


If I hold a long and a short position on the same option, do the contracts cancel out each other?

Suppose I sold an option on stock X, with strike price Y, and expiry date Z. Suppose I later buy an option on the same stock, with the same strike price, and the same expiry date. Do these two positions cancel out each other (i.e. both contracts cease to exist anywhere), or will I end up with two separate contracts?  Is it the same with the reverse situation? e.g. I bought an option on stock A, with strike price B, and expiry date C. If I later sell an option on the same stock, with the same strike price and expiry date, will I end up with two contracts (one long position, one short position)?


Tree with nested node class compiles, but inserting nodes return null

I am trying to insert a node into my tree using Node as a nested class. I can't figure out why the tree.root won't save the node using my method insertNode  public class Tree {   Node root;    private class Node {     int value;     Node(int value) {       this.value = value;     }   }    public static void main(String[] args) {     Tree tree = new Tree();     tree.insertNode(4, tree.root);     System.out.println(tree.root);    }    public void insertNode(int value, Node n){     if(n == null ){       n = new Node(value);     }   }     }  >> null   What am I missing? Thank you for your help


Inequality $(a+b)^2 + (a+b+4c)^2\ge \frac{kabc}{a+b+c}$ for $a,b,c \in\mathbb{R}$

Find biggest constans k such that  $(a+b)^2 + (a+b+4c)^2\ge \frac{kabc}{a+b+c}$ is true for any $a,b,c \in\mathbb{R}$  Could you check up my solution? I'm not sure it's ok -  $(a+b)^2 + (a+b+4c)^2 \ge 0$  and   $0\ge \frac{kabc}{a+b+c}$  so  $0 \ge k$


The "How to Ask" page might lead new users to ask their programming questions here. How can we deal with that?

When a user tries to post a new question on Stack Overflow for the first time, he's redirected to .  For a new user who is usually not very patient, it's just a wall of text. He goes over the words quickly, ticks the obvious "thanks, I will keep these tips in mind when asking " checkbox and then he might easily miss the "proceed" link which is both aligned to the right, far far away from the checkbox and has a light gray color.  In such a case the user will scan the page again looking how to get past that obstacle, then to the right of the big search box he'll see this:        Now he thinks "great, let's discuss my question on meta (whatever meta is)" and click the link happily and full with hope. He gets to a site with a very similar design to Stack Overflow. Remember that he's under the impression that's the place to discuss his question.  The "Ask Question" button is 100% the same as the one on Stack Overflow, so our dear user clicks it. Jackpot! There's no irritating wall of text asking him to confirm things he'll never really remember.  He posts the question there and quickly forgets the bumpy way he went through... until his question is downvoted and deleted on that mysterious "meta" site he never really meant to reach in the first place.  What can we do? I'm open for suggestions or objections, if you don't think that's the source for many of the programming questions we see here on daily basis.


Google Chrome - change from metro mode to desktop mode

On one of our desktop computers Google Chrome suddenly opens in metro mode. The user does not remember to having changed that setting.   How can I force Google Chrome to open in desktop mode again ?  This is on a Windows 8.1 computer.


Is it possible to do "Europe" -> "SFO" kind of search for airline tickets?

We know that you can do flexible search for multiple destinations for a specific date with a fixed source airport. For example, if you want to fly somewhere for a weekend from London, but don't care where exactly and want to see the prices, you can use either Google Flights or SkyScanner, type "Europe" as a destination and see the possible destinations and prices.  Is it possible to do the same search with fixed destination airport? What I mean is that I want to be in Heathrow on 1st, and I want to know from which airport around Europe it would be the cheapest to fly there on this particular date? So kind of "Europe" - > "LHR" search?  Edit: I know it is possible to do broad search from a source airport to multiple destinations. However I'm looking for the opposite - a search from many origins spawning multiple countries to one specific destination airport.   To be very specific: I want to type in "Europe" into the origin (not the "list of a few airports)", and "SFO" into the destination (not the "USA"), and see the flights with prices for the particular date.  Neither Kayar, nor ITA Matrix, nor Skyscanner, nor Google Flights seem to allow that.


The direct image of an ideal need not be an ideal

I need an example of a ring homomorphism such that the image of an ideal needs not to be an ideal.   I found that the image is an ideal if the mapping is onto, so all we need to find a mapping that is not onto.


Xubuntu 13.10 Blank Desktop after Update

I'm using Xubuntu and upgraded to 13.10 as the system dialog suggested it. However, after rebooting and logging in (the Loginscreen still perfectly works), I only see a black Desktop with an invisible mouse cursor, and my taskbar on the bottom. The invisible mouse is still useable as onMouseOver Effects apply.  After searching through the internet for a solution (the Guest Login still perfectly works), it seemed like the ATI drivers may be the root of evil here and it had been suggested to remove all fglrx packages and continue with the open source driver.  After uninstalling fglrx and rebooting, I'm experiencing exactly the same issues as mentioned in this question:   No Taskbar, no Mouse, just the plain Desktop Background. The problem at this point, however, is, that I use Xubuntu and xfce and none of the solutions of the mentioned thread was applicable for me so far as I don't have unity or compiz.


Eliminating discontinuities for increasing function

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a monotone increasing function. We know from a general fact that the set of discontinuities of $f$ is countable. Denote the set of discontinuities by $D$.  Define $g:\mathbb{R}\rightarrow\mathbb{R}$ as follows: $$g(x)=f(x^-)-\sum_{y\in D \text{ and }y<x}(f(y^+)-f(y^-))$$ It should be relatively clear that $g$ is monotone increasing. But is $g$ necessarily continuous?


Given an arbitrary set $X$, can one always find an element outside $X$? I think this question boils down to whether there exists a universal set that contains everything, including itself. But wiki says that assuming the existence of a universal set leads to . So given a set $X$, can one explicitly construct an element that does not belong to $X$? For example, is $\{X\}$ such an element?


Windows update not working in VirtualBox

I am trying to run Windows Update on a fresh VM using VirtualBox, but the Windows Update keeps hanging on "Checking for updates..."  Host OS: macOS Guest OS: Windows Embedded 8.1 Industry Pro  Happy to provide any other details necessary to help solve this problem. I have gone through several troubleshooting steps already and had no luck, including repairing the update services.


They are both the same menu way do they have different options? How do i get the left options to look like the rights?


Proving that $\sum_{n=0}^\infty \sum_{k=0}^n \frac{(-1)^n}{(k+1)\times (n-k+1)}$ converges

How can I prove that the following summation converges? $$\sum_{n=0}^\infty \sum_{k=0}^n \frac{(-1)^n}{(k+1)\times (n-k+1)}$$  I tried to prove that by proving that the following summation in in absolute value converges so the original one converges too, but that's incorrect.  Any other ideas?


Does Insect Plague trigger twice when you enter and end your turn inside the area?

Assuming you enter the spells area of effect and end your turn inside this area on the same turn. Does it trigger twice?     A creature must also make this saving throw when it enters the spell’s area for the first time on a turn or ends its turn there.   Not a native speaker, so I am not sure whether this means you make a saving throw when entering and when ending your turn in the area, or that you have to make one saving throw when one of this happens and only once.  It seems a bit overpowered when it triggers twice, dealing 8d10 damage is ok for a 5th level one-target spell, not a lasting multi-target AoE spell (DMG p.284)


What happens when you fall off the end of main() in a PIC?

included this program:  void main(void){     TRISD = 0x00;     PORTD = 0xFF; }   Let us assume that it does exactly what was intended up through the last line of main().  My question is, what happens in a PIC18F4550 when the flow of control falls off the end of main()? I assume any decent PIC programmer will fill the instruction space after main() with either all-1s or all-0s, but I don't know which.  I can see from  that an all-zeroes instruction is NOP, which is harmless in itself, but what happens when the program counter hits the end of the instruction space? Does it wrap around, halt, catch fire, emit monkeys...?  If PIC programmers fill program space with all-1s instead, as in an empty EEPROM, it appears that that will be an ADDLW instruction that adds 0xFF to W. If that is correct and we don't care about what happens to W, is this the same as the NOP case?  Do the answers to the above questions argue for doing something else, such as running an infinite loop to prevent execution from leaving main()? I don't think we can sleep the microcontroller here, since that won't keep the port D lines up indefinitely, as the OP wanted.


My english is not good but i need help please!!! I am adding dynamic rows to a table, within the row inputs used type checkbox. I need to use the onclick event checkbox, but I can't do.   $('#nuevo').click(function() {  //adding a row       var idusu = "<?php echo $idusuariologeado; ?>" ;  var fila='
&nbsp;	'+   '<input name="idiomas_nombre[]" type="text" placeholder="Idioma"    class="form-control input-md"  /><input  name="idiomas_usu[]" type="text"     value="'+ idusu + '" > 	'+    '<input  name="" type="checkbox" value="1" ><input type="hidden"     name="idiomas_suficiencia[]" value="" />	'+     '<input id="cb2"  name="" type="checkbox" onclick="updatebox()"     value="1" /><input type="text" name="idiomas_escritura[]"  />	'+     '<input id="cb3"  name="" type="checkbox" value="1"  >    <input type="hidden" name="idiomas_lectura[]" value="1" />	'+     '<input id="cb4" name="" type="checkbox" value="1" >         <input type="text" name="idiomas_hablado[]" value="1" />
';    //row to table $('#tab_logic').append(fila);       });   the function I intend to use in the onclick  function updatebox() { var textbox = document.getElementById("idiomas_escritura"); var values = [];  if(document.getElementById('cb2').checked) {     values.push("1"); }  if(document.getElementById('cb3').checked) {     values.push("1"); }  if(document.getElementById('cb4').checked) {     values.push("1"); }       textbox.value = values.join(" "); }   Please help me. Thank's


No Wifi Adapter Found on HP Laptop - 18.04

My laptop: HP 15-DA1006NT 5MM06EA i5-8265U 4GB 1TB 128GB SSD 2GB MX110 15.6 FreeDOS  I installed 18.04 Ubuntu both with 3rd party hardware and without them. I have same problem: "No wifi adapter found"  iwconfig  **  eno1 no wireless extension  lo no wireless extension  **  When I wrote "rfkill", I didn't have any results or error.   I looked the old topics and populer solution is bcmwl-kernel-source. However, when I wrote bcmwl-kernel-source to ınstall to termınal, I took this error:  unable to locate package bcmwl-kernel-source  Then I researced this error's solution.   This topic doesn't work for me.  and I've tried a few more things like that, but it didn't work. What are your solution suggestions?


Sometimes zooming with the mousewheel becomes very slow

I don't know what causes it, but sometimes zooming with the mouse wheel in the 3D View becomes very very slow. When I create a new 3D View it's back at normal speed, restarting Blender doesn't help though.  What could cause this and how can I solve it?


show that $a^{12} \equiv 1 \mod 32760$ for each $a \in \mathbb{Z}$ such that $\text{gcd}(a, 32760) = 1$

I am trying to show that $a^{12} \equiv 1 \mod 32760$ for each $a \in \mathbb{Z}$ coprime to $32760$. I have found the prime decomposition $32760 = 2^3 \cdot 3^3 \cdot 5 \cdot 7 \cdot 13$ and determined $\phi(32760)$, where $\phi$ is the Euler's totient function. This gives me that $\phi (32760) = 8640$.   Using Euler's congruence, this gives that $a^{8640} \equiv 1 \mod 32760$, but this is still far from the result I want to show... I also know a consequence of Eulers congruence, which states that $e \equiv e' \mod \phi (n)$ implies that $a^e \equiv a^{e'} \mod n$, but I do not see how to use this...  Any hints would be appreciated.  $\textbf{EDIT:}$ I made a mistake in my primefactorization, it is edited now.


There is a finite series:  \begin{equation}    \mathscr{S} = \sum_{n=0}^{m} {m \choose n}(m-2n)^2 \end{equation}  If I divide $\mathscr{S}$ by $2^{m}$ I get m. Could anyone explain it to me?


Cannot increase partition size although there is free space

I'm running a live session of Ubuntu/GParted through USB. I need to increase the size of /dev/sdb1 but I do not have that option. I can only decrease. I have 20GB set aside for my increase.  I did search for a while but could not find this exact issue.  Thanks for the quick replies. I'm still not sure how to fix this. I tried making all the other partitions smaller, but can't increase the one I need.    I reset everything because I don't see how to change what I want. I'll just wipe it and start over this weekend. Aside from being surprised this wasn't easy, I'm surprised I haven't found an explanation for why I can't resize that one partition. Would anyone be able to explain that?


How do you find the big O time complexity of this function?

This function runs a number series known as the Collatz conjecture. What is its time/space complexity? def run(n):     i = 0     while n > 1:         if n % 2 == 0:             n /= 2         else:             n = n * 3 + 1         i += 1     return i


An example s.t. $E(E(X|\mathcal F_1)|\mathcal F_2)\neq E(E(X|\mathcal F_2)|\mathcal F_1)$

If $\Omega=\{a,b,c\}$ give an example that $E(E(X|\mathcal F_1)|\mathcal F_2)\neq E(E(X|\mathcal F_2)|\mathcal F_1)$   If I choose the $\sigma$-algebras disjoint (or better said: one is not fully contained in the other) is the inequality always satisfied ?


What currency does the galaxy deal in besides credits?

In APM and the Clone Wars series, among other media, there are frequent instances where Republic credits are not accepted. These are typically places outside of the Republic and especially in the criminal underworld, Republic or otherwise.  If Anakin wants to pay Hondo to deliver some missiles illegally and not ask any questions, and Hondo does not accept credits, then what does Anakin pay him off with?


Story whose final line is "Let there be light!"

I read this series around 5-10 years ago. There were two parallel universes, ours and the universe of demons, and much of the series revolved around attacks in which demons created gateways to cross into our universe to kill people and wreak havoc, and had to be stopped by human magicians. Three youngsters (one guy from modern times, one from a few decades ago, and a girl from ancient Celtic times, all with funny names) end up being the key to the war when it's revealed that they are the three components of a mythical superweapon. These three are the only point-of-view characters in the series, each book being told from the PoV of just one of them. At the very end, they   destroy our entire universe so that, after killing all the demon masters, they can rebuild it and make sure everything happens as before up until the very last moment.  As they begin recreating the universe, the current PoV character (the one from modern times) says something like the following, the very last lines of the series. (sic on the quotation marks)  "In the beginning, there was nothing but darkness. Then [name] said, 'Let there be light!'" And there was light. Coolio!


How does one prove that the Klein bottle cannot be embedded in $R^3$? I'm talking about smooth embeddings.


Geometrical interpretation of transpose of a matrix

How can we interpret the transpose of a matrix, that represents the cordinates of a vector with respect to a basis, geometrically?


C++ LinkList and Node Template Linking Errors

I am trying to create a node template to use with my linked list template but am getting an error that my constructors in Node.h are not defined. I have a Node.h file and a Node.tem file that I created in Visual Studio. The Node.h file looks like this:  #ifndef NODE_H #define NODE_H  #include <cstdlib>  template <class Type> class Node { public:     Node();     Node(Type indata);      Type data;     Node<Type>* next;     Node<Type>* prev;  }; #include "Node.tem" #endif   and my Node.tem file looks like this:  template <class Type> Node<Type>::Node() {     next = nullptr; }  template <class Type> Node<Type>::Node(Type indata) {     data = indata;     next = nullptr; }   After some debugging, it looks like the problem occurs in my alloc function in the Linked List template on this bit of code:  template <class Type> Node<Type>* LinkList<Type>::alloc(Type indata) {     Node<Type>* dynamicNode = new Node(indata); //error occurs here     return dynamicNode; }   The errors I get are:  'Node': class has no constructors and 'Node': use of class template requires template argument list  My main() code is rather large as this is just a small piece of a big project, but I can post it if needed.


How do you store a character in a list of linked lists in C

I am trying to create a list of linked lists, but i get a warning:  warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]  printf("Data in 0 is : %s\n",list[0]->data);   the code is below  create(0,'A'); printf("Data in 0 is : %s\n",list[0]->data);   the create() code:  void create(int indx, char rsc){     struct Node* tmp = (struct Node*)malloc(sizeof(struct Node));     tmp->data = rsc;     tmp->next = NULL;     list[indx] = tmp;   the list of Nodes is initialized as follows:  struct Node *list[26];


Projectile motion maximum distance to origin

Is there an elegant or easy way to derive the maximum distance from the origin to a point of the parabola created by projectile motion (assume initial position is the origin)? Other than differentiating with respect to $x$ and equate to zero the distance given by $\sqrt{x^{2}+y^{2}}$?


Install OpenSSh from source on ubuntu 16.04

i want to install openssh from source on Ubuntu. i downloaded the source   ./configure make sudo make install   but with this last command, i get the following error:  (cd openbsd-compat && make) make[1]: Entering directory '/home/pc/Desktop/openssh-7.6p1/openbsd-compat' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/pc/Desktop/openssh-7.6p1/openbsd-compat' ./mkinstalldirs /usr/local/bin make: execvp: ./mkinstalldirs: Permission denied Makefile:313: recipe for target 'install-files' failed make: [install-files] Error 127   What can i do please to fix this error ? i can't find a solution !


From the poem I Like For You To Be Still by Pablo Neruda     I like for you to be still.   How is that different from      I like you to be still.


Using the system date / time in a Cron Script

I'm setting up a Cronjob that will backup a MySQL database I have in my server, but I don't want it to keep overwriting the same file over and over again. Instead, I want to have an array of backups to choose from, done automatically. For example:  ## Cronjob, run May 21st, 2011: mysqldump -u username -ppasword database > /path/to/file/21-03-2011.sql  ## SAME Conjob, run May 28th, 2011: mysqldump -u username -ppasword database > /path/to/file/28-03-2011.sql   And so on.  Is there any way that I can use the system date and/or time as some kind of variable in my Cronjob? If not, what are your suggestions to accomplish the same?


Confidence interval of linear regression variable calculation

I want to be able to calculate the confidence interval from the estimated coefficient and respective standard errors.  I have a linear regression model which can be summarized (in R):  summary(fit1)  Call: lm(formula = bwt ~ height + weight + parity, data = data)  Residuals:     Min      1Q  Median      3Q     Max  -66.913 -10.624   0.991  10.979  55.621   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) 31.19217   13.56879   2.299   0.0217 *   height       1.24964    0.23083   5.414 7.48e-08 *** weight       0.06781    0.02823   2.402   0.0164 *   parity1     -1.83309    1.19838  -1.530   0.1264     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 17.9 on 1170 degrees of freedom Multiple R-squared:  0.04898,   Adjusted R-squared:  0.04654  F-statistic: 20.08 on 3 and 1170 DF,  p-value: 1.071e-12   With this model I can calculate the respective confidence intervals:  > confint(fit1)                   2.5 %     97.5 % (Intercept)  4.57029503 57.8140351 height       0.79676227  1.7025207 weight       0.01243198  0.1231932 parity1     -4.18429933  0.5181151   I would expect the intervals of the predictor height to be given by  $$ 1.24964 \pm (1.96*0.23083) = [0.7972132,1.702067] $$  where 1.24964 is the estimated value for the coefficient and 0.23083 is the standard error for this coefficient. The numbers are close but not quite the same.  What am I doing wrong?


I was wondering if it is possible to change Blender's interface color?  The dark version is the default  Are there setting that would allow you to change to something lighter?


How long can I store the data on the flash drive?

how long can I store the data on the flash drive safely, without connecting it to a computer or any other host?  Edit  I understand that flash pens are absolutely not suitable for backup and storage. My question is the issue of data recovery. That's why it's tagged accordingly.  have in mind the use of the stick from time to time. In other words, do I have a chance to find the data corrupted if I haven't used the drive for a long time?


Can a wizard choose where to place their soul piece when creating a horcrux?

In the world of Harry Potter a wizard can remove a part of their soul and place it into another object through the act of homicide, thus creating a Horcrux. Is the wizard able to direct their soul pieces such that they can choose what becomes a Horcrux? Tied into that question, it seems possible that a wizard can kill someone and not create a Horcrux (Peter Pettigrew killed Cedric Diggory but no one seemed concerned that Peter made a Horcrux), so how/why did Harry Potter wind up with a sliver of Voldemort's soul when it seems inconceivable that Voldemort's intention was to put one there?


From .NET developer to SharePoint developer - Can it happen?

I am a .NET developer who builds web apps and I’m thinking of learning SharePoint 2010 and change my career to SharPOint development. Why? Because web development is widely focused and I never seem to be an expert in any one technology. There’s just too much to learn. At least with SharePoint I can use my existing C# and database skills in one platform.   My question is this: Is it a good career move to focus on one platform such as SharePoint? I sure hope you say yes.


How do I add a swap (Not a swap file) after installation of Kali Linux?

I am a dual user running Kali Linux and Windows 8.1 . A few days before, I had removed the swap partition that I had installed for Kali Linux during the installation, since my windows was running out of space. Now, I do not know how to make Kali Linux recognize the swap partition for it. The consequence I have to face is that it takes 2 full minutes to boot into Kali Linux. I am posting the system specs below:  Manufacturer and Model: Dell Latitude E5440   Version: Kali Linux Rolling 2020.3  I guess this is unimportant, but just posting it. Thanks! Another thing, I want Kali Linux to realize that I have given it a partition not during the installation procedure, but when it runs on the OS environment. GParted is not helping at all, although I try to provide it a Swap partition. It remains enabled, but during the next boot, Kali does not use it and it stays useless.


Can I answer all questions about my product or is it self-promotion?

Does answering all questions about a product that I'm working on is considered self-promotion? I'm asking because of this part in FAQ:     If a large percentage of your posts include a mention of your product or website, you're probably here for the wrong reasons.   And is it necessary for me to disclose my affiliation? Note that the questions are directly about how to use the product and I'm not suggesting my product as a solution


how to add graphics.h to code blocks in ubuntu ?

I have installed the codeblocks from ubuntu software center and used good enough time no problem but when i try to access functions from graphics.h library I'm getting errors so please help me adding the graphics.h from  to the code::blocks.  Thanking you , guys!


Why do I get NullPointerException while adding elements to an array?

I want the user to input n numbers of his wish and write a program in java to find the average using arrays. I came up with the following program, but there seems to be a problem when i run it:    Exception in thread "main" java.lang.NullPointerException at wert.main(wert.java:12)  This is the code in question:  import java.util.Scanner; public class wert {  public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     int gucci[] = null;      System.out.print("Enter the length\n");     int n = sc.nextInt();     System.out.println("enter the numbers : ");     for(int i=0;i<n;i++){          int k = sc.nextInt();         gucci[i] = k;         }     int m = average(gucci);     System.out.println(m/n);  }     public static int average(int x[]){         int total = 0;         for(int f: x){             total =+ f;         }         return total;     }    }   I'm sorry if I am asking a really basic question. I started learning java on my own a few days back.


How to install ubuntu on an old mac-mini

I've got an old mac mini A1103, without airport, running on Mac OSX 10.5.8 I decided to install Ubuntu but I can't. Could anyone help me? Which is the proper version for my mac?  my system:  1.25 Ghz PowerPC G4 512 Mb DDR SDRAM 37 Gb hard drive


I am an amateur. So there is nothing simple I should know.   Basically, I installed Linux on a my PC as windows 7 kept freezing just to give something a try. It worked. So my brother made me make him an account and it never worked. It is always leaving a black screen that required a hard crash. Then (after an infinite amount of complaints to parents) I tried to fix the problem and accidentally turned auto-login on his account and now Ubuntu boots straight to a black screen.   I've tried stopping auto-login, deleting his user, adding a password to it and several other things has given no success.   Any ideas please?   Thanks in advance (for trying).


What is Boolean [ ] ba[ ] supposed to mean?

what is Boolean [] ba[] supposed to mean? Is it an array (with name ba) of boolean type of an array of an array?


Should I postpone buying a zoom lens until I've learned to zoom with my feet?

After several years of shooting with my point-and-shoot, I upgraded to an NEX-5R, with two prime lenses — a 35mm f/1.8 and a 19mm f/2.8. I don't have a zoom lens, not even the kit lens.  I've been told that I should first learn to zoom with my feet before I buy a zoom lens. Is that advice correct? Would I be slowing down the rate at which I improve my skills if I buy a zoom lens now?  Or might buying one actually help because I'll be able to capture shots I can't with a prime lens (one can't always zoom with one's feet) and thereby learn compositional and other skills?


Gedit show text from terminal output colored

I run a script in terminal and the output printed in the terminal I also save in a text file. How can I display that text in Gedit colored similar to what I can see in the terminal? I thought there could be a plugin. Update I might not have been as clear as I planed, so I would like to see similar coloring changes in the plain text file as appears in terminal, not for shell scripts but if I have an error message (e.g. compiler error) than those line to be differentiated from other printouts in terminal. $ rosrun my_pkg my_node >> terminal_printout Update 2 My gedit version is 3.10.4 ii  libgtksourceview-3.0-1:amd64   3.10.2-0ubuntu1 amd64 sared libraries for the GTK+ syntax highlighting widget ii  libgtksourceview-3.0-common    3.10.2-0ubuntu1 all common files for the GTK+ syntax highlighting widget


How to create an Automator service to run an xattr script to remove extended attributes on selected files?

I want to create an Automator Service that will run an xattr Terminal command on a single or batch of files.  I can do the operation in Terminal (kinda), but I didn't understand how to apply that to Automator.  Basically I was trying to remove Where From extended attributes from an flv or mp4 file. In terminal I'd simply type:  xattr -d com.apple.metadata:kMDItemWhereFroms /Path/To/File   That threw an error, but it still worked.   I'm running macOS 10.11.6, El Cap.    I finally figured it out. It appears I didn't need to be as selective with the xattr command, since I just want to clear all the extended attributes. Here's an image of what appears to work:    I still don't entirely understand the actual Shell Script language. I learned from reading a lot of other posts that unlike Terminal, you have to tell the shell script where xattr (the tool) is.  /usr/bin/xattr   I assume that "$f" is the file(s) that you select in the Finder.  I continue to be confused by the difference between "Get Selected Finder Items" & Get Specified Finder Items." They both seem to pass whatever you choose in the Finder through. I chose the 1st option and it worked.  Apologies if this all seems elementary to you guys, I have zero experience writing scripts. I just usually cut and paste someone else's work, and 9 times out of 10 that's done the job. Just couldn't find this particular explanation anywhere. Hopefully it will help someone else.


How do I install Ubuntu on a Pre-installed Windows 8 laptop?

I spent this whole weekend trying to come up with a solution on my MSI GT70. Right now, I can boot using a Live USB under legacy mode with nomodeset.  However, I have trouble with booting it under UEFI. I tried following steps;   I disabled fastboot Disabled quick boot in win8.1 (I upgraded the pre-install system),  Ininstalled Intel rst  My SATA is under ACHI, so I disabled secure boot (though I'm sure that's not the case) Enabled CSM, I tried acip=off   none of these worked for me under UEFI. I even tried to install 12.04 LTS and 13.10 by changing the USB several times.  I'm frustrated and have no idea what to do now. There must be something that I'm missing. Because, when I used nomodeset, it runs into bunch of lines, and after that is a black screen. I never get to see the X desktop, It's always a black screen.  Can someone advise me what to do?  I tried everything on that post, nothing works, I can't boot my live USB, please do not just mark it as duplicate


Clustering unrelated (with no correlation) data

The objective of clustering analysis is to group data with similar characteristics in clusters, but in this case, I want to find the most unrelated data to group into clusters. In my particular case, I have 100 weather stations during one year with a 1hr interval, and I want to group the most similar weather stations(I performed this step with K-means using the correlation distance via MATLAB, but I can use R or Python). But now, I want to perform the inverse, i.e., group in the same cluster unrelated (with no correlation) weather stations .  Is this possible? If yes, how? Or, should I use others techniques to execute my idea?  The main idea is to use the groups to prove a concept often used in wind power designated as statistical power smoothing effect (). Basically, there is a statistical power smoothing effect in the wind power data, if you considered data with different features (e.g., different weather conditions). I want to use this grouping to show if I carefully grouping my weather stations (that will be transformed in wind power), then I can minimize the fluctuations. So far I applied k-means algorithm to select the weather stations with the same behavior, and now I want to explore the opposite. Probably, the technique that I need is not clustering, but so far I search and nothing came up.  @Pere: Yes, I also expected what you mentioned. Can you provide some reference to understand how I can compute the correlation inverse distance?  @Dougal: I want diverse groups, as in the normal cluster.  To be honest the goal was to split the data in the same number of the "normal" clustering, in my case 9.  @ Pere: Thank you for the example. But I didn't achieve the expected results since, in my case, some clusters are very close to the ones obtained with the "normal" cluster. Probably it is better to try a trial and error test (adding/removing weather stations) to understand the weather stations that I should combine to smooth my signal.


java.lang.NullPointerException on ArrayList size

I'm looking for the equivalent word in the dabase by the ContextQuery method, and when a equivalent word is null the program must try to use the next index from words and add it up to the current to make it a two word, if the two word is still null the program will make it a three word looking for the next 2 values. And i'm getting a NullPointerException everytime      for (int i = 0; i < words.size(); i++)       {                      try {             temp = QueryWithContext.query(words.get(i));             if(temp == null && temp.isEmpty() && words.size() >= i+1)             {             QueryWithContext.query(words.get(i)+" "+words.get(i+1));             temp = QueryWithContext.query(words.get(i)+" "+words.get(i+1));                 if(temp == null && temp.isEmpty());                     {                     temp = words.get(i);                     }             }             else if(temp == null && temp.isEmpty() && words.size() >= i+2)             {                 temp = QueryWithContext.query(words.get(i)+" "+words.get(i+1)+" "+words.get(i+2));                 if(temp == null && temp.isEmpty());                 {                 temp = words.get(i);                 }             }                System.out.println(temp);             holder = holder +" "+ temp;             counter++;       }


I have a problem in latex. I can't write like that picture.  how to write like that.   Please.


Delete all files having extension '.sh' but keep one file matching the extension by terminal

Actually this kind of too much to ask I think.  But I want to remove all files matching the extension ".sh"(current folder only) which I can do with below command:  find . -maxdepth 1 -type f -name '*.sh' -exec rm {} +   But still I want to keep file "cron.sh" in the current folder unaffected.  How can I achieve this in single command line ?


Consider RL circuit consisting of a battery , resistance , inductor , and switch .all components are in series .  If we close the switch at time t =0 the current will build up until reaching a maximum .now i want to put the differential equation that discribes the circuit while the current is building up and i know from walter lewin lectures that i have to use Faraday's law not kirchhoff's loop rule because we have nonconservative electricfield .  Walter lewin derives the differential equation as follows  Closed loop integral of (E.dl)=-Ldi/dt  IR - v = -Ldi/dt  What baffles me is what kind of electric field do we mean in the above formula ?do we mean the nonconservative electricfield only or do we mean the superposition of conservative and nonconservative electricfield ?


Is it possible to know a variable's name

One thing to note is: I need to get the variable's name, not the property's name.  I have a scenario where I need to pass in either List<int> or List<double> to a view. So in the partial view I bind the model to dynamic:  @model dynamic  var nameOfParameter = Web.Controllers.MemberInfoGetting.GetMemberName(() => Model);  @foreach (var value in list) {      <td>@Html.Editor(value, "DoubleTemplate", new { Column =  count, Switcher = (YearOfProgram >= count)})</td>      sum += (double)value;     ++count; }   And this is how I call the partial view from the main view:   @Html.Partial("_myPartial", Model.CategoryList)   Then I found that I have to know the name(CategoryList) of the list which is passed into the partial view.  Here I found many posts talking about using something like this:     public static class MemberInfoGetting     {         public static string GetMemberName<T>(Expression<Func<T>> memberExpression)         {             MemberExpression expressionBody = (MemberExpression)memberExpression.Body;             return expressionBody.Member.Name;         }     } }   This code doesn't work for me as the result of (nameOfParameter )calling it will always be "Model", rather than "CategoryList".  So, is it possible to achieve what I want?    Update1  The reason why I need to pass in the name of the list is because I need the name of the list to form the name on the html element into something like: CategoryList_1. So Razor knows I am trying to bind the value of the textbox into the 1st element of a property in my view model.  class MyViewModel { ................ public List<double> CategoryList {get; set;} ................ }     Update2    @Html.RenderPartial("_VerificationSummarySection",new { ListName = "PracticeEvaluationCreditsVerifiedList", List = Model.PracticeEvaluationCreditsVerifiedList})   I'm now trying to pass in the name of the list by using RenderPartial. But, I cannot find the right way to use it.


I have two files. I want to exclude anything that is in file 2 from file 1.   Example)  File #1 - List of 500 domain names  domain1 domain2 domain3 etc..   File #2 - Alexa's Top 1,000,000 domain names  domain1 domain2 domain3 etc..   I would think this would work.  cat file1 | grep -v -f file2 > results   This always results in "Killed" for anything over 10k+ in file2.   /var/log/messages shows it runs out of memory. The box has 12GB RAM.  Aug 25 02:21:18 V-RHEL-EM kernel: Out of memory: Kill process 13779 (grep) score 860 or sacrifice child Aug 25 02:21:18 V-RHEL-EM kernel: Killed process 13779 (grep), UID 0, total-vm:9377064kB, anon-rss:7400368kB, file-rss:0kB, shmem-rss:0kB   Is there a better way to do this?


How to revert to a previous xserver-xorg-video-intel driver?

I am using Lubuntu 14.04.2  I recently updated the xserver-xorg-video-intel-lts-utopic driver from:  2:2.99.914~1~exp1ubuntu4.3~trusty1  To  2:2.99.914~1~exp1ubuntu4.5~trusty1  Now I have randomly missing letters in the desktop icon text and other text in the GUI. I tried reloading the driver from Synaptic but it comes back periodically. The only solution I have found (albeit temporary) is to logout and log back in.  This was part of an update package that has gone awry.  I don't have the proprietary intel drivers installed, nor do I want to.   How do I revert back to the previous driver (2:2.99.914~1~exp1ubuntu4.5~trusty1) where I didn't have this issue?  The command line solution that mchid gave me below should work but I get an error message as seen below.  The solution provided does not have anything to do with my current issue as far as I can tell.  Thx  Nick


Are there any good Slytherins besides Snape and Slughorn?

Presumably Slytherins aren't inherently bad, they just value different traits in a person compared to the other houses. But it seems that in the stories, being a Slytherin equates more or less with being a death eater, or at least a Voldemort sympathizer.   The only exceptions I can think of are Snape and Slughorn, and even Snape was a death eater for while before switching sides.   Are there any other good Slytherins?


Why are there two metric signature conventions?

I understand that it is more common in GR for the metric to be given a $(-,+,+,+)$ signature and more common in particle physics (or field theory, as Peskin & Schroeder tells me) to use the $(+,-,-,-)$ metric signature. I'm wondering why. Is there any advantage in these disciplines in terms of actual physics to using one over the other, or it simply an entrenched arbitrary convention?


Is it possible to output a SELECT statement from a PL/SQL block?

How can I get a PL/SQL block to output the results of a SELECT statement the same way as if I had done a plain SELECT?  For example how to do a SELECT like:  SELECT foo, bar FROM foobar;   Hint :  BEGIN SELECT foo, bar FROM foobar; END;   doesn't work.


Let $A$ be a $5\times5$ matrix with real entries such that the sum of the entries in each row of $A$ is $1$. Then the sum of all entries in $A^3$ is   (a) $3$   (b) $15$  (c) $5$  (d) $125$  $1$ is an eigenvalue of $A$, that's all I know. How could we go to the sum of all entries of $A^3$ ?


How does a spinning electron produce a magnetic field?

I learned in my undergraduate physics class that atoms have magnetic fields produced by the orbit of electrons and the spin of electrons. I understand how an orbit can induce a magnetic field because a charge moving in a circle is the same as a loop of current.   What I do not understand is how a spinning ball of charge can produce a magnetic field. Can someone explain how spin works, preferably in a way I can understand?


Reputation decreased due to removal of random post

My reputation was decreased. When I look at the reason it says that the post was removed. But I don't think that I was by any means connected to that post. Has this happened to anybody else?   Or do I need to know something about Stack Overflow?


Why is virtual member function being called from base class instead of a subclass

I was writing a short snippet of code to figure out how I would store different template specializations into one data structure (e.g. vector). I'm aware of tuple but that's not good because I want to be able to append specializations after the tuple was constructed.  Below is a snippet of code that I came up with. In short, my idea was to have every template specialization inherit from a common class Element and then store such instances into a vector<Element>. That worked, but now when I access that data from vector, I access it as an Element. I need some way to find out which Element is paired with which template specialization.   Using typeid directly on elements from the vector returns the base type. I tried to work around that by having a member function runtime_type return that information from the subclass. Unfortunately, it's not working because the member function from SparseSet<T> is not overriding the virtual member function from the base class. I'm not sure why.  #include <vector> #include <iostream> #include <tuple> #include <typeinfo> #include <algorithm>  class Element { public:     virtual const std::type_info& runtime_type()     {         std::cout << " Called base ";         return typeid(*this);     }      virtual ~Element() = default; };  template<class T> class SparseSet : public Element { public:     T param;      const std::type_info& runtime_type() override     {         std::cout << " Called derived ";         return typeid(*this);     } };  class Manager { public:     std::vector<Element> elements;      template<class T>     bool has()     {         const auto it = std::find_if(elements.begin(), elements.end(), [](auto &element) {             std::cout << "typeid(element) = " << element.runtime_type().name() << std::endl;             std::cout << "typeid(T) = " << typeid(T).name() << std::endl;             return typeid(element) == typeid(T);          });         return it != elements.end();     } };  int main() {        SparseSet<int> ss_int;     ss_int.param = 3;      SparseSet<char> ss_char;     ss_char.param = 'a';      Manager manager;      manager.elements.push_back(ss_int);     manager.elements.push_back(ss_char);      std::cout << manager.has<SparseSet<int>>() << std::endl;      return 0; }   When I run the snippet above, using the online compiler  (g++ -std=c++17 -O2 -Wall -pedantic -pthread main.cpp && ./a.out), I get the following output.  typeid(element) =  Called base 7Element typeid(T) = 9SparseSetIiE typeid(element) =  Called base 7Element typeid(T) = 9SparseSetIiE 0


Declaring variables inside a switch statement

I saw a few answers to this issue, and I get it — you can't declare and assign variables inside a switch.  But I'm wondering if the following is correct at throwing an error saying     error: expected expression before 'int'   Code:  switch (i) {     case 0:         int j = 1;         break; }   Why would putting a call to NSLog() before it result in no errors?  switch (i) {     case 0:         NSLog(@"wtf");         int j = 1;         break; }


How does javascript class method know to call function or method when both have the same name?

I was just going though some source code here on the index file of glide.js and saw the following code :   mount (extensions = {}) {     this._e.emit('mount.before')      if (isObject(extensions)) {       this._c = mount(this, extensions, this._e)     } else {       warn('You need to provide a object on `mount()`')     }      this._e.emit('mount.after')      return this   }   So basically mount (extensions = {}) {} is a method inside the Glide class and the mount being invoked inside this mount method is a function that is being imported like so:  import { mount } from './core/index'   My question is how does JavaScript differentiate between recursively calling the mount method or the imported function since both have the same name ?  note ::- code can be found .


The following MWE  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*}         F_1(p) & = 1-\frac{L_0(\underline{c}_1-p)+\mu \underline{c}_1}{\mu p} & \text{ for } p\in \left[\frac{cL_0}{L_0+\mu},c \right] \\         F_{02}(p) & =\begin{cases} 1-\frac{L_1\left(\frac{cL_0}{L_0+\mu}-p\right)+\mu \frac{cL_0}{L_0+\mu}}{\mu p} & \text{ for } p\in \left[\frac{cL_0}{L_0+\mu},c \right) \\                                     1 & \text{ for } p\geq c,                      \end{cases}     \end{align*} \end{document}   produces    How can I modify the code to achieve alignment at the equals signs and the "for" statements?


exporting 20k or more records from MY SQL to CSV using php

I'm trying to export around 20k records from a table in mysql to csv and as expected it crashes my system, is there any alternative to doing this as to avoid crashes?  here's my current export code:  $filename2 = "csv/leads_".date("M-d-Y",time()).".csv";             $fp2 = fopen($filename2, 'w') or die("can't open file");              $sql2 = $sql_getcustomers;             $res2 = mysql_query($sql2);              // fetch a row and write the column names out to the file             $row2 = mysql_fetch_assoc($res2);             $line = "";             $comma = "";             if($row2){                 foreach($row2 as $name => $value) {                     $line .= $comma . '"' . str_replace('"', '""', $name) . '"';                     $comma = ",";                 }                  $line .= ",crm_group";                 $line .= "\n";                 fwrite($fp2, $line);                  // remove the result pointer back to the start                 mysql_data_seek($res2, 0);                  // and loop through the actual data                 while($row2 = mysql_fetch_assoc($res2)) {                           $line = "";                     $comma = "";                     foreach($row2 as $index => $value) {                         $line .= $comma . '"' . str_replace('"', '""', utf8_decode($value)) . '"';                         $comma = ",";                     }                      //** GET THE CRM GROUPS                     $sql_get_group = "SELECT a.crm_group_name, b.* FROM tbl_crm_members b JOIN tbl_crm_groups a ON (a.crm_gid = b.crm_groupid) WHERE crm_uid = ".$row2["uid"];                     $sql_get_groups = mysql_query($sql_get_group);                     $res_get_groups = "";                     while($sgg = mysql_fetch_object($sql_get_groups)) $res_get_groups .= $sgg->crm_group_name.";";                     $line .= ",".trim($res_get_groups, ";");                     $line .= "\n";                     fwrite($fp2, $line);                      }                 fclose($fp2);


Finding the moment generating function of the product of two standard normal distributions

The following question is on my homework assignment that I cannot figure out:     Let U and V be independent random variables, each having a normal distribution with mean zero and variance one. Find the moment generating function of the random variable W = UV .   I have looked around online, and cannot find an answer to this question. In fact, the only answers I can find that even relate to the product of standard normal random variables are using techniques that we never covered in my class. We covered in class how to find the MGF for linear combinations of random variables, by W isn't linear, its a product of two normals. So that technique won't work.   What am I supposed to do? I am completely at a loss. I have tried multiplying the MGFs of U and V together, but that leaves me with something ugly that I can't reduce.


A trusted online or free app to convert Latex pdf(Thesis) to Word?

I want to convert my thesis(pdf) to word, as university requires a softcopy to check plagiarism through Turnitin. I need an app or software which I can trust with my thesis.  Note: I have already tried opening pdf directly in word. It is a mess.


What is the name for this "..." punctuation?

When I am writing, and I want to leave something out, so that it gives an implied effect, I use this: ...  What is it called?


Do circular wheels maximize mechanical efficiency?

I recently wondered whether there is a simple proof that circular wheels maximise mechanical efficiency. By this I mean:     Show that for a wheel with a given width and cross-sectional area, the   circular wheel reaches the bottom of an incline faster than a wheel   with any other shape.   This sounds like a rather elementary problem in classical mechanics but I haven't found a proof of this fact in any of the classical mechanics texts that I have read.   Note 1: I assume that the distribution of mass is uniform across the wheel so comparable wheels will have equal mass.   Note 2: Dry friction is assumed to be present.


The sum of series with natural logarithm: $\sum_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$

Calculate the sum of series:  $$\sum_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$  I tried to spread this logarithm, but I'm not seeing any method for this exercise.


Why does manipulating the expression help?

Consider the limit $$\lim_{x\rightarrow 1}\frac {x^2-1}{x-1} $$ Plugging in $1 $ for $ x $ will yield $\frac00 $, which is no good. However, if we simplify the expression, we get: $$\lim_{x\rightarrow 1}\frac {x^2-1}{x-1} = \lim_{x\rightarrow 1}(x+1)$$ Now, plugging in $1 $ yields the answer $2 $. My question is: why on earth should simplifying the expression help us find the limit? The two expressions above are absolutely equivalent. I.e., if I plug in, say $10 $ in $(x+3)^2 $ and $x^2+6x+9 $, I get the same answer - $169 $.


My actual question is to find the number of transversal given a collection of set ...  After a little bit of study it has come down to:  How can we count the number of matchings in a bipartite graph with parts of size $m$ and $n$ such that it covers all $m$ vertices of the first part, $m \le n$?  I already know that there is a way to count the number of perfect matchings in a bipartite graph with $m=n$ using the permanent of its (square) incidence matrix.


I have this code...   public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {         // Inflate the layout for this fragment         final RelationShipAdapter adapter = null;         lvRelationShipAllUser.setOnItemClickListener(new AdapterView.OnItemClickListener(){              @Override             public void onItemClick(AdapterView<?> parent, View view, int i, long l) {                 int test = i;                 connectOrDisconnectUser(test);             }         });          lvRelationShipAllUser = (ListView) getView().findViewById(R.id.lvRelationShip);         lvRelationShipAllUser.setAdapter(adapter);         //context = BlankFragment.this;         return inflater.inflate(R.layout.relationship, container, false);     }   The error says:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setOnItemClickListener(android.widget.AdapterView$OnItemClickListener)' on a null object reference   On this line:  lvRelationShipAllUser.setOnItemClickListener(new AdapterView.OnItemClickListener(){   Whats the issue....?  When it's in this own class (No Fragments) there is no issue.


I've just been downvoted. How should I react?

I've posted a question or an answer, and I have received one or more downvotes. I am not really sure why I was down voted, or I think I know why, but I disagree.  Why did this happen, and what should I do about it?


iMac 2009 27 in used as display in target display mode from a new MacMiniM1 (2020-2021)

I would like to use the iMac 27 in  2009 used as  display in target display mode from a new MacMiniM1 (2020-2021)/ The MacMini has a TB 3 / USB3(A) and a HDMI ports. The iMac a MDP Apple suggest to buy and use the Apple TB3 (USBC)  to TB 2 adapter but this not work ( discovered on the data info’s on the original box! ) TB2 and MDP use same connector but are different protocols. The target display mode is functional with a different configuration / computer. The Apple TB3 (USBC) to TB 2 adapter is functional also with a different configuration/computer. I assume the adapter is not appropriate. Does anyone have a solution?


Transformers - Why more coils in second coil causes more voltage

I am learning about magnetic induction and transformers.    I have coil1 which uses AC to create an oscillating magnetic field. I have coil2 which has a voltage applied to it based on the magnetic field from coil1.   I just heard that if you have more coils in coil2 (the coil dependent on the oscillating magnetic field) you get a bigger voltage and this seems counter intuitive because:   voltage is based on pressure and that pressure is coming from coil1 so how can it be bigger? wouldn't more electrons present in coil2 cause more resistance and thus make the voltage smaller?   How is it that with more coils you get a bigger voltage?


I would like to hear if this is safe enough for storing passwords in a mysql DB.  <?php     $password=hash('sha512',$_POST['password']);     //and then insert it into and mysql database ?>   Is this safe? If not how could I do it more safe?


Prove $\int_{0}^{\pi/2} \ln \left(x^{2} + (\ln\cos x)^2 \right) \, dx=\pi\ln\ln2 $

How to prove   $$ \int_{0}^{\pi/2}\ln\left(\,x^{2} + \ln^{2}\left(\,\cos\left(\,x\,\right)\,\right) \,\right)\,{\rm d}x\ =\ \pi\ln\left(\,\ln\left(\, 2\,\right)\,\right) $$   I don't know how to answer it.  When I asked this integral to my brother, after less than half hours he said it has a nice closed-form involving $\pi$ and $\ln\left(2\right)$ but, as always, he didn't tell me the closed-form and how to obtain it ( I didn't believe him and I think he tried to mess around with me ).  I have also searched the similar question here but it looks like nothing is similar or related.  Could anyone here please help me to obtain the closed form of the integral preferably with elementary ways ( high school methods )?. Any help would be greatly appreciated. Thank you.    Edit:  He is being a little bit nice to me today, he said the closed form is $\pi\ln\ln2$ and it's numerically correct.  This is not a duplicate problem, I am looking for a proof without using complex analysis.


Uunderstanding the redirections in this command?

I found a magic command   ./my.sh 3>all 1> >(tee out >&3) 2> >(tee err >&3)   I am confused at some places:   Does 3>all mean setting the file descriptor 3 for file all? What do 1> > and 2> >? As per my understanding, the command should be ./my.sh 3>all 1>(tee out >&3) 2>(tee err >&3). But that doesn't work. Why doesn't (tee err >&3) overwrite the file all?     This is my my.sh  #!/bin/bash  echo myecho ls dflj


Duplicating SOF questions on other resources

Recently I've  the question on SOF and, as I didn't got an answer, I've decided to repeat my search in google, and I've found a several sites which duplicate the question of mine: , . Does anyone know is it a robot or human who just cheating for own SOF reputation? And is it legal for SOF community?


Intergral of x/(2x-2) - Two different answers, which one is correct?

I want to find the integral $$\int\frac{x}{2x-2}dx$$ This is just a simple question from my textbook. But there seems to be two ways of solving it. If I simplify it to: $$\int1+\frac{2}{2x-2}dx$$ I can then either just integrate that and end up with this: (which is the answer in my textbook) $$\frac{x+ln|2x-2|}{2}+C$$ Or I can simplify  $\frac{2}{2x-2}$ to $\frac{1}{x-1}$ and then integrate, ending up with: $$\frac{x+ln|x-1|}{2}+C$$ I'm not sure if you one of these methods is wrong. Or if I've made a mistake somewhere.


Why is ${x^{\frac{1}{2}}}$ the same as $\sqrt x $?   I'm currently studying indices/exponents, and this is a law that I was told to accept without much proof or explanation, could someone explain the reasoning behind this.  Thank you.


How to change font size of caption in a table

I need to change the font size to 9 pt in particular for captions in tables. If 9 was not required I would have used caption package and would have used captionsetup and set the font to small. Can I use a similar setup with a particular font size like 9?  Here is a minimal example ():  \usepackage{ijcai17}% http://pastebin.com/LiATA1sV \usepackage{graphicx} \usepackage{amsmath} \usepackage{verbatim} \usepackage{booktabs} \usepackage{adjustbox} \usepackage{caption}  \begin{document} \section{Test} Test document  \begin{table}[h!] \centering \captionsetup{font=small} \caption{Classification accuracy of RF-Feature selection and RF-Default for 1s, 3s, 5s, 10s segment lengths} \label{table:3} \resizebox{0.47\textwidth}{!}{% \begin{tabular}{c||c|c|c|c} \toprule  & 1s & 3s & 5s & 10s\\ \hline 2-class RF-Default & $88.6\%$ & $97.38\%$ & $94.69\%$ & $99.03\%$ \\ \hline 2-class RF-Feature selection & $89.08\%$ & $95.17\%$ & $96.62\%$ & $99.03\%$ \\ \hline 3-class RF-Default & $68.38\%$ & $76.38\%$ & $80.10\%$ & $78.64\%$\\ \hline 3-class RF-Feature selection & $68.76\%$ & $76.97\%$ & $82.04\%$ & $81.55\%$\\  \bottomrule \end{tabular}% } \end{table}  \end{document}


I forgot my user password for my Linux and there is no permission to login as root. I don’t know how to recover it.


Can I transfer a Windows 7 license to another computer?

Possible Duplicate:          I was thinking of buying Windows 7 Ultimate to be installed on an old computer. In due time, I will be giving this old computer away.  The question is:   Will I have trouble transferring the Windows 7 Ultimate license to another PC? If yes, do I need to watch out for any issues?  What exactly is Microsoft's stance/policies towards license transfers?  How many times can I transfer before it becomes illegal?


whenever i try to access my drive this appears and i can't access my drive. I am using 15.04 alongside windows 8.1    Error mounting /dev/sda2 at /media/sharif/EEE: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda2" "/media/sharif/EEE"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda2': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.


Can I update my map with another players map?

If I play multiplayer with a friend and we go into separate caves for example, will my map then update with what he sees as well?  Is there a way to make it do this?


Variable declaration, declare as Deque or ArrayDeque = new ArrayDeque();

I'm not sure what the difference between the following declarations are :  ArrayDeque ad = new ArrayDeque(); Deque d = new ArrayDeque();   Is one of them more proper than the other? Or are there situations where you would in fact use one over the other. I realize that ArrayDeque implements Deque but I'm not sure how that plays into the above declarations.   Thanks


substract month from timestamp in second

I would like to substract months from a timestamp in second.  Here is what I'm doing:  >>> ts = 1454284800 >>> date_object = datetime.datetime.strptime(time.strftime('%Y%m%d', time.gmtime(1454284800)), '%Y%m%d') >>> date_object datetime.datetime(2016, 2, 1, 0, 0) >>> date_substract = date_object - datetime.timedelta(9*365/12.0) >>> date_substract datetime.datetime(2015, 5, 3, 6, 0) >>>    It depends on the value for the number of months I want to substract, but for 9 months for exemple, days datetime.datetime(2015, 5, 3, 6, 0) are wrong.  Is there a better way to substract months, which would only change number of months and not days as well.  Thanks in advance.


Let $ a_{n+1} = \frac{1}{3}(2a_n + \frac{5}{a_n^{2}}), a_1 > 0 $. Show the sequence converge and find it's limit.    I did the following:  We see that $a_n$ is positive for every n obviously (considering $a_1 > 0$). Then:  $$ a_{n+1} - a_n = \frac{2a_n^{3} + 5}{3a_n^{2}} - a_n = \frac{5 - a_n^{3}}{3a_n^{2}}$$  We see that for each $a_n > ^3\sqrt{5}$ the sequence is decreasing. That means the proof collapses to prove  $a_n > ^3\sqrt{5}$ in order for $a_n$ to be decreasing. Suppose $ a_n > ^3\sqrt{5}$ then obviously $a_{n+1} = \frac{2a_n^{3} + 5}{3a_n^{2}} > \frac{2(\sqrt[3]{5})^{3} + 5}{3(\sqrt[3]{5})^{2}} = \sqrt[3]{5}$ so we deduced $a_{n+1} > ^\sqrt[3]{5} $.  (It's important to note $a_1$ might be less then $\sqrt[3]{5}$, hence the sequence will decrease from the second element.) So we observed $a_n$ is always positive and decreasig hence it's bounded below so it's bounded. As for it's limit:   $$\begin{align} L = \lim_{n \to \infty} a_{n+1} = \lim_{n \to \infty} \frac{1}{3}(2a_n + \frac{5}{a_n^{2}}) = \frac{1}{3}(2L + \frac{5}{L^{2}}) =  \sqrt[3]{5}\end{align}$$  I'm not sure as of the correctness of the solution. I'm aware that it's not a contradiction because it only implies it's in the epsilon-environment of $\sqrt[3]{5}$, or rather in this case $(\sqrt[3]{5}, \sqrt[3]{5}+\epsilon)$.  Is it correct?  EDIT: If anyone encounter a question in the likes, to sum it up you obviously should show the sequence is montonic and bounded. In this case for example we can show it using AM-GM inequality to see the sequence is bounded by $\sqrt[3]{5}$ and then in the difference of two consequective elements we see the difference is negative due to every element being greater then the third root of 5. From here we know the sequence is bounded below and decreasing hence it's bounded. If we plug in the limit of the sequence to itself we will see it's the third root of five. And that's it.


Having a hard time "verb-ing" vs having a hard time to "verb"

What is the difference between:      Having a hard time "verb-ing" vs   Having a hard time to "verb"    For example:      I'm having a hard time explaining vs   I'm having a hard time to explain


NOT ANSWERED -  I think Zanna gets th gist of it. It seems most miss the point... the system is mine and my responsibility. I simply do not want to be prompted for a pasword as specified below... GETS MORE AND MORE FRUSTRATING. my email if someone wants to answer directly to me is zeteo1052@gmail.com ...................... I have not found the answer to this anywhere on line and I am getting really frustrated. I will pay for support if it will get me the answer I've been looking for. I am 68 years old and a retired computer desktop support technician. I have been using Ubuntu for over 2 years now and will not go back to Windows (the dark side) LOL I want to be able to access files and folder, install packages, burn usb drives or dvd's etc. without always being prompted for a password. I really understand the DANGER of it and always have a backup of my computers if need to restore it. I am not worried about losing anything. This is my computer and supposedly my OS and is my headache no matter what happens. I'm getting old and need to save all the time I can...  LOL Is there any way you can help me? I know all about the visudo and tried all the procedures I could find but I am still being prompted for the password. Thank for your time and consideration.


Unexpected array length on my allocated memory array

In the following code I initialize an int pointer and after I dynamically allocated the memory. But when I want to display the size of the array it does not show me the value 5: int *p=NULL;    int tab[]={};    p=tab;    p=malloc(5*sizeof(int));   printf("sizeof(tab)=%d",(int)sizeof(tab));


Perfect squares and modularly congruency in mod 5

There is not any perfect square $k$ such that $k  \equiv 3\ (\textrm{mod}\ 5)$? Why? How can I prove it?


I intent  to travel  to  US  from India  in the last  week of September 2016  for  20 days and  have valid  US visa till November 2016. Will this visa be acceptable ?


Is $P(A\cap B \mid C) = P(A \mid C) \cap P(B \mid C)$ correct?

I'm new at Statistics and I was wondering some problem. Suppose you have two independent events $A$ and $B$ and you want to calculate the conditioned probability of having either $A$ or $B$ if you have $C$, that is:  $P(A\cap B  \mid  C)$  Is this correct: $$P(A\cap B  \mid  C) = P(A \mid  C) \cap P(B  \mid  C)\,\,?$$  Thanks a lot!


How to prove this formula $ \sum_{k=2}^n k(k-1)\binom{k}{n} = n(n-1) \cdot 2^{n-2}$?


How to disable the "New" button on a related list in a VF page

I have a Visualforce page which displays a related list of child objects. The list, however, displays the "New" button, which I need to remove. Is this possible, or am I stuck with building a custom related-list-like table?  For example, this code  <apex:page standardController="Account">     <apex:relatedList list="Contacts"/> </apex:page>   will display the related list which will also display the "New Contact" button. My objects are custom, but the problem is equivalent. Can those buttons be affected either from Visualforce code or from an extension controller?  Let me add that I can't simply remove the New button from the layout, because I need the related list in different custom pages, sometimes with and sometimes without the New button.


/dev/disk/by-uuid/XXXXX does not exist dropping to a shell

I have just installed ubuntu 14.04 and when I reboot and remove the media I get the   Gave up waiting for root device. Common problems: -Boot args (cat /proc/cmdline)  -check rootdelay= (did the system wait long enough?)  -Check root= (did the system wait for the right device?) -Missing modules (cat /proc/modules; ls /dev) ALERT ! /Dev/disk/by-uuid/e9399244-24c6-46bd-9786-051806f0f93f does not exist. Dropping to a shell  BusyBox v1.21.1 (Ubuntu 1:1.21.0-1ubuntu1) built-in shell (ash) enter 'help' for a list of built-in commands.  (initramfs)  $ ls -l /dev/disk/by-uuid lrwxrwxrwx 1 10 E411-5D60 -> ../../sda1   lrwxrwxrwx 1 10 e9399244-24c6-46bd-9786-051806f0f93f -> ../../sdb1 lrwxrwxrwx 1 10 df7a3fc6-d2dc-4c85-a445-8bbc02ff7c84 -> ../../sdb5   and I tried the solution found here:  twice...I still get the busybox shell...what can I do from here?


I am a little bit confused after I found out that "e.g." is followed by a comma in American English. My confusion stems from the correct placement of this abbreviation. Consider the following sentence:     Usually, these entities are both represented in the source language,   e.g., as modules or top-level declarations, and easy to distinguish   from each other by the user and the compiler, e.g., as separate   files or directories.   When reading this sentence, I stumble upon the commas after the "e.g."s. I could understand it if the sentence was:     Usually, these entities are both represented in the source language,   as, e.g., modules or top-level declarations, and easy to distinguish   from each other by the user and the compiler, as, e.g., separate   files or directories.   The second version reads somewhat slower, there is more emphasis on the ".e.g." as I would like and the meaning of the second "as" might be confused to relate to the "compiler".   Is the first form correct? If so, I wonder what purpose the commas serve? Is the second version different in meaning from the first, or am I reading it wrong?


Formula for finding area for all polygons

I have a image below, kinda hard to see but was wondering if anyone has seen this formula and what its from and how to use it.  thx  $$A=\frac{1}{2}\sum\limits_{i=0}^{n-1}(x_iy_{i+1}-x_{i+1}y_i)$$


Python string formatting with 'n' number of digits (when using keys) Python 2.7

To have specific number of digits in string formatting, I am aware that it can be done in this way:  In [18]: hours = 01  In [19]: "%.2d" %(hours) Out[19]: '01'  In [20]: "%.2f" %(hours) Out[20]: '1.00'   But my case is a bit different. I am using specific keys to denote the values, for example:  for filename in os.listdir('/home/user/zphot_01/')   Here I want to have different values for the '01', i.e.   for filename in os.listdir('/home/user/zphot_{value1}/'.format(value1=some_number):   When I use the above method with some_number = 01, it does not take into account the 0 and so my folder is not recognised.   EDIT:  Most of the answers are for only one value, however, I want to have more than one key value, i.e.:  for filename in os.listdir('/home/user/zphot_{value1}/zphot_{value2}'.format(value1=some_number1,value2=some_number2)).


How to fix "no installation candidate" error installing pessulus on Ubuntu 12.10?

How can I install pessulus on Ubuntu 12.10? We are currently upgrading hardware and Ubuntu 12.10 supports the multi-touch screen that we're about to use.  When I enter the command apt-get install pessulus in the command line, I get this message:  Reading package lists... Done Building dependency tree Reading state information... Done Package pessulus is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'pessulus' has no installation candidate   What do I need to do to install pessulus? I'd be grateful for any help.


Let moderators disable the dupehammer for certain tags

Recently  I'd like to request that moderators have the ability to disable this for certain tags. On the site that I am a mod on, , the [code-golf] tag accounts for over 50% of questions on the site. (We've been talking about getting in more diversity, but that's another discussion.) Clearly, giving users the ability to unilaterally close half the questions on the site is probably not a good idea. This could apply for other tags for which tag badges do not necessarily imply expertise - for example, a user having a tag badge in the [] tag on Code Review (sounds like a meta tag, but I'm not familiar with the site's policies and such) would not really imply that the user is an expert in... helping beginners? When this new feature launches across the network, could it also come with some way to disable it on tags that wouldn't benefit from it?


For one of the exercises of my homework I need to answer the following question, but I am not sure how I should apply gamblers ruin theory to solve this problem (it is stated as a hint, not that I must use it). The problem is as follows:  A mouse is in a room in a circular hallway with $N+1$ rooms. In the the other $N$ rooms there is a cheese. He has a chance of $\frac{1}{2}$ to go either way every step. If he enters a room with a cheese he eats the cheese. Prove that all cheeses have an equal chance of being eaten last, namely $\frac{1}{N}$.  I see that eating the $i^{\textrm{th}}$ cheese as last has two possibilities, first mouse walks to $i+1$ and then goes to $i-1$ without passing $i$, and the other way around. But I am at loss what to do next.


Unify the flag indicator and flag queue between meta and main sites

The flag queue on meta sites is separate from the flag queue on main sites. It's one more thing to check, and it's low-volume so there's no incentive to check it often because it would be empty most of the time. Yet sometimes flags indicate that urgent action is needed (e.g. flamewar in progress).  In addition, as meta sites have rather lower activity, this means moderators can sometimes go for a while without visiting the meta sites, leaving flags to linger. This is especially true since moderators receive a notification on the main site for each new meta question, so in the absence of such notification, there is little reason to think something big is happening on meta and thus to visit the meta site and find out about a flag.  Please unify the flag queue between the main site and the meta site. I think putting meta flags in a separate category (like there are now categories for spam, not an answer, etc.) would be sufficient to distinguish them when needed.  MSO before the MSE split is obviously a special case.


For any odd prime $p$, a quadratic is solvable mod $p^2$ if it is solvable mod $p$, and $p$ does not divide the discriminant and leading coefficient.

Let $p$ be an odd prime number and $a$, $b$ and $c$ integers such that $p$ does not divide $a$, and does not divide $D=b^2-4ac$, and such that $$ax^2+bx+c\equiv0\pmod{p},$$ is solvable. Prove that in this case $ay^2 + by + c \equiv 0 \mod p^2$ is solvable too.  Well, the only thing that I was able to do is get $D$ from quadratic equation: \begin{eqnarray*} ax^2 + bx + c &=& a(x^2 + bx/a) + c\\ & =& a(x^2 + 2\cdot b/2a + (b/2a)^2) - a(b/2a)^2 + c\\ &=&a(x + b/2a)^2 - \left(\frac{b^2 - 4ac}{4a}\right)\\ &=& a(x + b/2a)^2 - \left(\frac{D}{4a}\right) \end{eqnarray*} Since $D$ is not divisible by $p$, $D/4a$ is not divisible by $p$ too. So in order to make this equation true remainders of both $\frac{D}{4a}$ and $a(x + b/2a)^2$ should be equal to each other. Let us say that it is $r_1$. Okay, then let $a(x + b/2a)^2$ be $p\cdot k + r_1$ and $D/4a = p \cdot m + r_1$. But can't move on with this proof. I tried several paths but all of them didn't lead me anywhere. Your help will be much appreciated!


What's the difference between someone's something and something of someone?

I've noticed that many people say things like: "that's the dad of my babies"  "We're the love of each other's life"  And other people say: "That's my babies' dad"  "We're each other's love life"  So what's the difference between those two and when to use it? Feel free to give more examples :)  Thanks!


Finding a particular angle from a triangle

The way I have seen a solution is very lengthy  to find the value  of x. Is there any easy way to get the value of x? I have tried   different formula and didn't get any shortcut  solution.


How can I check how much free space there is in a disk with Python?

I need a script which would show me how much of free space I have on C:\ disk. What is the best way to do that? I am working with Python 3.6. Thank you in advance :)


How to prove equation of the form $| |y-x| - |z-y| | \leq |x-z| x,y, z \in \Re$ ?  There are 10(?) cases: (1) $x>y>z$ : $||y-x|-|z-y|| \le x-z$ (2) $x>z>y$ : $|y-x|-z+y \le x-z$ (3) $y>x>z$ : $|y-x-|z-y|| \le x-z$ (4) $y>z>x$ : $|y-x-|z-y||\le |x-z|$ (5) $z>x>y$ : $||y-x|-z+y|\le|x-z|$ (6) $z>y>x$ : $|y-x-z+y|\le|x-z|$ (7) $x=y>z$ : $|x-x|-|z-x|\le|x-z|$ (8) $x=z>y$ : $|y-x|-|x-y| \le |x-x|$ (9) $y=z>x$ : $|z-x|-|z-z| \le |x-z|$ (10)$x=y=z$ : $||x-x|-|x-x||\le |x-x|$    (1) $||y-x|-|z-y||\le x-z \to ||x-y|-|z-y||\le x-z \to |x-y-z+y|\le x-z \\ \to |x-z|\le x-z \to x-z \le x-z$ proved (2) $|y-x|-z+y\le x-z \to |y-x|+y\le x \to |x-y|+y\le x \to x \le x$  proved (3) $|y-x-|z-y|| \le x-z \to |y-x-|y-z|| \le x-z \to |y-x-y+z| \le x-z \to \\|-x+z|\le x-z \to |z-x|\le x-z \to |z-x| \le x-z \to |x-z| \le x-z \to \\ x-z\le x-z $  proved (4) $|y-x-|z-y|| \le |x-z| \to |y-x-|y-z||\le z-x \to |-x+z| \le z-x \to \\ |-x+z| \le z-x \to |z-x| \le z-x \to z-x \le z-x $  proved (5) $||y-x|-z+y|\le z-x \to |x-y-z+y|\le z-x \to |x-z|\le z-x \to z-x\le z-x$ proved (6) $|y-x+y-z| \le |x-z| \to |2y-x-z|\le|x-z| \to $ still no idea (7) $|0-|z-x||\le|x-z| \to |z-x|\le|x-z|$ proved (8) $|y-x|-|x-y|\le|x-x| \to 0 \le 0$ proved (9) $|z-x|-|z-z| \le |x-z| \to |z-x|\le|x-z|$  proved (10)$||x−x|−|x−x||≤|x−x| \to 0\le0$ proved  any ideas how to proceed? what could i do next?


Are $\mathbb{Z} \times \mathbb{Z}$ and $\mathbb{Z} \times \mathbb{Z} \times \mathbb{Z}$ isomorphic as groups?

To be clear, by $\mathbb Z$ I mean the group $(\mathbb Z, +)$.  My intuitive answer would be no, but I haven't been able to find a proof for it. The basic invariants I know of (e.g. order of elements) are not useful here and my knowledge of infinite abelian groups is very limited.  In general, is it true that $\mathbb Z^n \cong \mathbb Z^m \iff n=m$?


Is there a way to add each value to the first one in the for loop in JS?

I have 4 different values, when looping through an array. Is it possible to add the values together like you would in Java's StringBuilder append? I want something like this when doing a console.log(): 28.0334307,-25.872523799999996, 28.031527552564445,-25.87632233243363  Now I am just getting it one for one like this when doing a console.log(): 28.0334307 -25.872523799999996 28.031527552564445 -25.87632233243363  Here is my code: var coordinates = [28.0334307, -25.872523799999996, 28.031527552564445, -25.87632233243363]  for(var item in coordinates) {    console.log(item); }


How to see/change screen refresh rate or monitor frequency?

My eyes hurt so I thought I should check the screen refresh rate (monitor frequency), but I couldn't find it.  Where is it? (in Ubuntu 12)


Suppose G be a non-abelian group and H,K be two abelian subgroups of G. Then must HK be an abelian subgroup of G?

Suppose $G$ is a non-abelian group and $H,K$ are two abelian subgroups of $G$. Then must $HK$ be an abelian subgroup of $G$?  I know an example, but I am confused. Thus I just want to check that.


I have a log file, name out.log. I need to search a list of string (filelist.txt) from this log file.  I need each matching line from "out.log" for every file in filelist.txt. it can appear multiple times.  cat out.log | grep -i I466030.CXR910E >> search_result.txt   this works, it will search for I466030.CXR910E and output to search_result.txt  for i in `cat filelist.txt`; do  grep -i "$i" out.log >> result.txt; done    for i in `cat filelist.txt`;     do        echo $i      cat out.log | grep -i $i >> result2.txt      grep $i out.log >> result3.txt    done    Above code the echo will output the search string but none of the grep not writing output to any result*.txt    What am I missing here ? Thanks for your advice.     In response to comments:  xxxxxm@cxxxrtrls01[DEV][rerun] $ grep -i -f filelist.txt out.log > result.txt xxxxxm@cxxxrtrls01[DEV][rerun] $ ll total 564 -rw-r----- 1 cnrlsadm cnrlsadm   4600 Aug 19 09:36 filelist.txt -rw-r----- 1 cnrlsadm cnrlsadm    216 Aug 19 10:14 file.sh -rw-r--r-- 1 cnrlsadm cnrlsadm 557403 Aug 19 10:10 out.log -rw-r--r-- 1 cnrlsadm cnrlsadm      0 Aug 19 12:14 result.txt -rw-r----- 1 cnrlsadm cnrlsadm    213 Aug 19 12:10 srch.sh xxxxxm@cxxxrtrls01[DEV][rerun] $   size of result.txt is zero , it doesnt have anything.


bash wait for process in process substitution even if command is invalid

I'm trying to write a utility script errpipe with a simple api that runs stderr through a filter. At first I tried to implement it using bash's process substitution feature.  #!/bin/bash  com="$1" errpipe="$2"  $com 2> >(1>&2 $errpipe)   The problem with this is that the output looks strange when com does not exist.  If I type  sh-3.2$ ./errpipe foo cat   I get  sh-3.2$ ./errpipe foo cat sh-3.2$ ./errpipe: line 6: foo: command not found @   with @ representing the cursor. In other words, the shell prompt was printed too early. I suspect this is because the main shell script is not waiting for the process substitution process to complete. Throwing in a wait at the end of the script doesn't seem to fix the problem.  I'm open to a solution that uses bash, ksh, zsh or possibly some crazy awk feature. I think I know how to wire this together using something like C or Perl that exposes a richer API for manipulating processes and file descriptors, but I'd like to avoid using it unless there isn't an alternative.    One solution that "almost works" is to use the fact that $$ is not changed when the shell forks and to lob a signal at the parent when errpipe is finished.  #!/bin/bash  com="$1" errpipe="$2"  $com 2> >(1>&2 $errpipe; kill -SIGUSR1 $$)  while true; do     sleep 60 done   This fixes the original problem but a) is ugly and b) prints User defined signal 1: 30 before terminating even if I have a signal handler for SIGUSR1 and c) will loop forever if the process responsible for sending a SIGUSR to the parent dies somehow.


How to handle Sunlight Sensitivity (of Drow, etc.), especially for casters?

Sunlight Sensitivity looks pretty bad — Disadvantage to attack rolls and Perception checks whenever you, your target, or what you're trying to perceive are in direct sunlight. I hope I'm missing something, since no other PC race has a comparable hindrance.  Are there any ways you have used to mitigate this flaw to make players of this race not at a severe disadvantage (or, if it doesn't need mitigation, explain why it's already balanced without any action required)?


If adding is the sum of two numbers, Subtraction is the removal of a number from another.   Multiplication is $x$ lots of $y$.   Division is splitting $x$ between $y$.   Powers are multiplying a value by itself.  What is a square root?  To be clear, I'm asking what function a square root actually performs?  I can't seem to come up with an answer without the concept of powers to refer to.  For example; how would you go about solving the square root of $121$ without prior knowledge that $11^2$ is $121$?  Is it as blind as testing every value up to or past an answer until we find a solution then doing bisection until we get a result?  Edit: I think my question was still unclear, how could I perform a square root on a value without reverse engineering the question into a powers question.  E.g. square root $123456$, you do not know if the root is whole or decimal.


If I solve someones problem instead of answering their question, should I post a comment instead?

I posted  to a question where someone was trying to use regex to parse Html.  The question was "How can I get my regex to work?" and my answer was "Don't use regex, use  instead".  Should I have posted my answer as a comment?


How to append the contents of a list at the end of the other list?

How do I append the contents of one list at the end of another list?


How to get only files created after a date with ls?

With the ls command, is it possible to show only the files created after a specific date, hour...?  I'm asking it because I have a directory with thousand of files.  I want so see all files that were created since yesterday.   I use ls -ltr but I have to wait to see all files...  There is an equivalent of DIRECTORY/SINCE=date from OpenVMS ?


Currently running Version 2.14.13  I'm having trouble getting base maps to appear when I go to print a map in QGIS Cloud. I've been using Google Hybrid from the OpenLayers plugin, and while it appears when I pull up my web map, it disappears when I attempt to use the print feature. I realized OpenLayers is outdated so I tried to use the QuickMapServices plugin instead.  I've tried using OSM Standard from the QuickMapServices plugin. However, when I go to publish my map in QGIS, I get an error message stating "Unsupported Layers Found" in reference to the OSM Standard layer. I know there is a way to add a service within the QuickMap setting, but this is a process that I'm not familiar with, nor do I know if this is something that will even make a difference here. I realize I could just upload some aerial photos, but the size of those files doesn't really make it feasible with the amount of DB storage I have left. Any ideas of a solution?


If gravity is a gauge theory, what is the Lie group?

I asked a question. In one curious comment, I see a statement that gravity is a gauge theory. However, my definition (based on what I read till date) of a gauge theory is a field theory which is invariant under a (Lie) group of transformations where the group parameters are made local (functions of spacetime). And you have two kinds of fields. For example, you have a matter field $\psi$ and a gauge field $A_\mu$ for QED.    If the claim in the comment is true, what Lie group of transformations are we talking about here?  If the claim is true, is it possible to derive a Lagrangian where $g_{\mu\nu}$ pops up automatically (as happens in QED or Yang-Mills) by demanding some kind of "gauge invariance" principle to a Lagrangian containing matter fields?   Apologies to the experts if you feel I am blathering.


I saw an exercise like this:     Let $K$ be a algebraically closed field. Show that $K(X)$ is not algebraically closed.   I was trying to prove that $T^2-X$ has not root in $K(X)$. How do I show it? Does it really use the hypothesis about $K$?  Thank you!


My switch statement is not working in C++

I should be getting a day of the week. 0 should be monday and 6 should be sunday.I don't know if it's run time error or what. I have tried everything that I can think of.  #include <iostream>  using namespace std; string getDayOfWeek(int dayNum){     string dayName;     switch (dayNum){     case 0:         dayName = "Sunday";         break;     case 1:         dayName = "Monday";         break;     case 2:         dayName = "Tuesday";         break;     case 3:         dayName = "Wednesday";         break;     case 4:         dayName = "Thursday";         break;     case 5:         dayName = "Friday";         break;     case 6:         dayName = "Saturday";         break;     default:         dayName = "Invalid Day Number!";     } }  int main() {   cout << getDayOfWeek(1);     return 0; }


Why $0.999$... isn't the largest number before 1?

Why doesn't it called like that? It seems fair, $1$ called $1$ while $0.999$... being the largest number before $1$, and not called $1$ while not look like it is. Let's say it isn't, how would that number look like?


How can I invest in country A to take advantage of their great interest rate while I live in country B?

If I live in the US, for example, where current interest rates are practically nil, how can I take advantage of the fact that ?


Some time NTFS partitions can't open in Ubuntu 16.04

I am using Ubuntu 16.04 and windows 10. When I try to open my other partition (NTFS), sometimes I can open it. But sometimes I can't open it.  It shows this error message:    I asked this question in this site. () And I followed that solutions. it did not work.   After that I followed other solution. () But I can't understand those solution.  How do I fix my pc?


Can I re-ask a question if it hasn't been answered?

So I notice that some questions simply go unanswered. Due to the volume of questions asked, sometimes these questions go away from the front page fairly quickly, and then they are never seen or heard from again. If such an event occurs, can one re-ask the question?


Statistical significance (p-value) for comparing two classifiers with respect to (mean) ROC AUC, sensitivity and specificity

I have a test set of 100 cases and two classifiers.  I generated predictions and computed ROC AUC, sensitivity and specificity for both classifiers.  Question 1: How can I compute p-value to check if one is significantly better than the other with respect to all scores (ROC AUC, sensitivity, specificity)?    Now, for the same test set of 100 cases, I have different and independent feature assignments for each case. This is because my features are fixed but subjective and provided by multiple (5) subjects.  So, I evaluated my two classifiers again for 5 "versions" of my test set and obtained 5 ROC AUCs, 5 sensitivities and 5 specificities for both classifiers. Then, I computed the mean of each performance measure for 5 subjects (mean ROC AUC, mean sensitivity and mean specificity) for both classifiers.  Question 2: How can I compute p-value to check if one is significantly better than the other with respect to mean scores (mean ROC AUC, mean sensitivity, mean specificity)?    Answers with some example python (preferably) or MatLab code are more than welcome.


Do I need an extra home link when I have the logo on the right hand side

When I build a website I'd usually put the logo on the top left of the screen (or in the middle if applicable) and at the same time use it as the link to the home page. I think this became a common pattern today. But I'd instinctively would never put it on the top right.     In a new project I have a client who's CI exactly requires this: the logo has to sit top-right without excuses for online media.   Now I'm wondering if I can still use it as a home link.  From a gut feeling I'd say no and would put an extra home link in the main nav.  I would not expect a user to consider the logo on the right as the home button. As well, the page is not fully fluid, so that the logo might even disappear on smaller screens. (This as well should be an issue for CI but it obviously is not).   However, the navigation is perfect without the link and I'd rather love to focus the other items than having an extra "home".  What are other arguments for the one or the other approach?


Automatically created labels in Structure of TexStudio

I wrote a command for a document with many figures and tables which belong to each other. Every figure/table has the same caption just one parameter changes and the labels are automatically created. The problem is now, that these labels are not in the label list of TexStudio which would be nice.   \documentclass{article} \usepackage{hyperref}  \DeclareRobustCommand{\captionf}[1]{Parameter of #1\label{fig:Parameter#1} % \global\def \captiont {Description of \autoref{fig:Parameter#1}} }  \begin{document}  \begin{figure}[ht] \centering lalala \caption{\captionf{lalala}} \end{figure}  \begin{table}[ht] \centering \begin{tabular}{cc} la & lu \\ \end{tabular} \caption{\captiont} \end{table}  \end{document}   Does somebody knows a solution to this?


Some fast way to save and restore tabs of Terminal?

I have a Terminal window with a dozen named tabs open.  I would like to save the current configuration and have it restored with names and directories.  Is there a way to do this?


Calling a function inside an iframe from outside the iframe

I have a page with an iframe. Inside that iframe I have a javascript function like this:  function putme() {}  How can I call this function on the main page?


Is there a way to differentiate a string argument between non-hexadecimal and a hexadecimal?

Let's say we have the following signature  void doSomething(string s)   When the user calls the function, they can call  doSomething("hello") or doSomething("\x15\x3C\xFF")  Is there a way to tell when the argument is the second form, a hexadecimal value?  I want to do something like  if(isHex(s))          // do this else     // do that


Find the minimum of $\sqrt{(x+1)^2+(y-1)^2}+\sqrt{(x+2)^2+(y+2)^2}+\sqrt{(x-1)^2+(y+1)^2}$ For real $x,y$. It is the distance of a point in a triangle from its vertexes which gives the minimum when $(x,y)$ is on the Fermat's point.  But now I am stuck in finding the location of Fermat's point.  $(1) \quad 4$ $(2) \quad 5$ $(3) \quad \sqrt{3}+2\sqrt{5}$ $(4) \quad 4\sqrt{2}$


How to uninstall manually installed java? (jdk 8)

I am using Ubuntu 14.04 LTS 64 bit and installed the wrong version of Sun/Oracle's Java JDK (32 bit instead of 64 bit) using the   I assume I have to uninstall it now. How can I do that?


Android: Timer doesn't have leading zeroes

I have a timer that works, but I don't have leading zeros in the form of 00:00.000. How can I make that happen? Here's my code:  mEndTime = System.currentTimeMillis(); mTotalTime = mEndTime - mStartTime; int seconds = (int) (mTotalTime / 1000); int minutes = seconds / 60; seconds = seconds % 60; int millis = (int) mTotalTime % 1000; String sectime = Integer.toString(seconds); String milsectime = Integer.toString(millis); String time = minutes + ":" + sectime + "." + milsectime;


I am using Asus X450LA and Ubuntu 14.04. I am facing a problem with the touchpad. It is not working and the pointer is not visible either. I am using a mouse.


Everytime I turn my computer on its in something called grub?

So I've recently downloaded Ubuntu and was dual running it beside windows, but I didn't like Ubuntu so I went to deleting it. Here are the steps I took   I deleted the Ubuntu driver in my driver setting  Made a recovery drive    I was following a instructions, and it told me to restart computer. So I did, and now I'm in this thing called grub and I have no idea how to get out of it. Please help.


Why did Arwen have to become mortal to marry Aragorn if they were both half-elven?

I am sure Elrond is half-elven, so Arwen is too.  I recall something saying Argorn was half-elven as well.  Shouldn't half-elves not have to become mortal to marry each other?


As stated , being on fire means you are doing well, and  we see that you can be commended as an MVP for being on fire for a large portion of the time. This  shows that destroying non-player things gives you fire points, but what all do I get points from, and how many fire points do I need to be on fire/stay on fire?


There are different types of integration, such as Riemann, Lebesgue, etc. How about differentiation: Are there different types of differentiation? If not, why not?


The following is from some software documentation we are writing:     NOTE: Refreshing a report may be necessary or helpful when:         you believe the data in the report has changed since it was last executed   you'd like to return the report to its initial state/condition      My question is this. Should 'you' in the first bullet item and 'you'd' in the second bullet item be capitalized?