I know that we can call a C# method from a Java program.   I want to know if it will affect the performance of the Java program. Also, do you recommend using it or not?

Does anyone have a good solution for integrating some C# code into a java application?   The code is small, so I could re-write in java, but I would rather reuse the code if possible. Don't repeat yourself, etc.   Also, I know I can expose the C# as a web service or whatever, but it has some security/encryption stuff in there, so I would rather keep it tightly integrated if possible.    Edit: It's going to be on a server-based app, so "downloading" another runtime is irrelevant.


It's so easy to do in a chat room. I just do this: .   I want to capture that same benign, eye rolling, gently mocking disdain - but I have to stick to small words.  An example of an actual circumstance (true story) after which I might want to use such a phrase or word is when he ever-so-patiently explained to me that "rocket surgery" was an incorrect use of idiom.  Perhaps a quote?  I realize that this question is at least borderline for the site. If you feel I've crossed that line please edit if you feel that the question is salvageable.    EDIT: He's 56. Perhaps an instantly recognizable (to an American of his age) quote from pop-culture? Kind of like the way I might say, "Laugh it up, Fuzzball" to someone my age (46) who is very much enjoying the fact he's winning a card game?

I occasionally use "retarded" when chastising myself or other friends. I know it's not Politically Correct, but am I only allowed to say stupid? How long before we can't say that anymore?   Other words like "ignorant" don't work well because well, I don't like that word because it's misunderstood (even though it works well for how I say retarded . . for me it's like if you don't know something you should know).


Can someone PLEASE help me with this. Thank you The solutions of the equation $z^{100}=1$ are $1, w_1, w_2, w_3, \ldots, w_{99}$. Prove $1\times w_1\times w_2\times ...\times w_{99} = -1$.

I need to show that the product of all the $n$th roots of unity is $(−1)^{n+1}$.   Is there a way to do this by induction? If there is, I can't seem to figure it out. Are there other, perhaps more efficient, methods of proof?


Why did Dumbledore drink the potion? How did that help to find the horcrux?

When Albus Dumbledore  finally reaches the island with Harry Potter and finds out that you can't get near the potion, he made a cup and drank it. Why couldn't he just have poured the potion on the "floor"? Why couldn't he have made a big cup to hold almost everything inside the basin?


Recently we had a baby and planning to buy a home. Is now a good time to buy a home? In my area houses are around 650K. I have the following questions.   Is it good time to buy a home? Interest rate mortgage companies are charging @ 5-5.25%. Is it high? Is it really worth it or stay in a rented home? Mortgage company asking us to put 72K down payment but we have only 20K. What should I do now?

I am currently renting, but am considering buying a house in the future (1-3 years). I want to know if I should even consider waiting for a future recession to buy a home at a better price. Some would argue that we are due for a recession (seems common enough to not need a reference), though none of us can know this is imminent with certainty.   I would not mind waiting to buy if it means my money would go further. However, if I wait and the market does not come down, I risk the inverse as the cost of homes in my area is rising faster than inflation.  All other considerations aside, should I wait for a recession to buy a home and what other risks does this carry?


I am trying to evaluate the following integral using the residue theorem:  $$\int_0^{2\pi} e^{ \cos(\theta)} \cos(n\theta) d\theta$$  I have already evaluated $\int_0^{2\pi} e^{e^{-i\theta}} e^{i n\theta} d\theta$ using the residue theorem by making the substitution $z = e^{i\theta}$ and then finding the coefficient of the $z^{-1}$ term in the Laurent series expansion. Now, however, this no longer works, so any help would be appreciated.  Thank you.

The following integral should be doable using the residue theorum:     $$\frac1{2\pi}\int_{0}^{2\pi}e^{\cos\theta}\cos(n\theta) \,d\theta$$


I am preparing a bilingual document and using the  to distinguish between the two languages.  When I use the special character ß in a comment environment then I get an error message (Undefined control sequence.) although I use \usepackage[latin1]{inputenc} correctly.  Outside of the comment environment the character works fine.  The document class seems not to matter - I have the problem with scrbook and book.  \documentclass[]{scrbook}  \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc}  \usepackage[     english,     ngerman]         {babel}  \usepackage{comment}  \includecomment{Version-DE} \excludecomment{Version-EN}  \begin{document} ß % <-- no problem here  \begin{Version-DE} Version-DE ß % <-- big problem here! \end{Version-DE}  \begin{Version-EN} Version-EN \end{Version-EN}  \end{document}   I am not sure what tags to use here...  For Future Reference  I have found some other packages that maybe could be an alternative:    (recommended by the author of the tagging package Brent Longborough, see )  --> seems to be pretty robust and flexible so far     (extra "s")       Here's all the packages of this kind (conditional typesetting) on CTAN:

I noted that if I use comment.sty and a there is a block of text containing UTF8 characters inside a comment environment, the compilation aborts!  Minimal Example  \documentclass{article} \usepackage[T1]{fontenc} \RequirePackage[utf8]{inputenc}%this file is stored as UTF8 file! \RequirePackage{comment} \specialcomment{privateSolution}     {\begingroup\itshape\noindent\textbf{Solution}\\}     {\endgroup} %\excludecomment{privateSolution}%Use it to remove solutions!  \begin{document} \title{Comment.sty and UTF8 test file} \maketitle \section{UTF8 character test} In which alphabet characters àìùòè are common? \begin{privateSolution}     The Italian alphabet contains àìùòè. \end{privateSolution}  \begin{comment}     The Italian one! It contains àìùòè. \end{comment} \end{document}   Has anyone the same problem? Any workaround?  Thanks in advance.


I'm looking for aerial LiDAR or terrestrial laser scanner data in laz or las format preferably from an FTP site.   Does anyone know which countries have that data available to the public?   From my research it doesn't seem to be easy to come by.

Is there any freely available pointcloud data?   I'm especially interested in dense clouds of small areas(5m to 100m radius) but anything else would be fine too.   I've found that these pages have very nice and easy to access point cloud data.


So I was walking on some subset of a spherical metric, when I came across an idea that I haven't yet been able to disprove or shake. It goes as follows:  Let the rational numbers be countable an lie dense in the real numbers. Then the irrational numbers must also lay dense in the reals.  Proof: Suppose $x,y$ real numbers and $x\neq y$, assume without loss of generality that $x<y$. Then there exists a rational number $q$ such that $x+\pi<q<y+\pi$, so $x<q-\pi<y$, which is irrational. $\blacksquare$   Take any arbitrary 2 elements $x,y$ from the irrational numbers. Then because the denseness of the rationals, there lies a rational $c$ inbetween. Take any arbitrary 2 elements $p,q$ from the rational numbers. Then because of the denseness of the irrationals, there lies a rational $c$ inbetween.   On a first glance, this would suggest that the cardinality of the irrationals is equal to the cardinality of the rationals. This is obviously not true. The question is, why not? For this I have been unable to find a rigorous argument that does not use the fact that the reals are uncountable.  PS: I'm aware of:  . This question does however not have any satisfactory answers because they are all either built on intuition (This question specifically looks at rigorous ways to prove this.) or use the uncountability of the reals (I already know this proof. I'm looking for an alternative.)

I've been told that the rational numbers from zero to one form a countable infinity, while the irrational ones form an uncountable infinity, which is in some sense "larger". But how could that be? There is always a rational between two irrationals, and always an irrational between two rationals, so it seems like it should be split pretty evenly.


What is the fastest way to count all set bits? The number from which I am counting bits is from 1<=n<2^63, only positive values. For now I use bitset from the library and it is pretty fast, but if there is any faster option I would like to know.  In the worst case scenario I have over 1 billion iterations, so I am looking a way to speed it up.  This is the part of my loop where I am counting the setted bits: if (std::bitset<64>(currentNumber).count() == numofOnes) ++counter;

8 bits representing the number 7 look like this:  00000111   Three bits are set.     What are algorithms to determine the number of set bits in a 32-bit integer?


As my further preparation to Putnam competition, I came across such inequality to prove:  $$\forall n \in \mathbb{N}: \int_{0}^{\pi} \left|\frac{\sin(nx)}{x}\right|dx \geq \frac{2}{\pi}\sum_{k=1}^{n}\frac{1}{k}$$  The problem is that I got stuck in spite of spending by far 6 days on this problem!  Because I got really stuck, I am very determined to see how to prove such inequality. Help very, very appreciated!

Show that,$$\int_0^\pi \bigg|\dfrac{\sin nx}{x}\bigg|\mathrm{d}x \ge \dfrac{2}{\pi}\bigg(1+\dfrac12+\cdots+\dfrac{1}{n}\bigg)$$    I could not approach the problem at all. Please help.


Can some one please help me write an ls command to list files starting with abc (abc*.txt) and exclude the ones containing _DEL_ in the name (abc*_DEL*.txt)  I am trying something like this:  ls abc*.txt --ignore "abc*_DEL_*.xt"

There are plenty of situations where the use of a * is virtually inevitable - e.g. rm -rf * in a folder that holds thousands of subfolders and files.  But what if you want to exclude just one or two files or folders from the rm command? I've googled my way around and only found quite complicated solutions like find . -depth -not \( -name 'one' -o -name 'two' \ -o -name 'three' \) -exec rm {} \; as stated .  Is there a possibility to do this in an easier way - without that detour to find? E.g. rm -rf --exclude='one' --exclude='two' --exclude='three' * like in rsync or just rm -rf -e 'one','two','three' *?  Maybe even a general possibility to exclude things from * (so other commands like cp, mv, ... don't have to implement their own)? Something like *{'one','two','three'} or so?


Good afternoon, we are in process of renovating a small apartment that has been gut renovated  in 2000. We want to move a door position 40" to the right and install a pocket door instead. The metal studs we need to remove are not layed directly on the floor but have some kind of wood support at the bottom. we do not know if the wall is load bearing or not.  Attached are the pictures.  thank you [![door to be moved][1]][1] [![JOIST FRAMINGJOIST FRAMING SECOND FLOOR][![LEGEND][2]][2]2]

Other than looking up blue prints, which many homeowners may not have, are there ways to determine if a wall is load bearing?  Methods I can think of might include:   Going up in the attic to check if ceiling trusses run perpendicular to the wall If the wall is an exterior wall   Any others?


Why do a candle's flame always point upwards opposite to gravitational force? Why does not it point sideways or upwards?

I was watching  today, and noticed this: in some moment the space station changed orbit and the people inside experienced zero-gravity. At that moment, a candlestick passed floating in the air, with the candles burning ().   But in our environment the flames go upward because the hot air is less dense, and that effect should disappear when no gravity is present, am I right? How would a candle flame look then?


