When maximizing a Mac window with the green button, it will not maximize to full size, but have a little left margin from the left side.    I guess there is no setting to change that, but that margin has to have a specific size defined. Is there any kind of terminal command I can run to decrease the left margin to 0?  I know there are apps which can position windows to any prefered position and size, but I is there a way to do it without one?  The strange thing is, that it does maximize to full size without a margin on the right screen when you've got a second display connected.

When "maximise" doesn't mean "maximise" None of the maximise commands provide maximisation to fill the whole screen. When you have Dock not autohidden, then they only go up to the boundary of the dock. When you have Dock hidden they go near the edge of the screen but a few pixels short meaning you can see other apps and the desktop behind them. User error? First I thought it was because I was using third party apps to maximise. I tested in Sizeup, Moom and BetterTouchTools. But it turns out the native maximisation is broken to begin with. Nothing will let a window automatically maximise to the full screen size, there will always be some pixels left over wherever the Dock is even if you have it hidden and at the smallest size setting. Non-solutions At first I thought  was a duplicate and would provide my answer, but alas it doesn't. It is, of course, possible to move the window behind the dock protected pixels then resize it from the opposite side. But this has to be done for every window manually each time. Is there any way to make it so that maximise fully maximises across the entire screen? I really hope there is! Bonus points if anyone can find software that will allow keyboard shortcuts to do a different action moving a window dependant on where it currently is. e.g. in Windows 7 and above you can hit Windows+Left over and over and the window will first maximise half left, then maximise half right on the display to the left of the current display, then to the left of that display and so on. Likewise, Windows+Down will first restore a window, then minimise. Update It's now been most of a year since I posted this question and despite extensive additional searching as well up updating to El Capitan, this OS X bug hasn't been fixed and I haven't been able to find any tool that offers a working solution. Any ideas at all?! Update 2 This has been marked as closed since a similar question has already got an answer - forgive, I can't see the link to this answer and have been unable to find it myself. Update 3 I've now been linked to the "answer" which says that it's not possible without disabling the Dock, Mission Control and the application switcher i.e. making crippling the core multitasking capabilities of the OS (and making it unusuable for me). I can say clearly that cutting off your nose to spite your face is not the sort of solution I was after. The "reason" given is not a) necessary as claimed by any reasoning I can come up with or b) relevant to required a border of clear pixels after maximising, c) true in any way as you can manually move windows behind the border and still have a fully-functioning Dock. I don't understand why this is being marked as answered based on the other question since that's not really an answer even at a stretch - all the "answerer" says is they don't know of any reasonable solution. Since it's possible manually, one would be inclined to believe it's technically possible. And there's no sound reason for "maximised" programs to behave in this way, again this is demontrabl


I was told by a friend, that the (physically) innermost track on an HDD platter will read and write the fastest. But I think to myself that the outermost track must have more capacity for blocks and is covering more distance in one rotation, since the whole platter is spinning at a fixed RPM. So shouldn't data stored on the outer parts of a HDD platter be read and written faster than on the inside?

Some linux dual/multi-boot tutorials / general partitioning tutorials say that the inner side of a hard disk is faster than the outer side so partitions towards the outside tend to be slower while some say that the exact opposite is true.  Which side is actually faster?  Is the difference noticeable?  How are the partitions physically placed on the disk as compared to the partition listing order-for example gparted shows a logical ribbon layout of the partitions. Are the partitions shown to the left side of this ribbon near the outer or inner edge of the disk physically?  Are there software benchmarks like testing some disk intensive stuff for the first time on identical vanilla installs of the same OS but on different partitions, inner and outer?  EDIT: Links   ctrl + f for "slower" on this page   Says outer side is faster   Says inner side is faster   Says outer side is faster(not about dual-booting)


#include<stdio.h> #include<stdlib.h> int main() {      int x  = 5;     int y = 0;     x++, y = x*x;     printf("x is %d\n", x);     printf("y is %d\n", y);  }   Question: Why the output of the above code is:  x is 6 y is 36   instead of  x is 6 y is 25   ?  Reasoning: I am thinking it should be the latter because assignment operator has higher precedence than comma and therefore first an assignment to y should happen setting it to 25 and then x should be evaluated and set to 6.


I have a fresh installation of Ubuntu 20.04. I use gnome-tweaks to map Alt+Shift to swtich language. The problem is that when I use Alt+Tab to switch window, the option to press Alt+Shift+Tab (which supposed to be "previous window") doesn't work, and instead the language input is changing. How can I resolve this conflict? I want both shortcuts to work.

I have Ubuntu 16.04 with GNOME shell. I set ctrl+shift for the "Modifiers-only switch to next source" option.   This shortcut conflicts with apps hot-keys. I can't use ctrl+shift+i to open devtools in Chrome, it just switches the layout. In VS code IDE if I press shortcuts with ctrl+shift (for example ctrl+shift+f), shortcuts work but always switch a keyboard layout. When I used Windows this problem didn't exist.  Can I set the ctrl+shift shortcut in such a way that it causes a switch action only after the keys are released and only if this 2 keys were pressed (without additional keys)?


After months of not using ubuntu, I turned on my PC and when I typed the usual apt-get update then upgrade,  a red icon showed on my panel and when I clicked to upgrade packages, the Software Updater was shown with no packages listed but 243,6 MB to be downloaded.  Even when I clicked on Install now, somehow Software Updater crashed. And when I try to upgrade through terminal it shows "31 not upgraded'  What should I do to properly upgrade these packages?  EDIT  Here's the list of the non-upgraded packages  gcc-4.9-base gcc-4.9-base:i386 gimp gimp-data lib32gcc1 libgcc1 libgcc1:i386  libgimp2.0 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0  libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core  libreoffice-draw libreoffice-gnome libreoffice-gtk libreoffice-impress   libreoffice-math libreoffice-style-galaxy libreoffice-style-human  libreoffice-writer libva1 libva1:i386 linux-image-generic  oxideqt-codecs-extra pcsx2:i386 python3-uno

I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.  Could not calculate the upgrade  An unresolvable problem occurred while calculating the upgrade.  Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'


Here is the article I am referring to:   In their own words (or at least the article writer's), "it appears to draw in heat energy from its surroundings ... it begins to cool down, stealing energy from its environment to convert into more photons."  Well, there we have it. In the simplest case, you could use this device to pump heat from cold to hot, by simply aiming the light from the LEDs onto a dark surface. This obviously shouldn't be possible.  What am I missing?

I have read this , Which says that conversion efficiency of the LED have exceeded 100%. The results are published in Physical Review Letters     In their experiments, the researchers reduced the LED’s input power to just 30 picowatts and measured an output of 69 picowatts of light - an efficiency of 230%.   How is this possible, is it not the violation of conservation of energy or I am missing something.  Edit: I missed that the LED worked as TE cooler and absorb heat from atmosphere to convert it to light. But still it is overwhelming observation for me.   Is it really possible that a device use thermal energy to produce light.


I have an function to detect shapes in an image, this returns the shape name, from that I have an array of the returned shapes but was wondering how I could add a count to each shape detected?  So it would show:  rectangle 1  rectangle 2  rectangle 3  rectangle 4   and so on for each rectangle detected. The code I have at the moment is:  def detect(c):     # initialize the shape name and approximate the contour     shape = ""     peri = cv2.arcLength(c, True)     approx = cv2.approxPolyDP(c, 0.04 * peri, True)      # if the shape has 4 vertices, it is a rectangle     if len(approx) == 4:         # compute the bounding box of the contour and use the         # bounding box to compute the aspect ratio         (x, y, w, h) = cv2.boundingRect(approx)         ar = w / float(h)         #the shape is a rectangle         shape = "rectangle"      # otherwise the shape is a circle     else:         shape = "circle"      # return the name of the shape     return shape  # detect the shape shape = detect(c)  #array of rectangles rectangles = []  #add each rectangle found to the array 'rectangles' if shape == 'rectangle':     rectangles.append(shape)

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


As it were, I finally dreamed up a direction to explore and write something about, but just like every other time, I noticed someone senior has written has already explored the line of thought. In Physics, it seems as if there is practically nothing novel that I can explore. I know in part that may be it is just that I am not able to think fast enough.  If I am thinking about exploring something, and realize someone has already explored it, then decide to completely independently explore it without reading their work, and arrive at something similar or different, is this something that I can still put out there with my name? The thing is I have not written anything yet and have no reputation, and so I am hoping that I can put something may be simple but hopefully different and a bit new, even if it is silly. The problem is that as far as I can tell and after trying for a bit, it is looking like the chances of me doing something not completely explored might be even lower than I thought.  I am a serious scholar though not in any program at the moment, and have quite a bit of time. Any suggestions as to what the right approach is would be great.

I graduated with a Masters of Engineering, concentrating in digital signal processing, in particular medical and audio, almost two years ago. I've always been interested in research, but due to personal circumstances I could never commit a lot of time to working on a research project with a professor, and obviously didn't get a chance to publish anything. Now that I'm more settled and have much more time on my hands, I started getting involved in some open source projects and reading some technical literature (engineering, mathematics) that I couldn't get to before. However, I'd still like to find someone to to collaborate with on a research project who is already established in the field and publishes papers. Part of the reason I want to do that is to be able to eventually apply for a Ph.D. program in a good school, and having publications would be a great thing on my resume.  What I'm trying to find out is how I can work on a research project similar to those graduate students work on as a part of their studies if I'm not a student anymore? Should I contact my old professors from the university? Is it possible to find some "open research" team that accepts collaborators from outside? Do I have to do it on my own (quite frankly I'm not sure I can give myself a good enough quick-start)? In short, I'm willing to volunteer my time in exchange for a possibility of publication in the future. Can I do it, and if yes then how?


