I will be traveling to the US shortly from India and will be returning back. I am planning to purchase a laptop in the US and want to bring it to India. I read in the website of India customs where it says the following about "duty free" entitlement:  (ii) Rs.25000/- (in value) if Stayed abroad for more than three days (iii) One Laptop computer (notebook computer) imported by a passenger (but not a member of the crew of a ship / aircraft) Free, if the passenger is of the age of 18 years or above.  I want to know if the laptop mentioned in (iii) comes under (ii).  To be more clear, can I bring items worth 25K Plus a laptop (worth whatever)?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


I've been trying to prove this statement:     Let $f$ be a continuous function on $[0,1]$ such that $f(0)=f(1):=c$, and let $n$ be a natural constant. Prove that there exists $x\in[0,1-\frac{1}{n}], x\in \mathbb R$ such that $f(x+\frac{1}{n})=f(x).$   I tried to use the Intermediate Value Theorem by defining $g(x)=f(x+\frac{1}{n})-f(x)$. I could see that $g(0)=f(\frac{1}{n})-c$ and $g(1-\frac{1}{n})=c-f(1-\frac{1}{n})$ yet I could not figure out how to prove that $\mathrm s\mathrm i\mathrm g\mathrm n (g(0)\cdot g(1-\frac{1}{n}))=-1.$  Edit: Please notice that this statement is not (necessarily) true for every n. The statement is about some constant n.  Thank you and have a good day!.

Let $f:[0,1]\to \mathbb{R}$ is continuous, such that $f(0)=f(1)$. For each $n\in\mathbb{N}$, prove that $\exists x\in [0,1]$ such that $x+\dfrac{1}{n}\in[0,1]$ and $f\left(x+\dfrac{1}{n}\right)=f(x)$.   My approach: The interval $[0,1]$ is connected, then if $f$ is continuous, we have $f([0,1])\subset\mathbb{R}$ is a interval. And I suppose that, I can define a closed path such that $f(0)=f(1)$. Any hint pls,


There is problem. (Circle is new and uniform).

I'm quite new to Blender, so forgive me if this is a dumb question. I don't even know hot to describe it properly, so:      Basically I want to extrude a rectangle and then scale it along two axis, but without keeping the proportions; I want to reduce them of the same quantity, so that I get something similar to the frame of a picture.


In order to prove that   $$\sup A = -\inf(-A)$$  obs: $A$ is limited  I did:  think of $\sup A$ as a number  $$a\le \sup A, \forall a\in A \implies -a\ge -\sup A, \forall a\in A$$ Doesn't that implies that $-\sup A$ is indeed $\inf(-a)?$ I think I should prove that if there is another number that is in the middle, then this number cannot be the sup.   Also, why $A$ has to be bounded?

Let $\emptyset\neq A\subseteq\mathbb{R}$ a bounded set. Consider $-A=\{-a:a\in A\}$. I want to prove that $-\sup(-A)=\inf(A)$.  It is easy to see that $-\inf(A)$ is an upper bound of $-A$, so $\sup(-A)\le -\inf(A)$, then $-\sup(-A)\ge \inf(A)$.  How can we prove that $-\sup(-A)\le \inf(A)$?  Thanks.


As you can see Git command to check status untrack file in my repository. git status  i want to remove/ reset those untrack file but git command is not working  even i try clean untrack file still hard luck  even i try to pull from remote repository still no luck. can anyone tell me how to remove those file from untrack status? Thanks in advance.

How do you delete untracked local files from your current working tree?


I have a problem with the color of the rows and I have searched and tried several solutions and I have not been successful. I can set the color of the row without problem, but the colo does not occupy the entire row, leaving a margin up and down unpainted. How can I make it to paint everything?  I use MacTex with Texmaker.  Thank you very much.  \documentclass[12pt,a4paper,oneside]{report} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage[T1]{fontenc} \usepackage[scaled]{helvet} \normalfont \usepackage{graphicx} \usepackage{float} \usepackage{booktabs} \usepackage{colortbl} \usepackage{caption} \captionsetup{justification=centering,font={footnotesize},skip=0pt} \usepackage{color} \definecolor{verde}{RGB}{40,112,60} \definecolor{blanco}{RGB}{254,254,254}  \begin{document}  \begin{table}[H] \centering \resizebox{\textwidth}{!}{ \begin{tabular}{cccccccccccccc} \toprule[0.5mm] \multicolumn{14}{>{\columncolor{verde}}c}{\textcolor{blanco}{\textbf{Parámetros climáticos promedio}}}\\ \midrule[0.3mm] Mes & Ene & Feb & Mar & Abr & May & Jun & Jul & Ago & Sep & Oct & Nov & Dic & Anual\\ \midrule[0.1mm] Máx. media ($^\circ$C) & 15 & 15 & 16 & 17 & 15 & 14 & 14 & 15 & 16 & 18 & 18 & 17 & 15,8\\ Media ($^\circ$C) & 9 & 9 & 9 & 8,5 & 6,5 & 5,5 & 5,5 & 5 & 6 & 6,5 & 9,5 & 10 & 10\\ Mín. Media ($^\circ$C) & 3 & 3 & 2 & 0 & -2 & -3 & -4 & -3 & -1 & 1 & 2 & 3 & 0,1\\ Precip. (mm) & 92 & 86 & 55 & 13 & 3 & 1 & 1 & 3 & 10 & 20 & 38 & 75 & 397\\   Días $\geq$ 1mm & 17 & 16 & 12 & 5 & 1 & 0 & 0 & 1 & 2 & 5 & 7 & 14 & 80\\   \bottomrule[0.5mm] \end{tabular} } \caption{Datos climáticos promedio de San Cristóbal de Lípez} \end{table}  \end{document}

\documentclass[]{article} \usepackage[table,dvipsnames]{xcolor} \usepackage{multicol,booktabs,tabularx}  % Table settings \renewcommand{\aboverulesep}{1pt} \renewcommand{\belowrulesep}{1pt}  \begin{document}     \begin{tabularx}{\textwidth}{@{}X l@{}}         This is Header 1 & This is Header 2 \\         \toprule         \rowcolor{Apricot}         This is Text 1 & This is Text 2 \\\midrule         This is Text 1 & This is Text 2 \\\midrule         This is Text 1 & This is Text 2 \\         \bottomrule     \end{tabularx} \end{document}   I have the above table MWE using tabularx, and I am trying to colour the row from the table. However, due to the use of my \aboverulesep and \belowrulesep, I now have gaps above and below my table row that is not coloured.   Also, because of the use of my @{} on either side of the table to 'remove' the excess padding on the sides of the table, the row colour is being applied in those padding as well.   Qn 1: How can I colour the aforementioned gaps (arising due to the \aboverulesep) in, while maintaining the rule separation?   Qn 2: How to remove the colour from the two sides of the table?     EDIT  This is in response to Zarko's answer. I want to maintain the use of @{} on either side to remove the padding. If I were to adapt this into your answer, like so:  % @Zarko's answer \documentclass{article} \usepackage[table,dvipsnames]{xcolor} \usepackage{booktabs, cellspace, tabularx}  % Table settings \renewcommand{\aboverulesep}{0pt} \renewcommand{\belowrulesep}{0pt} \setlength\cellspacetoplimit{5pt} \setlength\cellspacebottomlimit{5pt}  \begin{document}     \begin{tabularx}{\textwidth}{@{}SX Sl@{}}% <-- S is append for activate additional vertical space          This is Header 1 & This is Header 2 \\         \toprule         \rowcolor{Apricot}         This is Text 1 & This is Text 2 \\\midrule         This is Text 1 & This is Text 2 \\\midrule         This is Text 1 & This is Text 2 \\         \bottomrule     \end{tabularx} \end{document}   I obtain this:   and so my second question (Qn2) is still unresolved.. For Qn 1, I prefer to use the solution by @Skillmon with \renewcommand{\arraystretch}{1.15} as I need not add a new package.


After working on the integral $\int_{0}^{1} \frac{\ln(1+x)}{x}dx$ for a couple of hours, I became convinced its antiderivative was not elementary. So I looked it up on Wolfram Alpha, and it found that  $$\displaystyle{\int \frac{\ln(1+x)}{x}dx = -\sum_{k=1}^{\infty}\frac{(-x)^k}{k^2} = -\text{Li}_2(-x)}.$$ How does one prove this result? I have no idea where to even begin...


I am a beginner in Blender. I have created a handgun after a reference, and I believe I have made a few mistakes. When it came to dents, I used "loop cut" to manually show them, but I do not believe I will be able to do this in the future (too many polygons and loop cuts for every single dent or additive). I also did this for holes.  There are several objects/meshes that are separate. I am completely lost when it comes to texturing the gun after the reference image. Should I join all of the meshes/objects into one object and then texture? If so, how would I go about texturing every single aspect that I need present. I apologise if this seems complicated or confusing, I am a true beginner. (I have watched a few tutorials)

I'm attempting to make a texture for a model i've been working on, so i've been trying to get a decent UV map, However whenever I do it usually ends up either very distorted or a lot of unrecognizable pieces or several different UV maps. What are some easier ways of unwrapping/UV Mapping?


Hi   I'm writing a little paragraph and want to write my footnotes horizontally.  How can I do that?  for example here my footnotes are 6x1 and I want something 1x6 or 2x3(I need a option that I can change the shape).  below is the code:  \begin{document} %\maketitle \chapter*{\centering Throwing all Money from the window}     In dangerous car chase in L.A recently, bank robbers who were running away\footnote{escaping} from the police, launched\footnote{throw} all the taken\footnote{stolen} money from the window. The disturbance \footnote{incident} began in northern suburb of the city where a armed bank robbery had been committed.the robbers escaped in a stolen vehicle and two of them who have not been arrested\footnote{caught}, tried to jump out of the car.     All along the chasing\footnote{route} one of the suspects ,who had set in the back seat of the car, threw handfuls of bank notes out of the window.  \end{document}   I would appreciate your solutions.