I need an echo server on my Linux/Debian for debugging purposes , I realized that there is an assigned port shown in '/etc/services' to do that already and it's port 7 TCP/UDP.  Is it possible to open this port on Linux (Debian)? if not, what are alternatives?

in order to enable the echo service we need to add the echo lines as the following example :  more /etc/inetd.conf   echo   stream  tcp     nowait  root    internal echo   dgram   udp     wait    root    internal   the question is about security issues that can be regarding that echo service is enables  is there any security problem on my linux machine when we open the echo service?  If yes please explain what security problems can appears when the echo service is open?


I see this post and I am stunned. I think this is fallacious but I can't figure where is the fallacy?  If you know the fallacy. Please post a answer.

What is wrong with this proof?    Is $\pi=4?$


In my physics textbook there is a chapter on waves. Now there is a topic on interference. I don't understand why I get additional energy there. Suppose two waves presented as $Y_1=3\sin(\omega t)$ and $Y_2=3\sin(\omega t)$ now if I add their energy I get total $\text{intensity}=\frac{k}{2}\cdot 3^2+\frac{k}{2}\cdot 3^2$. but again these waves are superimposed if F see this from another viewpoint then I get total $\text{amplitude}=6$. So $\text{energy}=\frac{k}{2}\cdot 6^2$ where $k$ is constant. So where does the energy go? and I tried Googling it, there t found that it's simply rearrangement of energy. But I think that doesn't explain this. And terribly sorry for my bad english

What happens to the energy when waves perfectly cancel each other (destructive interference)? It appears that the energy "disappear" but the law of conservation of energy states that it can't be destructed. My guess is that the kinetic energy is transformed into potential energy. Or maybe it depends on the context of the waves where do the energy goes? Can someone elaborate on that or correct me if I'm wrong?


I forgot my password on a Windows 10 machine. So I tried the offline nt password registry editor to clear it. But whenever I start the cd, it cannot find the partion:    Does someone know how to fix this?

I accidentally disabled my admin account.  After I login to another account I found I can not get admin rights, because all admin accounts on my computer are disabled.  I clicked on 'run as administrator' but only see a smart card choice (all the admin accounts are disabled so no choice provided)    I don't want to re-install my OS, help!    Details:  I have account A on my computer.    I got a new computer so I want to give the old one to my mother.    Creating a new user account B for her and disable account A.    Logout and restart.    Successfully login B, now I found I could not get admin rights because no account choice is provided.    More informations about my machine:  OS is Windows 10 and my admin account is a Microsoft Account.  I have an arch-linux installed on my computer and dual-boot it using GRUB, so maybe I can not use safe mode.


I saw it's been answered before but I could not understand the answers as it delved into material that I did not study yet.  My question is as follows:  Suppose $p \in F[x]$ is the minimal polynomial of some matrix $A \in M_n(F)$ and $F \subseteq K$  I need to show that $p$ is also the minimal polynomial of $A$ over the field $K$. In other words: Show that the minimal polynomial remains the same when we move to a bigger field.  What I thought of:  Obviously $p$ is irreducible in $F$, suppose it is reducible in $K$, which means there are $q,t \in K, q,t \notin F$ such that $p=qt$, now we just need to show that $q(A) \neq 0$ and $t(A) \neq 0$...But why is that so?  Edit: Another way of presenting this question is "Show that if $p$ is the minimal polynomial of $A$ over the field $K$ while the entries of$~A$ are contained in a subfield $F \subseteq K$, then all the coefficients of $p$ are elements of $F$".

I think I have heard that the following is true before, but I don't know how to prove it:     Let $A$ be a matrix with real entries. Then the minimal polynomial of $A$ over $\mathbb{C}$ is the same as the minimal polynomial of $A$ over $\mathbb{R}$.   Is this true? Would anyone be willing to provide a proof?    Attempt at a proof:  Let $M(t)$ be the minimal polynomial over the reals, and $P(t)$ over the complex numbers. We can look at $M$ as a polynomial over $\Bbb C$, in which case it will fulfil $M(A)=0$, and therefore $P(t)$ divides it. In addition, we can look at $P(t)$ as the sum of two polynomials: $R(t)+iK(t)$. Plugging $A$ we get that $R(A)+iK(A)=P(A)=0$, but this forces both $R(A)=0$ and $K(A)=0$. Looking at both $K$ and $R$ as real polynomials, we get that $M(t)$ divides them both, and therefore divides $R+iK=P$.   Now $M$ and $P$ are monic polynomials, and they divide each other, therefore $M=P$.  Does this look to be correct?    More generally, one might prove the following     Let $A$ be any square matrix with entries in a field$~K$, and let $F$ be an extension field of$~K$. Then the minimal polynomial of$~A$ over$~F$ is the same as the minimal polynomial of $A$ over$~K$.


$$\int_0^{\sqrt{5}} \sqrt{4x^4 + 16 x^2} dx$$  The square root really got me confused here. I've tried using the standard trick with $x = x + \sqrt{x^2+4}$ but failed. That might still be the best approach.  What's the best way to solve this and how to do it?

$\displaystyle \int\nolimits_0^8 \sqrt{x^4+4x^2}\,dx$.   Alright, so I thought I had this figured out. Here's what I did:   I factor out an $x^2$ to get $\sqrt{x^2(x^2+4)}$. I let $x = 2\tan(\theta)$, therefore the integrand is $\sqrt{4\tan^2(\theta)  (4\tan^2(\theta) + 4)}$. Factor out a 4 and it becomes $\sqrt{(16\tan^2(\theta)  (\tan^2(\theta) + 1))}$ Which equals $\sqrt{16\tan^2(\theta) \sec^2(\theta)}$ This is easy to take the sqrt of. The integrand becomes $4\tan(\theta)\sec(\theta)$. Now, the integral of this is $4\sec(\theta)$ And it's evaluated from $0$ to $\arctan(4)$ right? Because as $x$ goes to $0$, so does $\theta$, and as $x$ goes to $8$, $\theta$ goes to $\arctan(4)$... But the end result $(4 (\sec(\arctan(4)) - 1) )$ isn't the correct answer   I put it into WolframAlpha and I get $(8/3) (17\sqrt{17} - 1)$, which is the right answer. How did they get that? (there's no "show steps" option)  Any help is greatly appreciated!  PS, what's the syntax for doing sqrts and exponentials?


I first experienced this today, when I flagged a question for the first time on the StackApps Q&A. When I had flagged the question, I went back to my profile where I couldn't find a link to my flag summary.   There is no "helpful flags" link  Then I went to my StackOverflow profile, on which the "helpful flags" link was already present. I copied the link http://stackoverflow.com/users/flag-summary/1419007 and changed the site and userId (http://stackapps.com/users/flag-summary/12680. At this page, I was able to see that my flag had not been processed yet.  However, the "helpful flags" link did not appear on my profile until the flag got approved (about 6 hours later). I think it's unnecessarily confusing that you can't see* which posts you've flagged until at least one of your flags gets approved.    I'm not sure if this is by design (although it appears to be ), but in my opinion users should be able to figure out where their flags went, especially if they are new to a site (meaning they didn't flag anything before).  TL;DR: The "helpful flags" link doesn't appear until at least one of your flags gets approved. IMO, this should be changed so the link will be displayed if you've got any pending flags as well.  * Okay, technically you can see it. But new users don't even know where to find it, and even more experienced users will have to dig to get there.

The Problem  Currently if I flag a post, I cannot check the status of the flag unless I have prior helpful flags. This means, for example, that a new user who wants to check the status of his first flag cannot do so while it is pending (active).  This feature request is based on my experience on MSO, where I wanted to check the status of my flag but could not get to the summary page without cheating (tweaking my SO link to work with MSO). It also stems from this question, where the OP indicates he had the same issue:   My Proposal  If I have flagged any post, then show me a "flags" link (red arrow in image below). If I have any helpful flags, then the number of helpful flags should be displayed (blue arrow). If I have not flagged anything, then neither should be displayed (as with current site functionality).


If we have two positive compact , self adjoint operators; $A$, $B$. Is the product $AB$ a positive operator?

I want to show that for $S,T\in B(H)$ bounded operators on Hilbertspace with $S\geq 0,T\geq 0$ and $ST=TS$,  we have $S+T\geq 0$, and $ST\geq 0$.  $T\geq 0$ means $(Tx,x)\geq 0$.    To me it seems that $((S+T)x,x) = (Sx,x)+(Tx,x)\geq 0$. But for $ST$ i like some help.   There is a theorem in Rudin (12.32) that says that for every $T\in B(H)$ we have an equivalence:   $T$ is positive $\Leftrightarrow$ $T$ is self adjoint, i.e. $T=T^*$ and $\sigma(T)\subset [0,\infty)$.   Since $S, T$ are self adjoint we know that $ST=TS = S^*T^* = T^*S^*$ ($ST$ is selfadjoint since $S,T$ commute). Also I read somewhere that if $S,T $ commute then $\sigma(ST)\subset \sigma(S)\sigma(T)$, but I am not sure if this is true. Clearly I cant prove it, but if it were true by this ''Theorem'' it would follow that $ST \geq 0$.   Is there a more straightforward way?