I created a page that inserts some data into MySQL database using PHP and jQuery. It's working great but the problem is when I try to insert symbols, for example:    :) :( :P =D :o ;) :v >:( :/ :'( ^_^ 8) B| <3 3:) O:) -_- o.O >:o :3 (y)    I get this error:     You have an error in your SQL syntax   Code (that inserts the data into the database)    Push into mysql   PHP:  <?php mysql_connect("localhost","root",""); mysql_select_db("datab"); $to=$_POST['to']; $from=$_POST['from']; $msg=$_POST['msgg']; if(empty($msg)){     exit(); } $query=mysql_query("INSERT INTO `thetable`(`to`,`from`,`message`) VALUES ('$to','$from','$msg')"); mysql_real_escape_string($query); if($query){     echo "Inserted successfully!"; } else{      echo "An error occurred!";  } ?>   How can I solve this problem of inserting symbols into the database?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I need to add the first three elements of a list then add the next three elements of a list and so forth. This is the code I have got so far:  def get_triple_sums_list(a_list):     new_list = []     for numbers in range(0,len(a_list)):         numbers = sum(a_list[:3])         new_list.append(numbers)         return new_list     if a_list == []:         return []   For the list:   [1, 5, 3, 4, 5, 2]   This in turn gives me the result:  [9]   I need to get  [9, 11]   If the remaining numbers is less than 3, it gives me the remainder of the sum ie,  [1, 6, 2, 4, 3]   Gives me  [9, 7]   And  [1, 6, 2, 4]   Give me  [9, 4]

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I am trying to work with the .replace function and it is working fine as long as I only have one variable to replace. As soon as I need to replace a variable more than once, it is not working anymore. Here is part of my code: function handleDetails(contentItem, contentKeys, templateKey, contentElementKey, callback=null) {     let contentTemplate = $('#' + templateKey).html();      for (const item of contentKeys) {         contentTemplate = contentTemplate.replace('{{' + item + '}}', contentItem[item]);     }      $(contentElementKey).append(contentTemplate);      if (callback) {         callback(contentItem);     } }  Example: {{date}} -> replaced with 04/11/2021 Now I want to use {{date}} twice in my template but only my first {{date}} gets replaced. Therefore I tried to use /g but without success. Here is what I´ve tried so far: contentTemplate = contentTemplate.replace('{{' + item + '}}/g', contentItem[item]);  or contentTemplate = contentTemplate.replace('/{{' + item + '}}/g', contentItem[item]);  or contentTemplate = contentTemplate.replace(/'{{' + item + '}}'/g, contentItem[item]);  I can´t find the right syntax. What am I doing wrong? Isn´t that the way it should work? I really appreciate any help. Thanks in advance, Chris

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


thanks to answers on this site I now know that you can remove the last characters of a string by string[:-1] which was really helpfull, however I need to be able to remove the first aswell and as far as I understand this technique it is not possible. so are there other ways to remove parts of strings without replacing spesific letters?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


New installation (lubuntu 16.04.3 LTS)  I have a user lets call it me and a second user that I'm using to test what follows, named temproot.  First experiment:   turn on laptop log in with temproot sudo ls -lah /home/me   It's encrypted it! Great.  Second experiment   turn on laptop log in with me I can access my own Home, great. log out with me log in with temproot sudo ls -lah /home/me   I can still access /home/me?? Shouldn't encrypted folders be unmounted on log out?

I you have an account with an encrypted home folder, you can't access the user's plain text data in their home folder if that user hasn't logged in, yet, since the system last booted up. This is what I expected because it should in fact not be practically feasible to access a user's home folder without their password being entered.  However, I found that when a user with an encrypted home folder logs in and then logs out, the plain text data in their home folder still is accessible to other users. Sufficient access privileges are required, of course.  w doesn't list the user and the output of sudo pgrep -u <username> is empty, indicating that the user doesn't have any running processes.  What is the reason for this behavior? Why not just lock the user's home folder after they logged out?


Star Wars 7 introduced Luke Skywalker in the end of the movie, but where is this planet that he is at? Can someone tell me the name?

Do we know what system the planet Rey finds Luke on is in?


As far as I know the following command is supposed to make me root:  su -i   Nevertheless, when I type it in Ubuntu 17.04 Zesty Zapus, I get the following message:  su: invalid option -- 'i' Usage: su [options] [LOGIN] Options:   -c, --command COMMAND         pass COMMAND to the invoked shell   -h, --help                    display this help message and exit   -, -l, --login                make the shell a login shell   -m, -p,   --preserve-environment        do not reset environment variables, and                                 keep the same shell   -s, --shell SHELL             use SHELL instead of the default in passwd   I remember it was working some time ago. How do I re-enable it?

I want to login as root, but when I enter   sudo -s   and enter password, this message is shown: "you are not in sudoers file", and when I enter   su   and enter password, this is shown: "authentication failure".  My os has one account only. about past1 hours ago I log on as root and do some commands , when I logout , I can't login another time!


I write     public class Vehicle {         public enum condition {new, used, wrecked, rebuilt, restored};     }   and it doesn't build because new is a keyword. I can change it to  public enum condition {newVehicle, used, wrecked, rebuilt, restored};   but that's clunky. Is there a way to use a keyword as an enum constant?

Is there any tricky way to use Java reserved words as variable, method, class, interface, package, or enum constant names?


I am working on multi-output boolean function i.e. a function that takes an $n$-bit input and gives an $m$-bit output for all possible inputs (i.e. $2^n$ inputs).  To be more exact: I am trying to do a cryptanalysis of the AES 8x8 s-box, with the goal to learn the whole procedure of finding/calculating non-linearity.   Doing some research, I learned that I need to find the minimum hamming distance from all $n$ variable affine functions. Sadly enough, I don't  really grasp all of the math which would be required to find the non-linearity.   In the end, I’ld like to be able to calculate the Linear Approximation Table of the AES s-box. Can someone please explain how to build a LAT of the AES Sbox. How can I practically calculate the non-linearity of a multi-output boolean function like the AES s-box?

I want to calculate the hamming weight of a S-Box using this formula: $\text{hw}(f) = \sum_{x=0}^{2^n-1} f(x)$. Where $f: \{0, 1\}^n \rightarrow \{0, 1\}$  My problem is that I don't know how to get the $f$-function.  I found that helpful paper: . At Page 9 (18) boolean functions are described. But she only prints the truth table (Table 2.1) without describing her $f$-function. She only says $f$ is a linear function, therefore I think $f$ depends on my S-Box?  For example, if I have this $2 \times 2$ S-Box:  0    1    2    3  1    3    0    2    $00 \rightarrow 01\\ 01  \rightarrow 11\\ 10  \rightarrow 00\\ 11  \rightarrow 10$  What are the $f$-functions and what is the hamming weight?


Captain America's shield is composed of an alloy of Adamantium-Vibranium & Thor's Mjölnir is forged with Enchanted Uru.

I was reading about Adamantium on the      Proto-Adamantium   This is the original Adamantium created by Dr. MacLain. Proto-Adamantium is the official name for the metal that makes up Captain America's Shield. It has never been recreated and is the absolute most invulnerable item in all of existence.    This lead me to read about      The true shield was once slightly dented by an enraged Odinforce empowered Thor, using Mjolnir, but he later reconciled and pounded out the small dent.    Was the dent caused by Odinforce or Thor's Hammer? Is Mjolnir or Captain America's Shield "the absolute most invulnerable item in all of existence"?


The DeMoivre-Laplace theorem says that in the limit for large $n$, the distribution tends to a Gaussian.  Can we say the same for multinomials? Can someone give me a reference as well?

Question  Suppose we have a multinomial distribution with $N$ possible outcomes, with probabilities $p_1,\ldots,p_N$. We sample this $n$ times, and denote the observed frequency of the $i$th outcome as $\xi_i$. In [1] the author claims that the distribution of the $\xi_i$ in the limit of large $n$ is:  $$p(\xi_1,\ldots,\xi_N)\propto\exp\left(-\frac{n}{2}\sum_{i=1}^N\frac{(\xi_i-p_i)^2}{p_i}\right).\;\;\;\;\;(1)$$  We can see immediately that this must be an approximation, as it assigns nonzero probabilities for $\xi_1+\cdots+\xi_N>1$. However we can see that these have vanishing probability in the limit $n\rightarrow\infty$. My question is how do we derive (1) from the multinomial distribution, and show that they match in the $n\rightarrow\infty$ limit?  My thoughts  My first thought would be to appeal to the central limit theorem. The multinomial distribution has mean $\mu_i=p_i$ and covariance matrix $\Sigma_{ij}=\delta_{ij}p_i-p_ip_j$, so we would expect this in the large $n$ limit to be described by a multivariate Gaussian with mean $\mu$ and covariance $\frac{1}{n}\Sigma$. However, things are complicated by the fact that the multinomial covariance is singular (since $\xi_N$ is determined by the other $\xi_i$s), and so the multivariate Gaussian is not defined.  To address this, we may try and consider only the first $\xi_1,\ldots,\xi_{N-1}$, which have a non-singular covariance matrix and hence well-defined multivariate Gaussian distribution. Let's take the Binomial distribution $N=2$. The frequency $\xi_1$, this has mean $p_1$ and variance $p_1(1-p_1)$, so this would be described the the Gaussian: $$\propto\exp\left(-\frac{n}{2}\frac{(\xi_1-p_1)^2}{p_1(1-p_1)}\right).\;\;\;\;\;(2)$$ The expression (1) gives: $$\propto\exp\left(-\frac{n}{2}\left(\frac{(\xi_1-p_1)^2}{p_1}+\frac{(\xi_2-p_2)^2}{p_2}\right)\right).\;\;\;\;\;(3)$$ If we substitute $\xi_2\rightarrow 1-\xi_1$, $p_2\rightarrow 1-p_1$ into (3), we can verify that this gives the same answer as (2). I have verified that this also works for $N=4$.   I'm sure that if I just bashed out the algebra for general $N$ we would get agreement between the central limit theorem and (1) when we restrict the latter to $\xi_1+\cdots+\xi_N=1,p_1+\cdots+p_N=1$. However, how can we start with the multinomial distribution and derive (1) as a limit which is valid everywhere? One idea would be to say that (1) goes to zero as $n\rightarrow\infty$ when you are not on that plane, however I am a bit uncomfortable with this as it goes to zero everywhere except the mean as $n\rightarrow\infty$, so I don't know if that argument is good enough.  [1] Wootters, William K. "Statistical distance and Hilbert space." Physical Review D 23.2 (1981): 357.