For documents with a lot of footnotes, particularly if some are short, it can be nice to have multiple on the same line, e.g.:        this is the first footnote 2. this is the second footnote 3. this   if the third footnote 4. finally, we begin to wrap around.      Rather than having it:        First footnote   Second footnote   Etc.      Is there a way to achieve this in LaTeX?  (This is not a duplicate of  because I'm asking about regular full page environment.)


Is it possible to filter out some WiFi networks from list of all available WiFi networks when I drop down the WiFi list from the menu bar in macOS?  My condo complex has a lot of networks and it clutters the list. I only ever need 3 -- my home  WiFi, my work WiFi, my iPhone WiFi.

I have obnoxious neighbors that think its funny to use offensive words for their SSIDs.  I would like to remove those SSIDs from, at a minimum, the wifi menubar icon.  If its easier, hiding/removing them from the OS completely (menubar icon and system prefs) would be acceptable.  I'm an OS X newbie, so I don't even know where to start with this.    I prefer built-in solutions (read: free), but solutions < $10.00 would be ok too.


I have 6 3x10 blocks of LEDs (3 blocks red, 3 blocks white), all controlled individually.    r r r r r r r r r r + r r r r r r r r r r -   r r r r r r r r r r   (wired in parallel)  I'm controlling the blocks of LEDs using an Arduino MKRZERO.  I'm able to make 1 LED shine very bright per every output pin on the Arduino. However, I cannot make an entire block of lights shine very bright. They're actually very dim.  The I/O pins on the Arduino can only handle 3.5 volts.  If I by-pass the Arduino, I'm able to make a block of lights shine very bright.  At most I will have 3 blocks (90 LEDs total) shining, and at least 1 block (30 LEDs); except when it's off where obviously there would be no LEDs on.  The blocks will flash, only being on for no more than 1 second.   Everything needs to be powered by a 12v car charger (cig lighter port).  Currently I have an adapter that plugs into the car charger, and coverts to USB. I then took a USB cable and wired it to a voltage step down that goes to the Arduino. From the Arduino pins I have wires going to the light blocks.  The lights I'm using are 5mm clear straw hat red and white.    Multiplexing Where you can trick the brain into thinking all the lights are on. If I went this route, I would at most have 3 LEDs on at a time right? I've never seen this done with flashing blocks of LEDs, or this many... or really ever seen this.  Transistors To my understanding I can put 12 volts to all the lights, and use transistors connected to the Arduino that would act as a switch for each block of lights. One transistor per block of lights, right?  I'd like to go the easiest, and least expensive route.

I now have a PCB with 64 UV LEDs on it and I use this to expose other PCBs. I have a serial resistor for each LED which produces a lot of heat and consumes about 1.3 A at 12 V.  I am now considering to make a bigger UV unit with twice the size of my current UV unit. I have searched on the internet how to drive this amount of LEDs but the only things I came across where ways to drive each LED individually.  I was thinking to make groups of LEDs (5 by example) and use one resister for each group of LEDs.  Are any other efficient ways to drive 128 LEDs without grouping the LEDs?


Let $C_0,C_1,\ldots,C_n$ are real constants. It is given that $$C_0 + \frac{C_1}{2} + \ldots + \frac{C_{n-1}}{n} + \frac{C_n}{n+1}= 0$$ We need to prove that the equation $C_0 + C_1 x + \ldots + C_{n-1} x^{n-1} + C_{n}x^{n} = 0$ has at least one real root between 0 and 1. This is taken from Rudin pg-114. I Need some help in the last part of the following proof:  Partial proof:   Let $f(x)= C_0 + C_1 x + \ldots + C_{n-1} x^{n-1} + C_{n}x^{n}$.  We have: $$f'(x)= C_1+ 2C_2 x + 3C_3 x^2 + \ldots +nC_n x^{n-1}$$  $$f'(0)=C_1, \ f'(1)= C_1 + 2C_2 + 3C_3 + \ldots +(n-1)C_{n-1}+ nC_{n}$$ I would probably want to show that $f'(0)$ and $f'(1)$ are opposite in sign so that we can claim that there exists at least one $x \in (0,1)$ such that $f'(x)=0$. This is possible because $f(x)$ is a polynomial and hence continuous, differentiable function. Going forward, we use: $$C_0 + \frac{C_1}{2} + \ldots +\frac{C_{n-1}}{n} + \frac{C_n}{n+1}= 0$$ to get: $$C_1 = -2\left(C_0 + \frac{C_2}{3}+ \ldots +\frac{C_n}{n+1}\right)$$ Using this we get the following: $$f'(1)=-2C_0 + \sum_{k=2}^{n} \frac{(k+2)(k-1)}{k+1} C_{k}$$ $$f'(0)=-2C_0 -2 \sum_{k=2}^{n} \frac{1}{k+1} C_{k}$$ But how do we conclude that $f'(1)$ is opposite in sign of $f'(0)$ ?

Problem: If   $$C_0+\frac{C_1}{2}+\cdots + \frac{C_{n-1}}{n}+\frac{C_n}{n+1} =0,$$  where $C_0,...,C_n$ are real constants, prove that the equation  $$C_0+C_1x+\cdots +C_{n-1}x^{n-1}+C_nx^n=0$$  has at least one real root between $0$ and $1$.  Source: W. Rudin, Principles of Mathematical Analysis, Chapter 5, exercise 4.


I need help calculating gravity and shape of a planet based on a few factors.  If a mass rotates quickly enough, the inertia (or "imaginary centrifugal force") will pull the mass outward "perpendicular" to the rotational axis. This is shown in both Earth (very slightly) and Haumea (a dwarf planet with a greater rotational speed), as well as other examples.  The mass (and therefore gravity) will affect how quickly the object must rotate to begin becoming more and more oblong. The tangential velocity at the equator (where the planet will be most oblong, if rotating quickly enough) will work against the gravity to make it seem "lighter", while gravity would be heavier at the poles. How oblong the planet is (how far the surface of the equator is from the center) will affect the tangential velocity, and in turn the resultant gravity.  I am trying to create a large rocky planet (that will be habitable) with a relatively quick rotational speed. The speed is debatable, and doesn't need to be definite as of now (i am hoping it can be a variable, but am looking at a period of one hour or less, until unrealistically fast). My problem is that I don't know how to calculate how oblong the planet will be with a given mass or rotational speed. I am hoping to be able to set a rotational speed and mass (or gravitational force), and determine and equation that either is a graph to show the shape, or can be used to then make a graph to show the shape.  My desire is to determine the shape and appearance of the planet, as well as the gravitational force at each latitude. Using the equation, I hope to be able to change the rotational speed and mass (or gravity based on mass) to find different results.

I made a naive calculation of the height of Earth's equatorial bulge and found that it should be about 10km.  The true height is about 20km.  My question is: why is there this discrepancy?  The calculation I did was to imagine placing a ball down on the spinning Earth.  Wherever I place it, it shouldn't move.  The gravitational potential per unit mass of the ball is $hg$, with $h$ the height above the pole-to-center distance of the Earth (call that $R$) and $g$ gravitational acceleration.  Gravity wants to pull the ball towards the poles, away from the bulge.  It is balanced by the centrifugal force, which has a potential $-\omega^2R^2\sin^2\theta/2$ per unit mass, with $\omega$ Earth's angular velocity and $\theta$ the angle from the north pole.  This comes taking what in an inertial frame would be the ball's kinetic energy and making it a potential in the accelerating frame.  If the ball doesn't move, this potential must be constant, so  $$U = hg - \frac{(\omega R \sin\theta)^2}{2} = \textrm{const}$$  we might as well let the constant be zero and write  $$h = \frac{(\omega R \sin\theta)^2}{2g}$$  For the Earth,   $$R = 6.4*10^6m$$  $$\omega = \frac{2\pi}{24\ \textrm{hours}}$$  $$g = 9.8\ m/s^2$$  This gives 10.8 km when $\theta = \pi/2$, so the equatorial bulge should be roughly that large.    , the Earth is 42.72 km wider in diameter at the equator than pole-to-pole, meaning the bulge is about twice as large as I expected.  (Wikipedia cites diameter; I estimated radius.)  Where is the extra bulge coming from?  My simple calculation uses $g$ and $R$ as constants, but neither varies more than a percent or so.  It's true the Earth does not have uniform density, but it's not clear to me how this should affect the calculation, so long as the density distribution is still spherically-symmetric (or nearly so).  (Wikipedia also includes , without derivation, that agrees with mine.)


How can I add open bracket([) before first open paranthesis({) and close bracket(]) last close paranthesis(}) in the below string : res.data = "{\"id\":\"97\",\"studentName\":\"#28 McCarran Center, LC\",\"email\":\"\",\"inactive\":false},{\"id\":\"98\",\"studentName\":\"+Pura\",\"email\":\"dc@maspura-gt.com\",\"inactive\":false}"  I needs to make it as : res.data = "[{\"id\":\"97\",\"studentName\":\"#28 McCarran Center, LC\",\"email\":\"\",\"inactive\":false},{\"id\":\"98\",\"studentName\":\"+Pura\",\"email\":\"dc@maspura-gt.com\",\"inactive\":false}]"  res.data =  res.Content.Insert(1, "[");  This made me to add "[" for the first. But how can I add to the last closed parenthesis one ?

What's the most efficient way to concatenate strings?


There is a four category classification system for individuals with HIV, labeled Stages 1, 2, 3, and 4, with higher stages indicating more advanced disease. Cell count is a continuous variable, and you are interested in comparing mean cell count between those in different stages.  My question is how does the model change if I treat the stages as nominal or ordinal? I hope my representations below are correct. What test could I use to see if using an ordinal relationship is appropriate, or see if one model has a better fit? My first thought was to look at the $R^2$ value, but that seems too simple.   Nominal Model:  $E(Y)=b_0+b_1X_1+b_2X_2+b_3X_3$, with $X_1, X_2, X_3$ all being indicators for the different stages.  Stage 1 is the reference stage such that $E(Y)=b_0$ for stage 1, $E(Y)=b_0+b_1$ for stage 2, etc  Ordinal Model:  Do I basically treat the stages as a continuous variable?   $E(Y)=b_0+b_1X_1$, where $X_1$ consists of the stages:  stage 1=1, stage 2=2, etc.

Given a continuous dependent variable y and independent variables including an ordinal variable X1, how do I fit a linear model in R? Are there papers about this type of model?


I am traveling with esta visa ( visa waiver program) i wanted to spend whole summer in North America. I was in US for 87 days and now came to Canada to see my family. I wasnt aware that Canada is under the 90 days for visa waiver!! I dont get it , I had to come to Canada with a  E-Visa. I am confused did I over stayed my US ESTA visa !! If i am whats should I do next to get my visa back ... As my return flight is from LA

I'm staying in the US under the Visa Waiver Program at the moment, until 8th March. I'm planning to visit Montreal, Canada, for a week and then come back to the States.  Is a new visa waiver required to come back to the States or is the old one still valid after leaving the country?


Quick proof that every finite integral domain is a field.    I'm not sure if I'm missing anything, but here is my attempt.  Let $R$ be a finite integral domain. So it is unital and commutative. Since $R$ is finite, it is of the form $R= \{a_1,a_2,...,a_n\}.$ Let $0\neq a\in R.$ Then if $aa_i = aa_j,$ we must have $a_i=a_j$ (because $R$ has no zero divisors). Since $R$ is closed under multiplication, $R= \{aa_1,aa_2,...,aa_n\}.$ Since $R$ is unital, there exists $a_i\in R$ such that $aa_i=1.$ Thus $R$ is a field.

This is how I'm approaching it: let $R$ be a finite integral domain and I'm trying to show every element in $R$ has an inverse:   let $R-\{0\}=\{x_1,x_2,\ldots,x_k\}$,  then as $R$ is closed under multiplication $\prod_{n=1}^k\ x_i=x_j$,  therefore by canceling $x_j$ we get $x_1x_2\cdots x_{j-1}x_{j+1}\cdots x_k=1 $,  by commuting any of these elements to the front we find an inverse for first term, e.g. for $x_m$ we have $x_m(x_1\cdots x_{m-1}x_{m+1}\cdots x_{j-1}x_{j+1}\cdots x_k)=1$, where $(x_m)^{-1}=x_1\cdots x_{m-1}x_{m+1}\cdots x_{j-1}x_{j+1}\cdots x_k$.   As far as I can see this is correct, so we have found inverses for all $x_i\in R$ apart from $x_j$ if I am right so far. How would we find $(x_{j})^{-1}$?


What is the value of $0^0$ ??  I have read many discussions regarding it but the result was only confusion. Is it 0, 1 or not defined??

Could someone provide me with a good explanation of why $0^0=1$?  My train of thought:  $x>0$  $0^x=0^{x-0}=0^x/0^0$, so  $0^0=0^x/0^x=\,?$  Possible answers:   $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined   PS. I've read the  on mathforum.org, but it isn't clear to me.


I am trying to define a name for a long server folder path below.  May I know why I still get "EOL while scanning string literal" error?  Many thanks. path= (r '\\hbap.adroot.abb\HK\Finance\00210602\AMH_A2R\1KY\Drv Reengine\Python\')

Technically, any odd number of backslashes, as described in .  >>> r'\'   File "<stdin>", line 1     r'\'        ^ SyntaxError: EOL while scanning string literal >>> r'\\' '\\\\' >>> r'\\\'   File "<stdin>", line 1     r'\\\'          ^ SyntaxError: EOL while scanning string literal   It seems like the parser could just treat backslashes in raw strings as regular characters (isn't that what raw strings are all about?), but I'm probably missing something obvious.


I have done attaching 3 events mouseenter mouseleave click, and they all fire in the first attempt. However, after this first time firing, as I commented above, I prepend a .shape-top.interactive element when click is fired after 0.3s in order to make these events be able to refire, but then nothing happen with mouseenter (the .hover is not added), then as a result mouseleave click do not fire too. Where does it go wrong here? see snippet below :   var shape_placed = `
<svg style="width: 80%; height: 80%" viewbox="0 0 63 63" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="31.5" cy="31.5" fill="#ff7f00" id="svg_1" rx="30" ry="30" stroke="null" stroke-width="1.5"></ellipse> </svg>
`; var shape_top = `
<svg style="width: 80%; height: 80%" viewbox="0 0 63 63" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="31.5" cy="31.5" fill="#ff7f00" id="svg_1" rx="30" ry="30" stroke="null" stroke-width="1.5"></ellipse> </svg>
`;  $(".shape-top.interactive").on({     "mouseover": function(){         $(this).css({"transform": "", "transition": ""}).addClass('hover');     },     "mouseout": function(){         $(this).removeClass('hover').css({"transform": "translate(0px,0px)", "transition": "all 0.2s ease-in-out"});         setTimeout(function() {$(this).css({"transform": "", "transition": ""});}, 0);     },     "click": function(){         $(this).css({"transform": "translate(0,-94px)","transition": "transform 0.3s ease-in-out"});         setTimeout(function() {             $('.shape-deck').find('.shape-top.interactive').remove();             $('.shape-deck').prepend(shape_top); // a .shape-top.interactive element is prepended but the event does not fire             $('.shape-slot').html('').append(shape_placed);         }, 300);     } }); .shape-deck{     width: 63px;     height: 63px;     display: inline-block;     margin: 2px 20px 2px 0px;   }      .shape-top{     background-color: #f8f8f5;     border-radius: 5px;     width: 63px;     height: 63px;     display: flex;     align-items: center;     justify-content: center;     }    .shape-top.interactive{     z-index: 5;     cursor: pointer;   }      .shape-top.static{     z-index: 3;     box-shadow: rgba(108,108,108,.56) 0 3px 2px 0;   }    .shape-top,.shape-middle,.shape-bottom{     position: absolute;     user-select: none;   }    .shape-slot{     background-color: #d6d6d0;     border-radius: 5px;     width: 63px;     height: 63px;   }      .hover{     box-shadow: rgba(108,108,108,.56) 0 3px 2px 0;     width: 67px;     height: 67px;     transform: translate(-4px,-5px);     transition: all 0.2s ease-in-out;   }

<svg style="width: 80%; height: 80%" viewbox="0 0 63 63" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="31.5" cy="31.5" fill="#ff7f00" id="svg_1" rx="30" ry="30" stroke="null" stroke-width="1.5"></ellipse> </svg>

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.


So I was playing Skyrim on my PS4 and I found out that I could do this mission. I didn’t know that this mission had a bug though. I accepted vilkas’s mission for purity first. As soon as I leave the building he goes back inside and the mission is in the completed section even though it says I never completed it. Now something happened and I can’t start the mission again because they keep saying I have a follower, when I clearly don’t have anyone with me. Can someone please help me, if they know how to fix this bug.

I started the quest where Vilkas asks me to accompany him to the flame to cure himself.   But it won't let activate the flame and says the quest is complete even though I haven't done anything, and Vilkas is nowhere to be seen.  Is it because I fast traveled to the location?


I want that everytime someone connect to my wifi network, the first browser webpage is one that I can set via admin page.  How can I achieve this with AP NetgearWG602?  I dont have any experience about that.  Just want to know whether it is possible and if so some hint to do that.  Thanks

Currently I'm using hostapd and dnsmasq. And I want to add something like login page: user connects to ap, opens any site and my wifi/dns-program automatically redirects him to the login page till he didn't enter correct credentials. I've found something on the raymond.cc but it's only for windows. So what should I use?  And I also want few sites to be available even before log-in


Currently, generics in C# do not allow any sane way to perform arithmetic. There are awkward workarounds available, but none of them are very neat and all of them reduce performance. According to , an interface with arithmetic types is not possible to implement, and so one such workaround is suggested.     But what you could do is have your Matrix take as an argument a Calculator, and in Calculator, have a method called multiply. You go implement that and you pass it to the Matrix.   Why should I have to tell an advanced programming language how to add and multiply numbers? [Edited due to popular demand]  Why not simply allow a Generic to be restricted to a list of types?  Eg.  class Matrix<T> where T : int,long,float,double   The syntax could of course be different. But the compiler needs only to check that the type is on the list, and that the operators used work on all types, which should be much simpler than the apparently-too-difficult interface suggestion.  Are there any obvious reasons as to why this cannot be implemented?

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


I was in a rush and accidently did "sudo chmod -R 777/". As you can imagine, everything is broken. I can't access sudo either. Is there a solution to this, or will I have to do a clean install?

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


I've got a little question here because I'm creating a log in and register system. A developer at my school told me to salt secure passwords. I agree on that point but he said I needed to create the salt out of a timestamp but how to do it? Currently I'm doin' this:  $password = hash('sha512', $password . $salt);   and the salt just like:  $salt = "xHkosbGhsfT77239GhsvH";   This stands litteraly in my configuration so it's not good...   Does anyone have some tips? Any idea how to do it, so if any of you do share it with me!  Thanks.

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


My computer keeps connecting itself to a malicious website.  Here is the image of my antivirus blocking it:    I didn't even open the Web browser when this appeared.  Whenever I start the computer it's like this (happening for a couple of days now).  What can I do to stop it?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I want to check the disk usage with a readable size (option -h)  [root@iz2ze9wve43n2nyuvmsfx5z /]# du -sh ./* 2>/dev/null | sort -nr 914M    ./var 568K    ./tmp 523M    ./root 496K    ./run 156M    ./boot 37M ./etc 16K ./lost+found 4.0K    ./srv 4.0K    ./opt 4.0K    ./mnt 4.0K    ./media 4.0K    ./home 2.4G    ./usr 0   ./sys 0   ./sbin 0   ./proc 0   ./lib64 0   ./lib 0   ./dev 0   ./bin   It display 568K > 523M  How could I solve the problem?

How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong.  [~]# du -sh /var/* | sort -n 0       /var/mail 1.2M    /var/www 1.8M    /var/tmp 1.9G    /var/named 2.9M    /var/run 4.1G    /var/log 8.0K    /var/account 8.0K    /var/crash 8.0K    /var/cvs 8.0K    /var/games 8.0K    /var/local 8.0K    /var/nis 8.0K    /var/opt 8.0K    /var/preserve 8.0K    /var/racoon 12K     /var/aquota.user 12K     /var/portsentry 16K     /var/ftp 16K     /var/quota.user 20K     /var/yp 24K     /var/db 28K     /var/empty 32K     /var/lock 84K     /var/profiles 224M    /var/netenberg 235M    /var/cpanel 245M    /var/cache 620M    /var/lib 748K    /var/spool


I have a logrotate running on Aws ec2 instance which is trying to rotate logs under /var/log/tomcat8/ every hour. I have below configuration under /etc/logrotate.d/rotate_tomcat:  "/var/log/tomcat8/localhost_access_log.*-*-*.txt" "/var/log/tomcat8/catalina.*-*-*.log" "/var/log/tomcat8/agent-log.*-*-*.json" "/var/log/tomcat8/ldap-query-log.*-*-*.*.json" {     copytruncate     size 1k     rotate 5     compress     missingok     create 0644 tomcat tomcat }   When I run this manually, it works as expected. But when I run this as crond, it doesn't do anything. Below is my crond config under /etc/crond.d/accessLogDeletion  */2 * * * * root logrotate /etc/logrotate.d/rotate_tomcat  Any inputs are appreciated.

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


I am trying to make a LoRa board with an RFM95W module. Using the calculator shown in the image below, I designed a 50 ohm impedance transmission line. I added options for both a monopole copper wire antenna and a proper U.Fl antenna. However, after further research I am unclear whether a wire antenna even needs the 50 ohm. Further, I am worried that if I end up going with the U.Fl, the board trace impedance will add with the connector impedance and create 100 ohms.  (There will be copper pour on the red side)  So do wire antennas need a 50 ohm transmission line? Will the impedance of a 50 ohm transmission line and a 50 ohm ufl antenna connector add to make 100 ohms in series?

I am trying to use LoRa with a RFM95W module. I added this 3mm trace on the opposite side of the ground plane to try to create a 50-ohm impedance. I want to use a wire antenna to J4. I also included an optional ufl antenna connector. Does this look like the correct way to lay this out? Is there enough of a cutout of ground pour around the trace?


So I asked my first question and got instantly downvoted for no reason that I can determine. How can I figure out why my question is getting downvotes so that I can fix it?   I provided code examples. I did searches to try and find the answer prior to asking. I don't get it.     Clarification:  If the user does searches and provides code and asks a pointed question but then gets downvotes with no comments and only some vague text in a tooltip about it being somehow unclear, but not specifically how, ...is the implication that psychic powers are the usual expectation on StackOverflow? ;-)   I guess I can adapt somewhat by pasting in 30 or 40 google searches. Then, at least, I have proof of research.

Sometimes my post receives downvotes with no explanation on what I've done wrong. Even worse, sometimes I just get snarky comments! It seems like this is especially bad for new users, who are made to feel unwelcome by veteran users. Stack Exchange's rules can be difficult to grasp, especially for newbies, and downvotes can feel hostile and discouraging. Several ideas have been proposed for how to fix this, including:  Every downvote should be accompanied by a mandatory comment Downvotes should be accompanied by a mandatory, anonymous comment Downvotes should be accompanied by a reason selected from a drop-down menu The first downvote should be accompanied by a mandatory comment Downvotes should cost reputation points unless accompanied by a comment …and other variations.  However, whenever someone suggests one of these changes on Meta, it gets unceremoniously rejected and (ironically) downvoted without a detailed explanation! Why are all of these ideas rejected? Is it because people here are curmudgeonly trolls who just hate people and don't want new users to feel welcome? This question was originally from . While there are many posts related to this issue which get closed as duplicates of , that question doesn't adequately explain to new users why this is always turned down. The purpose of this question is to be the network-wide community-approved FAQ to be used as a duplicate target for questions asking for mandatory feedback on downvotes.


I have written a trigger to send email. Whenever the trigger is fired i am getting equal no of mails which is equal to no of records retrieved.  Ex - If i am getting 3 records, three times i am receiving email. Can anybody tell me where i am going wrong -   trigger taskEmail on Project__c (after update ) {     set<String> projName = new set<String>();     list<Task__c> listTask = new list<Task__c>();      for(Project__c pro : Trigger.new) {         projName.add(pro.Name);     }      listTask = [SELECT Id,Project_Approval__c,Project_Name__c,Status__c,Task_Executioner__c FROM Task__c WHERE Project_Name__c IN : projName];     system.debug('11111' + listTask.size());     EmailTemplate et=[Select id from EmailTemplate where name='Multiple Tasks'];     List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();      Set<Task__c> setTaskName = new Set<Task__c>();     setTaskName.addAll(listTask);     List<Task__c> finalTsk = new List<Task__c>();     finalTsk.addAll(setTaskName);       if(listTask.size() > 0) {     system.debug('222222' + listTask.size());         for(Task__c con : finalTsk) {         system.debug('33333  enter for ');                if(con.Project_Approval__c =='Approved' && con.Status__c == 'Open'){             system.debug('444   enter if inside for ');              Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();             mail.setTargetObjectId(con.Task_Executioner__c);             mail.setTemplateId(et.Id);             mail.setSaveAsActivity(false);             mail.setWhatId(con.Id);             mails.add(mail);         }         system.debug('0000000');      }      Messaging.sendEmail(mails); } }

I have written a trigger to send email. Whenever the trigger is fired i am getting equal no of mails which is equal to no of records retrieved.  Ex - If i am getting 3 records, three times i am receiving email. Can anybody tell me where i am going wrong -  trigger taskEmail on Project__c (after update ) {     set<String> projName = new set<String>();     list<Task__c> listTask = new list<Task__c>();      for(Project__c pro : Trigger.new) {         projName.add(pro.Name);     }      listTask = [SELECT Id,Project_Approval__c,Project_Name__c,Status__c,Task_Executioner__c FROM Task__c WHERE Project_Name__c IN : projName];     system.debug('11111' + listTask.size());     EmailTemplate et=[Select id from EmailTemplate where name='Multiple Tasks'];     List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();      if(listTask.size() > 0) {     system.debug('222222' + listTask.size());         for(Task__c con : listTask ) {         system.debug('33333  enter for ');                if(con.Project_Approval__c =='Approved' && con.Status__c == 'Open'){             system.debug('444   enter if inside for ');              Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();             mail.setTargetObjectId(con.Task_Executioner__c);             mail.setTemplateId(et.Id);             mail.setSaveAsActivity(false);             mail.setWhatId(con.Id);             mails.add(mail);         }         system.debug('0000000');      }      Messaging.sendEmail(mails); } }


I am trying to refer to a line of text in my document using \label and \ref options in latex, but it doesn't seem to work.  \bigskip \mhead{Publications} {Paper published in xyz journal, 2016. \label{myposter}}  %... %after two pages %...  \begin{itemize} \item[•]See poster~\ref{myposter}. \end{itemize}

I'm having trouble using labels and cross-referencing in Lyx.  I put a label into the document where I want it.  It is not embedded in anything, it's just in the text.  Then I put a cross-reference to link it at a different point in the paper.  When I make the pdf, the cross-reference does not go to the link but rather to the top of the section it's in.  What going on?  However, within Lyx, whenever I use the (Navigate Bar -> Other Lists -> Labels and References) then the reference appears to work fine.  It's just not working in the pdf..  What could be the problem?  Thank you in advance!


I'm using QGIS 2.14.7 and I want to change the  QGIS splash screen into something more suitable for my project. I noticed that in older versions there was a .png that could be changed, but the path (images/splash/splash.xcf.bz) doesn't exist in version 2.14.7 anymore. Does any of you know how to change it now?

Where can I find the splash image which is shown while starting QGIS, and how to customise it?  I am developing a GIS software for myself based on QGIS, but I don't want to just start anew with QGIS's include and lib as it cost much time and energy. Instead, with the QGIS interface, I can pay more attention to create my own algorithms and add them to QGIS as plugins like sextante. Yet,I got my favoured bgimage before and still want to use it in this software I am developing.


I want to compute the gradient $\nabla_x f(x)$ of $f(x) = x^T B^T B x - x^T B^T b - b^T Bx$ with respect to the vector $x$. So far I have tried below. But when I try to add them together, I couldn't see they come together.  Edits  Now I think I got it. They does come together as the following answers. Since $C=B^TB$, $C$ is symmetric. Then $c_{ij} = c_{ji}$, so  $$\frac{\partial D}{\partial x} = 2\Big[\sum_{i=1}^n c_{1i} x_i \ \ \sum_{i=1}^n c_{2i} x_i \ \ \cdots \ \ \sum_{i=1}^n c_{ni} x_i\Big] =2 C x.$$  Hence $$\frac{\partial x^TBb}{\partial x} = \Big[ \sum_{i=1}^n b_{i1} b_i \ \ \sum_{i=1}^n b_{i2} b_i \ \ \ \ \cdots \ \ \sum_{i=1}^n b_{in} b_i \ \ \Big] = B^T b.$$  So $\frac{d}{dx} (x^T B^T B x - 2x^T B^T b) = 2B^T B - 2B^Tb$.  Thank you!    Let $C = B^T B$. \begin{align*} x^T C x =&  \begin{pmatrix} x_1 & x_2 & \cdots & x_n\end{pmatrix} \begin{pmatrix}  c_{11} & c_{12} & \cdots & c_{1m}\\  c_{21} & c_{22} & \cdots & c_{2m}\\ \vdots & \vdots& \ddots & \vdots \\  c_{n1} & c_{n2} & \cdots & c_{nm}\\  \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ \vdots \\x_n\end{pmatrix}\\ =&  \begin{pmatrix} x_1 & x_2 & \cdots & x_n\end{pmatrix} \begin{pmatrix}  c_{11} x_1 + c_{12} x_2 + \cdots c_{1n} x_n\\ c_{21} x_1 + c_{22} x_2 + \cdots c_{2n} x_n\\ \vdots\\ c_{n1} x_1 + a_{n2} x_2 + \cdots a_{nn} x_n\\ \end{pmatrix}\\ =& x_1(c_{11} x_1 + c_{12} x_2 + \cdots c_{1n} x_n)+x_2(c_{21} x_1 + c_{22} x_2 + \cdots c_{2n} x_n) + \cdots + x_n(c_{n1} x_1 + a_{n2} x_2 + \cdots a_{nn} x_n) \end{align*} Since the derivative of the scalar $D = x^T C x$ by a vector $x$ is $$\frac{\partial D}{\partial x} = \bigg(\frac{\partial D}{\partial x_1} \frac{\partial D}{\partial x_2} \cdots  \frac{\partial D}{\partial x_n}\bigg),$$ I have: \begin{align*} \frac{\partial D}{\partial x_1}  &= c_{11} x_1 + c_{12} x_2 + \cdots c_{1n} x_n  + c_{11} x_1 + c_{21} x_2 + \cdots + c_{n1} x_n = \sum_{i=1}^n (c_{1i} + c_{i1})x_i \end{align*} Hence $$\frac{\partial D}{\partial x} = \Big[\sum_{i=1}^n (c_{1i} + c_{i1})x_i \ \ \sum_{i=1}^n (c_{2i}+c_{i2})x_i \ \ \cdots \ \ \sum_{i=1}^n (c_{ni}+c_{in})x_i\Big].$$ \begin{align*} x^T B b =&  \begin{pmatrix} x_1 & x_2 & \cdots & x_n\end{pmatrix} \begin{pmatrix}  b_{11} b_1 + b_{12} b_2 + \cdots b_{1n} b_n\\ b_{21} b_1 + b_{22} b_2 + \cdots b_{2n} b_n\\ \vdots\\ b_{n1} b_1 + b_{n2} b_2 + \cdots b_{nn} b_n\\ \end{pmatrix}\\ =&  x_1(b_{11} b_1 + b_{12} b_2 + \cdots b_{1n} b_n)+ x_2(b_{21} b_1 + b_{22} b_2 + \cdots b_{2n} b_n)+\cdots+ x_n(b_{n1} b_1 + b_{n2} b_2 + \cdots b_{nn} b_n) \end{align*} Hence $$\frac{\partial x^TBb}{\partial x} = \Big[ \sum_{i=1}^n b_{1i} b_i \ \ \sum_{i=1}^n b_{2i} b_i \ \ \ \ \cdots \ \ \sum_{i=1}^n b_{ni} b_i \ \ \Big].$$

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


In a theorem I am reading about closed subspace the author states that an infinite dimensional subspace need not be closed.  What is an example of infinite dimensional subspace that is not closed?

Are there any examples of subspaces  of $\ell^{2}$ and $\ell^{\infty}$ which are not closed?


I'm not sure how this is a duplicate of anything that was mentioned.  The script I'm trying to run needs Sudo to work, none of the answers say anything about getting a script that needs "super user" privelages to run at startup.  None of the answers have worked so far, I think Upstart would need my password in it somewhere to run the sh.  I'm trying to run a sudo sh at startup, none of these methods seem to work.  I tried adding   sudo //usr/local/include/temp_throttle.sh 80   to Startup Applications. It doesn't run or even ask for password.  I tried   gksudo //usr/local/include/temp_throttle.sh 80   to Startup Applications. It pops up asking for a Password for almost half a second then dissappears but doesn't run.  I tried making a .desktop file and tested it, it runs it but not in sudo so it doesn't work.  Just tried putting my .sh in /etc/init.d/ and used update-rc.d. It runs the script at startup but without sudo privlages so it doesn't work.  I'm not sure what to do to make this work.  Note, Upstart is installed and working but will not launch this script properly.

I have a script that I would like to run as a service on my Ubuntu Server 11.04 headless box. That is, I want to have the correct files under /etc/init.d/ and to be able to control it via the service command.  Is there any guide available that will show me how to do this?


I've been using Ubuntu for a little over a year now and have gotten fairly comfortable with the UI.  The one case I've had trouble on was recently trying to install bit coin on my 13.10 computer.  When I open up the deb file and it takes me to the software center where there should be an install button there's something about libdb4.8++.  Thankyou in advance.

Can anyone walk me through the process of installing Bitcoin on Ubuntu? I'm new to linux, and this is really all I want to do with this computer.


In the Avengers movie, Thor dropped Mjölnir on the floor of the Helicarrier. As proof, I can remind you that the Hulk tried to lift Mjölnir on the Helicarrier.  Due to Odin's enchantment, was Mjölnir limiting the altitude of the Helicarrier and putting it in danger? (According to aerodynamics, it's essential to go up or down, even by a very small amount, due to non-ideal air conditions for flying.)  Or was it not dangerous because the condition of being worthy or unworthy to lift Mjölnir is not applicable to an artificial object like the Helicarrier?

In the Thor movie, Thor puts Mjolnir  on top of Loki at the end of the movie to stop him from moving.  Why did this not crush Loki?  And if it did not crush him, why could he not just roll out from under it?


In R the princomp()and the factanal() are somewhat similar. At least their output looks pretty similar. I learned that this is not surprising since the print function of princomp comes from factanal. I understand that SS loadings do not make much sense for princomp as it is bounded to 1 anyway. Moreover, as Joris stated on nabble, the proportion of variance is only printed because of the common print function, but does not contain valuable information when princomp is used.   What I do not understand is rather not an R question but more a multivariate stats question what is the conceptual difference between these PCA and Factor Analysis functions as they are used in R? This question relates particularly to the scores (let's assume "regression" scores for FA) respectively the difference between scores in both concepts?  What should I rather use when I want to use to resulting scores in a regression model (for example in order to circumvent multicollinearity)? I also understand that PCA has a fixed number of components while FA has fewer factors than variables.   richiemorrisroe's answer in the thread suggested by Rob Hyndman might go into that direction.

It seems that a number of the statistical packages that I use wrap these two concepts together. However, I'm wondering if there are different assumptions or data 'formalities' that must be true to use one over the other. A real example would be incredibly useful.


So I want to prove that is in title. I'm working with modular arithmetic, so if any of you can show me a hint, it will be perfect.

If $a+d$, $(b-1)c$, $ab-a+c$ are divisible by $m$, prove that   $ab^n+cn+d$ is also divisible by $m$.   I want to prove this by induction. For proving $ab^{k+1}+c(k+1)+d$ is divisible by $m$, i want to prove that $ab^k(b-1)+c$ is divisible by $m$ and then add it to $ab^{k}+ck+d$. Any idea how to prove $ab^k(b-1)+c$ is divisible by $m$? Or is there a better way to solve the problem?  Thanks in advance.


I was in Markarth, and got my stolen items taken. I checked the Guard's Tower and the Keep, but I couldn't find anything. Any clues as to where my items are?

After getting caught stealing a few things in skyrim, I noticed that most of the stolen items got confiscated. However, when I went back to the original place of the item, it was gone.  So my question is, does the confiscated items get stored somewhere specific, or are there no way of getting them back?


Some while ago I found a web page explaining the default size of a session was 2048 kb, the minimum was 1 kb.  How can this be adjusted? And if some one has links regarding the subject I would be a happy camper :)  Sorry not for mentioning the IIS, but it is 7.0  Cheers

How to find out size of session in ASP.NET from web application?


My system was a dual boot system   Ubuntu and Windows.   Now that I have removed Windows but the thing is thing I just formated the drive from within the Ubuntu. But during boot the Windows entry is still appearing during Boot.  How to remove the Windows Entry from Boot Grub.

I have removed Windows 7 using GParted, and want my computer to boot straight into Ubuntu, but I still get the dual boot screen, how can I fix this?


What tense should be used in writing the previous researches? For the following example, which one should I revise?  Or I could always use any tense although the research has passed?     More than 20,000 bioactive metabolites are of microbial origin (Berdy 2005).   Starting from 2007 to 2010 there were only approximately 200 publications on endophyte diversity.  Further, these publications were mainly used morphology and molecular data as the basis of identification (2011).   Thank you.

I am writing a paper in mathematics.   Stone theorems have a long history. B [B78] proved the stone theorem for the B model. C and D [CD14] not only prove a stone theorem for the cake process in random environment, but also have a nice overview of existing results.  (here B, C and D are some names, and 'stone theorem' and 'the cake process' also represent something else, but it is not important for the structure)  Question: is it ok to use a past tense in the first sentence which refers to 1978, but use a present tense in the second sentence which describes something that happened relatively recently, in 2014?


I'm having an issue with my house after 1.2 and after researching any changes that may have been made My house is still invalid. It's all made out of stone and I've never had an issue like this before.  My houses before 1.2 have been much bigger and much smaller but were always valid    Is there a size limit to how large a house can be?  I tried adding a row of stone from where the corner torch above the door is to the other side but still said not valid.  EDIT:  It seems I did reach some size maximum in the previous picture, but the one below shows that its suitable and the guide moved in.

I read on the wiki that people will move in under the following conditions:   You do something to please them An empty house is available with a light source, table, and chair (also with walls).   I have a house which is about 7x8, then a roof space above that; about half the area. I could put furniture up there too, but will anyone move in?


When I run  df -H   I can see that the root / is using 100% of the space:  Filesystem      Size  Used Avail Use% Mounted on /dev/xvda1      423G  423G     0 100% / udev            2.0G  8.2k  2.0G   1% /dev tmpfs           787M  209k  787M   1% /run none            5.3M     0  5.3M   0% /run/lock none            2.0G     0  2.0G   0% /run/shm /dev/xvdb       423G  209M  402G   1% /mnt   So I wanted to understand what directories are using more space, and with:  du -sh /   The result is telling me that the root is only using 62G  62G /   How is this possible? Where is the rest of the space used?

I have a Linux CentOS server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the total size of the two folders is larger than the disk used size.  Run du -sh on each folder, one use 50GB, the other one use 47GB  But run df -h, the used space is 96GB. (50GB + 47GB + 5GB) > 96GB  Is there any problem? Those two folders contain lots of files (1 million+). Thanks.


So I am currently doing a problem about narcissistic number and I need to prove that $a^3+b^3+c^3=a*10^{2n}+b*10^n+c$, where $a=1666..666, b=5000..00, c=33...333 $ and $a,b,c$ has $n$ digits. I am trying to do an induction and have observed that $3a+2=b$, $3c+1=2b$ and $a+b+c=10^n$; the difficult part when doing induction is I just cannot write the equation into $b$ and $n$ which would allow me to solve as I know that $b=(10^n)/2$. Is there any idea that is better than induction? Thanks in advance.

I saw on facebook some image on which these identities that I am going to write below are labeled as "amazing math fact" and on the image there are these identities:  $1^3+5^3+3^3=153$ $16^3+50^3+33^3=165033$ $166^3+500^3+333^3=166500333$ $1666^3+5000^3+3333^3=166650003333$  and then it is written under these identities "and so on and on and on and on!" which suggests that for every $k \in \mathbb N$ we shuld have  $(1 \cdot 10^k + \sum_{i=0}^{k-1} 6 \cdot 10^i)^3 + (5 \cdot 10^k)^3 + (\sum_{i=0}^{k} 3 \cdot 10^i)^3=16...650...03...3$  (on the right hand side of the above stated identity the number of times that number $6$ is shown up is $k-1$, the number of times that number $0$ is shown up is $k-1$ and the number of times that number $3$ is shown up is $k$) This problem seems attackable with mathematical induction but I would like to see how it could be proved without using mathematical induction in any step(s) of the proof.


I am using the L'chaim hat which is shown on all my Stack Exchange sites, such as Stack Overflow, Meta Stack Overflow, WordPress answers etc.. But it is not shown on Drupal Answers.  Do I have to do something to make the hat appear on my Drupal Answers account?

The question pretty much tells it all.   I joined  today and I'm not seeing any hats in my profile. So joining any SE site after Winter-Bash starts doesn't grant me hats? I see that there may be a . Is this the case?


Let $A$ be a subset of $\mathbb{R}^{n}$, such that $A$ is homeomorphic to $\mathbb{R}^{n}$.  Is $A$ open in $\mathbb{R}^{n}$?

Let $X$ be a subset of $\mathbb{R^n}$. The topology on $X$ is induced by the topology of $\mathbb{R^n}$. If there is an homeomorphism from $X$ onto $\mathbb{R}^n$, is it true that $X$ is open in $\mathbb{R}^n$ ? I think yes, but how can it be shown? (of course, $X$ is open in $X$).  If $x \in X$, $H_{n-1}(\mathbb{R}^n-\{f(x)\})= \mathbb{Z}$ so $H_{n-1}(X-\{x\})= \mathbb{Z}$, but I don't know how to continue.  Thanks in advance.


While playing scrabble, the word mount was on the board, my opponent added ing, making the word mounting, then wanted to make a word off the g in the same turn, is that a legal play?

Can you resolve a dispute between myself and my girlfriend? She recently won a game with what I think is a double movement (although there's no mention of this in the rule book).  She put one two letters down to make one word, which also scored linked to another letter. But she then added another letter immediately to the left of the finished word, which then extended the second word. I just don't think you can make a second movement like this in scrabble!    My sister placed down W, D and E, the ones that I circled in red. Is she allowed to do that? I told her it was impossible is it?  Can you resolve this for me please?


Let $f(x)=\sin(x^2)$. Determine if $f$ is uniformly continuous.  I initially tried to determine the uniform continuity by checking if $f$ was Lipschitz. From MVT I got that $$|f(x)-f(y)| = |f'(c)||x-y|$$ and since $f'(x) = 2x\cos(x^2) \le 2x$ I have $$|f(x)-f(y)| \le 2x|x-y|$$ but the term $2x$ can blow up so this clearly isn't Lipschitz. How can I determine uniform continuity? Trying to bound $$|f(x)-f(y)| = |\sin(x^2)-\sin(y^2)| = \sin(x^2)+\sin(y^2) \le 2$$ but this doesn't seem to help.

Show that the bounded function $f(x) = \sin(x^2)$ is continuous, but not uniformly continuous, on the interval $[0,\infty)$.  The problem should be solved using the following definitions: Definition of Continuous Function Let $X$ and $Y$ be metric spaces. We sat that a function $f:X\rightarrow Y$ is continuous if given any open set $V \subseteq Y$, its inverse image $f^{-1}(V)$ is an open subset of $X$. Definition of Uniformly Continuous Function Let $(X,d_x)$ and $(Y,d_y)$ be metric spaces. If $E \subseteq X$, then we say that a function $f: X\rightarrow Y$ is uniformly continuous on $E$ if for every $\epsilon > 0$ there exists a $\delta > 0$ such that for all $x,y \in E$ we have $$d_x(x,y) < \delta \longrightarrow d_y(f(x),f(y)) < \epsilon$$ For the continuity part it is clear that $f^{-1}(a,b), (a,b) \subseteq (-1,1) = \{x:f(x) \in (a,b)\}$ which appears to be an open set however I doubt this is sufficient as a proof since it holds for any function $f$. Not sure how to go about proving $f$ not uniformly continuous. Seems to be difficult to prove from the definition alone.


I have a computer which is working fine after a windows re-install.  However, I did not install any drivers at all, they seem to have been installed via Windows Update.  Back then, I remember I had to download the latest drivers from the motherboard manufacturer, video-card manufacturer, etc.  Is this still valid?  Should I download the latest drivers from the manufacturers, or are the drivers available via Windows update enough?  I am running Windows 8.1.

I've just installed Windows 7 on my PC.  I went online to look for drivers. For , Foxconn offers LAN drivers, on-board audio drivers, and chipset drivers. And for , Nvidia offers a graphics card driver, obviously.  But then I stopped and wondered... what benefit would I gain from installing them?   The LAN cable is plugged in and I'm online; no problems there.  The on-board audio is working fine.  A quick Google tells me that a chipset is responsible for moving data around my motherboard – which seems to be happening OK!  And my graphics look perfect.    So why should I install the drivers? What would they give me, other than badly designed "management" interfaces, and pointless "notifications" whenever I plug in an audio jack?  If there are different considerations for each of the components – chipset, audio, LAN, and graphics (and any others you think I should be aware of) – please break it down in your answer.     Update: I've had a couple of answers already, saying that I'll get better stability, bugfixes, etc.   Can I slightly expand my question... Can I get all these same benefits if I install the drivers via Windows Update? And if I do this, would I avoid having to install the vendor-specific UIs, which I find so annoying?


For some reason while playing minecraft, my saplings did not want to grow for 3 in-game days. To my surprise, while googling this question multiple times, I found no answer.   Why does this not work and how can I fix it?

I am playing on vanilla 1.7.2, and I trying to get trees to grow underground. I gave 60 bonemeal to a tree, and it would not grow... How many blocks high does my room need to be? Here is a picture.    I realized I actually that picture is not updated, I raised the ceiling by one block.  I googled on tree growth behavior and they said room has to be 4-5 blocks high, but the trees still won't grow.


I am doing problems in Induction. What i know is: First we need to test Base case, that is $P(n_0)$ should be verified. Second we need to assume that $P(k)$ is True which is the inductive Hypothesis Third we need to prove $P(k+1)$ is True using the above Hypothesis which gives the conclusion. But the below problem made me to fall in a confusion. When we assume $P(k)$ is True, does it mean all of $P(1),P(2),...P(k-1)$ are also True? Here is the problem: Prove using induction that $10^n-(5+\sqrt{17})^n-(5-\sqrt{17})^n$ is divisible by $2^{n+1}, \:\forall n \in N$ My try: Obviously $P(1)$ is True. I assumed that $P(k)$ is True: So we have: $$10^{k}-(5+\sqrt{17})^{k}-(5-\sqrt{17})^{k}=2^{k+1} Q \to (1)$$ for some $Q \in N$ Now let $$P(k+1)=10^{k+1}-(5+\sqrt{17})^{k+1}-(5-\sqrt{17})^{k+1}$$ Using $(1)$ we get $$\begin{array}{l} P(k+1)=10\left(10^{k}\right)-(5+\sqrt{17})^{k+1}-(5-\sqrt{17})^{k+1} \\ =10\left(2^{k+1} Q+(5+\sqrt{17})^{k}+(5-\sqrt{17})^{k}\right)-(5+\sqrt{17})^{k+1}-(5-\sqrt{17})^{k+1} \\ =5\left(2^{k+2}\right) Q+(5+\sqrt{17})^{k}(5-\sqrt{17})+(5-\sqrt{17})^{k}(5+\sqrt{17})\\ =5(2^{k+2})Q+(5+\sqrt{17})^{k-1}(8)+(5-\sqrt{17})^{k-1}(8)\\ =5(2^{k+2})Q+8P(k-1) \end{array}$$ Now according to my book, the author has taken $P(k-1)$ as True and proved the result. So my question is: When we assume $P(k)$ is True, does it mean all of $P(1),P(2),...P(k-1)$ are also True?

I recently learned about . I am familiar with both strong induction and ordinary induction and make sense. But what particularly confuses me is why we do not to explicit the base cases for complete induction. They seem crucial for modus ponens to work and thus, actually show the stand alone proposition $p(n)$ to be true.  The claim for complete induction seems to be the following:     if we show $ P(m), m<n \implies P(n) $ then somehow that must mean that $P(0)$ is true (or $P(b)$ is true for some set of base cases $b \in BaseCases$)   These are my thoughts:  In induction we actually do two things (to show $ P(n) $ for all $ n \in \mathbb N$) :   show P(0) show implication $ P(n-1) \implies P(n) $   or for strong induction   show P(0) show implication $ \forall m, m < n, P(m) \implies P(n) $   However, in complete induction we only show:   $ \forall m, m < n, P(m) \implies P(n) $   now that I’ve thought of it more carefully, what bothers me is that in the inductive step we actually only show an implication is true, not that $P(n)$ is true. Intuitively, $P(n)$ ends up true because of Modus Ponens (MP), which forcibly requires checking some set of base cases, say $P(0)$.  What concerns me is the following: ff we show $ \forall m, m < n, P(m) \implies P(n) $ then we shown the implication is true, and not necessarily anything else. If $n=0$ then $ \forall m, m < n, P(m) \implies P(n) $ is False. So sure, the implication is (vacuously) true, but that doesn’t necessarily say $P(0)$ is true stand alone (which is what induction ultimately cares about!).   My assumption is that the claim the wikipedia article does is that (somehow) whatever proof for $ \forall m, m < n, P(m) \implies P(n) $ that we have must also be a stand alone proof for $P(0)$. I guess I could abstractly believe that’s true (mostly on faith), but it seems rather odd to me. I’ve never seen False implies $P(n)$ implies $P(n)$. It’s nearly like the truth table for implication is built so that if you only know the antecedent is False, then you can’t decide if the consequent is true. Which makes sense. A false starting point should intuitively get you no where or get you everywhere (by principle of explosion).  So my question is, whats going on? Is it just that the proof for $ \forall m, m < n, P(m) \implies P(n) $ can also be plugged in for a proof for $P(0)$ and then $P(0)$ is true? Or am I missing something?  I have a feeling that this being so abstract makes it hard to be believable and a concrete example of how $ \forall m, m < n, P(m) \implies P(n) $ automagically makes $P(0)$ (the base cases) true would be really valuable.    Another useful source:


I learned that which and that are interchangeable; and I also learned that *which8 can be converted to and it.   Then how about these sentences?        In this chapter we presented a new context sharing scheme within    a pervasive and ad-hoc network that can address the problem in   many-to-many communication: a large number of context exchanges.   In this chapter we presented a new context sharing scheme within a pervasive and ad-hoc network which can address the problem in   many-to-many communication: a large number of context exchanges.   In this chapter we presented a new context sharing scheme within a pervasive and ad-hoc network, which can address the problem in   many-to-many communication: a large number of context exchanges.       Do 1 and 2 convey the exactly same meaning? How about 3? I think 3 is the correct statement, as what addresses the problem is "scheme" not "network" so there should be a *which" to explicitly show that.

What is the difference between the words which and that?  For example I have the following sentences:   “I have a car which is blue.” “I have a car that is blue.”   Are there any rules specifying usage of which and that?


Someone know how to get value of a property bag with JSOM? I do this with C# code :  string anchorIdTheme = SPContext.Current.Web.GetWebProperty(WebProperties.NETWORK_THEME_NODE, string.Empty);   I want to do same thing with JSOM.

I am trying to grab a key/value pair from a specific property bag but can't find any documentation or example code on how to grab a property bag. Currently I can only seem to grab allProperties. Here is my code:      <CommandUIHandler           Command="FCS.Intake.Tab.Reports.TL"           CommandAction="javascript:           function getWebProperty() {          var ctx = new SP.ClientContext.get_current();         var web = ctx.get_site().get_rootWeb();         this.props =  web.get_allProperties();          ctx.load(web);          ctx.executeQueryAsync(Function.createDelegate(this, gotProperty), Function.createDelegate(this, failedGettingProperty));     }      function gotProperty() {       window.location.href = this.props.get_item('PropertyKey1');            }      function failedGettingProperty() {         alert('failed');     }   getWebProperty();"         />   This doesn't work because the key/value pair is located in a property bag as opposed to a site property.  Does anyone know how to grab a specific property bag using ECMA script?


The attacker knows multiple hashes like md5(known_value_n + secret_value), for multiple known values. Does it help him to discover secret_value better then just single md5(known_value + secret_value)? secret_value is long enough, 20-30 characters.

To be clear, I have access to $H(S)$ and as many $H(S||K)$ as I want. Every string $K$ is known. Can I use the extra information to my advantage and try to deduce $S$, without requiring bruteforce? Or do you still have to bruteforce but try less combinations since you have more information?


I just got myself a MBA and I am wondering how do I install Xcode 6 on my MBA?  In the Mac App Store I can see Xcode 5.1.1 so I have started installing that on the MBA. But, I want to install Xcode 6 and more specifically Swift. How do I do that?

I want to start developing in Swift. I already own an apple developer account, yet am struggling to download Xcode (n) beta.  How can I do this?  Thank you in advance.


Question: Let $T(n)$ be a running time that satisfies the recurrence    $$T(n) = 1 + \sum_{k=0}^{n-1} T(k) \quad \text{and}\quad T(0) = 1.$$   Show that $T(n) = 2^n.$   The recurrence above can be obtained in CLRS's Introduction to Algorithms, $3$rd edition, page $364,$ where the authors discuss rod-cutting problem using Recursive top-down implementation.   Does anyone how to obtain the solution for the recurrence of $T(n)$ above?

$T(0)=1 \\ T(n) = 1 + \sum_{j=0}^{n-1}T(j) \\ $  Show that $T(n) = 2^n$.  I know how to prove this by induction, but I would like to know how to show this using first principles.  Edit: The way I want to solve this problem is manipulate $T(n)$ in such a way that it ends up as $2^n$.


sir unfortunately my copy of windows8 was not genuine and i am unable to install Ubuntu 12.01 version if the formatting is the way i lost most of my data so my query is thier any possibility of installing Ubuntu along with windows please reply

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Most advice on cast iron pan care says that most of the time you shouldn't use soap when washing a pan. However, that may leave some residual fat/grease from your cooking on the pan.   It can be fat/oil with a low smoke point which is going to smoke then next time you heat the pan.  Would it be safe to cook in such smoking pan? Should you burn it till it stops smoking? Is this smoke in the kitchen safe for your lungs?

How on earth is not washing a cast iron with soap not harmful? Since even if you wash it good with hot water and Salt, wouldn't there still be a possibility of harmful bacteria and such left in the crevices in the metal? I mean the metal is porous, correct?  Also same goes for the seasoning we use (bacon grease, oil, etc) How does this not get a bunch of bacteria on it?


SOLVED, THANK YOU <3  I have a problem, when I try to populate a second dropdownlist with data from database from column selected in previous dropdownlist, like:  ddl:DDL1     ddl:DDL2    button:Search  When You choose in DDL1 e.g. ID, DDL2 should let You pick one of the existing ID's from database.  This is my HTML Form:  <form id="detailed_search_form">          <select id="select_columns" name="select_columns" onchange="take_value()">         </select>          <select id="select_value" name="select_value">         </select>          <button id="button_search" value="search" onclick="search()">Search</button>  </form>

   This fills DDL1, and THIS WORKS:      function take_columns(){ var tab = new Array(); $.ajax({     dataType:       "json",     url:            "take_columns.php",     data:   {  },     success:    function(data) {         for (var i=0;i<data.length;i++){             tab[i]=data[i]["Column_name"];         }         var $el = $("#select_columns");         $el.empty(); // remove old options         for (var i=0;i<tab.length;i++){             $el.append($("<option></option>").attr("value", tab[i]).text(tab[i]));         }     }   }); };   This SHOULD fill DDL2 and THIS DOESN'T WORK:  function take_value() { var e = document.getElementById("select_columns"); var requestedColumn = e.options[e.selectedIndex].value; $.ajax({     data: { column: requestedColumn },     url: 'take_value.php',     dataType: 'json',     success: function(json) {         for (var i = 0;i<data.length;i++){             tab[i]=data[i][requestedColumn];             alert(tab[i]);         }         var $el = $("#select_value");         $el.empty(); // remove old options         for (var i=0;i<tab.length;i++){             $el.append($("<option></option>").attr("value",  tab[i]).text(tab[i]));         }     }   }); };   This is take_value.php:  $pdo = new PDO($dsn, $username, $password); if(isset($_GET['column'])) {     $whatColumn = $_GET['column'];     $stmt = $pdo->prepare("SELECT $whatColumn FROM kandydaci");     $stmt->bindParam(':column', $whatColumn, PDO::PARAM_STR);     $stmt->execute();     $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); } echo json_encode($rows);

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


Suppose I have 3 random variables, $X1, X2,X3$. Define $Z$ as:  $Z=X1+X2+X3$  I want to force $Z$ to equal 1 for every "realization" of $X1,X2,X3$ ($X_i \sim Beta(a_i,b_i))$. As an example, let $X_i$ denote the percentage of votes a party will get. In a hypothetical country, there are only 3 parties. Therefore, $Z$ is the total percentage of votes, which equals to 100%. Statistically, how could someone force Z to equal 1, and by simulation or through an analytical expression derive the percentages of party A,B and C?

I would like to show (demonstrate by simulation) a random process that turns out after $i$ interactions to be deterministic, i.e. ends at predefined value (roughly) known at time $t=1$.  Conditions for the solution:  1) The random process should display randomness visible (graph) = interactive  2) The "convergence" to the end result should be gradual and therefore the end result surprising to the observer.     3) Solution in R (hopefully).  The meaning of surprising in this case: I mean, during the generating process, the observer expectation is not (rational?) .... (Surprise in sense of conviction that random is not random after all).   Sub-question (setup):  Does it matter whether the terminal (final) value is revealed to observer a priori (at the beginning of the generating process series) or after the process ends (to confirm the values match)?  Summary:  1) If solution is not provided, how to approach it? (any hint helps)  2) Which tool (statistical/modeling) should be used? How to set up the process?  EDIT: improved version (of what I'm asking)     Simulate a (large) number of identically distributed but dependent random variables, such that their sum is ideally equal to a prespecified value, or failing that (for continuous RVs, we will hit a single number with probability 0), which is in a given range with a given probability. (with @Stephan kind help.)


I am trying to have a sed script that makes changes and outputs a new file, but it must add two comment lines to the top, so that the output file can then be itself run as a bash script. The trouble is that all the solutions I have seen for adding two top lines do not apply to comments, which render the script itself non-functioning. So for example if my sed results in a file like this: AAAA BBBB CCCC DDDD  I want to end up with something looking like this: #$ -cwd #$ -pe mpi 16  AAAA BBBB CCCC DDDD  I have already tried variations on things like this: sed -i '1s/^/#$ -cwd\n/' output.txt  But these will treat everything past the # as comment. How can I write a bash script that will add the comment headers without messing itself up? Thanks!

I've been looking around sed command to add text into a file in a specific line. This works adding text after line 1:  sed '1 a\   But I want to add it before line 1. It would be:  sed '0 a\   but I get this error: invalid usage of line address 0.  Any suggestion?


I can appreciate the value of factory methods, but I'm struggling with the value of using dedicated factory classes.  This will work:  class Brady {     int age;     String name;     static Brady create(String who)     {         if(who.equals("Cindy"))  return new Cindy();         if(who.equals("Jan"))    return new Jan();         if(who.equals("Marcia")) return new Marcia();         return null;     } } class Marcia extends Brady {} class Cindy extends Brady {} class Jan extends Brady {}  ... Jan jan = (Jan)Brady.create("Jan");   So is there any good reason to use a factory class instead?  class Brady {     int age;     String name; } class Marcia extends Brady {} class Cindy extends Brady {} class Jan extends Brady {}  class BradyFactory  {     static Brady create(String who)     {         if(who.equals("Cindy"))     return new Cindy();         if(who.equals("Jan"))       return new Jan();         if(who.equals("Marcia"))    return new Marcia();         return null;     } }  Jan jan = (Jan)BradyFactory.create("Jan");   It just seems like a waste of additional code.  I do understand the usefulness of a factory class when an instance is needed:  class BradyFactory  {     Brady brady;     BradyFactory(String who)     {         if(who.equals("Cindy"))             brady = new Cindy();         else if(who.equals("Jan"))             brady = new Jan();         else if(who.equals("Marcia"))             brady = new Marcia();     }     public BradyFactory addChore(Chore chore)      {          brady.addChore(chore);         return this;     }     Brady create()     {         return brady;     } }  Jan jan = (Jan)new BradyFactory("Jan")             .addChore(Chore.Dishes)             .addChore(Chore.Washing)             .create();   ...or when a subclass of the Factory is needed.    So my question is: is there any value to putting simple factory methods in a dedicated factory class other than when an instance of the factory, or a factory subclass, is needed?

When is it a good idea to use factory methods within an object instead of a Factory class?


I am a javascript beginner and I would like to create a function named swap that swaps the variables that were passed in: function swap(a, b){     var t = a;     a = b;     b = t; } var x = 3; var y = 4; swap (x, y); console.log(x + " " + y);  and the output should be 4 3 but I can't figure out how to make this function work, because in C++ we would just pass the reference swap(&a, &b). How to pass reference in JS?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Example with :     Another hated ‘pindos’ is Senator John McCain (R-Ariz.), famous in Russia for his periodic tweets to ‘Dear Vlad.’ In 2011, for example, Mr. McCain tweeted Putin, “Dear Vlad, The #ArabSpring is coming to a neighborhood near you.”   I can't really figure that one out, though something tells me that this might stand for something like representative of Arizona. Am I on the right track with my assumption?

An example:     US Rep. Marsha Blackburn (R-TN) wants to make sure the Federal Communications Commission never interferes with "states' rights" to protect private Internet service providers from having to compete against municipal broadband networks.   From:   Looks like some kind of an abbreviation to me.


I have the following scenario. I have 2 views - view1 & view2 both reading data from table1. Is it possible to change view1 and view2's table from table1 to table2 if both table1 and table2 share the same schema? Or I will have to drop the 2 views and recreate them so that they query table2?

The Postgresql documentation is clear on this point: you can not change the columns of an existing view.     The new query must generate the same columns that were generated by the existing view query (that is, the same column names in the same order and with the same data types) (...)   Reference:   Why on earth do I have to either DROP the view or ALTER it for modifying it ?


I am interested in the following compressor, which I reverse-engineered from a pcb (there might be some mistakes, but I don't think so)    (open the schematic in a separate window to see the small text). The lightning sign is +9V DC and Vin is only AC, with frequencies 20 Hz < f < 800 Hz. The chip is a TL074CN quad op-amp, and there's a jfet which says K192A.  I guessed this is a compressor because it makes sense in this application to have one (e.g. make the bass more rich), but I am otherwise clueless as to what this part of the circuit actually does.  I suspect it does amplify the signal a bit, could you tell me how much? I am in principle only interested in the linear range of the compressor, as my point is to bypass it, but I need to match the input and the output's magnitude. Of course, if you want to tell me exactly what the circuit does, please by all means, go ahead :)  EDIT: To clarify: In my previous question (see ), I wanted to bypass this compressor. In this question, I am interested in its response, particularly in the linear range.

I have an Altec Lansing ATP3 2.1 audio system PCB which I reverse-engineered, and I would like to bypass the JFET compressor that's on it. Its active components are a JFET and four op-amps. I will connect the input to the output so it gets forwarded to the next stage.  My question is: should I disconnect the input and output from the compressor (in that case should I remove power supply as well, which would be very annoying), or can I leave it connected but short-circuited?  The block I want to short-circuit is the pink one on the left.    I realize the image is very small. The sound comes in on the right, in the green box. In the middle yellow box there's some trebble/volume/bass control. The small green box on its left merges the left and right channels to forward it to the subwoofer section, which is the complete left half of this diagram (except the red box on the left, which is just power). Signal then goes through a low-pass, a small equalizer and a compressor (the big purple box). It finally gets amplified in the brown power amp.


Show that $m^3\le2^m$ for $m\ge10$  My try:  Base case is true for $m=10$  Inductive Hypothesis: Assume $P(k)$ is true $\implies k^3\le2^k$  Now showing that $P(k+1)$ is true  $(k+1)^3\le2^{k+1}$  $\implies (k+1)^3\le k^3+1+3k^2+3k$  $\le 2^{k+1}+3k^2+3k+1($ from inductive hypothesis$)$  From here I could not proceed.  Can anyone explain how to proceed from here.

Problem  For what natural numbers is $n^3 < 2^n$?  Attempt @ Solution   For $n=1$, $1 < 2$ Suppose $n^3 < 2^n$ for some $n = k \ge 1$ It looks like the inequality is true for $n = 0$, $n = 1$ and $n\ge10$ But, how can I prove this through induction?


I have Ubuntu 16.04 installed on my SSD and I have a HDD where I keep all of my C++ files and programs. Ubuntu recognizes that I have the HDD. When I am in the terminal and want to access my c++ files on the hdd how do I get the directory? I tried using cd then the name of the drive but that didn't work.  I'd like to make it so that every time I start my terminal I am automatically in the HDD instead of desktop too.

What is the command that lets me see what and where devices are mounted?  I'm having trouble changing songs on my old iPod, and I have a feeling it's because of the mount point.


The command . .bash_profile is used to reload(?) bash_profile. What is the general purpose of the first .? How it can be used and is there a resource to read about these type symbols of Terminal?

I came across this example when trying to mount a usb device inside a openvz container and I have never seen the construct in the second line before. Can you explain what it signifies?  #!/bin/bash . /etc/vz/vz.conf


I'm required to prove the following theorem:  Prove that for any natural number $N$, there exists $N$ consecutive integers none of which is a power of an integer with exponent greater than one  I'm having a lot of trouble understanding the meaning of this theorem. I don't know what information it's trying to tell me (I'm really really bad at Number Theory). Here's my attempt using an example. If we have $N=5$ that means we have five consecutive integers. Which 5 integers? Do I simply pick 5 random integers? If I pick $\{1,2,3,4,5\}$, $4$ is a power of an integer with an exponent greater than one. That is $2^2=4$. So the obviously I've chosen wrongly the consecutive integers. Could someone provide me with a detailed numerical example? Thank you for any help

The fact that there are arbitrarily long sequences of consecutive numbers without prime number is well known, the proof is easy and goes like this:   let $n\ge 2$, then the number $n!+k$ is greater then $k$ and divisible by $k$ for $k=2,\dots,n$, so it is composite, so we have at least $n-1$ consecutive composite numbers.  I think that there are arbitrarily long sequences of consecutive numbers without prime numbers and without powers of primes, probably also without any perfect powers.  Examples:  $17,18,19,20,21,22,23,24$ -- 8 consecutive numbers without any perfect power,  $37,38,\dots,48$ -- 12 consecutive numbers without any perfect power,  $50,51,\dots,63$ -- 13 consecutive numbers without any perfect power,  $65,66,\dots,80$ -- 16 consecutive numbers without any perfect power,  $901,902,\dots,960$ -- 60 consecutive numbers without any perfect power,  $1601,1602,\dots,1680$ -- 80 consecutive numbers without any perfect power.  But I'm not able to prove my conjecture. Is it really true? Any proposals will be appreciated.


I need to make a singly-linked list for my array of integers, but, I don't know what is currently wrong with my code right now.  This is the code to create the nodes. (the data)  package sllset;  class SLLNode {     int value;     SLLNode next;  public SLLNode(int i, SLLNode n){     value = i;     next = n        }    }   My other class which has my methods and constructors look like this.   package sllset;   public class SLLSet {     private int setSize;     private SLLNode head;  public SLLSet(){     head = null;     setSize = 0; }  public SLLSet(int[] sortedArray){ //second constructor     setSize = sortedArray.length;     int i;     head=null;     for(i=0;i<setSize;i++){         head.next = head;         head = new SLLNode(sortedArray[i],head.next);         } }   public String toString(){     SLLNode p;     String result = new String();     for(p=head ; p!=null ; p=p.next)         result += p.value;     return result; }  public static void main(String[] args) { int[] A = {2,3,6,8,9}; SLLSet a = new SLLSet(A); System.out.println(a.toString());      }  }   My problem is that my second constructor doesn't work and I dont really have a clue as to why. I have been following a guide on how to make most of these functions so my knowledge of the code I guess isn't great enough to decipher the problem.  EDIT: So someone told me to specify the problem which I get a NULLPointerException at line 19; where I code head.next = head; . However, when  I remove that part to test, line 20 gets the error message

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


I am doing a project in which I am determining which areas of New York City can be accessed within a five- or ten-minute walk of a subway entrance. I have done this in the past in ArcGIS, and am trying it out in QGIS. The goal of the project is to determine which areas of the city would become accessible within a five- or ten-minute walk if closed subway entrances, of which I have accumulated a list , were reopened. I used the  tool to first look at the service areas for open subway entrances, based on the city's . In ArcGIS, I could create non-overlapping service area polygons to allocate areas to the closest subway entrance. I have not seen any way of doing this in QGIS, so how do I do this using that software? When using QNEAT3, all the areas within, for example, five minutes of an entrance, are in a single layer, which is not very helpful, as can be seen in this screenshot below.

I am doing a project in which I am determining which areas of New York City can be accessed within a five- or ten-minute walk of a subway entrance. I have done this in the past in ArcGIS, and am trying it out in QGIS. The goal of the project is to determine which areas of the city would become accessible within a five- or ten-minute walk if closed subway entrances, of which I have accumulated a list , were reopened. I used the  tool to first look at the service areas for open subway entrances, based on the city's . In ArcGIS, I could create non-overlapping service area polygons to allocate areas to the closest subway entrance. I have not seen any way of doing this in QGIS. When using QNEAT3, all the areas within, for example, five minutes of an entrance, are in a single layer, which is not very helpful, as can be seen in this screenshot below.  For some reason, the polygons for areas within a closer range of an entrance, i.e. 60-120 seconds, are sometimes in the incorrect spot, being underneath layers like the 300-480 second polygon layer. If you compare the two images below, you will see that if I uncheck this layer, the 60-120 second layer is visible. In ArcGIS, I had no issues with this at all. How do I remedy this?   Another issue is that there are spikes in the polygons, especially those in the 480-540 and 540-600 second layers, which should not be there. These areas are clearly not within ten minutes of an open subway entrance. I have no idea what error is causing them. Does anyone have an idea? Here is an overview showing multiple errors:  This major one occurs over a body of water:   This one for some reason has a polygon connecting Lower Manhattan with Brooklyn over New York Harbor.   You also have a big one here in Queens.


my question is simple. How can we calculate the temperature needed in order to do the nuclear fusion things , and also the temperature after the reaction successful.    If you can describe it, it would be really cool. I just want to know about it  Thanks

I am not talking about the pseudo-science of so called cold fusion  I am interested in what temperature you can get away with to produce fusion reaction. I was thinking in terms of micro-fusion or at least at levels below the huge tokamaks being produced because obviously small scale devices couldn't handle millions of degrees of temperature. Or correct me if I am wrong please as I am no expert just a curious student!!


I want to use Canonical Correlation Analysis (CCA) to identify relationships between two sets of variables X and Y. The CCA should give a score (highest correlation) between two samples of X and Y.  I tried to implement it via scikit-learn like that:  X = [[1, 0, 0], [1, 1, 0], [1, 1, 1], [2, 0, 0]] Y = [[0, 0, 1], [1, 0, 0], [2, 2, 2], [3, 5, 4]]  cca = CCA(n_components=2) cca.fit(X, Y)  for x in X:     print "----------"     print x     for y in Y:         print str(y) + " : " + str(cca.score(x,y))   The output for the first element in X:  [1, 0, 0] [0, 0, 1] : 0.35461498401 [1, 0, 0] : -0.0502507710089 [2, 2, 2] : 0.0 [3, 5, 4] : -22.2417510911   But the result is not as expected, there is no highest correlation between [1, 0, 0] in X and Y. But the score returns something else back: "Returns the coefficient of determination R^2 of the prediction".  How is it possible via CCA to find the highest correlation matching pairs (X#n, Y#m)? Is it possible via scikit-learn, or I have to use another library?  Thanks in advance.

I have a training dataset of images: X (Visual) and Y (Infrared). Each set has $300$ training examples. I extract feature vectors from both sets of images. Thus my X and Y datasets are respectively $300\times 1920$ and $300\times 1536$ where $300$ is the number of sample observations (in  this case images) and $1920$ & $1536$ are respectively the length of the feature vectors in visual and infrared spectrum.  A testing dataset consists of images of different subjects in both visual spectrum and infrared spectrum. I will have the visual spectrum data as my gallery. I will have the infrared images as the probe data. For each probe image, I need to retrieve the corresponding visual image from the gallery by using some kind of similarity measure.  Basic algorithm idea:   Start Training Phase. Read the images from visual and infrared spectrum dataset. Get the feature vectors by using desired descriptors and populate the matrices X and Y. Use CCA for subspace learning. Get the projection matrices Wx and Wy. Start Testing Phase. Given the gallery images (visual), read these images and use the Wx transformation matrix to convert them into the CCA subspace. For each probe image, convert it into the CCA subspace by using the Wy transformation and compare with each images of the gallery and compute a matching score. The image (or its label) in the gallery having the maximum score is returned.   Could anyone tell me if my approach is correct or not? Pointing me in the right direction would also be helpful. Please see the following paper for reference: .    I work in Matlab and use the following command to perform CCA:  [Wx,Wx,r,U,V] = canoncorr(X,Y);   %// DO CCA   The output I get is this :    Name           Size             Bytes   Class     Attributes    Wx         1920x297            890880  double                 Wx         1536x297            712704  double                 U           300x297             27840  double                 V           300x297             27840  double                 r             1x297               464  double          :   The projection matrices are Wx and Wy since they transform X and Y into the new space. The resulting projections of X and Y into the new space are U and V, respectively. The r vector represents the entries of the correlation matrix between U and V, which is a diagonal matrix.


I'm trying to create a some code in blender where I can have it print a full list of vertices and faces for a mesh that I have selected. I'm then planning on using this list to draw out the same mesh in a another program i want to use as an add-on. I am am able to get blender to return the list of vertices in the console, but I've had no luck with the faces. I'm just starting to learn the blender API, so any help would be appreciated.  I've already looked at some older forums on a solution to this problem, but they all use a mesh.faces function, which blender says does not exist anymore. I'm getting a feeling that after some updates blender has moved it to a new class function, however, I have no idea where it is.  ## This first part works like a charm, and it prints out the vertices perfectly. obj = bpy.context.active_object v = obj.data.vertices[0] coords = [(obj.matrix_world * v.co) for v in obj.data.vertices]  plain_coords = [vert.to_tuple() for vert in coords] print(plain_coords)  ## This is the part I need help on. No matter what I try it keeps saying there is no attribute  f = obj.faces print(f)   In the bottom, I'm trying to set f to be the list of faces in obj, but it keeps saying that obj doesn't have the attribute faces.

I'm trying to do an export plugin for Blender 2.69 to metasequoia file (.mqo).  Vertex is exported but i have some trouble with faces.  I used  has a reference but it's for blender 2.5 so i think it's outdated.