Im appending an input to my html markup but my event listener not working on this input here is my code:    $('button').click(function(){   $('body').append('<input>') }) $('input').on('keydown',function(e){   if(e.keyCode==13){      alert('ok')     } }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button>Click me</button>

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


I am trying to build a calendar using this  which uses backbone and the jquery FullCalendar plugin. I want to attach a click event handler to a cell(weekday view) of the calendar-this is the code I tried for testing:  $(document).ready(function() {   $('.fc-event-time').click(function() {   alert('test'); });  });   The above does not work.fc-event-time is the class associated with the cell that contains the time.Here is an image of the cell with some notes in it.   The whole calendar is created with JS.The only HTML required is a div named calendar.Can that be the reason why the event handler cannot be attached. Look at some code to see what I am talking about:

   fullcalendar.js is the file the created the calendar inside div#calendar.Application.js is the backbone code(REST,render functions,models etc) which adds some functionality to the calendar and custom_cal_code.js is my code you see above-which tries to attach the event handler.Jquery dependencies are not shown above for the sake of brevity.


I'm working on an Earth model and when I apply its textures I get them repeating instead of being applied only once. Im still new to Blender, I would appreciate some help

I'm trying to unwrap a UV Sphere and I can't seem to get a perfect  projection. What process should I follow to get a perfect UV unwrap that looks like the black grid lines in this image?:


I have notepad opened and added as a game, while having its name changed to "with your feelings.." so my message is "Playing with your feelings..".  Whenever I play another game, it will instantly change my custom message and it will say "Playing Counter-Strike: Global Offensive" instead. I want to make it so my custom message, "Playing with your feelings..", is shown no matter what other game is on. I don't want my custom message to get changed to "Playing Counter-Strike:Global Offensive" nor any other message. Is there any way of doing this?

I've been looking for the solution to this for a while and even tried my own. I'm trying to change Discord to always show my custom message, but when I play games like Rocket league and LoL the game's name goes over my message.   Those are verified games so I can't change the name for those, I also can't change the file now for league because then the client won't work and idk what other files to change if I do change that. If you could help I would appreciate it but seems like there's no solution.


I thought I would share with the community my somewhat unique spin on targeting elements that contain keywords of text, yet ignoring capital letters, then finishing off with a little CSS to the element. I don't every proclaim my code I use is ever perfect, but please if you see improving, feel free, enjoy.

Is there a case insensitive version of the  jQuery selector or should I do the work manually by looping over all elements and comparing their .text() to my string?


Let's consider values $z_1, \dots, z_m$ and the minimizer of the function: $$ \min_q (1-\tau) \sum_{z_i<q} (q-z_i) + \tau \sum_{z_i \geq q}(z_i -q)$$  Why does minimizing this function gives the $\tau \%$ quantile?  If I plug $\tau=0$ or $\tau=1$, the formula makes sense.  But for $\tau \in (0,1)$, how can we prove that the formula gives indeed the $\tau\%$ quantile?

I am trying to understand the quantile regression, but one thing that makes me suffer is the choice of the loss function.    $\rho_\tau(u) = u(\tau-1_{\{u<0\}})$  I know that the minimum of the expectation of $\rho_\tau(y-u)$ is equal to the $\tau\%$-quantile, but what is the intuitive reason to start off with this function? I don't see the relation between minimizing this function and the quantile. Can somebody explain it to me?


I'm beginning with the regression analysis and I'm quite confused with the generalized linear regression.  I understand, that the ordinary linear models can be described with a formula  $$ y_i = \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_n x_n + \epsilon_i $$  and when using generalized linear regression I'd expect it to be something like this  $$ g\left(y_i\right) = \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_n x_n + \epsilon_i, $$ $g$  being the link function.  But, instead I came across this formula  $$ g\left(E[\mathbf{y}]\right) = \mathbf{x'}\mathbf{\beta} $$  and I don't get, what's the expected value in the left doing there.  Could you, please, explain it a little?

I have scoured around, reading posts on Cross Validated () and also looking at references including Dobson and McCullagh and Nelder, e.g.  so I am aware that this topic is well trodden. Nevertheless, I am trying to articulate and formalize my understanding of GLM and while several posts have helped me with that, I am conscious of gaps and the possibility of an unsound foundation of my understanding.   In simple linear regression we have some set of observations $(x_i, y_i)$ pairs and treat $y_i$ as a realization of a random variable, $Y_i$, distributed as $Y_i \sim N(\mu_i, \sigma^2)$. The means ($\mu_i$) depend on the predictor but the variance is constant. We model $\mu_i = \beta_0 + (\beta_1 \times x_i)$ (or matrix equivalent ) which I believe is the same as saying $Y_i = \mu_i + \epsilon_i$ with $\epsilon_i \sim N(0,\sigma^2)$. I am not sure but I think a correct way to state $\mu$ is $\mu_i = E[Y_i|X=x]$. Can someone confirm that?  Anyway, we might transform the response to achieve linearity (maybe taking logs) and in that case we are modelling $log(Y_i) = \alpha_0 + (\alpha_1 \times x_i) + \epsilon_i$ where $\epsilon_i$ now is assumed to have a log normal distribution.   We generalize by decomposing the model into:   A structural component ($\beta_0 + (\beta_1 \times x_i)$) A link g(.) A response distribution (or random component) (member of the exponential family - Guassian, bin,gamma etc)   Let's say that the observations are assumed to come from a distribution in the exponential family and to keep things simple assume that it is the Gaussian distribution. Again, the expected value comes out as $E[Y_i|X=x] = \mu_i$, but does so from the first derivative of the b(theta) term in the exponential family form () (pg 29). In the case where we assume a binomial distribution, the expected value comes out at np but it still comes from the first derivative of the b(theta) term when the distribution is expressed in the exponential family form. Note, I don't fully appreciate or understand the derivation of the mean or variance at this stage, perhaps someone could provide a layman's explanation?  Instead of modelling the mean as was done for simple linear regression, we now model a transformation of the mean so instead of saying $\mu_i = \beta_0 + (\beta_1 \times x_i)$ we are saying $g(\mu_i) = \eta_i = \beta_0 + (\beta_1 \times x_i)$ where g is some link function (invertible and differentiable). I think this is a key (yet still somewhat confusing to me) distinction between SLR and GLM. In SLR we transform the response ($y_i$) and model that, in GLM we transform the expected value ($\mu_i$ in the case of the Gaussian example) and model that. Another way of saying it is that in the SLR case we model $E[g(Y_i|X=x)] = \beta_0 + (\beta_1 \times x_i)$ but in the GLM world we are modelling $\eta_i = g[E(Y_i|X=x)] = \beta_0 + (\beta_1 \times x_i)$.   My question is around verifying my understanding and statement of the essence of the foundations of GLM and the differences between GLM and the traditional linear model. Thanks.


I see many examples that attach custom properties to objects eg.  bpy.types.Object.mytype = bpy.props.StringProperty()   What are the other useful places to put custom properties. In particular I want to store a global to the blend file itself?   len(dir(bpy.types)) # -> 3282!   I see there is a type BlendData

I need to store additional information in a .blend file, that occurs only once per file. So, attaching it to, for example, bpy.types.Scene doesn't help.  Since bpy.data is an instance of bpy.types.BlendData, I tried attaching properties to bpy.types.BlendData. This failed:  >>> bpy.types.BlendData.testProp = bpy.props.StringProperty() >>> bpy.data.testProp (<built-in function StringProperty>, {})   Here, bpy.data.testProp is not a string, but some tuple, So it looks like registering properties on bpy.types.BlendData is not supported, like it is for bpy.types.Object:  >>> bpy.types.Object.testProp = bpy.props.StringProperty() >>> bpy.data.objects['Camera'].testProp ''   Is it somehow possible to attach properties to bpy.types.BlendData?  Are there other ways to register global data in a .blend file?


First I've checked it by putting $n=3$.  Then, I've assumed it to be true for $n=k$ to get $k!>k^{\frac k2}$.  Then, putting $n=k+1$, I get $(k+1)!=k!(k+1)>k^{\frac k2}(k+1)$. Now, I'm stuck and couldn't proceed further.

Show that if $n>2$, then $(n!)^2>n^n$.     My work: I tried to apply induction. So, at the induction step, I need to prove, $n^n>(n+1)^{n-1}$ Here, I tried to use induction again without any luck. I also took log of both sides, but I did not get anything. Please help!


I manage an application that has multiple users entering data through a web front-end into an MSSQL database. Each individual 'record' can have around 100 database columns across multiple tables (sometime multiple rows in the same table). It is relatively trivial to write SQL queries that will output 1 row per 'record' with all the columns we require for reporting purposes, for example:  Assessor  Date    Length  Colour  Weight Steve     2/4/17  23.4    NULL    45 John      4/4/17  NULL    Blue    NULL Brenda    4/4/17  NULL    NULL    NULL   I want to produce a simple output that lists everything where data was not recorded i.e fields that remain NULL. For example:  Assessor  Date    Field Steve     2/4/17  Colour John      4/4/17  Length John      4/4/17  Weight Brenda    4/4/17  Length Brenda    4/4/17  Length Brenda    4/4/17  Colour Brenda    4/4/17  Weight   Currently I've tried something along these lines:   select    assessor   ,date   ,Field    =  'Length'  from  dbo.table1  where [Length] is NULL UNION ALL  select    assessor   ,date   ,Field    =  'Colour'  from  dbo.table1  where [Colour] is NULL UNION ALL ...   Is there any way to produce my required output without building such a long list of unions? I've looked into UNPIVOT however this appears to exclude NULLs.

Consider the following table:  id  title   genre1  genre2  genre3  genre4  genre5 1   Movie1  Thriller    Crime   NULL    NULL    NULL 2   Movie2  Fantasy NULL    NULL    NULL    NULL 3   Movie3  Political   Philosophical   Historical  NULL    NULL 4   Movie4  Science Fiction NULL    NULL    NULL    NULL   When I unpivot genre1, genre2, ... the NULL values are removed, so that, for example, the rows for Movie1 would be:  id title  genre     original_column 1  Movie1 Thriller  genre1 1  Movie1 Crime     genre2   Is there a way to include NULL values, for example:  id title  genre     original_column 1  Movie1 Thriller  genre1 1  Movie1 Crime     genre2 1  Movie1 NULL      genre3 1  Movie1 NULL      genre4 1  Movie1 NULL      genre5   I can SELECT ISNULL(genre1, '*'), ISNULL(genre2, '*') ..., but suppose I want the values to appear as NULL? Is there a better way than:  WITH  -- SELECT that unpivots table AS unpivoted SELECT unpivoted.id,    unpivoted.title,    ,CASE unpivoted.genre WHEN '*' THEN NULL ELSE unpivoted.genre END    ,unpivoted.original_transaction FROM unpivoted   Also, I notice that the query that returns the source data to be unpivoted MUST have an alias. For example:  SELECT ... FROM   -- *must* give it an alias or it's a syntax error   (SELECT ... FROM) AS source    UNPIVOT(genre for original_column IN (genre1,genre2, genre3,genre4,genre5))   Does anyone know why? I have not found a way to refer to the alias anywhere in the query.


How can I safely upgrade an Ubuntu installation from one release to another? What should I do before upgrading to ensure it goes smoothly, and is there any clean-up I need to do afterwards?  In particular, do I need to do anything special if I am using packages from PPAs, if I have a graphics card that needs drivers, or if I'm running a custom Linux kernel?  This is a general question , but as example we take Ubuntu 12.04 and Ubuntu 12.10

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


I'm using MCP4725 () module, VCC is connected to a 4096V reference voltage. there's a steady 23mV offset:  0 - 23mV 50 - 73mV 100 - 123mV ...   How can I zero this offset error?  From the datasheet:

This DAC has an output range of 1-3 volts. Here's the datasheet:    I'm getting pulses with different amplitudes, frequencies, duty cycles and widths varying from 0.2 ms to 2 s from the DAC. I want an output range of 0-4 volts instead (Vcc=5v). I tried a high-pass RC filter, and then amplified it with an op-amp, but the output doesn't look like a pulse anymore. Also, I tried the circuit suggested in the datasheet (page 8) with no luck. I'm not sure what values I should assign to this circuit, since I don't understand how it functions. How should I go about this?