I am student in web programing. I use massively <table> ... </table> to structure my web page.  My professor once told me it could decrease the referencing quality for my websites, so I ask myself this question :   Why does a <table> tag is a bad practice in structuring a webpage instead of using it for basic data dysplaying ?

What are some clear and logical reasons for why we shouldn't be designing websites with tables? Where are the benefits, what has been driving this idea in the industry? When is it okay to use a table?


The original question is to find the Galois extension of the polynomial $x^9-5$. There are multiple questions before the actual question. Assuming $F$ = $\mathbb{Q}(\zeta)$ where $\zeta$ is a primitive 9th root of unity and $L$ = $\mathbb{Q}(\gamma)$ where $\gamma$ is the real root of $x^9-5$. I have proved that the only non-trivial subextension of $L$ is $\mathbb{Q}(\gamma^3)$. I am unable to prove whether $\mathbb{Q}(\gamma^3)$ is equal to $\mathbb{Q}(cos(2\pi/9))$ (which is subextesion of $F$ ) or not. If yes then $F$ intersection $L$ is $\mathbb{Q}(\gamma^3)$ otherwise it is $\mathbb{Q}$. Any help would be appreciated

I have some problems with this exercise. I don't know if it can be done. Consider the polynomial $ x^n - a \in \mathbb{Q} $ Can I compute the Galois group of this over $\mathbb{Q}$? Maybe having a nice "basis.  The splitting field is given by $\mathbb{Q}(\zeta_n,\alpha)$ , where $\zeta_n$ is a primitive root of unity , and $\alpha$ is some number such that $\alpha^n = a $. Well first of all, I want a $\underline{"good basis"}$ for the splitting field. In the sense that the minimal polynomials, of the adjoined elements, are different (in this case the computation of the galois group is very simple).  For example one easy case, it's when $a>0$, then $(a)^{\frac{1}{n}} \in \mathbb{R}$ , so clearly the minimal polynomial of $(a)^{\frac{1}{n}} , \zeta_n$ are distincs, and I'm done. If $n$ is odd then , it's also easy, since one root it's also real, for example $x^3-3 $, the real root is $ \root 3 \of { - 3}  =  - \root 3 \of 3  $ , so I can consider the splitting field as $\mathbb{Q}(-\root 3 \of 3 , \zeta_3 )=\mathbb{Q}(\root 3 \of 3 , \zeta_3 )$. The difficult case is when $n$ is even and $a<0$ , for example  $x^8+20$ or $x^4+20$ in some cases as in the second, there are particular cases since there exist algorithms for the Galois group of quartics, but in general. It can be done?  $\underline{Remark}$ I'm searching a $\underline{"good basis"}$ for the splitting field. In the sense that the minimal polynomials, of the adjoined elements, are different since in this case the computation of the galois group is very simple.


I know from previous questions that you can use both Bentonite followed by Sparkolloid in the same mead. Am I correct in thinking the best process would be add bentonite, give a week, RACK OFF THE SEDIMENT,then add Sparkolloid and give enough time to clear and then a final racking?  The key component I am asking is the racking between the two. I wanted to make sure that was correct thing to do. Thanks all.

Can you use bentonite and Sparkaloid to clarify at the same time?   Can they be used in the primary fermentation bucket or must they be used after racking?  How long does each require to work?


I've got a problem with sharing internet connection from my macbook pro to iphone. I've shared Ethernet connection in System Preference and managed to connect to the network from my iPhone but has no internet connection on the iPhone I assume that the problem is because my macbook's Ethernet connection uses proxy. I tried to enabled auto in proxy setting on iPhone but it didn't help. So the question is how to set up internet connection sharing under conditions described above. Thanks in advance.

I have an iMac, connected to the Internet via Ethernet, and an iPhone 4. I would like to share the iMac's Internet connection to my iPhone via the USB Cable (because my wife dreams of a wifi-less household).  I've set up Internet Sharing, specifying "sharing from: Ethernet  via: USB IPhone", but when I test, the iPhone cannot connect to the Internet. Is there something I need to activate on the iPhone?   iMac, mac os x version: Mountain Lion, 10.8.4 iPhone 4, IOS Version: 6.1


There are several ways of proving $I=\int_{-\infty}^{\infty} \mathrm{e}^{-x^2}\, dx = \sqrt \pi$, of which one of the ways is to consider $$I^2=\bigg(\int_{-\infty}^{+\infty} e^{-x^2} dx\bigg)\bigg(\int_{-\infty}^{+\infty} e^{-y^2} dy\bigg)=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}e^{-(x^2+y^2)} dxdy$$ and then convert to polar coordinates.  The step changing the product of two single variable integrals into a double integral can be justified using Fubini's theorem, the proof of which is beyond the standard undergraduate curriculum of many universities. Is there a more elementary way to justify this step?  Clarification: This is not a duplicate of the  requiring a proof of the integral. I am asking for justification of a step used in the accepted answer without using Fubini's theorem which is not something addressed there.

How to prove  $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$


I am trying to back up a folder on a web server from a file server. I have tested it manually and it works without me needing to enter a password for the SSH connection. When I put it in the crontab and wait a while however, nothing happens and it's hard to debug the problem when there's no output at all. My crontab looks like this:   01 * * * * sftpadmin rsync --delete -avh --progress -e ssh /home/sftpadmin/www/html jobhandler@10.5.5.16:/var/www/   EDIT: Probably should have mentioned I am trying to get the script to run every minute.   EDIT 2: This question isn't a duplicate because the supposed duplicate linked is just an advice article of many different reasons why a cron job might be going wrong. My specific case might not be in that article. I have gone through most things in that article and I still cannot get it to work.

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


So I'm trying to get a 'Broadcom Corporation BCM4306' wireless card working with an old ASUS laptop. I've tried looking at other people's solutions however so far nothing has worked. I've tried installing 'firmware-b43-installer' and 'b43-fwcutter' but as stated nothing's happened. The only driver available in the 'Additional drivers' application is the 'software modem' driver. The wireless doesn't work regardless if this is installed or not.  I've tried the top answer from these two threads

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


When I type  echo it's terminal  or anything containing 'blah blah terminal blah blah with echo the output shows  Blockquote  what does this mean.

When I enter single quote ' in terminal it goes to some other mode, and commands don't execute. What is this mode and when do we use it?  root@sai:~# ' > ls > ' ls : command not found root@sai:~#


I'm trying to build a program where the user picks a consonant/vowel and a random letter is chosen and added to a string each time, similar to the TV show countdown. I'm hit with the error in the title. When I try to compile the console reads that the file is not readable as an executable.  // April16Assignment.cpp : Defines the entry point for the console application. //  #include "stdafx.h" #include <stdlib.h> #include <string> using namespace std;  int main(){  char type, letters[10]; char vowels[6] = { 'A', 'E', 'I', 'O', 'U' }; char consonants[22] = { "B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Y", "Z" }; int i, j, k, l;  for (i = 0; i < 9; i++){ printf("Vowel or consonant? (V/C)"); scanf("%c", &type);  if (type == 'V')     for (k = 0; k<1; k++){         j = (rand() % 5);         strcat(letters, vowels[j]);      } if (type == 'C')     for (l = 0; l<1; l++){         j = (rand() % 21);         strcat(letters, consonants[j]);      } else     printf("Invalid!"); break; }     printf("%s", letters); return 0; }

During a long compilation with Visual Studio 2005 (version 8.0.50727.762), I sometimes get the following error in several files in some project:    fatal error C1033: cannot open program database 'v:\temp\apprtctest\win32\release\vc80.pdb'   (The file mentioned is either vc80.pdb or vc80.idb in the project's temp dir.)  The next build of the same project succeeds. There is no other Visual Studio open that might access the same files.  This is a serious problem because it makes nightly compilation impossible.


This is a short story; written before 90s; where a man is in charge of a program to settle Jupiter; where they had developed some way of transforming human into Jupiter adapted life. Seems to work; but no one comes back. Man transforms self and dog in desperate attempt to figure out: turns out life so wonderful they didn’t go back either.

They want to see if humans can survive in harsh planet conditions with a view to future colonisation. Scientist guy invents a machine which can transform humans into beings which are adapted to conditions on planet. They send folks in but none ever report back. Scientist, in despair, sends his old dog in. Dog doesn't return either so scientist finally goes himself. Gets to planet and, in his new state, finds himself strong and perfectly adapted to life on new planet. Meets his old dog who is also fine, they can now communicate and end up going off to discover the new world together.


I'm taking care of a website's SEO. Its languages are Portuguese and Spanish. Usually, I just use English for programming, including files naming.   In order to take advantage of boost rank that meaningful images' file names can provide, will I have to translate its names to both Portuguese and Spanish, either by duplicating the files or going with a sever side rewrite approach?

I have one site with two languages: English and Spanish for example. What would be the proper convention to name image files?  From my point of view it would be stupid to duplicate image and then name it according to on which site it will be uploaded. It would be waste of resources IMO and unnecessary job to do.  What do you think about this one?


I want to sanitize data against mysql injection. So I need to write a pattern to recognize and remove 4 main mysql SELECT, Replace, DELETE , UPDATE.  I want to use this general rule for array_map  $_POST = array_map('stz',$_POST);   However I stuck in to write that pattern to against happens like this "  ' AND 1=1; SELECT * FROM test_table "

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


There's a  from nearly six years ago, but without any answers. Just now, on , I was awarded the  for completing 1,000 review tasks (close votes):  You'll of course notice that I've completed in excess of 1,300 reviews of this type, hitting the 1,000 mark perhaps a year or so ago. The same goes for the one on  for new posts, which was also completed (probably) more than a year ago. Are we buggy about badges at the moment, or does someone "up there" like me?

I suddenly got four Steward badges re-awarded on SFF. I actually earned these between 2016 and 2020, but now they're  (?), and the old ones say:  for 1000 reviews, over 200 actioned in the old review system  There's an "old" review system??? A glance at the "Recent Badges" sidebar on the  shows that dozens of Steward badges are suddenly being re-awarded. This hasn't happened on all sites, apparently - e.g.  there are no new Steward badges today - but the root cause is presumably something network-wide rather than an SFF-specific phenomenon, so I'm posting this on main meta. What happened? Is someone messing with the badge system again? :-)