I want to recreate the following:    What I have is this:  \begin{equation} \label{eq1} \begin{split} \nabla f(x_i) = \nabla f(x_i, y_j, z_k) & \approx ( \dfrac{1}{2} \left( f(x_{i+1}, y_j, z_k) - f(x_{i-1}, y_j, z_k) \right), \\  & \phantom{abc} \dfrac{1}{2} \left( f(x_{i}, y_{j+1}, z_k) - f(x_{i}, y_{j-1}, z_k) \right), \\   & \phantom{abc} \dfrac{1}{2} \left( f(x_{i}, y_j, z_{k+1}) - f(x_{i}, y_j, z_{k-1}) \right) ) \end{split} \end{equation}   Which produces this:    When I try to change the size of the first and last bracket with \left and \right I get an error. How else could I adjust the sizes of the first and last bracket?

I have a multi-line equation that I want to have matching sized parentheses. The advice I read online was to use \left( equation \right. \\ left. rest-of-equation \right) . However, this syntax leaves first half of the equation unaware of what is in the second half. For example, if you include a square root term after the break, the second parenthesis will be larger than the opening parenthesis. When you are using the aligned environment to split a long equation this can look somewhat offputting.    Compare the top equation to the bottom one. The parentheses match in size for the bottom equation, but the left hand parentheses for the top one is  noticeably smaller.  Top Code:   \begin{aligned}[t]   \gamma_{\text{u}} + \frac{1}{108}   \left(57\gamma_{\text{er}} \right. &+  38\gamma_{\text{se}}\\ & {}\pm  \left.\sqrt{2601 \gamma_{\text{er}}^2 + 3648  \gamma_{\text{er}}\gamma_{\text{se}} + 1444 \gamma_{\text{se}}^2}  \right)   \end{aligned}   Bottom Code:  \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{16} \left(9\gamma_{\text{er}}  +  6\gamma_{\text{se}} \pm  \sqrt{49 \gamma_{\text{er}}^2 + 76 \gamma_{\text{er}}\gamma_{\text{se}} + 36 \gamma_{\text{se}}^2} \right) \end{aligned}


Hi I started in creating an html page with Chinese characters.  I used W3 schools try it page as a reference to what i am doing, I simply put the code in their try it window and see my output.  The thing is that i used this code         <!DOCTYPE html>
嗨 hhh

（卷上）
         But no matter what i give in font family, the chinese characters are not showing in the output page  Somebody please help only 'hhh' is coming, chinese characters are showing as '?'..   Edit to add is that the code is working fine in firefox browser, but not working in chrome, why? because the code has to be independent of browser right?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


For work I need to use the IBM Lotus Notes e-mail client. I have installed it without much problem, but I'm having troubles in launching it when I start the pc. The problem is that I can't find how I can launch the client from the terminal, so I can't put it in the startup list.  As of right now, I start the client by searching in my Unity for 'Notes' and this brings up the client and I just press enter to start running it. Is there a way I can figure out which command Unity uses to start the client so I can add it to the startup list?

I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that?


I am using ArcMap 10.5.  I'm have dynamic text box I'm trying to add to the buttom of my legend. The text is about 350 characters so need to resize the text box to fit into my legend. But, the "Preserve Aspect Ratio checkbox is grayed-out.  Tried to look in ESRI help with no luck and even found a thread on a forum with the same question, but the answer did not help.  How do I make my text box size editable?

How can I word-wrap a text element on an ArcMap layout, when it contains a lot of text?   go into Layout mode choose > Insert > Text paste in a long text block eg    The text block now stretches across the screen, and there's no apparent way to change the width of the text block. Is there a way to set the text block to the desired width, and have ArcMap automatically enter line breaks?  (The way that, um, every other piece of software which handles text does...)  The workaround is to enter line breaks manually, which is great until you decide to change the width, font size, etc.