How can we convert "Dec 5, 2018 3:14 PM" (with three letter month) to datetime format. Tried both Parse and ValueOf and they did not work.  DateTime.Parse('Dec 5, 2018 3:14 PM'); DateTime.ValueOf('Dec 5, 2018 3:14 PM');   We have this date in a json file that we need to process.  Even this did not work  system.debug(Json.deserialize('Dec 5, 2018 3:14 PM', DateTime.Class));

I have a string as,  field name : start Date: 2016-11-14 08:00 AM ( string type)  how to convert this to Date time. I tried Date.parseDate and below option also.  String val = recruiters[j].Start_Time_Formula__c;                              system.debug('val ::'+ val);                             DateTime date1 = (DateTime)Json.deserialize('"'+val+'"', DateTime.class);                             system.debug('date1 ::' + date1);   but I am getting error as,     System.JSONException: Invalid format: "2016-11-14 08:00 AM" is malformed at " 08:00 AM": (System Code)   I referred the below link and got with the above error.    any help ?


I am new here and I am studying the philosophical implications of Quantum Mechanics. I read somewhere that QM and determinism are mutually exclusive and that QM involve a number of philosophers to think that nature is probabilistic. Is this true? And what are the theories or physical laws (in QM)that state that nature is probabilistic? In other words, where is the modal aspect in QM?

I've heard this pop up in a discussion with my physicist/engineer roommates, but didn't care to ask at the time.  Now I'm mighty curious about it.   doesn't really seem to say much on this issue.  From what I understand about the Uncertainty Principle, it says that there are certain properties of electrons and stuff that cannot be measured, and are therefore uncertain.  Then Wikipedia (under ) states that Sir Arthur Eddington says that the Uncertainty Principle isn't really so because we can't measure these properties, but because turns out nature is indeterministic.  At least that's what I took from those paragraphs.  Even without my biased wording, it sounds more like an assertion than evidence.  I've also read a few things about how other scientific conventions perceive the issue, like how a ball on the peak of a perfect mound might randomly roll down in any direction, and I'm still unconvinced.  My belief of determinism is generally that if you knew every single variable that existed as a factor at the very beginning and birth of the universe, you could correctly determine all properties of any individual particle at any point in time.  Could anyone provide some more background about this?  Especially regarding quantum mechanics?


I've puchased a big interior scene from a 3d marketplace.   To optimize it in Unity (using Occlusion culling), I need to break the meshes into pieces, without modifying the structure.   Is there any blender command to do this?

I want to make the teeth a separate child object from the mouth. I want to know the best way to do this.   I have tried going into edit mode with Tab and trying to select all the vertices but that doesn't move the teeth. Is there an easy way to select just that part and make it a separate child mesh to the rest of the mouth?


Hello i have ubuntu desktop 18.04.5 with latest updates.. But dont know why the prompt i should read doesnt appear :  I only have the line The software on this computer is up-to date.And thats it... I also would like to pass from "normal" Ubuntu Desktop 18.04 to Ubuntu Studio 20.04.1 if possible ( as i have bought a usb audio interface and want to make some tests with djinng and music). Thanks in advance

I want to use do-release-upgrade to upgrade from 18.04 to 20.04, but I can't do that do-release-upgrade Checking for a new Ubuntu release There is no development version of an LTS available.  It seems that  is used, and it still points to 18.04. Do you know when (or how?) can I upgrade to 20.04?


I've bought a Mpow H10 Headset a couple of years ago and I've always used it on my phone, great sound experience. Now I'm trying to use them on Discord but I'm having some issue. On my profiles I can see  Headset | Mpow H10 Hands-Free AG Audio  and  Headphones | Mpow H10 Stereo   Whenever I listen using the Headset profile I hear to a lot of screeching and terrible sounds, Headphones works ok though. Of course the only input profile I see it's the headset's. The problem is, using Discord, I need to use the headset profile on both input and output to make the microphone work, if I use the headphone profile on output I can't hear anything. I've used Driver Booster to update any driver on my pc. I've already tried unchecking Audio Sink and Handsfree Telephony on the Services Properties on the Control Panel but no luck. The only close solution I've found so far is using the monitor as output but I'd really like to use my headset for everything. What should I do?

Every time I connect a bluetooth headset it shows up as 2 things on sound playback devices.    I can choose bluedio stereo or bluedio hands free.  What is that?  What's the difference?  I often see the stereo part to be unstable though.


I have one app in MVC for editing Users in Database. I also have CreatedDate(when the user was created) but ofcourse it shows me Date and Time when it was Created, but I need it to show me how many days, hours, minutes it was ago.   So when I created user 2 hours ago, it will show me like 0 days 2 hours 0 minutes instead of 8.9.2015 13:48. I know I have to customize this in Model, but I dont really know how. Thanks for help, there is the model.   public DateTime? CreatedDate { get; set; }

Given a specific DateTime value, how do I display relative time, like:   2 hours ago 3 days ago a month ago


How do you update the default location for Screenshots in Ubuntu 18.04+? Note: There is a similar question @ . But the accepted answers are not so clear, so a separate question for easier accessibility.

I want to change the default location of "Save a screenshot to Pictures" to save it to Desktop.   If that is not possible, is there any other way to do it? I am using Ubuntu GNOME 17.04.  NOTE: I don't want to change the location with dconf-editor as it changes the location of screenshot applet and not of the shortcut I require.


has an effect that triggers when mountains enter the battlefield.      When a mountain enters the battlefield, if you control 5 or more other mountains, Valakut deals 3 damage to target creature or player.   If a player has for example 4 mountains and 3 forests in play, and casts a spell such as , sacrificing a forest to fetch 2 mountains, bringing the total count up to 6, does Valakut trigger?  How does this work with a card like , which would allow you to sacrifice all of your lands and fetch a valakut and 6 mountains?

Let's say I have  on the board. He is a 2/2 that says:  Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.  I play a . It says:  Put three 1/1 red Human creature tokens with haste onto the battlefield. Sacrifice those tokens at the beginning of the next end step.  The sacrifice portion is not important to this question. What is important is how these two cards interact with each other. Playing this card in my first main phase, assuming no counters or other shenanigans by my opponent, I will have my Commander and 3 tokens on the battlefield. What will happen in terms of the power/toughness of my tokens and Commander? Option A The tokens will be 1/1 each. They don't see each other come in at all. The Commander is 3/3, as one "enter the battlefield" trigger happens. Option B The tokens will be 1/1. They don't see each other come in at all, because they weren't on the battlefield to see any of the triggers. The Commander is 5/5, as he saw three "enter the battlefield" triggers occur. Option C The tokens will all be different, with one being 3/3 as he saw the other two come in, one being 2/2 as he saw only the last one come in, and 1/1 as the last one saw none come in. Option D The tokens will all be 4/4, as three creatures entered the battlefield this turn. I am obviously hoping for this option. It may be supported by a ruling on Goldnight Commander that says, emphasis mine:  The creature that entered the battlefield will also get +1/+1 until end of turn if it's still on the battlefield when the ability resolves.  The key being the ability resolving. So my thought is thus:  Thatcher Revolt goes on the stack. Thatcher Revolt resolves, and three separate "enter the battlefield" triggers go on the stack as the three humans enter the battlefield as 1/1. The last (it is a stack) "etb" trigger resolves. This puts an ability from Goldnight Commander on the stack. This resolves and the humans are now all 2/2. The next "etb" trigger resolves. This puts a new ability from Commander on the stack, and resolves with the humans being 3/3. The first "etb" trigger finally resolves, puts a Command ability on the stack, which resolves putting the humans at their final state of 4/4.  Option E The tokens will all be 2/2.  Thatcher Revolt goes on the stack. Thatcher Revolt resolves, and one single "enter the battlefield" trigger goes on the stack. The "etb" trigger resolves. This puts an ability from Goldnight Commander on the stack. This resolves and the humans are now all 2/2.  I would really like to have a complete understanding both of the result and how this result is calculated by the game engine.


I'm trying to rotate all sprites in the view port around a central character. I have made some progress, using the following I can get my ship to rotate around the coordinates 0,0, with the radius being the initial placement of the ship.  How do I move the point that my ship will revolve around? If I try adding NewPoint to any meaningful screen position the ship buggers off!      Dim NewPoint As New Vector2     NewPoint = Vector2.Transform(Ship.Position, Matrix.CreateRotationZ(Ship.ShipAngle))     Ship.Position = NewPoint     Ship.RotationValue = Ship.ShipAngle   Thanks for all your help with this folks, I do appreciate it.

I have tried using glm::rotate and such. glm::translate works fine, but rotate doesn't work (if I rotate before/after a translation).  Here is my current setup:  glm::vec4 Off = glm::vec4(0, 0, 0, 1); glm::vec4 result = Util::createTransform(offset) * Off;  for (int i = 0; i < Tvertex.size(); i++) {     Tvertex[i] += glm::vec3(result.x, result.y, result.z);     Tcolors[i] = currentColor; }   And here is my Util::createTransform:  glm::mat4 Util::createTransform(glm::vec3 pos) {     glm::mat4 trans = glm::mat4(1.0);     trans = glm::translate(trans, pos);     return trans; }  glm::mat4 Util::createTransform(glm::vec3 pos, glm::vec3 rot) {     glm::mat4 trans = glm::mat4(1.0);     trans = glm::rotate(trans, glm::radians(rot.x), glm::vec3(1, 0, 0));     trans = glm::rotate(trans, glm::radians(rot.y), glm::vec3(0, 1, 0));     trans = glm::rotate(trans, glm::radians(rot.z), glm::vec3(0, 0, 1));     trans = glm::translate(trans, pos);     return trans; }