I use the following code for referring to an equation and table.  \let\originaleqref=\eqref \renewcommand{\eqref}{Equation~\originaleqref} \newcommand{\tref}[1]{Table (\ref{#1})}   When I refer to an equation, there is no number of chapetr. But when I refer to a table, there is a number of chapter.      Here is a small MWE.  \documentclass[]{OAGM} %% For the accepted, final version, set this to the correct value: \OAGMarXiv{1404.3538}  \usepackage{float} % fix the table \usepackage{bold-extra} \usepackage{amsmath,bm} \usepackage{color} \usepackage{amsmath,amsopn} \usepackage{bbm} %\usepackage{hyperref}  \usepackage{mathrsfs} \usepackage{tikz,pgfplots} \usepackage{listings} \usepackage{color} %\usepackage{breqn}  \usepackage{caption} \usepackage{subcaption} \usepackage{epstopdf} %\usepackage[titletoc,toc,title]{appendix} \usepackage{mathtools}  \usepackage{tabularx} \usepackage{booktabs} \usepackage{natbib } \usepackage{graphics} \usepackage{amsfonts} \usepackage{mathtools}    \begin{document}  \section{1} \subsection{2}  \begin{tabularx}{\textwidth}{XX} \toprule  a & b\\\midrule  \label{Tab a simple table}\end{tabularx}   I have to cite the table ~\ref{Tab a simple table}  \end{document}

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


After upgrading both a desktop and laptop from Fedora 24 to fedora 25 I had verified that wayland could be set and tested some development code on it.   Developer apps and debug repositories were added over time.  After the numerous updates that occur when a new version is released I was testing some development code and noticed that the Xserver was being used and tried logging out of the desktop to gdm login screen and set wayland which fails to start.   The ps axf command on the desktop now shows   979 ?        Ssl    0:00 /usr/sbin/gdm  1272 ?        Sl     0:00  \_ gdm-session-worker [pam/gdm-launch-environment]  1294 tty1     Ssl+   0:00  |   \_ /usr/libexec/gdm-x-session gnome-session --autostart /usr/share/gdm/greeter/autostart --debug  1296 tty1     Sl+    0:01  |       \_ /usr/libexec/Xorg vt1 -displayfd 3 -auth /run/user/42/gdm/Xauthority -nolisten tcp -backgr  1305 tty1     Sl+    0:00  |       \_ /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart --debug  1325 tty1     Sl+    0:02  |           \_ /usr/bin/gnome-shell  1423 tty1     Sl     0:00  |           |   \_ ibus-daemon --xim --panel disable  1427 tty1     Sl     0:00  |           |       \_ /usr/libexec/ibus-dconf  1503 tty1     Sl     0:00  |           |       \_ /usr/libexec/ibus-engine-simple  1452 tty1     Sl+    0:00  |           \_ /usr/libexec/gnome-settings-daemon  1546 ?        Sl     0:00  \_ gdm-session-worker [pam/gdm-password]  1572 tty2     Ssl+   0:00      \_ /usr/libexec/gdm-x-session --run-script gnome-session  1578 tty2     Sl+    0:21          \_ /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -back  1595 tty2     Sl+    0:00          \_ /usr/libexec/gnome-session-binary  1672 tty2     Sl+    0:18              \_ /usr/bin/gnome-shell   Verifying that even gdm has defaulted to X. Which in Fedora 24 was using wayland.  Not sure what changed to end up with defaulting to X on two development system computers.  No nvidea closed source drivers are in use, just the open source nouveav driver on both laptop and desktop.

For some reason my Fedora 25 FRESH install is not using wayland by default. I know this because of  $: loginctl show-session 3 -p Type Type=x11   If I was using Wayland by default that should say wayland or weston. I'm very confused why this fresh install of fedora 25 is not sporting wayland by default. I looked over the arch wiki briefly, and tried to test run wayland by issuing  $: weston   Also, I have rebooted fedora to multiuser.target, to get just a command line to manually launch a dbus-run-session for wayland, and this is the output:  $: dbus-run-session -- gnome-shell --display-server --wayland (gnome-shell:1372): mutter-WARNING **: Can't initialize KMS backend: could not find drm kms device   Then I tried:  $: startx   And my standard gnome desktop popped up no problem. I'm seriously wondering if fedora 25 live installer ever installed wayland to begin with?  After looking for the wayland config file weston.ini, I cannot find it in ~/.config/ where it's supposed to be.  System info:  $:uname -a Linux sark 4.8.10-300.fc25.x86_64 #1 SMP Mon Nov 21 18:49:16 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux   I have done a full system update on first login with   $: sudo dnf update    Also went through the process of using the nvidia drivers for my graphics card; GTX 950 Not using the default pre-my-move-to-nvidia-driver driver :P   EDIT:  After investigating onto my laptop, my Laptop reports that it is using wayland:  $: loginctl show-session 2 -p Type Type=wayland   This laptop was a fedora24 upgrade to fedora25, not a fresh install of fedora 25  Laptop info:  $: uname -a Linux mcp 4.8.10-300.fc25.x86_64 #1 SMP Mon Nov 21 18:59:16 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


Following  in Britain this week, we were told that lack of power being generated led to a drop in the AC frequency as shown in this graph:    I understand why a stable frequency is important how how nationwide frequency is kept in sync but am not sure what exactly caused the drop in frequency and why.

about the use of battery/freewheel based Frequency Regulators confused me about how the 60hz frequency of the North American power grid was set--saying that it was kept at that frequency by balancing load and supply. I used to think that it was only voltage which was affected by this balance, and that the frequency was determined by the speed of the rotors in the generator. EG see .   Can someone help me understand the physics behind this?


I have a preprocessing pipeline that includes replacing missing values and onehotencoding for the categorical variables.   When I try to use my model on the test set, it explains that the number of columns it expects differs. This is due to one hot encoding  One option I considered was passing the full dataset into the pipeline and then seperating into test and split. However, this causes data leakage as the missing values it capturing values from the testset.  Please let me know how to prevent this.   Thanks,

I'm building an app that will require user input. Currently, on the training set, I run the following code, in which data is a pandas dataframe with a combination of categorical and numerical columns.  dummified_data = data.get_dummies() train_data = dummified_data[:10000] test_data = dummified_data[10000:12000]   Currently, I have a hand-written function that takes user-inputted data and transforms it into a format like dummy data. This doesn't seem sustainable as the number of columns/the size of my categorical variables grows.  Is there a way to dummify training data and production data consistently?


Why is adding a return statement for the main() function in C important if the programs I make runs the same without it?  Is there a disadvantage in my programs if I omitted the return statement in the main() function?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


So the equation is as follows:  $$ 6x^2  -\ 25x \ + 12 \ +\ \frac6{x^2}\ + \frac{25}{x} = 0$$  So one thing that is immediately observable is that pairs of roots will be of the from $$x_1=-\frac{1}{x_2}$$  How do I go about solving this equation systematically ? I have already solved it based on trial error to get roots as 2,3,-1/2,-1/3. But I need to show systematic manipulations to get there.  Thanks a lot !

I simplified to get $6x^4-25x^3+12x^2+25x+6=0$  Or $6 (x^2+1)^2+25x(1-x^2)=0$  Then I substituted $z=x^2+1$, to get $6z^2+25\sqrt{(z-1)}(2-z)=0$  I can't find a way to proceed further.


I've recently started editing questions. While editing questions I almost always remove the Thanks in advance and Thanks for your help parts of the questions. I've read  question which is very similar my question and I notice that the accepted answer and the comments that follow are more of a debate so as to remove the or no. Since most of the questions belong to newbies I am still confused and don't how to go about it. My point being:  a) If they are new they might like it if their questions remain friendly. I mean, won't you want a human touch to your questions (the debate and some answers point towards it)  b) As the accepted answer states, the reasons for removing them are:   It will leave even less room in the question preview so that we have more difficulty gauging what a question consists of by reading the preview. It takes time to read and parse through those questions when I am trying to spend my time more efficiently reading through the actual question and figuring out how to appropriately answer it. If I have to start reading all the little side comments and snarky humor inserted in there it detracts from the overall message. If this is supposed to be a website which is servicing more than just the primary author, we need to think about how we construct messages so that they appear more clearly to those searching on google for questions that match their own. If I am looking for a solution for question X, I want to find someone who had the same problem, not their short autobiography and formalities before getting to that actual question.   So, is there any guideline for editing questions? And if not, what do most people who edit questions follow?

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


I've seen prior discussions of ending a sentence with "etc." and I know there should only be one period.  But what if the "etc." comes inside parenthesis which then end the sentence, such as:  .....blah blah blah (blah, blah etc.).  That looks awkward to me.  Because the period inside the parentheses is used for the abbreviation I don't think it suffices to end the sentence with it; so I'm thinking:  .....blah blah blah (blah, blah etc.)  is incorrect.    I know I could always simply write-out et cetera but I'm wondering if there's an actual rule for this.    Thanks in advance.    Ok, so multiple people have marked this as asked and answered.  Could someone please post a link to that, because I can't find it.    @tchrist: unicorns???    Never mind.  Found the link in the right margin.  Thank you.

In Hungarian, when there's a dot both inside and outside parentheses at the end of a sentence, we write it as follows:     Sok állatom van (kutya, macska stb.).   (Meaning: I've got many animals [dogs, cats, etc.])  I'm not sure though how do we write it in English.   I've got many animals (dogs, cats, etc.). I've got many animals. (dogs, cats, etc.) I've got many animals (dogs, cats, etc.) I've got many animals (dogs, cats, etc).


I am making a custom tool (code generator) for VS2008.  I have the wix installer putting in all the registry entries for the visual studio, but what it is not doing is the equivalent of regasm mytool.dll  It is getting into the GAC by virtue of the  Assembly=".net" attribute of the File element. But I am not even entirely sure that getting into the GAC matters.  I think it would work with a regasm /codebase mytool.dll  Thanks

There seems to be lots of different ways to register assemblies with the GAC, as in, they 'work'.  However, what's the "proper" way of doing it?  In response to Lou Franco (and gacutil):  I'm using Gacutil for development, but it seems to me to be not the proper way to install it, since gacutil isn't included in the basic .NET utilities past .NET 1.1 - it's only a developer tool.  Additional: Gacutil (as seen in responses below) is not redistributable, and therefore should not be used in any app that you intend to give to people who are not developers.  AKA, customers.  See .  In response to using WIX:  WIX might be great and all, but how does it work under the hood?  What details makes the way WIX installs the assembly the right way to install it?  How does it look it up?  Is it a system/.NET call?  Is there some call in a dll buried somewhere in System32 that needs to be made?    (Edit: it looks like WIX uses MSI under the hood.  See my comments in the accepted answer.)  Final edit: It looks like the correct way to install an assembly to the GAC is using windows installer, and nothing else.  I'm going to give Wix a try.  Thanks all!


I have had a Galaxy S2 for 2 years. I just upgraded to the S4 3 weeks ago.   Until this morning, I was able to send SMS messages without data mobile being on via my Wi-Fi connection.  I have made no alterations to my phone other than trying out various suggestions on given on forum sites. I have tried 3-word messages as a test and even these are converted to MMS.  I have loaded both Handcent and Bigsms. They work, but why should I have to have these after 2 years and 3 weeks without a problem?

The Galaxy S I9000 messaging app automatically converts long SMS messages to MMS. How can I disable this?


I'm using math mode,   \begin{enumerate}  \item \begin{align*} 3(2x+4)-4x &= 6-x &\text{Initial equation (1)}\\ 6x + 12 - 4x &= 6-x &\text{Distribute (2)}\\ 6x-4x+x &= 6-12 &\text{Rearrange (3)}\\ 3x &= -6 &\text{Combine Like Terms (4)}\\ x &= \boxed{-2} &\text{Simplify (5)} \end{align*}  \end{enumerate}   When I type this up, I get this:  Why is there a giant blank link between "1." and the first line? How can I remove that line?  Thank you!

Related (but not the same):         Earlier today I asked a question about aligning equations in an enumerate environment and got an answer that seemed to work for the example I gave, but it turns out I wasn't really specific enough for my problem.  I'm using align* environments, often as the only part of a list item. (If you're wondering why I'm not using more words to introduce the align*, these are mostly homework solutions where most of the work is algebra, etc.)  Here's my code and what it makes (above the middle line):  \begin{enumerate}   \item \begin{align*}     x^2 + y^2 &= x^2 + (iy)^2 \\               &= (x + iy) (x - iy)   \end{align*}   \item \begin{align*}     \frac{1}{n^2-4} &= \frac14 \frac{4}{(n-2)(n+2)} \\                     &= \frac14 \left( \frac{1}{n-2}-\frac{1}{n+2} \right)   \end{align*} \end{enumerate}     I'm trying to make the baseline of the first line of the align* environment the same as the number's baseline—I want the first line of the align* to have the same vertical position (centered horizontally in the same way) relative to its number as in the second half of my picture. (Side question: why is there so much space before the align* starts?)


I would like to know if there is a difference in the values taken from measurements of a given characteristic sampled at primary forest=1 and secondary forest=0  I'm using two vectors, one with the data itself (DATA$Measurements), and the other one with the category of sampling point (DATA$Point).  How should I perform the wilcox.test fucntion?  I'm doing this way:  wilcox.test(DATA$Measurements~DATA$Point)   But I notice that are other forms of performing this test:  wilcox.test(DATA$Measurements,DATA$Point) wilcox.test(DATA$Measurements,DATA$Point,paired=TRUE)   Which one is more suited for testing my question of interest, and what is the difference between these options? (Is there a difference between points for this given characteristic)?

I would like to know if there is a difference in the values taken from measurements of a given characteristic sampled at primary forest (Point=1) and secondary forest (Point=0)  I'm using two vectors, one with the data itself (DATA$Measurements), and the other one with the category of sampling point (DATA$Point).  How should I perform the wilcox.test fucntion?  I'm doing this way:  wilcox.test(DATA$Measurements~DATA$Point) But I notice that are other forms of performing this test:  wilcox.test(DATA$Measurements,DATA$Point) wilcox.test(DATA$Measurements,DATA$Point,paired=TRUE) Which one is more suited for testing my question of interest (Is there a difference between points for this given characteristic), and what is the difference between these options??


I have a list like:     list = [1, 2, 3]  I need to convert it to a triple digit like:     "123"

I have a list of integers that I would like to convert to one number like:  numList = [1, 2, 3] num = magic(numList)  print num, type(num) >>> 123, <type 'int'>   What is the best way to implement the magic function?  EDIT  I did find , but it seems like there has to be a better way.


I wish to add Ubuntu 64 bit to Windows 8, and the installation guide mentions booting from USB or DVD. If I burn the downloaded Ubuntu to an empty USB stick, then put the stick into my computer, what happens next?

I am looking at this:    I need to create a boot disk to test Ubuntu to make sure it will run on a PC (Compaq Mini CQ10-120LA) I was given. I can create the boot disk off of a Mac (in English) or Windows (but Windows is in Spanish and foreign to me).   Questions:     What format do I choose for the USB stick? (I wish the instructions stated this). What is Dash? (Will I know when I run the installer?) Can I do this from a Mac or Windows computer? Or only from Ubuntu?


In the Dark Knight, Bruce Wayne tracks Melvin White  aggravated assault, moved to Arkham twice  to his apartment, which is overlooking Commissioner Loeb's funeral parade, where he finds a police honor guard unit tied to a post, blindfolded, mouths taped shut. When Bruce removes the tape from one of the men, Bruce asks:  What happened? They took our guns, our uniforms  From this we can assume that a substantial portion, if not the entire unit, is full of the Joker's men. Why doesn't anyone realize this? Surely there must be someone familiar with the individuals in the honor guard. Previous answers have stated that a corrupt police force allowed the Joker and his men to blend in, or that there were so many police in uniform that all looked the same, or that Gordon and his men were too busy scanning windows. Still, none of these explanations account for the fact that the honor guard was still a separate part of the procession and had a special role. There is next to no chance they could completely escape detection.

In  , when The Joker plans to kill the Mayor at a public gathering. His attempt to shoot the Mayor is foiled by Gordon. After this we see Joker's face in frustration. This is the only time we see Joker without his make up, but the scars on his face are clearly visible.  Why is it that no one noticed this highly unusual man dressed up in a police uniform at this function?


As far as we know, we can make a file run every time after turning on the windows, by putting it in Startup folder or make a key in registry with its path in the value!  Now I want to now, is there any way to make a file run right before Windows shutdown?

I was wondering if anyone knows how to configure a Windows 7 x64 Enterprise install that is on a domain to run a script if the user attempts to shutdown the computer - but I dont want the script to run if the user tries to log out.   Here is a bit of detail on my situation...  I have installed drive encryption software on 5 desktops that are in use by various people in my group.  These desktops are installed a few buildings away in a secure lab that very people have access to.   People in my group access these machines (8 Core 2600K Intel Sandybridge with 8GB RAM) over RDP to preform tasks that require heavy lifting that laptops are not well suited for.    I wrote a shutdown script (.hta file) to warn a user that if he/she shuts the computer down, they will have to get access to the lab and enter the drive encryption password in order to bring the machine back online.   The script has a timer that counts down for 1 minute and allows the user to cancel the shutdown command.    The script works as expected when a user tries to shutdown the computer, but I just realized that the script seems to run when a user tries to log off.  Is there any way to differentiate between a user logging off and a user shutting down a machine?   If possible, I would only want the script to run if the machine is shutdown.  If the user logs out, I would not want any script to run.  If this is possible, it seems like this would be managed via local Group Policy.     Let me know if you need any further details.


If the definition of prime lens says that their focal length is fixed, then how come you can still alter the focal length when focusing? (either MF or AF)

By definition, a  is a fixed lens system with a fixed focal length.  Then, simple physics tells us that it should be able to focus only on one plane (at a fixed distance) in front of it. But in fact you can focus on objects near as well as far.  What am I missing here?


Find the double integral which represents the intersection of the cylinder and the sphere happened over  $$D:\{(x,y):\, -1\le x\le 1 \,\,\text{ and }\,\, 1-\sqrt{1-x^2} \le y\le 1+\sqrt{1-x^2}\, \}$$  The integral is  $$2\iint_D \sqrt{f_x^2+f_y^2+1}\, d\sigma$$  where $f(x,y) = \sqrt{4-x^2-y^2}$. First of all I calculated $f_x^2=\frac{x^2}{-x^2-y^2+4}$, $f_y^2=\frac{y^2}{-x^2-y^2+4}$. However, I am not sure how to take into account the region $D$. Any help to finilize calculation are welcomed.

Find the surface area of the part $\sigma$: $x^2+y^2+z^2=4$ that lies inside the cylinder $x^2+y^2=2y$  So, the surface is a sphere of $R=2$. It looks there should be double integral to calculate the surface, but how, which way?


(i use blender 2.79) in video games, the farther is the object the fewer details it has, and that of course to save memory but how to do it in blender  if you have 2 complex objects and one of them is closer to the camera than the other  how to make the farther object get less render?

Objective: build a virtual suburb in blender for use in creating exterior shots (not realtime: shots will be rendered in Cycles).  The angles of these shots will not be known in advance, so it's impossible to guess in advance which elements need to be high detail and which can be low detail.  Large scene becomes unwieldy and incredibly memory-intensive with hundreds or even thousands of high-detail objects, especially when many are not in shot. Scene will be utilized by an artist on home computer, so excessive memory use is not viable. Convenience is the primary objective to maximize efficiency in setting up and rendering shots. Renderer to be used is Cycles.  The higher detail of the nearby models would not necessarily be provided by subdivision. A perfect example of the sorts of things I'd be working with are buildings; up close, they would have fully modeled doors, windows, and other small details like flags, while far away, those fine details could be baked into textures, made more rudimentary, or simply omitted altogether.  Is it possible to automatically swap out lower detail meshes/materials at long distance for these renders?  I am also interested in alternate solutions. Since there are only 20 layers available, the only alternate solution I can come up with would be to divide the suburb into sections and have a high-detail and low-detail version of each section put onto adjacent layers, which the artist will toggle based on the position of the camera and what is visible in the shot, but this would be less than optimal. Any other ideas are welcome.


The following problem is an exam problem, which I could not do. But I attempted it as far as I can do.   Let $y$ be a nontrivial solution of the boundary value problem $$y^{''} + xy = 0, x \in [a, b],   y(a) = y(b) = 0.$$   Then   $b > 0$ $y$ is monotonic in $(a, 0)$ if $a < 0 < b.$ $y^{'}(a) = 0.$ $y$ has infinitely many zeros in $[a, b].$   It is a Sturm Liouville Problem. If $y$ is a nontrivial solution to the problem, then $y$ is an eigen function corresponding to the eigen value 0.   Then we know that the eigen values of a Sturm Liouville Problem can be arranged in an strictly increasing sequence $\lambda_1 < \lambda_2 < ... < \lambda_n < ... $ which tends to infinity.  Also we know that corresponding to each eigen value  $\lambda_n $, the eigen function $y_n(x)$ has exactly $n - 1$ roots in $(a, b).$ Then the option 4 is False. But I do not know what the $n$ is ?   I do not have any idea about other options. I could not even solve the $y^{''} + xy = 0$. Can it be done by Power series method?

Let $y$ be a nontrivial solution of the boundary value problem  $$\frac{d^2y}{dx^2}+xy=0,\ x \in [a,b]$$  $$y(a)=y(b)=0$$ Then:   $b>0$ $y$ is monotone in $(a,0)$ if $a<0<b$. $y'(a)=0$. $y$ has infinitely many zeros in $[a,b]$   I have no idea how to solve it and which options is/ are correct. please help me.


I have a *.tex file open in WinEdt which inputs a few other .tex files.   Previously, I was able to compile my files by hitting F9 from within any of the files in the Tree panel. But now after any change, I have to go to the main file (at the top of the Tree) and compile from there, which is a bit cumbersome. Any ideas how I can get WinEdt (version 8.0) to compile from anywhere by hitting F9?

I have large LaTeX project (my thesis) with a main TeX file and many subfiles contained in their own subdirectories. The template is available  at Cambridge University website  Now coming to my question, in WinEdt I can compile the project only when the current document is the main/root document. If I try to run from sub files WinEdt throws an error.  Is there any way (like a flag in LaTeXing for Sublime Text) to tell WinEdt to always start compiling from root TeX file.


Is there any way to configure the "feed" to report only certain specified tags?

I get a lot from Stack Overflow, I want to contribute to others' questions too, but numerous .net, html questions come to the front page, while what I am good at is c and linux. How to filter those questions and just show questions related to my favorite tags?


So I am writing my thesis in LaTeX for bioengineering, and I have an image of a genetic circuit like so:  And I want the caption to read like this: Fig 2.1. Genetic circuit 0x8E. This is a circuit diagram of the circuit 0x8E from the Cello paper. IPTG, aTc and Ara are the input mole.. blah... In where (image of a NAND gate) represents a NAND gate, (image of a AND gate) represents an AND gate, and () represents a NOT gate. Is it possible to add mini-images in the caption itself of an image in LaTeX?

I need to place a small image in the caption of an image, but I don't know how, please help.  \begin{figure}[H]    \begin{center}        \includegraphics[width=9.5cm]{figure.eps}\\ \caption{Some text [SMALL IMAGE HERE].}\label{figure} \end{center} \end{figure}


I have many hyperlinks to web pages in an Excel file and I want to open those links either in IE or Chrome depending on the link. Most of my links I use I have no issues with opening the default Chrome browser and that is fine but some I wish to open with IE. Is this possible to do with a hyperlink in the Excel file?

A bunch of our network/server/storage hardware uses web interfaces for their administrative portals. I'm currently using an Excel 2010 worksheet to keep track of each device. I have one column set aside to list the URL for each web interface. This makes it easy to simply click the URL to open each administrative portal.  My default browser is Firefox. However, some of the administrative portals don't play well with Firefox and require the use of IE. Until now, when I want to open a hyperlink in IE, I have to manually open IE, copy the URL from the Excel worksheet, and paste it into the IE address bar (otherwise it will open in Firefox if I simply click it). It's just an annoying extra couple of steps.  So without changing Firefox as my default browser, is there a simple way in Excel 2010 to tell it which hyperlinks to open in IE when they are clicked? I want to choose specifically which links open in which browser  (For reference I'm using Windows 7 Enterprise 64-bit)


How can I rename or open or do anything with this file?  Everything I try (rm, mv, cat, less, vi) gives unrecognised option '--.html'  So far, only a full ls piped to grep has been useful, or even usable.  stewart$ ls -l | grep html -rw-rw-r-- 1 stewart stewart  18262 Mar 13 06:08 --.html

Ok, I have a bunch of files starting with a dash, -. Which is not so good... and I want to rename them. In my particular case I would just like to put a character in front of them.  I found the following line that should work, but because of it dash it doesn't:  for file in -N*.ext; do mv $file x$file; done   If I put an echo in front of the mv I get a bunch of  mv -N1.ext x-f1.ext mv -N2.ext x-f2.ext   Which is correct, except of course it will think the first filename is options. So when I remove the echo and run it I just get a bunch of  mv: illegal option -- N   I have tried to change it to  for file in -N*.ext; do mv "$file" "x$file"; done   but the quotes are just ignored it seems. Tried to use single quotes, but then the variable wasn't expanded... What do I do here?  Update: I have now also tried to quote the quotes. Like this:  for file in -N*.ext; do mv '"'$file'"' '"'x$file'"'; done   And when I echo that, it looks correct, but when I actually run it I just get  mv: rename "-N1.ext" to "x-n1.ext":: No such file or directory   I have just no clue how to do this now... sigh


Either my parents or my sisters IS/ARE going to visit...  Either my parents or my sister IS/ARE going to visit...    Which one is "certainly" correct?

Is it legal to use has in the following question?     Would you tell me please whether either my friend Joey or me has to visit the manager tomorrow?   Or, instead, should I use have rather than has?


I created this function to fetch the contents of a url with curl  function leggiUrl($url){     $ch = curl_init($url);     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);     curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);     curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");     $content = curl_exec($ch);     curl_close($ch);     return $content; }   if I enter a URL whose content is partly generated by a script JavaScript, this text is taken from the function. I would like to grab the text (finished) of any page. Thank you.