I want to modify a line if a specific keyword is found in a line.  CS_CODE, SM_NUM, PORT_NUM, DEV_PORT_NUM, DIRNUM, MAIN_DIRNUM, BILL_NO, ADR_NAME   In above line, if 'PORT_NUM' is present then 'BILL_NO' should be replaced with 'NA'. Only the keyword present in the line should be replaced.  I am using below approach:  while IFS=$'\n' read -r line do      if [[ $line == *"$string"* ]]; then            < sed command to replace only keyword >      fi done < "$file"   How can I achieve this?  Note: '-i' extension does not work in my sed version.

Replacing strings in files based on certain search criteria is a very common task. How can I    replace string foo with bar in all files in the current directory? do the same recursively for sub directories? replace only if the file name matches another string? replace only if the string is found in a certain context? replace if the string is on a certain line number? replace multiple strings with the same replacement replace multiple strings with different replacements


I always thought public methods of base class do get inherited by the derived class, even thought the derived class did not had definition of that particular method. For example  #include <iostream>  using namespace std;       class A {     public:         int f() { cout << 3; return 0;}         int f(int x) {cout << x; return 0;}     };       class B: public A {     public:         int f() {std::cout << 5; return 0;}      };       int main(){        B ob;        ob.f(7);          return 0;     }   I was expecting the result to be : 7 , but I get compilation error saying   " error: too many arguments to function call, expected 0, have 1; did you mean 'A::f'?"  I know what the error is trying to say but I am little confused that the fuction from the Base class is not called.

I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code:  class A {     public:     void foo(string s){}; };  class B : public A {     public:     int foo(int i){}; };  class C : public B {     public:     void bar()     {         string s;         foo(s);     } };   I receive the following error from the gcc compiler:  In member function `void C::bar()': no matching function for call to `C::foo(std::string&)' candidates are: int B::foo(int)   If I remove int foo(int i){}; from class B, or if I rename it from foo1, everything works fine.   What's the problem with this?


They have told me this log in is vulnerable, but i dont know how to make it safe, im looking for help if anyone whants to help me I'd really appreciate it.   When i add this: "1' OR 1=1 LIMIT 1#" to the password en the login form it enters.  Here is the code:    <?php session_start(); include 'inc/header.php'; include 'panel_funciones.php';  $usuario = $_POST["nombre"]; $pass = $_POST["pass"]; try {  $bd = new PDO("mysql:host=localhost;dbname=b9_16267033_1","b9_16267033","12346");  $bd->query("SET NAMES 'utf8'"); } catch (Exception $e){  echo "No se ha podido conectar";  exit; } try{         $sql= "SELECT usuario, pass FROM usuarios WHERE usuario='$usuario' and pass='$pass'"; }catch(Exception $e){  echo "Error en consulta";  exit; } $iniciosesion = $bd->query($sql); $result = $iniciosesion->fetchAll(); $contar = count($result);  // AQUI COMIENZA COMPROBACIÓN if ($_SESSION['Logueado'] = TRUE) {  panel(); } elseif ($contar == 1) {  $_SESSION['Logueado'] = TRUE; panel(); } else{  echo "El usuario o contraseña es incorrecto"; } include 'inc/footer.php'; ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


For example the command: ~$ mysql -v  yields:                                                                                ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

In my server, everytime I try to access MySQL I get the error:        Access denied for user 'root'@'localhost' (using password: NO)   when I try mysqladmin -u root -p password I get        Access denied for user 'root'@'localhost' (using password: YES)   How can I access MySQL in my Ubuntu server 12.04?


I have a name, place and date of birth, place and date of death also. This soldier died in Italy in 1945 and is buried in Futa Pass.   Could anybody provide me with where i can gain more information as to the records?

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


#include <iostream>    class Base   {   public:      virtual ~Base() {}       virtual void f()       {           std::cout << "base\n";       } };  class Derived : public Base {   public:       virtual ~Derived() {}       virtual void f()         {           std::cout << "derived\n";       }   };    int main()   {       Derived* D = new Derived;       D->f();     delete D;       return 0;   }   So I am calling Derived::f but I want to call Base::f too. Is there any other way than calling Base::f() inside Derived::f()?

How do I call the parent function from a derived class using C++? For example, I have a class called parent, and a class called child which is derived from parent. Within  each class there is a print function.  In the definition of the child's print function I would like to make a call to the parents print function.  How would I go about doing this?


Edit: This question was marked as duplicate and closed, but I checked the suggested duplicates before asking mine and found they had different particulars, even if they were about the same topic.  If, however, I missed the exact duplicate, then I stand corrected. When deleting all text before the cursor, you could use the keyboard shortcut CMD + Delete, but what's the opposite equivalent when you want to delete all text after the cusor (or to the end of a line)?

It is possible to press ⎇ Backspace on macOS in order to delete the previous word (left of the cursor), and ⌘ Backspace to delete the previous line (left of the cursor). If you have an external keyboard with a "delete" key (or the "forward delete key"), or are able to emulate the delete key via software, it is possible to press ⎇ Delete to delete the word to the right of the cursor. However, perhaps surprisingly, it is not possible to press ⌘ Delete in order to delete the line to the right of the cursor.  Now, I have only been able to make this possible by emulating a ⌘⇧→ and then a Backspace with BetterTouchTool. However, I want to avoid doing something like this because BTT does not work at a "low enough level" for me – that is to say, the action is not entirely reliable.  Is there any official macOS way to delete the line to the right of the cursor?


So I was reading this article on 'Understanding the basics of Stock Owning' (1).   It starts by saying, Exxon has 5.28 billion shares of stock outstanding, in other words, they have divide the company into 5.28 billion pieces.  It then goes on to say, the stock is worth $90.70 per share and if you own the share you get a dividend of $1.70 a year. Finally, if the company closes or sells itself or w/e then you get ~$20 per share. Fine.    My question is, why would anyone buy this stock? Its dividend is $1.70 a year, if you bought a stock, you'd have to wait a long time for it to pay itself. Or is the idea that it's a kind of (unreliable) bond where you can invest $1,000,000 into the stocks and get a decent return every year through dividends? The price is driven by speculation on the dividend (analogous to some kind of mutable bond coupon).  This leads to my second question, why would anyone buy shares of a company that does not give out dividends? If the company closes then you only receive a fraction of what you paid for the shares, what's the incentive?    [1]

Before recently, Apple Inc. did not give dividend to shareholders.  This makes me curious why people buy Apple Inc. stocks; while it might be due to the expectation of selling stocks at a higher price, this can only be possible if other people are thinking the same, thereby increasing demand. But the stocks themselves do not pay interests - so Apple's amazing revenue/profit records would not matter....


I have an arrayList in a class and a getter for it. I need to make a method that returns an arrayList filled with all the files from the first arrayList that have the same name as the String arg. This is what I've come up with.  ArrayList<File> dirs = new ArrayList<File>(); // filled with files  public ArrayList<File> getDirectoriesNamed(String fileName) {     ArrayList<File> files = new ArrayList<File>();     for (File file : dirs) {         if (file.getName() == fileName) //problem is here             files.add(file);     }     return files; }   however when I try this, I get an empty arrayList. and I figured out that the reason is because of the if Statement... is there any reason why that shouldn't work that I'm not seeing?

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