I'm looking for a library that has functionality similar to Perl's , but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting page and return in a simple format all forms and their fields, along with all links on the page.  I know about CURL, but it's a little too barebones, and the syntax is pretty ugly (tons of curl_foo($curl_handle, ...) statements  Clarification:  I want something more high-level than the answers so far. For example, in Perl, you could do something like:  # navigate to the main page $mech->get( 'http://www.somesite.com/' );   # follow a link that contains the text 'download this' $mech->follow_link( text_regex => qr/download this/i );  # submit a POST form, to log into the site $mech->submit_form(     with_fields      => {         username    => 'mungo',         password    => 'lost-and-alone',     } );  # save the results as a file $mech->save_content('somefile.zip');   To do the same thing using HTTP_Client or wget or CURL would be a lot of work, I'd have to manually parse the pages to find the links, find the form URL, extract all the hidden fields, and so on. The reason I'm asking for a PHP solution is that I have no experience with Perl, and I could probably build what I need with a lot of work, but it would be much quicker if I could do the above in PHP.


I'm making a 3d game, and I have only made games in 2D before, but i have used blender before too.  My player can now walk and jump, but he is not limited to only jumping of the ground.  In 2D, you separated ground objects in a collision layer, and in the jump method you add an if statement like this  if(myCollider.IsTouchingLayers(LayerMask.GetMask("climbing"))) {     //do the stuff }   Apparently this is designed for 2d only.   How do I do this in 3d?

I'm using touch inputs in my game to control the character. I would like to know how to disable my character from jumping again in the air.  if (FingerTouchy.phase == TouchPhase.Ended)                 {        charcter.transform.Translate(Vector2.up * speed * Time.deltaTime);        float jumpForce = 250;                         charcter.GetComponent<Rigidbody2D>().AddForce(new Vector2(0, jumpForce));                      }   Update  Im using   void OnCollisionEnter (Collision col)     {         if(col.gameObject.tag == "Ground")         {             grounded = true;          }     }   And checking if charcter is grounded  if(FingerTouchy.phase == TouchPhase.Ended)             {                      float jumpForce=250;                     if (grounded)                         continue;                     charcter.transform.Translate(Vector2.up * speed * Time.deltaTime);                     charcter.GetComponent<Rigidbody2D>().AddForce(new Vector2(0,jumpForce));                         grounded=false;                  }   using collision/collision2d doesn't work too.


What directions should i be following to use my friends mac to create a bootable usb stick for an old hp pavilion dv4?  The hp pavilion doesn't seem to have any operating system, it tries to boot windows but it's 'missing' something and tells me I need to install Windows, but I'd rather install ubuntu. Please help me!

I'd like to create an Ubuntu live USB stick on a Mac to use to install Ubuntu on another machine. How do I accomplish this?


Sometimes it would be really helpful to ask other users how they would deal with a certain problem, or what best practice would be with regards to solving a problem. This does not involve specific code discussion.  Where can I post such questions? From reading the rules StackOverflow doesnt seem appropriate?   If there isn't such a place, maybe one should be created?  Andy

I just got a question closed because it was rendered subjective by the moderators. The question is important to me and I believe other people would benefit. So, I ask the following non subjective question: on which site of the Stack Exchange ecosystem should I post  question?


Let $M$ be a compact connected $3$-manifold with boundary $\partial M$. If $M$ is nonorientable and $\partial M$ is empty, then how do I see that $H_1(M, \mathbb{Z})$ is infinite?

This is an example from a question sheet (non-assessed) of a university class. If M is a non-orientable, closed, connected 3 manifold, prove $H_1(M;\mathbb{Z})$ is an infinite group. I know that since $M$ is non-orientable it follows that $H_3(M;\mathbb{Z}) = 0$ and since $M$ is connected $H_0(M;\mathbb{Z}) = \mathbb{Z}$. I want to apply a combination of Poincare duality and Universal coefficient theorem to try and find a contradiction if $H_1(M;\mathbb{Z})$ has no free part. However poincare duality doesn't apply here so I'm stuck.  I would appreciate any hints as to how to proceed.


I do understand that this is a common problem, and I have read few of the threads. Here is synopsis of my problem.   Logged on to window 8.1, windows installed updates and now grub2 doesn't work   Laptop is a Toshiba C55-A Secure boot is disable Turn off fast startup booted with Ubuntu 12.04 LTS Live CD by pressing c accessed grub prompt exited out of grub at which point was able to access boot manager with Windows Boot Manager, Ubuntu, Ubuntu options Selected Ubuntu Booted into Ubuntu sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update sudo apt-get install -y boot-repair && (boot-repair &) Selected recommended repair     The output on boot tab from msconfig (windows command prompt) shows only windows 8.1  The output from the bcdedit is as follows   Windows Boot Manager -------------------- identifier              {bootmgr} device                  partition=\Device\HarddiskVolume2 path                    \EFI\Microsoft\Boot\bootmgfw.efi description             Windows Boot Manager locale                  en-US inherit                 {globalsettings} default                 {current} resumeobject            {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} displayorder            {current} toolsdisplayorder       {memdiag} timeout                 30  Windows Boot Loader ------------------- identifier              {current} device                  partition=C: path                    \Windows\system32\winload.efi description             Windows 8.1 locale                  en-US inherit                 {bootloadersettings} recoverysequence        {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} recoveryenabled         Yes isolatedcontext         Yes allowedinmemorysettings 0x15000075 osdevice                partition=C: systemroot              \Windows resumeobject            {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} nx                      OptIn bootmenupolicy          Standard detecthal               Yes   Did not see the grub2 menu as expected?  Any other ideas  References

I have an Ubuntu 13.10 and Windows 8 dual-boot working properly, and upgrading to Windows 8.1 breaks grub2 as expected. However, this time boot-repair was not able to bring grub back for me. My laptop jumps right into windows.  I double checked that Windows 8.1 re-enabled fast startup, so I've disabled it. And in my BIOS, UEIF is used for boot and secure-boot is disabled.  I have a 500GB GPT partition, in which, sda1 is the efi partion, sda2 is the /boot, sda3 is the / for ubuntu, and sda7 is the swap area. For Windows, sda4 is the msft reserve, sda5 is c://, and sda6 is Windows recovery. Those are (at least) my original setup.  Here's the boot info:   I also tried mount my hard drive from a live ubuntu session, then re-install grub on /dev/sda, which didn't work either.  Is there any other thing I could try to bring my Ubuntu back?


It is possible to make the caption of a figure in CAPS (versalitas) typeface format?  Like as image below. But I want to change only the 'FIGURE 1.1'. Descriptive text label that is invariant. That has not been answered in another post  I also want to ask if it   is possible to write in bold the test in CAPS format?   Code (false) right here for either case:    \documentclass{article}   \usepackage{mathtools,amsmath}   \usepackage{amsthm}    \begin{document}    \begin{center}   \fbox{\parbox[b]{.3\linewidth}{     \begin{center}      .......\\This is a figure\\*******     \end{center} }   }   \end{center}    \begin{center}   \textsc{Figure 1.1:} Solution of $x^2\leq 4$   \end{center}   \end{document}

I would like to italicize my figure captions and make them smaller.  How can I do that?


According to an answer in Quora to the question:  there is a specific way to position adjectives based in their type, how accurate is this?     Ordering of Adjectives#3: Ordering of Adjectives      If you have more than one adjective to describe a noun, there is a   specific order you put them in, or else the clause will sound very   awkward.      That order is:   Opinion-size-age-shape-colour-origin-material-purpose-noun.      The most common example of this is "the lovely little old rectangular   green French silver whittling knife."      If you put any of those adjectives out of order, the phrase will sound   extremely confusing   How confusing will sound to mix that order? I mean, would it just sound a little like a non-native speaker or it will mess the sentence meaning completely?  Doing a little research on the subject it seems that there is not even a consensus for the right order, so I wonder how important is this or under what conditions it may change (American English has the same order of Brithis English?, etc).  Example Order 1:   Example Order 2:

When learning the order of adjectives in a sentence, I thought up a word "saSHcomp" standing for the  order.   Later, I  found out that there's a slightly  where the shape of a noun comes before its age.  So, both "an old round thing" and "a round old thing"  are correct and the order of the adjectives depends on the variant of the English one's using, British or American.  My question is as follows:  Might the confusion of these orders influence negatively the results of English grammar level tests taken in Great Britain or in the USA?   Can the use of this or that order manifest, in one single sentence, the origin of the writer, British or American, or, to be more exact, where they lived when they came to school?   Do native English speakers themselves ever confuse this order in the writing?   What's the order of these two adjectives that is used in the English-speaking world beyond GB and the USA — especially in Canada, Australia, and South Africa?


My schema 'test' has 3 tables: 'user', 'post' and 'revision'.  CREATE TABLE IF NOT EXISTS `test`.`user` (   `iduser` INT UNSIGNED NOT NULL AUTO_INCREMENT,   `name` VARCHAR(45) NOT NULL,    PRIMARY KEY (`iduser`)) ENGINE = InnoDB;  CREATE TABLE IF NOT EXISTS `test`.`post` (   `idpost` INT UNSIGNED NOT NULL AUTO_INCREMENT,   `iduser` INT UNSIGNED NOT NULL,   `content` VARCHAR(4000) NOT NULL,   `revision_count` INT NOT NULL DEFAULT 0,    PRIMARY KEY (`idpost`),    INDEX `fk_post_user1_idx` (`iduser` ASC),    CONSTRAINT `fk_post_user1`      FOREIGN KEY (`iduser`)      REFERENCES `test`.`user` (`iduser`)      ON DELETE NO ACTION      ON UPDATE NO ACTION) ENGINE = InnoDB;  CREATE TABLE IF NOT EXISTS `test`.`revision` (   `idrevision` INT UNSIGNED NOT NULL,   `iduser` INT UNSIGNED NOT NULL,   `idpost` INT UNSIGNED NOT NULL,   `content` VARCHAR(4000) NOT NULL,    UNIQUE INDEX `index1` (`idpost` ASC, `idrevision` ASC),    PRIMARY KEY (`idrevision`, `iduser`),    INDEX `fk_revision_user1_idx` (`iduser` ASC),    CONSTRAINT `fk_revision_post`      FOREIGN KEY (`idpost`)      REFERENCES `test`.`post` (`idpost`)      ON DELETE NO ACTION      ON UPDATE NO ACTION,    CONSTRAINT `fk_revision_user1`      FOREIGN KEY (`iduser`)      REFERENCES `test`.`user` (`iduser`)      ON DELETE NO ACTION      ON UPDATE NO ACTION) ENGINE = InnoDB;   And there is the script creates data:  INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (1, 'Ann'); INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (2, 'Bob');  INSERT INTO `test`.`post` (`idpost`, `iduser`, `content`, `revision_count`) VALUES (1, 1, 'this is first post', 1);  INSERT INTO `test`.`revision` (`idrevision`, `iduser`, `idpost`, `content`) VALUES (1, 1, 1, 'this is old content of first post');   I create 2 sessions work concurrently. Session 1 works with query:  BEGIN; INSERT INTO revision (idrevision, idpost, iduser, content) VALUES     ((SELECT max_idrevision + 1      FROM (SELECT max(idrevision) AS max_idrevision           FROM revision WHERE idpost = 1) AS anon_1),     1, 2, 'abc xyz');   Now session 2 works:   BEGIN; UPDATE revision SET idrevision=3 WHERE idpost=1 AND iduser =1; -- will hang by lock  -- but with this update UPDATE revision SET content='nwe asdfs' WHERE idpost=1 AND iduser=1; -- not hang   I don't know what's lock mysql used with query insert in session 1? Is it row lock or table lock or anything else ? If it's row lock, why does second update query in session 2 not hang ?


I've tried doing this with CSS changing them from float:left & float:right and reversing it under a @media (max-width:820px) query which I'm sure has worked in the past but didn't work.  Tried a simple JQuery:  if ($(window).width() < 820) {    $( ".first" ).insertAfter( $( ".second" ) ); } else {    $( ".first" ).insertBefore( $( ".second" ) ); }   I know this should be so simple but it's just not playing ball, what am I doing wrong?