How do you accept case-insensitive and allow embedded blanks in a user input? So the user can enter “hong konG” and get a correct match to the input.  I only have the input[0] = toupper(input[0]); which only accepts if the case sensitive is at the beginning of the word.  while(true){ cout << "Enter a city by name: "<< " ";  std::getline (std::cin,input); if (input == "quit")     {         break;     } input[0] = toupper (input[0]);      //....how do I loop to find all letter's in the input string variable?     }

What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase?  Please indicate whether the methods are Unicode-friendly and how portable they are.


What is the probability that if you break a stick at $2$ points the three sides form a triangle?  Is there a technique that avoids calculus?

Randomly break a stick (or a piece of dry spaghetti, etc.) in two places, forming three pieces.  The probability that these three pieces can form a triangle is $\frac14$ (coordinatize the stick form $0$ to $1$, call the breaking points $x$ and $y$, consider the unit square of the coordinate plane, shade the areas that satisfy the triangle inequality edit: see comments on the question, below, for a better explanation of this).  The other day in class*, my professor was demonstrating how to do a Monte Carlo simulation of this problem on a calculator and wrote a program that, for each trial did the following:   Pick a random number $x$ between $0$ and $1$.  This is the first side length. Pick a random number $y$ between $0$ and $1 - x$ (the remaning part of the stick).  This is the second side length. The third side length is $1 - x - y$. Test if the three side lengths satisfy the triangle inequality (in all three permutations).   He ran around $1000$ trials and was getting $0.19$, which he said was probably just random-chance error off $0.25$, but every time the program was run, no matter who's calculator we used, the result was around $0.19$.  What's wrong with the simulation method?  What is the theoretical answer to the problem actually being simulated?  (* the other day was more than $10$ years ago)


I'm looking for command line code to show the window below AND execute the link "Nach Updates suchen" (looking for updates). By wuapp.exe only the window is shown.

After a fresh Windows install – XP or 7 – how can I "force" Windows updates?   I don't want to have "old" Windows updates after a week, so could it be done in "one step"? Are there any "magical" commands that force Windows to check for updates, and if there are any, install them?


I got a lava texture from poliigon.con and noticed that there are 2 types of maps that I have never encountered. One is an "emissive" map, and one is a "mask" map. Will I need to use these maps along with the Diffuse, Gloss, Normal, and Displacement maps to improve the realism of the texture??If so, how do I properly plug these in in blender cycles  2.79?   Textures:

I have 5 different images one each for diffuse, specular, reflection/refraction, normal and illumination/emission map. Can someone please help me to set-up cycles material node including all the 5 maps to get the best physical render as possible? A screenshot after setting up all the nodes would be much helpful.


I have some rows separated by \cline's. It's important for presentation that they appear on the same page. However the \nopagebreak doesn't work in conjunction with \hline or \cline. Is there any easy fix for this?

How to disable pagebreak on \hline in longtable?  This is an example illustrating my problem:  \documentclass[12pt,a4paper,oneside]{letter}  \usepackage{longtable}  \begin{document}  \begin{longtable}{ | p{5cm} | } \hline Table header\\* \hline Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pharetra porttitor turpis, id egestas neque congue in. Nam sed lorem lorem, ac tristique tellus. Nunc ornare feugiat orci, a blandit turpis facilisis ut. Aenean pharetra ornare ante. Sed tempus leo in dolor eleifend placerat. Integer at enim augue. Ut nisl tortor, interdum ac porttitor ac, sagittis quis libero. Vivamus nibh metus, ornare vel pulvinar nec, fringilla nec orci. Maecenas mollis nulla a nibh fringilla nec convallis augue varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere   cubilia Curae. \\ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pharetra porttitor turpis, id egestas neque congue in. Nam sed lorem lorem, ac tristique tellus. Nunc ornare feugiat orci, a blandit turpis facilisis ut. Aenean pharetra ornare ante. Sed tempus leo in dolor eleifend placerat.  Integer at enim augue. Ut nisl tortor, interdum ac porttitor ac, sagittis quis libero. Vivamus nibh metus, ornare vel pulvinar nec, fringilla nec    orci. Maecenas mollis nulla a nibh fringilla nec convallis augue varius.   Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere   cubilia Curae. \\ \hline Table header\\* \hline Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pharetra porttitor turpis, id egestas neque congue in. Nam sed lorem lorem, ac    tristique tellus. Nunc ornare feugiat orci, a blandit turpis facilisis ut. Aenean pharetra ornare ante. Sed tempus leo in dolor eleifend placerat.    Integer at enim augue. Ut nisl tortor, interdum ac porttitor ac, sagittis  quis libero. Vivamus nibh metus, ornare vel pulvinar nec, fringilla nec    orci. Maecenas mollis nulla a nibh fringilla nec convallis augue varius.   Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere  cubilia Curae. \\ \hline \end{longtable}  \end{document}   I'd like to have second header on page 3. I do not control table contents, so I can not do page breaks manually.


I need some information regarding hotel booking in Portugal. I booked hotels (with free cancellation) from booking.com in Lisbon and Porto before applying for a visa and submitted this booking information when applying.  Now I am getting better deals from different websites for better, cheaper hotels. Can I cancel the hotels I booked before and book the new hotels in the same city, same date and same duration? Will it cause any issue in the future?

My route trip is Prague-->Berlin-->Vienna. I want to change the route to be Prague-->Berlin-->Paris.  Additionally, I already got my Schengen Visa, but after that I found a good deal in another hotel.    Can I change the first hotel I will visit before I travel?  If yes, is that going to cancel my visa or anything like that? Also I planned to go to Vienna and go back to my home from there. Can I change it and go to Paris instead?


First off I'm somewhat new to C# but I'm working on a game in C# Monogame and I'm trying to get timers working. There was a similar question answered around here a while back but I found that the solution doesn't work for me, perhaps an older version or I'm missing something, so I wrote similar timer and timer manager classes myself.   I ended up with a wait(time) function (that seems to work from looking through the debugger but not sure) now I'm wondering how can I get an action to be executed when the timer created by that expires.  Ideally I'd like something like   timerManager.Wait(10) {     //do stuff once done waiting }   Here's my timer classes -  and   TimerManager gets instantiated in my player class and wait is called in the update function by keyboard input.  if(keyState.IsKeyDown(Keys.Space)) {     if(canJump)     {         vAccel = jumpSpeed * -1;         stripManager.setCurrentAction(PlayerActions.jump);         timerManager.Wait(1);     } }       So my question is how can I get an action to trigger, ideally with a set of {} as shown above. I'm aiming to having a class I can reuse for any sort of delay I need in my game.

I want a method to run after every 10 or 15 seconds.   My timer is set to:   timer = (double) gameTime.ElapsedGameTime.TotalSeconds;   What would be the logic to check for every 10 or 15 seconds?


I need to prove that if matrix A has the form $\begin{pmatrix}a &b\\ -b& a\end{pmatrix}$, or    $\begin{pmatrix}a &b\\ b& -a\end{pmatrix}$ so $ a^2+b^2= 1 $ I picked a matrix $\begin{pmatrix}a &b\\ c& d\end{pmatrix}$, and I proved for this one.Then I changed $c = b$ and $d = -a$, but I'm not sure if this is correct. I'm not getting the correct answer, I didn't prove it.

Let A be some $2x2$ matrix with real entries. Prove that $A^T$$A$ = $I$ if and only if $A$ is the rotation matrix or the reflection matrix.  My Progress: It can be shown that if $A$ is either the rotation or reflection matrix, then $A^T$$A$ = $I$ holds by matrix multiplication. Where I get suck is showing that if $A$ is a $2x2$ orthogonal matrix, then $A$ must either be the Rotation or Reflection Matrix. I suppose that since $A$ is orthogonal, it is distance preserving - and the only $2x2$ matrices that preserve distance are the Rotation and Reflection Matrices, but this isn't really a proof.  Any advice and help would be much appreciated.


I had Windows Vista and Ubuntu 12.04 LTS dual booting on my Lenovo SL300 laptop. I used a windows 7 home premium install disk to install 7 on a new partition. Then I uninstalled vista by deleting the windows vista partition. Now when I boot the computer it goes straight into windows 7 without displaying the GRUB bootloader.  The ubuntu partition is still untouched and I would like to be able to acess it without reinstalling ubuntu. Do I someohow need to confiure grub through windows? I still have my 12.04 LTS live disk, so I could maybe use that to access the GRUB files that are on my ubuntu partition? please help

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I am struggling to understand how exactly a player learns new spells, let's take for example the Ranger class:     At level one they don't get any spell or cantrips. At level two they get to learn 2 spells with level 1 slots available. At level three it says they know 3 spells with level 1 slots available.   Does that mean that at level 3 they know 3 spells of level 1 or are they added to the spell pool of previous levels, so 2 + 3 = 5 spells known in total at level 3?   Can someone please explain this as thoroughly as possible and, if needed, use examples from other spellcasting classes like the wizard and sorcerer as well.   I've looked in chapter 10 and 11 of PHB but haven't found the answer.

So I'm fairly new and ended up being the Cleric in my also fairly new group. I haven't played a caster before and the book says that at level 1 I have Bless and Cure Wounds. Do I need to assign these to a spell slot or do I have them inherently (not to be confused with a cantrip; I know I'd have to use a slot to cast them)?


Note: Someone linked to  as a possible duplicate. But this link does not answer my question. Specifically, this link does not describe where exactly a regular domain name buyer like me (who has no DNS administration experience) sets the authoritative nameserver. All an inexperienced domain buyer like me does is set edit the DNS field for my domain in a reseller website like Godaddy or Namecheap and set it to customer nameservers like ns1.digitalocean.com, ns2.digitalocean.com, etc. The visible output I see after doing this is these nameservers appearing in the whois <mydomain> output. Is this equivalent to setting the authoritative nameserver as well, or is there something more to it?   Say I register a domain named example.com using any popular domain name registration service/reseller.  Say I have two Linux VMs hosted on two different cloud service provider's infrastructure.  Say I create DNS entries for example.com using the DNS Manager of both cloud service providers. On the first cloud, I point example.com to the IP address of the VM on the first cloud. On the second cloud, I point example.com to the IP address of the VM on the second cloud.  When an Internet user performs nslookup or dig on example.com which IP address would example.com resolve to for it?  As per HBruijn's comment below, it would resolve to the IP address in the record of the authoritative nameserver. So my question is where in this whole process of registering a domain name by an inexperienced user like me on a popular domain name reseller service do we specify the authoritative nameserver?  Is it the DNS field that resellers like Godaddy or Namecheap ask us to enter? I thought that DNS field only appears in the whois output. Does the reseller go and update the DNS too with the same nameservers as the authoritative nameservers?

This is a  about DNS (Domain Name Service).   If my understanding of the DNS system is correct, the .com registry holds a table that maps domains (www.example.com) to DNS servers.   What is the advantage? Why not map directly to an IP address? If the only record that needs to change when I am configuring a DNS server to point to a different IP address, is located at the DNS server, why isn't the process instant? If the only reason for the delay are DNS caches, is it possible to bypass them, so I can see what is happening in real time?


What leads me to ask: I requested assistance with a thorny problem via the "Contact Us" on Nov. 6.  No answer; tried again on Nov. 17.  Still nothing (December 8).  How many SOS's are there in the current backlog?  What's the average wait time to get a response from "Contact Us"?  How many SOS's are received per week?  How do those numbers compare with those that were occurring prior to The Firing?  Is average wait time calculated and recorded?  If so, how could I look at it?  Has the data guru been looking at these issues at all?  Have the community managers and/or management noticed or hypothesized a correlation between reduction of wait time and the general level of trust?  And now, two feature requests:   When a user sends a message to the CM team via "Contact us" or an email to community-support@stackoverflow.com, arrange for the automatic response to include an estimated number of days of wait time. Publish somewhere (here perhaps) the average wait time on an occasional, on-going basis, e.g. approximately once a month.     How this question is different from the proposed duplicate:  The proposed duplicate seems to be saying that average response time is between one day and one week, and that if it's going to be longer, one can expect an email to that effect.  In these difficult times, I'd be surprised if the numbers were the same.  I'd like to know how they compare.  My target answer author: the data guru, I forget her name (hope someone will help me and edit this part).

So I had a dispute with the moderators at a specific SE site. As a result, I got suspended there. As per SE guidelines, I pressed the "Contact us" button and wrote to the higher powers to appeal.  That was 5-6 weeks ago. There was zero feedback, neither positive, nor negative, not even "it's in progress, please wait".  So what is this "contact us" thing supposed to do? Is it a placebo to make me feel better while being routed to dev/null?  What is the normal time it takes to process a "contact us" message?  Notes:   As far as I remember, I did not contact the team before. I'm a longtime user of multiple SE sites and never had any problems except for that one site. I'm pretty sure my form was submitted. I didn't make screenshots or anything, because I did not think I would need them in a post like this. I didn't expect a super-fast reply either, so I wasn't wondering after a week or two.


What I currently have is:  paragraph 1  paragraph 2  paragraph 3 [1].  With that I want to show that I am citing all 3 paragraphs from the same source. But appearently this is not right. Is it enough that I do?  paragraph 1 [1]  paragraph 2 [1]  paragraph 3 [1].

I'm writing a paper where I have a number of sentences across a few paragraphs, all from the same source. How should I use inline citations in this situation? Should I put them after each listed fact in the sentence at the end of each paragraph, or at the end of all of the paragraphs? The paragraphs are all topically related, but each one is different enough to be a sub-topic. In case it's relevant, the topic being discussed is technology, the paragraphs detail how companies using that technology.


I've got a form done in Razor. The user can choose between two actions to take with the data they fill in to that form,  SaveCurrentProgress(User user)   ...which allows the user to save the current state of the form and come back to it later. or:  SubmitFinalVersion(User user)   Which saves the form data and then renders it read-only.  I know how to use Html.BeginForm() to pass an object to a single action/controller, but how do I code it so the user can pass the object to one of the two actions?

Is there some easy way to handle multiple submit buttons from the same form? For example:  <% Html.BeginForm("MyAction", "MyController", FormMethod.Post); %> <input type="submit" value="Send" /> <input type="submit" value="Cancel" /> <% Html.EndForm(); %>   Any idea how to do this in ASP.NET Framework Beta? All examples I've googled for have single buttons in them.


In the lagrangian for double pendulum for small angles, the term $\dot{\theta}_1\dot{\theta}_2 \left [ 1-\frac{(\theta_1-\theta_2)^2}{2} \right ]$ is replaced with $\dot{\theta}_1\dot{\theta}_2$, because $\dot{\theta}_1\dot{\theta}_2  \frac{(\theta_1-\theta_2)^2}{2}$ is neglected. The product $\dot{\theta}_1\dot{\theta}_2$ has the second order of smallness, but why? This  explains for simple pendulum, but says that it is more complicated for double pendulum. What is explanation for double pendulum?  Edit: Correct me if I am wrong, but I think I found the answer. If double pendulum starts oscillating from rest, the potential energy at that moment is $E_{pm}=m_1gh_{1i}+m_2gh_{2i}$, where $h_{1i}$ and $h_{2i}$ are lengths from reference line to centres of masses of two pendulums. In small angles aproximation these heights are $h_{1i}=l_1+l_2-l_{cm1}+\frac{\theta_{1i}^2}{2}l_{cm1}$ and $h_{2i}=l_2-l_{cm2}+l_1\frac{\theta_{1i}^2}{2}+l_{cm2}\frac{\theta_{2i}^2}{2}$. Kinetic energy of first pendulum is $E_{k1}=E_{pm}-E_{k2}-E_{p1}-E_{p2}=\frac{m_1v_1^2}{2}+\frac{I_1\dot{\theta_1}^2}{2}=\frac{m_1l_{cm1}^2+I_1}{2}\dot{\theta_1}^2$. Kinetic energy of second is $E_{k2}=\frac{m_2v_2^2}{2}+\frac{I_2\dot{\theta_2}^2}{2}=\frac{m_2l_{cm2}^2+I_2}{2}\dot{\theta_2}^2$. $E_{k1}=\frac{g}{2}((\theta_{1i}^2-\theta_{1}^2)(m_1l_{cm1}+m_2l_1)+m_2l_{cm2}(\theta_{2i}^2-\theta_{2}^2))-E_{k2}$ $\dot{\theta_1}=\sqrt{\frac{g((\theta_{1i}^2-\theta_{1}^2)(m_1l_{cm1}+m_2l_1)+m_2l_{cm2}(\theta_{2i}^2-\theta_{2}^2))-2E_{k2}}{m_1l_{cm1}^2+I_1}}=\sqrt{\frac{2E_{k1}}{m_1l_{cm1}^2+I_1}}$ $\dot{\theta_2}=\sqrt{\frac{g((\theta_{1i}^2-\theta_{1}^2)(m_1l_{cm1}+m_2l_1)+m_2l_{cm2}(\theta_{2i}^2-\theta_{2}^2))-2E_{k1}}{m_2l_{cm2}^2+I_2}}=\sqrt{\frac{2E_{k2}}{m_2l_{cm2}^2+I_2}}$ Masses and lengths have influence, but $\dot{\theta_1}$ and $\dot{\theta_1}$ should be small because terms $(\theta_{1i}^2-\theta_{1}^2)$ and $(\theta_{2i}^2-\theta_{2}^2)$ are small. Also when $\dot{\theta_1}$ is maximal, $E_{k1}$ is maximal, so $\dot{\theta_2}$ will be smaller. Similar is with $\dot{\theta_1}$. $\dot{\theta_1}$ and $\dot{\theta_1}$ will not be maximal in same time, so their product will be small.

From the Lagrangian I've got the following equations of motion for the  in 2D. (The masses are different but the lengths of the two pendula are equal.) Let $m_2$ be the lowest-hanging mass.     $$(m_1+m_2)\ddot{\theta_1}+2m_2\ddot\theta_2\cos(\theta_2-\theta_1)=\\ -2m_2\dot\theta_1\dot\theta_2\sin(\theta_1-\theta_2)-(m_1+m_2)g/l\sin(\theta_1)$$   and     $$m_2\ddot{\theta_1}+2m_2\ddot\theta_2\cos(\theta_2-\theta_1)=\\ 2m_2\dot\theta_1\dot\theta_2\sin(\theta_1-\theta_2)-m_2g/l\sin(\theta_1)$$   In the small angle approximation these become, respectively     $$(m_1+m_2)\ddot{\theta_1}+2m_2\ddot\theta_2= -2m_2\dot\theta_1\dot\theta_2(\theta_1-\theta_2)-\theta_1(m_1+m_2)g/l$$   and      $$m_2\ddot{\theta_1}+2m_2\ddot\theta_2= 2m_2\dot\theta_1\dot\theta_2(\theta_1-\theta_2)-\theta_1m_2g/l$$.   Most sources don't have the terms of order $\dot\theta$. This is because they apply the small angle approximation to the Lagrangian before taking the derivatives, thereby ignoring terms of order $\theta.$ What justification do we have for getting rid of these terms?


This search seems to work much better than the search bar at the top:    In fact, this is the way I normally search. Is there anyway the way this search works could be incorporated into the main search bar?

The search engine that works behind the scenes to generate the "Questions that may already have your answer" is staggeringly amazing; even this first draft at a not very good title brings up exactly the question I was going to ask as the first result:   On the other hand, the search bar doesn't do quite such a good job:   So I'd like to propose that a little of the "New question screen" magic go into the search bar. Or to propose this in a little less wishy-washy way; that (in addition to normal search results) top results from the "Questions that may already have your answer" box go into the search box as if the search had been phrased as a new question. This will help casual users who may search but may not (attempt to) ask. This will additionally be helpful for experienced users because (due to draft saving) you cannot have two independent new question pages open at once. As such, I can't use the new question-based search while also drafting a question


i have just learned labels in JS for loops. it works correctly but with that warning.     Unexpected':'.   mainLoop://label   var count = 0; mainLoop:   //label for (i = 0; i < 5; i++) {     childLoop:   //label     for (x = 0; x < 5; x++) {         if (x === 2 && count === 0){             count++;             continue childLoop;//will not print 2 and continue in the same loop            }         else if (x === 2 && count === 1){             count++;             continue mainLoop;//will not print 2 and continue in the parent loop         }         else if (x === 2 && count === 2){             count++;             break childLoop;//will not print 2 and break the same loop            }         else if (x === 2 && count === 3){             count++;             break mainLoop;//will not print 2 and break the parent loop         }         console.log(i + "->" + x)     } }   How Can I make JSLint expect that ':' XD ??  and thanks

In my javascript I have this      loopDeLoop:         while (foo !== bar) {             switch (fubar) {                 case reallyFubar:                     if (anotherFoo == anotherBar) {                         break loopDeLoop;                     }                     break;                 default:                     break;             }         }   But JSLint says... lint warning: use of label  Here's the notes from        Labels   JavaScript allows any statement to have a label, and labels have a separate name space. JSLint is more strict.      JSLint expects labels only on statements that interact with break: switch, while, do, and for. JSLint expects that labels will be distinct from vars and parameters.   How do I construct the above to get rid of the warning?  Thanks, Greg


What is an example of perfect collinearity in terms of the design matrix $X$?  I would like an example where $\hat \beta =  (X'X)^{-1}X'Y$ can't be estimated because $(X'X)$ is not invertible.

I am doing some calculations on different matrices (mainly in logistic regression) and I commonly get the error "Matrix is singular", where I have to go back and remove the correlated variables. My question here is what would you consider a "highly" correlated matrix? Is there a threshold value of correlation to represent this word? Like if a variable was 0.97 correlated to another one, is this a "high" enough to make a matrix singular?  Apologies if the question is very basic, I wasn't able to find any references talking about this issue (a hint towards any reference would be a big plus!).


In the above image I have a block of mass m hanging from a mass less pulley with the help of a massless string. The other end of the string is attached to a wall.  $F_g$ is gravitational force acting downward and $F_s$ is the restoring force of spring acting leftward. T represents tension in the string.  I had to find the reading of the spring balance and assumed that it would be the force on the spring balance(to measure extension of spring).  However I can't seem to figure out the tension force between the spring balance and the wall. If I consider that spring balance was a block, then tension force would be leftward and of magnitude T. But what about the tension force leftward? (on the wall)  Similarly in the following image, I again need to find the weight measured by the spring balance:    My intuitive understanding of the problem is since the bodies are not accelarating, the problem is similar to the previous one and therefore the weight measured by the spring is the weight of one block. But is this correct? if so, what would be the direction of restoring force of the spring?  Also if instead, of the spring balance, I imagined a rigid block at the same position, then the net force on the block would be zero, but when I use the spring balance, the measured weight is different, why is this so?  Sorry if I sound very confused.  Edit:  I now know that the tension leftward = T,(in the first diagram) but still don't understand which direction the restoring force of the spring would be (in the second diagram), since force is being applied in both directions

Tension, for me, is a tricky thing.  After finishing a related chapter of my book and watching a video, I still can't get a hang of it.  Here is a situation:   My knowledge is that tension, just like normal force, happens in  just the same way, but with the difference of a string attached.  It is understandable that in the picture, the string attached to the hanging mass has a tension directed upward, because it's weight is directed downward. (Action and reaction)  But what intrigues me is that applying the same logic, the horizontal mass is being pulled to the right, it would have been understandable if the tension is directed to the left.   also Can I think of tension as the reaction force when you pull, and normal force when you push?  update If I was to think tension as a reaction force in the first picture for the horizontal mass, then can the frictional force be the action force? (Ehh, I don't think that makes sentence. Friction is always reaction)


Prove that $x^2+y^2=z^n$ has a solution $(x, y, z)$ in $\mathbb{N}$ for all $n\in\mathbb{N}$  I tried to prove this by induction, but couldn't. ( This was probably because the solution for some $n$ isn't necessarily related to the solution for $n+1$)  I can't seem to see any other way other than induction for proving the statement. Any help/hints on solving this problem, or any alternative approach will be highly appreciated :)

I was presented with the following problem:      Prove that there exist solutions to $x^2+y^2=z^n$ for all $n$, with $x,y,z, n \in \mathbb{N}$   I showed that by taking any Pythagorean triple $x^2+y^2=z^2$ and multiplying by $z^{2(n-1)}$ we get $(z^{n-1}x)^2+(z^{n-1}y)^2=(z^2)^n$, which allows me to generate solutions easily for any value of $n$. I managed to find several similar questions on this site, such as  concerning the specific case $n=3$. I notice that all of these questions take a similar approach and start with a Pythagorean triple and use it to generate general solutions.  Is there a way to prove the statement (or better yet provide solutions to the equation) without first relying on Pythagoras?


Here is what I want to do (a part of my trigger):  BEGIN DECLARE updatecount INT default 0; declare number int; declare column varchar(10); declare i int default 1; declare j int default 1; while i<=6 do     set column = "num"+i; /*will be num1 num2, so on*/     set number = NEW.@column; /* will represent NEW.num1, num2 so on*/   I know that the last 2 lines are not correct. But I wanted you guys to understand what I want to do. Can anyone tell me the correct syntax? thanks.  EDIT:   what I want to do with this trigger is when a new row added into the resultsTBL, I want to check all the rows in the guessesTBL to find how many of them are same.   For example we have 2 rows in guessesTBL (always in ascending order):  num1 num2 num3 num4 num5 num6  1    5    10   15   20   26  4    8    12   16   25   40   then we add a new row into the resultsTBL (always in ascending order):  num1 num2 num3 num4 num5 num6  1    8    17   20   25   40   after that trigger will compare the new added row with all the rows in the guessesTBL:  for the 1st row the result is: 2 for the 2nd row the result is: 3   pseudocode:  CREATE DEFINER = CURRENT_USER TRIGGER `myDB`.`resultsTBL_AFTER_INSERT` AFTER INSERT ON `resultsTBL` FOR EACH ROW for each field in resultsTBL (num1, num2, ... num6)   number= num1...num6   for each field in guessesTBL (num1, num2, ... num6)     if number == guessesTBL.num1,num2,...num6       counter++

I've already, searched and read, many answers about this issue for 3 days, but couldn't get a clear answer on how to do this.  this will be a little long, be patient please.  First of all, I am trying to make a simple lottery app. I hope everyone of you know about the 6/49 lottery thing.  Well, according to game, first, for a week customers play lottery (lotteryTBL). Then 6 numbers between 1-49 are selected as lucky numbers (resultsTBL).  What I want to do is updating lotteryTBL after a new result row is inserted into resultsTBL.  Structure of lotteryTBL:  ID    num1  num2  num3  num4  num5  num6     draw_date      howmanyknew  1       5    6     8    15      18    25     08-21-2015         0 2       7    15    18   30      40    45     08-21-2015         0   Structure of resultsTBL:  ID    num1  num2  num3  num4  num5  num6     draw_date   1      15    18    35    38    40    47     08-21-2015    Now, here is the pseudocode of what i want:  after insert a new row into resultsTBL    total <- 0    for each row in the lotteryTBL where lotteryTBL.draw_date = resultsTBL.draw_date        total <- calculate how many of them are the same with the resultsTBL's row.    update lotteryTBL set howmanyknew = total where "some condition"   First, I tried to do it with trigger, some said "it is dynamic sql, you cannot use trigger", some said "use stored procedure". And I did it too. But, they never worked.  Anyway, Can someone type a good pseudocode for this? which method do I have to use? what is the logic here?


I am from the Philippines and going to travel to Sweden next month. My flights are:   Cebu (CEB)-Singapore (SIN) with AirAsia Singapore (SIN)-London (LGW) with Norwegian Air UK London (LGW)-Göteborg (GOT) with Norwegian   Every flight is with a different airline, so I need to get my baggage and check them in again. My layover time is 3 hours and 10 minutes in Singapore and in London 3 hours and 40 minutes. I will stay only inside the airport.  I hold a residence permit, which is valid for two years and I have a complete confirmed plane ticket (all flights). But I am confused whether I need to get a transit visa, since I will check in every airport, even if it's a connecting flight, especially at Gatwick Airport in London.  Just in case, do I need to have a transit visa? Can I get it at the airport upon arrival?  Thank you.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


So, I'm new to Blender and I'm following a tutorial. I'm making a doughnut and everything looks fine until I decide to see how it looks when I render it. I set the render engine to Cycles and press F12. However, when it finished, I see that all the icing is gone. The rest of the doughnut is there, all the sprinkles are still there, but the icing is nowhere to be seen. I have no clue what's wrong, all objects are enabled to be viewed in render, this is all in one layer, and I can't seem to find anything else like this.  I'm using Blender version 2.81.16 installed on Steam, an AMD CPU and GPU, and Windows 10. If you need anything else, you can just ask me.  If you need to look at the .blend file, here's a Google Drive link to it, you can download it there:   I'll put several screenshots here:            I hope someone can fix this, I have no clue what's causing it. Thanks!

Sorry in advance if this is a duplicate, but I have read anything I can find with "Object missing in render".  I am doing the updated blender 2.8 doughnut tutorial.   My Icing for my Doughnut is missing in action.   My icing appears just fine in the viewport, including in render mode.    However if I do an actual render:   It does not seem to be disabled, these are the setting I have already checked and they all seem to make sence.


I am new to unix script. I am trying to create a script that acts as a unix command, such as "ls -l", "ls -la"    myscript -x     ----> do thing 1 myscript -xy    ----> do thing 1, do thing 2 myscript -yz    ----> do thing 2, do thing 3    so, "-x", "-xy" are $0 ? or we need to use different variables to get that?  Thanks

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


The following code gets all the values from the checked checkboxes and store them in an array:   function SaveIt(id) {  var arrayCheckedCDs = $('input:checkbox[name="checkCD[]"]:checked').map(function () {             return this.value; }).get(); }   Here's the html:   <form>

      Id	     Artist	     Album	     Select

     1	     Jeff Buckley	     Grace	         <input type="checkbox" value="1|Buckley|Grace" name="checkCD[]" id="checkCD1">

     2	     U2	     Zooropa	         <input type="checkbox" value="2|U2|Zooropa" name="checkCD[]" id="checkCD2">
      .      .

  <input type="submit" onclick="javascript:SaveIt(id); return false;"value="submit">  </form>   After storing the values in arrayCheckedCDs I need to hide the selected rows and uncheck the selected checks.  The hiding is easy:   $('#cdsTable #cd'+id+'').hide();   But I don't have a clue on how to uncheck the selected checkboxes because the following is not working:   $('checkCD'+id+'').attr('checked', false);   Thanks for your help!

I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist?


just bought my first macbook. There's a problem with few characters as they're being underlined and it has strange behavior:  If i type single quote, it gets underlined and if I press other letter, it integrates together, for ex. I want to type There's so I type There' and press s but it becomes Thereś. If I press SPACEs it becomes There's  Underlining looks like this     Thanks  EDIT: as it was marked as duplicate I found out that changin layout to U.S. may help. But I want to use my native layout not U.S. one - any solution?

My problem is whenever I type quotes on Snow Leopard 10.6.4, it waits for the next character typed, and turns it into another character instead of just typing quotes.  example:   [shift] + " a results in ä  [shift] + " u results in ü  I don't want this functionality, I just want to type quotes normally, I don't need these characters.


So this is my first time with the hats. It's fun.  Maybe it would be possible to be able to change the hat size so that you can "fit" it to your profile picture?  I realize that this is likely not possible in the short time left of this promotion, but maybe next year.    I also know that there is , but I want to specifically focus on resizing.

I just got a new hat! :D screaming with joy Looking at so many users looking all exquisite with their stunningly 'fitted' hats, I'm wondering if there's an option to resize or rotate a hat?  PS: Happy Winter Bash everyone! :)


I have the following codes:   thesis.tex  \usepackage[square, numbers, comma, sort&compress]{natbib}   \bibliographystyle{plainnat}   \bibliography{Bibliography/sample.bib}   Bibliography/sample.bib  @article{Reference1,     Author = {Alexander Schuller and Benjamin Dietz and Christoph M. Flath and Christof Weinhardt},     Journal = {IEEE Transactions on Power Systems},     Month = {September},     Number = {29},     Numpages = {9},     Pages = {2014-2022},     Title = {Charging Strategies for Battery Electric Vehicles: Economic Benchmark and V2G Potential},     Volume = {5},     Year = {2014}}   Still, TeXmaker (Mac OS) displays the standard reference list:   I tried with changing the bib file name, changing the default bibliography.bib file, and tried with creating new folders/links, but nothing worked out. There is also no other file on my drive, that contains these default references (checked by file search).   How can that be?  I would be grateful for any suggestions!  Thank you very much in advance.  Best Michael

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}