Given a template where the HTML cannot be modified because of other requirements, how is it possible to display (rearrange) a div above another div when they are not in that order in the HTML? Both divs contain data that varies in height and width.

         Content to be below in this situation

         Content to be above in this situation

 Other elements   Hopefully it is obvious that the desired result is:  Content to be above in this situation Content to be below in this situation Other elements   When the dimensions are fixed it easy to position them where needed, but I need some ideas for when the content is variable. For the sake of this scenario, please just consider the width to be 100% on both.  I am specifically looking for a CSS-only solution (and it will probably have to be met with other solutions if that doesn't pan out).   There are other elements following this. A good suggestion was mentioned given the limited scenario I demonstrated—given that it might be the best answer, but I am looking to also make sure elements following this aren't impacted.


I was using a head of garlic (from China, if that helps), And the entire thing seemed healthy and fine, but I got to one of the inner cloves and it had turned ENTIRELY into a very soft powder, I was afraid of breathing it in because some puffed out when I got to it!! I am so confused, it’s such a fine, dry dust-like powder yet the rest is totally fine! Does ANYONE know what this is?? And do I have anything to worry about health-wise now?

Today I cut open a garlic bulb only to discover that the core was mostly black powder. What on earth was that? I've never seen it before in my life. From the outside the bulb seemed to be fine. It wasn't obviously rotten or dark or anything like that.


Let's say that I have some type of long bar. It is perfectly incompressible. On one side I have a sensor that detects any force. On the other end, I hit the bar with a hammer. From the moment my hammer hits this bar and the moment my force transducer picks up the force on the other end should be instantaneous right? Why would this scenario be any slower than the speed of light?

Is it possible for information (like 1 and 0s) to be transmitted faster than light?   For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end.   The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey.  Would this actually work?


A page is on HTTPS and all content on it is served from HTTPS, however, this page contains a video player, and once user hits a PLAY button in it, it starts playing a video, that is served from HTTP.  2 questions:   Will this page show a broken padlock and get insecure? Will this page get SEO boost from Google (HTTPS factor)?

Google Chrome is probably one of the stricter browsers out there in terms of highlighting SSL errors.  Most browsers will point out when you are viewing an HTTPS page which loads insecure images/Javascript, I understand how this is a security issue - an attacker could have modified the non-SSL content in a way which gives them access to the secure content, injected some javascript for example.  However once you have viewed an HTTPS page with mixed content, Google Chrome will continue showing you the mixed content warning (a red line through the 'https://') for as long as you stay browsing the same domain, even for subsequent pages which only include other HTTPS resources. Only once you navigate to another domain, or open a fresh tab does it tell you you're secure again.  What is the danger it's protecting you from here? How could mixed content on a previous page actually affect the security of subsequent secured pages? I understand that mixed content should be flagged up, but there must be a specific reason that Google is persisting this warning, other than "Well you still need to know about it"


How can I minimize any browser window using a code (for example 'javascript') ? I would like to minimize browser in infokiosk.

Is there a Javascript or jQuery method to minimize the current browser window?


I have an unrooted Nexus 4 and running Android 5.0. When the 5.0.1 OTA update came out I could download it and start installing it and then get screen that said error with the android robot on it's back but with no helpful information. I just tried again with 5.1 and I got the same problem. I factory reset my phone and it still doesn't work!  Please can someone advise on what to do?   Thanks in advance.

I updated to 5.0.1 via OTA sometime ago, and it worked fine. Now I got a notification that 5.0.2 is ready but when Android shuts down to install update it returns error (with no other message. My Nexus 7 is rooted but has the stock recovery.  Is there an easy fix that doesn't require factory reset or installing recovery?


I've downloaded a driver for a video card (*.run) and tried to install within a terminal. When I started the installation process I got this error: ERROR: nvidia-installer must be run as root. I'm logged in with my own profile.

My PC has both Ubuntu and Windows 7 installed. I have installed all my drivers in Windows like Nvidia graphics, motherboard etc. Shall I install them in Ubuntu too?  I looked on the web for my Nvidia drivers and I have found a .run file. How could I install it on my Ubuntu?


I have the following data, i want to define in a elegant way and fast access.  Dictionary<string, string> myDictionary =  new Dictionary<string, string> {    {"a", "1"},    {"b"  "2"} };   Now the "1" and "2" defined in 2 different modules x and y. I'm thinking of nested dictionary here. I'm looking for elegant way to define.  My thinking:      //FileA -  Namespace1     Dictionary<string, string> dcA = new Dictionary<string, string>     {         {"LOC1", "ADDR1"},         {"LOC2", "ADDR2"}     };      //FileB -  NameSpace1     Dictionary<string, string> dcB = new Dictionary<string, string>     {         {"LOC3", "ADD3"},         {"LOC4", "ADD4"}     };      //FileX - NameSpace 2     static Dictionary<string, string> dc1 = new Dictionary<string, Dictionary<string, string>>     {         {"LOC1", dcA.GetValue("LOC1"},         {"LOC2", dcA.GetValue("LOC2"},         {"LOC3", dcA.GetValue("LOC3"},         {"LOC4", dcA.GetValue("LOC4"},     };      string myString;     string key = "LOC1";     if (!dc1.TryGetValue(key, out myString))     {         throw new InvalidDataException("Can't find the your Addr for this LOC");     }     Console.WriteLine("myString : {0}", myString)      //Expected output as      myString : ADDR1   Yes i want to combine 2 dictionary to a new dictionary. The problem is i can access value of new dictionary like this dcA.GetValue("LOC1"}. Trying to see if there a better solution or data struct which i'm not thinking at all.

What's the best way to merge 2 or more dictionaries (Dictionary<T1,T2>) in C#? (3.0 features like LINQ are fine).  I'm thinking of a method signature along the lines of:  public static Dictionary<TKey,TValue>                  Merge<TKey,TValue>(Dictionary<TKey,TValue>[] dictionaries);   or  public static Dictionary<TKey,TValue>                  Merge<TKey,TValue>(IEnumerable<Dictionary<TKey,TValue>> dictionaries);   EDIT: Got a cool solution from JaredPar and Jon Skeet, but I was thinking of something that handles duplicate keys. In case of collision, it doesn't matter which value is saved to the dict as long as it's consistent.


I have been struggling now for an inordinate amount of time trying to get the brightness adjustment working in Ubuntu.  I am running Ubuntu 12.04 on a Lenovo V570 Laptop.  I have tried all of the adjustments I can find to "fix brightness control" in the /etc/default/grub file with the following results (before you ask, yes I did run sudo update-grub and sudo reboot after each change):  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="  Result: No response to buttons, slider has no affect.  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"  Result: No response to buttons, slider has no affect.  GRUB_CMDLINE_LINUX_DEFAULT="splash quiet acpi_osi='!Windows 2012'"  Result: Limited response to buttons from OS (slider only moves down one tick, then sticks), no dimming, slider has no affect.  GRUB_CMDLINE_LINUX_DEFAULT="splash quiet" Result: OS responds to buttons, but screen does not dim.  Slider has no affect.  Am I missing something?  What can I do to adjust the brightness?  Update: I did more searching, and I found that in /sys/class/backlight I have both acpi_video0 and intel_backlight.  By changing the "brightness" file in each of these folders, I discovered, that editing the /sys/class/backlight/intel_backlight/brightness changed the actual brightness setting on my screen. How do I get Ubuntu to adjust this setting?  Any hope of getting my function keys to also adjust it?  Update2:  As requested, here is the output from lspci:      $ lspci | grep VGA     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

My Lenovo Z570 has two GPU's, nVidia and Intell. Brightness control has no effect what so ever over the screen brightness, and because I've had some major issues in the past when I was trying to fiddle with nVidia drivers and settings, and I wanna be cautious now. I haven't find similar questions referring 14.04 LTS with similar configuration as mine.   I've read that it could be fixed by adding/changing content in xorg.conf but when I run  sudo gedit /etc/X11/xorg.conf   the file comes out to be absolutely empty. What do I need to do, what do I need to add to it and not get my laptop screwed with a black screen again?


I have equipped and charged the axii sign of the puppet type and it does always make the enemy (drowner, bandit or alghoul) a friend. But with the exception of a group of drowners it never resulted in the puppet attacking the rest of the monsters.  I have not been able to repeat the situation so far.  Do I have to attack the mob beforehand? Or afterwards? Does it have to be a melee attack? I tend to do the sign right before the fight, as it takes awfully long. For instance, I axii puppeted one of two alghouls, and then walked towards them to make them aggressive. I had the advantage of just one alghoul following me, but never did I see them fighting amongst themselves.  My situation differs from the one in , which appears to be a problem of casting. My situation is like the one described . I haven’t equipped delusion.

The Axii sign should allow Geralt to get one enemy to fight on his side for a short while. This sound extremely useful for fighting groups, but I was unable to get it to work so far.   What happens when I use it on an enemy is that he gets distracted for a second and some visual effect is visible on the enemy. But he doesn't attack other enemies and the whole thing lasts only a second or so.  Am I doing something wrong, or does the Axii sign just not work on many enemies?


How would you code direction to bearing in Java? For example: Enter compass direction: N Enter compass angle: 30 Enter compass direction: W The code should output 330. My code so far isn't outputting anything (I have not completely finished because I would like to find out what I am doing wrong first)  {System.out.println("Do you have either - "             + "1: A bearing OR 2: A direction? (Enter number 1 or 2)");}     int number;     Unit2LastAssignment In1 = null;     number = In1.getInt();     if (number == 2)     {System.out.println("Enter Compass Direction: ");}     String direction1;     Unit2LastAssignment In2 = null;     direction1 = In2.getString();     {System.out.println("Enter Compass Angle: ");}     int angle;     Unit2LastAssignment In3 = null;     angle = In3.getInt();     {System.out.println("Enter Compass Direction: ");}     String direction2;     Unit2LastAssignment In4 = null;     direction2 = In4.getString();      {if (direction1 == "N")     {System.out.println("360");}     else if (direction1 == "E")     {System.out.println("90");}     else if (direction1 == "S")     {System.out.println("180");}     else if (direction1 == "W")     {System.out.println("270");}     else if (direction1 == "NE")     {System.out.println("45");}     else if (direction1 == "SE")     {System.out.println("135");}     else if (direction1 == "SW")     {System.out.println("225");}     else if (direction1 == "NW")     {System.out.println("315");}          else if (direction1 == "N" && direction2 == "E" && angle > 0 && angle <     45)         {System.out.println(angle);}     else if (direction1 == "E" && direction2 == "N" && angle > 0 && angle <     45)     {int angle1;     angle1 = 180 - angle;     {System.out.println(angle1);}}

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?