I want two pictures next to another big one and every picture has a different size (like the example below).    I want that all pictures keep their aspect ratio and the pictures to the right should have the same height. Also all 3 pictures should be as wide as the \textwidth.  I've tried subfigure and \resizebox, but I could not set the right heights dependent on the height of the left picture. Manually trying to fit all the sizes is way too tedious, is there an easy way to do that?  Edit:  Here are more informations for my problem. My current code looks like this. I've just adjustet the sizes of the pictures until they fit (trial end error). A very tedious process.   The pictures have individual caption with (a), (b) and (c) and the whole picture has another caption.  It would be nice to manage the size of the right pictures so that they are not bigger than the left one and that alle 3 pictures don't exceed the linewitdh.  \begin{figure}[H] \centering \begin{subfigure}[p]{.45\textwidth}     \includegraphics[height=\textheight]{MMC.eps}     \caption{MMC Schaltbild, \cite{Eremia.2016}} \label{fig:ch2_MMC \end{subfigure} \qquad \begin{subfigure}[p]{.45\textwidth}     \centering     \includegraphics[height=0.39\textheight]{Halfbridge.eps}     \caption{Halfbridge, \cite{Shah.17.07.201621.07.2016}} \label{fig:ch2_Halfbridge}      \vspace{2ex}      \includegraphics[height=0.39\textheight]{Fullbridge.eps}     \caption{Fullbridge, \cite{Shah.17.07.201621.07.2016}} \label{fig:ch2_Fullfbridge} \end{subfigure} \caption{MMC and Submodule}\end{figure}

I need a layout similar to the following image. However I want only the 3 images on the right side to be subfigures (2a, 2b, 3c), But the big red image on the left should be numbered as Figure 1.    Currently I am using minipage and the 3 blue images are not caaptioned as subfigures.  \begin{figure} %   \centering     \begin{minipage}{0.8\textwidth}         \includegraphics[width=\textwidth]{merge-scenario}         \caption{Merge Scenario}         \label{fig:merge-scenario}     \end{minipage}%     \begin{minipage}{0.15\textwidth}         \includegraphics[width=\textwidth]{case_a}         \caption{State A}          \label{fig:case-a}         \includegraphics[width=\linewidth]{case_b}         \caption{State B}          \label{fig:case-b}         \includegraphics[width=\linewidth]{case_c}         \caption{State C}          \label{fig:case-c}     \end{minipage} \end{figure}


You have 6 green chips, 6 black, and 6 yellow. You randomly select a sample of 3 chips without replacement. What is the probability that the sample contains at least one chip of each color?

You have 6 red balls, 6 blue, and 6 white. You randomly select a sample of 3 balls without replacement. The balls, save for the color, are indistinguishable from each other. What are the odds that your sample contains at least a ball from each color?  I thought about finding the chance that the sample will not contain at least one color and subtracting that from one:  $$P(\text{sample is missing at least one color})=P(\text{sample is missing one color})+P(\text{sample is missing two colors}) $$  Essentially the second probability statement on the right hand side is the probability that all the balls in the sample are the same color. The case where the sample does not contain three colors doesn't make sense, so I didn't include it. $$=\binom{3}{1} \left[\left(\frac{12}{18}\right) \cdot \left(\frac{11}{17}\right) \cdot\left(\frac{10}{16}\right)\right]+\binom{3}{2}\left[\left(\frac{6}{18}\right) \cdot \left(\frac{5}{17}\right) \cdot\left(\frac{4}{16}\right)\right] \approx 0.882353$$  When all of this is done, we simply subtract the probability from one to get $0.117647$.  What am I doing wrong?


Suppose that f is Riemann integrable on [a,b]. And f is bounded by M. Then, $$\left|\int_a^b f\right| \le \int_a^b|f| \le M(b-a)$$ Can some explain where the first inequality is derived from?

The following is a proof from my textbook that shows that $|f|$ is integrable on $[a,b]$ and $|\int_a^b f| \le \int_a^b |f|$, if $f$ is integrable on $[a,b]$.  Let $f$ be integrable on $[a,b]$. Then $|f|$ is integrable on $[a,b]$ and $|\int_a^b f| \le \int_a^b |f|.$ Proof. Since $f$ is integrable on $[a,b]$, there exists $B>0$ such that $|f(x)|\le B$ for all $x \in [a,b]$. Define $g:[-B,B] \rightarrow \mathbb{R}$ by $g(t) = |t|$. Then $g$ is continuous on $[-B,B]$ and $g \circ f = |f|$. It follows that $|f|$ is integrable. To establish the inequality between the integrals, we note that $-|f(x)| \le f(x) \le |f(x)|$ for all $x \in [a,b]$, so that $-\int_a^b |f| \le \int_a^b f \le \int_a^b |f|.$ But then $|\int_a^b f| \le \int_a^b |f|$, as desired.  I wanted to know how we get that $|\int_a^b f| \le \int_a^b |f|$? Does this inequality follow from the triangle inequality?


$$\int_0^R mg\frac{r}{2}dr=\frac{m}{2}v_{max}$$ and can't write $$\frac{m}{2}v_{max}=mgR$$ don't we usually equal potential energy to kinetic energy?  A stone is falling through a tunnel towards the center of the Earth. Just the ush =)  And it goes on suggesting that the time it arrives at the center is $$T_{1/2}=\frac{\pi}{\omega_0}$$ since the movement can be characterized as a harmonic oscillator.

...And you jumped in.  What would happen when you got to the middle of the Earth? Would you gradually slow down, until you got to the middle and once you were in middle would every direction feel like it was up?


I am considering returning to university to begin postgraduate study, but before that I plan to spend a year or two in industry to earn some money and also gain perspective on the idea. However, I'd like to continue reading about the area I plan to study while on that break.  My question is: Would I be better served, as far as preparing for postgraduate studies in an informal way:   Staying up-to-date with relevant research in the area I plan to specialise in, thereby having a relatively good idea of how things are at the moment, etc., or Reading more widely, covering for example most of the important/foundational texts for the whole area of study (or at least more of it than I otherwise would), and so having a better understanding of the issues and key idea in most areas at the expense of in-depth knowledge of the specialisaiton area   Of course, I will likely be doing a bit of both, but I was wondering if either is more worth aiming for than the other.  EDIT: Regarding similarity to : I read that before posting and they seem to be asking more about the depth in which they should read given articles, while I am asking more for whether the articles/etc that I choose to read should be broad or deep in their subject matter. This question is different.

Ever since starting graduate school I've tried to make scientific reading a part of my daily ritual; I track pages read using , and the graph doesn't lie.  It keeps me honest.  I aim to closely read and summarize 5 pages per day and skim a few other abstracts besides that.  I spend about half my time looking at data and figures which doesn't contribute to my daily "page count."  When I'm reading about a new topic these five pages can take several hours, but on topics I have more background in five pages might only take an hour per day.  I guess since everybody defines "read" in a different way it's hard to get an objective answer about how much reading is enough.  How much people read seems like a bit of a sensitive topic among real-life colleagues because everyone has a bit of anxiety that they aren't reading enough.  But for those further along in their academic path, I'd like to hear how you approached the literature early in your graduate school career and what you think is a sufficient amount.  I guess this all distills down into two main topics:  When deciding what to read each day, should I focus on depth or breadth?  Is five pages of close reading per day enough?  I know it doesn't sound like much, but it takes significant mental energy to meet that goal.  And consistently reading 5 pages per day adds up to a lot over time.  Edited to add: I mostly read about petrology, volcanology, structural geology, and tectonics if that makes a difference.  By "page" I mean "page of text" so if I'm reading a structural geology paper with lots of maps and figures I discount for those and a "ten page" paper becomes a 5 page paper for my purposes.


1) Custom Post Type named "Buying_Locations"  2) Each Post has three meta values of: State, City, Store Name  QUESTION:  How can you show a list of these posts sorted alphabetically by State, then City and then the Store Name? For example...  STATE 1   CITY 1   STORE NAME STORE NAME STORE NAME  CITY 2   STORE NAME STORE NAME STORE NAME  CITY 3   STORE NAME STORE NAME STORE NAME    STATE 2   CITY 1   STORE NAME STORE NAME STORE NAME  CITY 2   STORE NAME STORE NAME STORE NAME    STATE 3   CITY 1   STORE NAME STORE NAME  CITY 2   STORE NAME STORE NAME STORE NAME  CITY 3   STORE NAME    I've gotten a little further with this:   $mypost = array(  'post_type' => 'buy_locations',  'posts_per_page' => -1,  'meta_key' => 'store_city',  'orderby' => 'meta_value title',  'order' => 'ASC'  );  $loop = new WP_Query( $mypost );    Just need to figure out how to sort by the State first, then the city, then title.   Not sure how to add the extra "meta_key" value.  How do I add the 3rd sorting request?   $mypost = array(      'post_type' => 'buy_locations',      'posts_per_page' => -1,      'meta_key1' => 'store_state',      'meta_key2' => 'store_city',      'orderby' => 'meta_value1 meta_value2 title',      'order' => 'ASC'      );

I'm triyng to display hotels (taxonomy which i have created) by two 'orderby' with wp_query but i'm not success.  Results looks likes:  Hotel 1 :       2 persons          5 stars Hotel 2 :       2 persons          4 stars Hotel 3 :       2 persons          3 stars Hotel 4 :       3 persons          5 stars Hotel 5 :       5 persons          5 stars Hotel 6:        10 persons         2 stars Hotel 7:        10 persons         1 star   The first 'order by' is on the number of persons(the biggest in first) and the second 'order by' is on the rating in stars (so, if several hotels have the same number of persons, the hotel with the biggest stars rating would be in first).  Below my code. I have tried to add an array inside an array with meta_query but it doesn't work.  $args=             array(                                     'post_type' => 'hotel',                                     'Services' => $Services,                                     'Town' => $Town,                                      'meta_key' => 'Number_persons',                                     'orderby' => 'meta_value_num',                                     'order' => 'ASC',                                        'meta_query' => array(                                                            array(                                                                'meta_key' => 'Rating',                                                                'orderby' => 'meta_value',                                                                'order' => 'DESC',                                                               )                                                        )                  );   $the_query = new WP_Query( $args );   Thanks a lot :)


What is a RMS value and what is the point of RMS value? Why do we calculate it? Please be concise and precise and kindly express it in layman terms.

What makes it a good idea to use RMS rather than peak values of current and voltage when we talk about or compute with AC signals.


My employer want to calculate the total points of a user on his answers only. He don't believe in the reputation earned through questions!  If technically impossible, just the sum of upvotes and best answer points sum of his answer. (without edit, chosen best)

Is there a way in calculating the total number of reputation points one gained only on his/her answers? Currently the reputation points for questions and answers are combined total.


on SO and someone has pointed out (via a close vote) that it would be better suited to Super User.  I agree.  Let's move the question.  How do I do that?  A minute or two of looking through the UI and meta doesn't seem to have the answer.

I posted a question which was closed as off-topic and it seems like it could fit on another site in the network. How can I go about moving it there?   What is migration? When can a question be migrated, and who can migrate it? When should I consider migration, and when is it inappropriate? What causes a migration to be blocked and what happens after? What causes a migration to be rejected and what happens after? Anything else I should know about migration?


How can I dump a specific table or set of tables without including the rest of the db tables?

We have 40 databases in our server.   We want to take 36 databases backup using mysqldump. How can i ignore remaining 4 databases in mysqldump command? Is there any option for mysqldump to ignore databases for backup in MySQL?  I know the general mysqldump command but it is very lengthy. I want to ignore only 4 databases and need to take remaining dbs backup.


I'm currently running a Minecraft Realm. I am trying to give people some renamed things, but I have no idea how to rename things. Well, I know how to rename thing with the majestic anvil, but when it comes to colours and non-italic names, I am clueless. I heard of the lore tag and the custom name tag but I don't know how to use it.  Thanks all.

I have heard it was possible to change the names and lores of Minecraft items WITHOUT the use of third-party programs like MCEdit. Given the things that my friends have told me, and from the information gathered online, my guess is that, since Minecraft has started using JavaScript, /give @p 35 1 14 {name:"Red Wool",lore:"bob"}. Whenever I run this command block, all I get is a piece of Red Wool with no Lore, nor a name. I also get no errors in this process.


I would like to try out tabletop RPG games but don't know how to find a group.     Is there an usual way to find other players? Especially ones who would accept a complete newcomer to join ?  I tried basic internet search, Meetup and Facebook, with no result.    I live in France and can play in either French or English. Answers containing tips specific to the country and links to websites or social media groups in either language are welcome.

I'd really like to learn how to play pen-and-paper RPGs.  I know that it takes a few players to actually sit down and play, but I'm not at all sure where to find more gamers.  How do I find existing groups to join? Or, are there any resources online that may help me find existing RPG groups or players?


After rendering a very short animation (simple turntable) the nodes for the textures have disappeared. The "use nodes" is active in materials but nothing in the texture node editor window, Did I hide them by accident? Hope you can help. Blender 2.91

I have been following  tutorial until I started adding nodes. The problem is that he has completely different nodes than I have. Even nodes that are created at start are different (I have Material and Output and he has Render Layers and Composite). Have I missed something or should I use different nodes than he?


I am writing a console program in C.  I expect the Terminal that my program is running in to have its character encoding set to UTF-8. This means that I am sending UTF-8 encoded strings to the Terminal, and expecting to receive UTF-8 encoded strings from the Terminal.  But if the Terminal was set to another character encoding (other than UTF-8) while my program is running, then my program will stop working as expected.  So is there a way to know what character encoding the Terminal is set to from within my program (so that I can change my program behavior accordingly)? And even if there is such a way, should I even bother making my program work with multiple character encodings, or is it enough to only make it work with UTF-8?

I've noticed that SyncTERM uses a different character encoding than the default MacOS terminal emulator, and they're incompatible with one another.  For example, say you want to print a block character in a format string.  In SyncTERM, which uses the IBM Extended ASCII character encoding, you would use an octal escape sequence like \261.  In Terminal.app (and probably iTerm2 as well), this just prints a question mark.  Since these terminals use UTF-8, you need to use the \uxxxx escape sequence.  So let's say you want to print a certain, not-ASCII, character in a format string, and you want it to work in all terminal emulators, regardless of character set.  I'm guessing you would use an entry in the terminfo database, but I'm not really familiar with terminfo.  I need some pointers here.


Note, this is not a dupe of this question:    I need to validate whether or not a bitmask consists of multiple flags.  I've come up with this method, but I don't like it a whole lot because of the enumeration and casting.   [Flags] enum MyFlags { a = 1, b = 2, c = 4, d = 8 }  var flags = Enum.GetValues(typeof(MyFlags)).Cast<MyFlags>();  Console.WriteLine(flags.Any(f => f == (MyFlags.a | MyFlags.c))); //false Console.WriteLine(flags.Any(f => f == MyFlags.b)); //true

Today I needed a simple algorithm for checking if a number is a power of 2.  The algorithm needs to be:   Simple Correct for any ulong value.   I came up with this simple algorithm:  private bool IsPowerOfTwo(ulong number) {     if (number == 0)         return false;      for (ulong power = 1; power > 0; power = power << 1)     {         // This for loop used shifting for powers of 2, meaning         // that the value will become 0 after the last shift         // (from binary 1000...0000 to 0000...0000) then, the 'for'         // loop will break out.          if (power == number)             return true;         if (power > number)             return false;     }     return false; }   But then I thought, how about checking if log2 x is an exactly round number? But when I checked for 2^63+1, Math.Log returned exactly 63 because of rounding. So I checked if 2 to the power 63 is equal to the original number - and it is, because the calculation is done in doubles and not in exact numbers:  private bool IsPowerOfTwo_2(ulong number) {     double log = Math.Log(number, 2);     double pow = Math.Pow(2, Math.Round(log));     return pow == number; }   This returned true for the given wrong value: 9223372036854775809.  Is there a better algorithm?


How can I set text to be multi-line on a multirow table? I'm referring to row 5 column 1. Thank you    \documentclass{report} \usepackage[margin=0.5in]{geometry} \geometry{margin=1in} \usepackage{graphicx} \usepackage[table,xcdraw]{xcolor} \usepackage{tabularx} \usepackage{multirow} \usepackage{ragged2e} \newcolumntype{C}{>{\centering\arraybackslash}X}  \begin{document}  \begin{table}[h!] \centering \small \setlength\tabcolsep{3pt} \renewcommand\tabularxcolumn[1]{m{#1}} \begin{tabularx}{\linewidth}{     |>{\hsize=1.0\hsize}C|% 10% of 4\hsize      >{\hsize=1.0\hsize}C|% 30% of 4\hsize     >{\hsize=1.0\hsize}C|% 30% of 4\hsize         % sum=4.0\hsize for 4 columns   } \hline  \textbf{Instituição} & \textbf{Estágio} & \textbf{Duração}\\ \hline  \multirow{4}{*}{Hospital de Origem} & Radiologia convencional e estudos contrastados & 6 meses \\  & Ecografia Geral e Ecografia Ginecológica & 6 meses \\  & Eco-Doppler & 1 mês \\  & Tomografia Computorizada & 6 meses \\ \hline  \multirow{3}{*}{Hospital de Origem depois} & Radiologia convencional e estudos contrastados & 3 meses \\  & Neurorradiologia & 3 meses \\  & Ressonância Magnética & 3 meses (a tempo parcial) \\ \hline  CHospital de Origem com texto grande (muito grande) & Eco-Doppler & 2 meses \\ \hline  \multirow{4}{*}{Hospital de Origem enorme e acontece isto porque} & Radiologia Mamária & 3 meses \\  & Medicina Nuclear e Densitometria Óssea & 1 mês \\  & Radiologia do Pescoço &  0\\  & Radiologia de intervenção &  0\\ \hline  \end{tabularx} \caption{Distribuição do Internato de Formação Específica} \label{tab:exemplo} \end{table}  \end{document}

I'm making a tabular and I'd like to automatically do a like break rather than going beyond the page.   This is my tabular code:  \begin{table}[h] \begin{tabular}{|l|l|l|} Use Case Navn:          & \multicolumn{2}{l}{Opret Server} \\ Scenarie:               & \multicolumn{2}{l}{At oprette en server med bestemte regler som tillader folk at spille sammen. More Text more text More Text} \\ \end{tabular} \end{table}   This is my preamble:  \documentclass[danish,a4paper,twoside,11pt]{report} \usepackage{babel} \usepackage[utf8x]{inputenc} \usepackage{natbib} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{titling} \usepackage{color} \usepackage{xcolor} \usepackage{nag} \usepackage{tabularx}  \newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\\}   This is how it looks right now:


I have a fresh installation of Ubuntu 18.04-x64.  In the terminal I enter the command:  sudo apt update   And I get the following error:  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   When I run sudo apt update again, the command runs successfully and I get:  Reading package lists... Done                                                   Building dependency tree        Reading state information... Done 103 packages can be upgraded. Run 'apt list --upgradable' to see them.   This behaviour is consistent. I have a VM snapshot of the fresh Ubuntu installation and everytime the first sudo apt update fails with this error and the second sudo apt update completes successfully.  EDIT: Should have mentioned that the sudo apt update command lies inside a script. Running the script with sudo privileges seems to have fixed the problem.

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


I would like to know how I can change the fontsize of the captions associated with my subfigures. I want the caption of the subfigures to be smaller than that of the figure. \begin{figure}[H]  \centering  \begin{subfigure}[b]{0.3\textwidth}      \centering      \includegraphics[width=\textwidth]{Figures/B2.png}      \caption{Bandstructuur $2$ natrium atomen.}      \label{fig:B2}  \end{subfigure}  \hfill  \begin{subfigure}[b]{0.3\textwidth}      \centering      \includegraphics[width=\textwidth]{Figures/B3.png}      \caption{Bandstructuur $3$ natrium atomen.}      \label{fig:B3}  \end{subfigure}  \hfill  \begin{subfigure}[b]{0.3\textwidth}      \centering      \includegraphics[width=\textwidth]{Figures/BN.png}      \caption[10pt]{Bandstructuur $N_A$ natrium atomen in kristalstructuur.}      \label{fig:BN}  \end{subfigure}     \caption{Vorming bandstructuur van natrium (Na) atomen. Breedte van banden neemt toe naarmate de hoeveelheid atomen toeneemt zodat er uiteindelijk een bandstructuur ontstaat.}     \label{fig:B23N} \end{figure}

That's what I use  \usepackage{caption} \usepackage{subcaption}   The template I'm using is from a university and uses the Koma Script When adding figures or graphs I do this:  \begin{figure}[h!] \begin{subfigure}[normal]{0.40\textwidth}  \includegraphics[width=\textwidth]{figures/Fig1} \caption{Caption of Fig1} \label{Label of Fig1} \end{subfigure} \begin{subfigure}[normal]{0.40\textwidth} \includegraphics[width=\textwidth]{figures/Fig2} \caption{Caption of Fig2} \label{Label of Fig2} \end{subfigure} \caption{This is the caption for whole graphic} \label{This is the label for the whole graphic} \end{figure}   what I want to know is how to simply adjust different font styles for the captions of the subfigures and figure.  I want especially the captions fonts of the subfigures to be smaller than the captions fonts of the figures.  As far as I googled the problem, I could do this with a Koma script command or by addressing the caption package.  I tried the following:  \captionsetup{font=small,labelfont={bf,sf}}   this affects all captions but how can I adjust the captions of subfigures separately?  I don't understand the difference in the approaches between the komaScript and the captionpackages So I simply want to adjust the Font sizes of the different Caption types separately and uniquely for the whole document and I would like to adjust the space between the captions and the subfigures .....


Our definition of a manifold $M$ is a Hausdorff topological space such that for every $x \in M$, there exists a neighborhood $U_x$ that is homemorphic to $\mathbb{R}^m$ for some $m$. We define the closed unit ball in $\mathbb{R}^n$ to be the set $\{x \in \mathbb{R}^n \colon \|x\| \leq 1\}$.  The claim is that the closed unit ball is not a manifold. The open unit ball is clearly a manifold, so I assume that for every point $x$ on the boundary of the closed unit ball, none of the neighborhoods of $x$ are homemorphic to $\mathbb{R}$. However, I am having trouble doing so. I have tried proving this by contradiction by supposing such a homemorphism exists and showing there exists a topological property of $\mathbb{R}^n$ that the closed unit ball doesn't have.

My book on differential geometry claims that a closed ball in $\Bbb R^n$ can never be a differentiable manifold because of the boundary points. The book doesn't really give an explanation for why this is true. Could someone provide more details please? thanks


Let's assume that I have the following three lists (l1, l2, l3). How can I create a new list where each element is a tuple of elements of the lists (l_desired)? It actually works as an extended version of the zip method in python. In simpler words, given l1, l2, l3, how can I create l_desired? l1 = [1,2,3] l2 = ['a', 'b', 'c'] l3 = ['Jess', 'Muss']  l_desiered = [(1, 'a', 'Jess'), (1, 'b', 'Jess'), (1, 'c', 'Jess'),                (1, 'a', 'Muss'), (1, 'b', 'Muss'), (1, 'c', 'Muss'),                (2, 'a', 'Jess'), (2, 'b', 'Jess'), (2, 'c', 'Jess'), ...]   `

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I'm trying to install an outdoor antenna at my parent's house and was wondering how to connect the wire that goes to the grounding rod to the grounding electrode system through the service panel when there doesn't appear to be a grounding bus bar in the service panel.    Here's the inside:

So to continue my line of electrical questioning (and perhaps narrow down my ), I took a look through the two panels in this house.  There is a 200amp main service in the basement, which then feeds up to a 100amp sub-panel for the main floor.  This 100amp sub feeds a kitchen (fridge, microwave, dishwasher, gas range), a bathroom, 3 bedrooms, and a living room.  The 200amp main feeds the 100amp sub, 2 bedrooms, a living room, a washer/dryer (gas dryer), a utility room (well pump, pressure tank, gas water heater, gas furnace), and an A/C.  My first concern is that the main service panel has the bare ground and neutral wires mixed on the two bus bars.  Reading around, some say this is OK, other's say it is bad.  Any thoughts?  The sub-panel is wired with grounds and neutrals on separate bars.  My second concern- is a 100amp sub sufficient for the main floor?


Mixing of different wavelengths of light results in white,  but why is that when paint with different colors are mix results in black?

I'm trying to reconcile these facts,   If I had paints of the primary colours and I mixed them together, I would produce gray.  White light contains every colour.    My most convincing attempt to answer the question: The colours of objects that don't produce light are the colours those objects don't absorb. A white object doesn't absorb any colour, a blue object absorbs all colours but blue, a green object absorbs all colours but green, etc. So by mixing paints of the primary colours I mix influences that collectively absorb all colours and reflect all colours; whereas, if I had paint that only absorbed all colours I would have black paint, and if I had paint that only reflected all colours I would have had white paint. Gray is a combination of white and black so I found this answer intuitively satisfying. However, I don't know if it's an accurate explanation of the observation.   Why does mixing every paint colour produce gray instead of white?  Thank you.


I'm trying to reconcile how photons do and don't have mass, and the distinction seems to come from the frame of reference. As far as I understand, if you were to somehow stop a photon relative to an observer so that it was at rest, you wouldn't be able to measure its mass, probably for multiple paradoxical reasons, although maybe in some weird scenario you could decohere perpendicular photons and measure the effects, but anyway, photons can't stop, so they can't have rest mass I guess. However, how do we know which causes the other? Do they not have rest mass because they must stay in motion? Or must they stay in motion because they formed in such a way that they never could have had rest mass to begin with? And then, how do they have mass simply by not being at rest?

Why is the rest mass of the photon is taken to be zero?  If rest mass of the photon is non zero, then it leads to infinite energy of the photon (by $E=mc^2$ equation) and there is a violation of conservation of energy. Is this a reason?  Also, is there any thing called the relativistic mass of the photon?


I did a fresh install of Ubuntu 12.10 in my Asus X101CH Eee PC, using a live usb which I made using startup disk creator, replacing Ubuntu 12.04. The installation ran smoothly, but when I boot, it goes to a purple screen for a second, then a lot of text like the following shows up in sequence:  Starting crash report submission daemon                        [OK] Starting CPU interrupts balancing daemon                       [OK] Stopping save kernel messages                                  [OK] _   And the cursor just keeps blinking for hours. I can't log in. Pressing Alt + F2 did not bring me to console mode.  I thought it might be a partition problem so I formatted the whole disk, by creating a new partition table using gparted in Ubuntu 12.04 live USB. I noticed that I can't try Ubuntu using 12.10 live USB either; it just went to a blank screen when I hit the 'try ubuntu' button.   But the same problem arose. I even changed the pen drive for the live USB a couple of times.  I happened to know that the Intel Atom N2600 Cedar Trail CPU in my computer is not well supported in Linux, I managed to install its drivers in Ubuntu 12.04, although the computer went blank during the installation.

I am looking for instructions on how to install cedarview graphics drivers on Ubuntu 13.04 32bit.  My graphics hardware is a GMA3600 aka Power VR SGX545.  EDIT: It seems that they are not in Raring yet, but only Precise:   EDIT2: they seem to be closed source.


This is problem 1.7.24 Hogg, McKean, and Craig. I understand the process for finding such a CDF and PDF. Here is what I have,  $$F_Y(y)=P(Y\leq y)$$ $$=P(X^2\leq y)$$ $$=P(-\sqrt{y}\leq X\leq \sqrt{y}).$$  So I would think the answer would be  $$F_Y(y)=\int_{-\sqrt{y}}^\sqrt{y}\frac{1}{3}dx$$ on $0\leq y<4$. But the solutions manual says   $$F_Y(y)=\int_{-\sqrt{y}}^\sqrt{y}\frac{1}{3}dx$$ on $0\leq y<1$ and   $$F_Y(y)=\int_{-1}^\sqrt{y}\frac{1}{3}dx$$ on $1\leq y<4$.   I don't understand how the reasoning behind using these bounds. Any  explanation would be much appreciated.

Suppose $X$ has uniform $[-1,2]$ distribution. I am trying to find the density of $Z=X^2$.  Here is what I have done thus far:  Range($Z$)$=[0,4]$. I began computing the distribution of $Z$ for $z \in [0,4]$ as follows:  $$\begin{align*}   P(Z \le z) &= P(X^2 \le z)\\              &= P(X \in [-\sqrt z, \sqrt z]) \end{align*}$$  I am note sure what to do from here. Any help is greatly appreciated. Once I unravel the distribution of $Z$, I can obtain the density of $Z$ by taking the derivative of its distribution function with respect to $z$.


Back in the '80s I read a short story (which might have been old, then) about aliens in a war with other aliens finding Earth which had previously been locked away, I think, by some kind of lock on the Moon.  After some misgivings, they unlocked Earth and landed to ask for help.  Earth seemed completely pastoral and they almost gave up hope of getting help, but persisted and humans finally agreed to help them.  At the end of the story, they get back in their space ship and wait for Earth's space ships to fly out and help them when the Earth itself grows an engine and flies after them.  I have been looking for this story on and off for a couple of decades and have never found it, but my daughter was asking about some of the short stories I enjoyed as a youngster and this one came up, so I'd really like to find it, now.  I've looked through several hundred old anthologies and haven't found it, yet, but I found StackExchange, so I'm hoping someone here can help me.  I know this isn't much detail to work with, but I'm working from old memories.  Thanks in advance for the help (or attempt).

First we are told that the Galactic Empire/Federation/Powers-that-be have kept the Earth locked up for being too warlike, but now their help is needed against invaders from another galaxy.  When the aliens land the first thing they meet is a talking bunny.      at the end when humans have accepted to join the fight the alien offers to send ships to transport them. The human leader tells that there is no need...  and the Earth accelerates away.   I must have read this sometime in the mid eighties, so no later than 84 or 85, but the story may be from the sixties or before.


So, I'm just wondering about this because I read the following in my Biology textbook about fruit fly genes:     "Normal male and female flies express distinct forms of the fru gene. When females are genetically manipulated to express the male form of fru, they court other females, performing the role normally played by the male..."   Out of curiosity, have any studies been conducted to see what causes homosexuality? Is there a similar gene in humans that, if randomly altered, causes attraction to same-sex individuals?  EDIT: a similar post exists, but nobody provided an answer related to the poster's question.

From some basic googling, I found that nobody has ever proven that people are born gay and that environment plays a great part in homosexuality.  I wish to know if there is a genetic component to homosexual behaviour. If so, how significant is that component (in some measure such as percentage contribution to the behaviour). What are other factors that play a role in homosexuality i.e. what constitutes environmental factors?


I have a Micromax Canvas Doodle running on Android that I don't use anymore.      There is No Official UBUNTU TOUCH ROM available for my phone. Could   anyone provide me with the unofficial build?    I just want to try UBUNTU   TOUCH.   P.S My bootloader is unlocked and I have ROOT.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I can't understand this. Can you please make a clearer explanation?

Out of boredom, I decided to recall the following equation:   $$x^{x^{x\cdots}} = 2.$$  Which, I simply rewrote like this:   $x^2 = 2$, and therefore $x = \sqrt{2}$.  Then I took a look at the more general form:  $$x^{x^{x\cdots}} = p.$$  I then concluded that $x = (p)^{\frac{1}{p}}$, and this was the solution set for all $p$. Then I thought for a while and determined that there are multiple values where this function equals the square root of $2$, so its not injective. However, this led to an awkward statemend based on the fact that $\sqrt{2} = (4)^{\frac{1}{4}}$. We deduce the following:  The equation $x^{x^{x\cdots}} = 2$ and the equation $x^{x^{x\cdots}} = 4$ have the same solution, namely $x = \sqrt{2}$. So we conclude that $2 = 4$.   I showed this to friend of mine, and he conjectured that there are no valid solutions for all $p > e$. To prove this, I tried writing the following:   I tried differentiating $f(x) = (x)^{(1/x)}$ and setting it equal to $0$ to find the maximum. I determined that there was a maximum at the point where $x = e$. Does this mean that the maximum possible solution $x$ for the infinite power is $e^{(1/e)}$ therefore showing that the maximum value for $p$ is indeed $p = e$?


What word would best describe the term "with very little confidence" ?

I'm trying to find a word that describes a lack of confidence. Something that gives a sense of worthlessness maybe. I've dried looking up in Thesarus.com for similarities to lack of confidence and antonyms to self-worth, but with no luck. Anyone have some ideas?


Theres a Do method in System.Reactive to a execute a mutator for each item in the sequence. Is there any equivalent method for IEnumerable either in standard library or third parties like ?

Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, maybe performance?


The following doesn't work:      public string foo()     {         using (Random myRandomChoice = new Random())         {             return myRandomChoice.Next(10).ToString();         }     }   The following is errors:      public string foo()     {         Random myRandomChoice = new Random();         return myRandomChoice.Next(10).ToString();     }   The error message for the first foo is concerning Random not being implicitly convertable to System.IDisposable.   Is this a deliberate ploy withing the syntax of the language so you only use using in specific circumstances e.g when dealing with database connections? or can I explicitly convert Random to type IDisposable so that the initial foo works?  Is there a list available of types that would be better declared with using ?

What is the purpose of the Using block in C#? How is it different from a local variable?


How do I proof $\neg \neg p \rightarrow p$ in the following Hilbert system without the use of additional lemmas (derive purely syntactical)?     $A \rightarrow (B \rightarrow C)$ $(A \rightarrow (B \rightarrow C)) \rightarrow ((A \rightarrow B) \rightarrow (A \rightarrow C))$ $(\neg A \rightarrow \neg B) \rightarrow ((\neg A \rightarrow B) \rightarrow A)$   In  there is a proof for $p \rightarrow p$, which is easy to grasp (pdf-version of the textbook onchapter 2 page 23) and in  (page 12) there is a proof for the exact problem of this question, except that it uses additional lemmas and transformations.

I have been trying to prove that the propositional formula $ \big( \alpha \rightarrow \lnot \beta \big) \rightarrow \big((\alpha \rightarrow \beta) \rightarrow \lnot \alpha \big)$ is a theorem in Hilbert's system, i.e., to prove $\vdash \big( \alpha \rightarrow \lnot \beta \big) \rightarrow \big((\alpha \rightarrow \beta) \rightarrow \lnot \alpha \big)$using the following three axioms and Modus Ponens.   $\alpha \rightarrow \big(\beta \rightarrow\alpha \big)$ $ \big({\alpha \rightarrow \big(\beta \rightarrow\gamma \big)}\big) \rightarrow  \big({\big(\alpha \rightarrow\beta \big) \rightarrow \big(\alpha \rightarrow\gamma \big)} \big)$ $\big( \lnot \beta \rightarrow \lnot \alpha \big) \rightarrow \big( (\lnot \beta \rightarrow\alpha) \rightarrow \beta \big)$    Deduction theorem can be used as well. I am getting into long winded derivations which don't lead anywhere. Hints will be highly appreciated.


I am studying the proof by contradiction below. But I am confused on why the proof is valid. It first assumes that $p, q$ have no common factor, and then arrives at a conclusion where $p, q$ are both divisible by $2$, and hence they do have a common factor, contradicting the earlier assumption. But I am confused on how this leads to the conclusion that $\sqrt{2}$ is irrational. To me, it seems all it says is that we can't assume that $p, q$ have no common factors. How does it prove the case where $p, q$ have a common factor, but doesn't result in $\sqrt{2}$?

I have read a few proofs that $\sqrt{2}$ is irrational.  I have never, however, been able to really grasp what they were talking about.  Is there a simplified proof that $\sqrt{2}$ is irrational?


I don't know how long this has been happening, but I recently noticed what seems to be a regression: after clicking the "An edit has been made to this post" banner that appears when a question or an answer has been edited while you're viewing it, any code syntax highlighting or math formatting in the post fails to render.  Steps to reproduce:   Open a question with highlighted code or MathJax markup that is likely to get edited soon. (The  or  is a good place to find some.) Leave the question open until someone edits it and the "An edit has been made to this post" banner appears. (For efficiency, open several questions in separate tabs and wait a few minutes until one of them gets edited.) Click the banner. Observe that the question gets reloaded, but it loses any syntax highlighting or math formatting.   (The bug also occurs for edited answers, but those tend to be harder to find on demand.  Unfortunately, editing a post yourself while having it open in another tab doesn't seem to work, since the banner never appears in that case.)    FWIW, the cause of this bug appears to be a missing call to styleCode() (or equivalent code) in the reloadPosts function in realtime-se.js, as included in the  bundle. (In particular, running styleCode() from the browser JavaScript console after reloading the post restores the missing syntax highlighting.)  I'm pretty sure this used to work automatically, so I suspect this is a regression caused by some recent code reorganization.

If you are looking at an answer with a code snippet in it, and the answerer updates the answer, you see An edit has been made (etc.). If you click that, the answer is refreshed, but the code snippet buttons (Run, Copy, and Expand) go missing.  The code snippet buttons are there again after reloading the entire page.  Answer has been edited:        After clicking to reload it:        Similarly, non-snippet code blocks do not receive syntax highlighting after an edit, as described , which refers to  as a related or root cause.  (Browser: Chrome v77 - OS: Windows 10 Pro x64)


This is from the book The statistical sleuth--A course in methods of Data analysis Chapter 20, Exercise 12(c)-(e). I am using logistic regression to predict carrier with possible predictors CK and H. Here is my solution:  Carrier <- c(0,0,0,0,0,1,1,1,1,1)   CK      <- c(52,20,28,30,40,167,104,30,65,440)   H       <- c(83.5,77,86.5,104,83,89,81,108,87,107)   logCK   <- log(CK)   fit4    <- glm(Carrier~logCK+H, family="binomial", control=list(maxit=100))   Warning message:   glm.fit: fitted probabilities numerically 0 or 1 occurred    summary(fit4) ##  ## Call: ## glm(formula = Carrier ~ logCK + H, family = "binomial", control = list(maxit = 100)) ##  ## Deviance Residuals:  ##        Min          1Q      Median          3Q         Max   ## -1.480e-05  -2.110e-08   0.000e+00   2.110e-08   1.376e-05   ## ## Coefficients:   ##              Estimate Std. Error z value Pr(>|z|)   ## (Intercept)   -2292.8  4130902.8  -0.001        1   ## logCK           315.6   589675.2   0.001        1   ## H                11.5    21279.6   0.001        1   This results appear to be weird, because it seems that all coefficients are not significant.  Also the next question is to do a drop-in-deviance test for this full model and the reduced model that neither of logCK and H is useful predictor. I get:    fit5 <- glm(Carrier~1, family="binomial")   1-pchisq(deviance(fit5)-deviance(fit4), df.residual(fit5)-df.residual(fit4))   ## [1] 0.0009765625   So the p-value indicates that at least one of logCK and H is useful. Then I'm stuck at the next question, it asks me to calculate odds ratio for a woman with (CK, H)=(300,100) over one with (CK, H)=(80, 85).    But how can I get a meaningful result with all coefficients in this model ranging so wildly? Is there anything wrong with the way I did this logistic regression? Are there any remedial measures?

If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message:  Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred    We still get the model but the coefficient estimates are inflated.   How do you deal with this in practice?


Any input on the following:  I have no idea if these means that we need to simply resubmit our APP, or our they denying our APP for any future development?   Dear Jane Doe,   You have revoked your certificate, so it is no longer valid.  Certificate: iOS Distribution Team Name:  Any provisioning profiles that include this certificate are no longer valid and must be regenerated for future use.   Best regards,  Apple Developer Program Support

My app is already in App Store. Now my distribution certificate is expired. I know my app in App Store will continue running, but my questions are:   If now I have a bug fix in my app, does it mean I am not able to submit the updated app to App Store since my distribution certificate expired? If I renew the distribution certificate, my understanding is that it is identical as revoke the distribution certificate and create a new distribution certificate, am I right? If the answer to my 2nd question is "Yes", does it mean in future when I see my distribution certificate is expiring soon, I just revoke it and create a new one for existing app in App Store, am I right?


I want to draw a letterform free-hand, simulating an aliased character and I would like to then apply a filter so it looks like an anti-aliased character [ed. note: simulate sub-pixel rendering?].  I tried the various blur filters but the blur is too regular. Is there a filter that would make it look more like a real anti-aliased letterform?  edit : since you need it it here is an exemple of a letter I would like to make look like a rasterized anti-aliased letter :   link :

Do I really have to design everything in Photoshop with anti-aliasing set to "none"?  I'm sure there is a better way.    I'd like to have a setting so that when picking a basic web-safe (such as Tahoma) in Photoshop so I can see what it will actually look like when on the web.  For example: The difference between Tahoma with anti-aliasing set to "crisp" in Photoshop and how it renders in Firefox is major.  It looks nice and smooth in Photoshop and looks like crap on the web.  Is there a anti-aliasing choice that is best to start with (that has the most similar outcome) when planning to have the content live on the web?


Can anyone explain to me how the power meter can differentiate between the reactive power and real power? If power is current times voltage, can we assume that since reactive elements give back the current to the generators the average power for using them is zero? If this true, how come indusrtries pay for reactive current?

If power is current times meter shouldn't the overall resistances and inductances and capacitances of my house appliances be known so the power meter could calculate the power. I look at my house as a closed circuit. some people say the amp meter measures the current that is used by the appliances but according to ohm's law I need to know the impedances to measure the current.The voltage is standard 120 rms volts.


So, I'm currently an upcoming sophomore in undergrad and my grades during freshman year weren't the best. I got a F during my second semester which gave me an overall freshman GPA of 2.9  I'm not too worried about the GPA since I still have time to improve it.  However, the F on the transcript is really stressing me out. As of now, my school says I cannot retake and replace the F on the transcript.  Even if I increase my GPA to at least a 3.7 but still have 1 F on my transcript, how badly will if affect my chances of getting into a good grad school or getting internships?

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I've got to plot an histogram with pgfplots where a single x value assumes a large value on the y-axis (14000) while the remaining data are all under 150... I'd like some suggestions on how to handle the plotting. I would like to have the plot scaled in order to have a good view of those data under 150 but at the same time it should report the largest value... Any suggestion?      \documentclass{article}     \usepackage{pgfplots}      \begin{document}      \begin{figure}     \begin{center}         \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}%         %         \begin{tikzpicture}         \begin{axis}[         scale only axis,         xmin=0,         xmax=10,         xmajorgrids,         ymin=0,         ymax=20000,         ymajorgrids         ]         \addplot[ycomb,color=mycolor1,solid,mark=o,mark options={solid}] plot            table[row sep=crcr] {%             0   20000\\             1   126.220647721184\\             2   136.394614023852\\             3   21.1680012089801\\             4   113.520374296189\\             5   143.838641199471\\             6   41.9123247298389\\             7   98.5479898078184\\             8   148.403736993507\\             9   61.8177727862635\\             10  81.6031666334055\\         };         \end{axis}         \end{tikzpicture}%     \end{center}     \end{figure}      \end{document}

Is there an easy way to 'break' the axis in a pgfplots environment? What I'm talking about is something like     Any minimal plot will do as an example...for example  \documentclass{minimal}   \usepackage{tikz} \usepackage{pgfplots}  \begin{document} \begin{tikzpicture} \begin{axis}[ymin=0, ymax=80] \addplot {x*0};  \addplot {x^2+50}; \end{axis} \end{tikzpicture}  \end{document}   For example, in the below plot,    I want to break the axis from around y = 10 to y = 40.   Any ideas? Does PGF have this functionality? A search for `break' in the manual doesn't yield anything.


They are saying This app duplicates the content and functionality of other apps submitted by your but this is my first app to be submitted and I never submitted apps before. From Apple:   3 Design: Spam Guideline 4.3 - Design  This app duplicates the content and functionality of other apps submitted by you or another developer to the App Store, which is considered a form of spam. Apps that simply duplicate content or functionality create clutter, diminish the overall experience for the end user, and reduce the ability of developers to market their apps. The next submission of this app may require a longer review time, and this app will not be eligible for an expedited review until this issue is resolved. Next Steps  Review the Design section of the App Store Review Guidelines. Ensure your app is compliant with all sections of the App Store Review Guidelines and the Terms & Conditions of the Apple Developer Program. Once your app is fully compliant, resubmit your app for review.  Submitting apps designed to mislead or harm customers or evade the review process may result in the termination of your Apple Developer Program account. Review the Terms & Conditions of the Apple Developer Program to learn more about our policies regarding termination"  What should I do?

Can anybody help me out to know the possible reasons for which Apple store can reject or raise objection to submit any iPhone application.


The question is from the book The Foundation of Mathematics by Ian Stewart.  Let $y = 0·1234567891011121314151617181920 . . . $,  whose digits are the natural numbers in decimal form, strung end to end. Prove that y is irrational.  This is how I solved it.  I assumed the number is of the form $a_0.a_1a_2a_3.......$ where $a_n = a + nd$ and $a = 0, d = 1$  So if there is no repetition in the infinite decimal places then the number is irrational.  All I had to prove was that assume to there is a repetition after $a_n$ from $a_{n+1}$ till $a_{n+k}$ and if $a_{n+1} \ne a_{n+k+1}$ then there is no repetition and the series must be irrational.  Is my proof correct?

Show that the sequence $\{a_n\}_{n\in \mathbb{N}} = \{x: x=$ the nth decimal digit of Champernowne's constant$\}$ is not periodic.  For those who don't know what Champernowne's constant is, it's the following number:  $C_{10} = 0.123456789101112131415161718192021...$  Well, before someone says that $\{a_n\}_{n\in \mathbb{N}}$ is definitely aperiodic because Champernowne's constant is irrational(and even transcendental), I have to say that I'm well aware of the fact that a number is rational if and only if the sequence of its digits is periodic, but I'm looking for another proof that the sequence of the digits of $C_{10}$ is aperiodic that doesn't use anything but a smart way of showing that $a_{n+k} = a_n$ can't hold for any $k\in \mathbb{N}$.  I've observed that by grouping the terms of a sequence in a clever way we can show that no such $k$ can exist for some sequences. For example I created the following sequence:  $1,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,\cdots$  The sequence is created this way: First you put one $1$, then two $0$'s, and in the nth step you add either $1$'s or $0$'s n times depending on whether n is odd or even respectively.   It's easy to show this sequence is not periodic, because no matter how large $k$ is you can always find $n$ such that $a_n = 1$ but $a_{n+k}=0$ or $a_n=0$ but $a_{n+k}=1$. That proves the sequence is not periodic and as a corollary it' proved that the real number $0.1001110000111110000001111111\cdots$ is irrational.  After showing that I've been trying to apply this technique of grouping to the sequence in problem without much success so far.  I think if the periodicity of a sequence $\{a_n\}$ is denoted by $\Omega(\{a_n\})$ then if we define a new sequence $\bar{a}_m(n) := \bar{a}_{m,n} = [a_n]_m$ then $\Omega(\{\bar{a}_{m,n}\}) \mid \Omega({a_n})$. This shouldn't be very hard to prove  I think.  Now, to show that   $1,2,3,4,5,6,7,8,9,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,2,0,2,1,\cdots$  is not periodic it's sufficient to prove that the sequence   $1,0,1,0,1,0,1,0,1,1,0,1,1,1,0,1,0,1,0,1,\cdots$  is not periodic. But I haven't progressed much from here  :/


I need to create a web api that accepts a multipart form request that contains input for text, file fields. Now I'm facing a problem that I cannot send html text through the text field.  [HttpPost] public HttpResponseMessage SampleController() {     try     {         var httpRequest = HttpContext.Current.Request;         var sendItem = httpRequest.Params["Body"];     } }   The code above shows the api controller. It accepts a 'Body' field that contains Html contents. When parsing the request by controller caught an Error shown below.     System.Web.HttpRequestValidationException: 'A potentially dangerous Request.Form value was detected from the client (Body="
Hai
").   Web.config:  <system.web>   <compilation debug="true" targetFramework="4.7.2" />   <httpRuntime targetFramework="4.7.2" /> </system.web>   How to solve this issue so that it can accept text with html?

Every time a user posts something containing < or > in a page in my web application, I get this exception thrown.  I don't want to go into the discussion about the smartness of throwing an exception or crashing an entire web application because somebody entered a character in a text box, but I am looking for an elegant way to handle this.  Trapping the exception and showing     An error has occurred please go back and re-type your entire form again, but this time please do not use <   doesn't seem professional enough to me.  Disabling post validation (validateRequest="false") will definitely avoid this error, but it will leave the page vulnerable to a number of attacks.  Ideally: When a post back occurs containing HTML restricted characters, that posted value in the Form collection will be automatically HTML encoded. So the .Text property of my text-box will be something & lt; html & gt;  Is there a way I can do this from a handler?


I'm aware of the previous question which has been answered :   Today   , I found another formula for the number of paths between two vertices in a complete graph      $     \space \ \lfloor e \times (p-2) !\rfloor $    such that $p$ is number of vertices in complete graph . I don't know how $e$ and floor function have appeared in that . In the other words , I'm looking for the proof .

In a complete graph total number of paths between two nodes is equal to:   $\lfloor(P-2)!e\rfloor$   This formula doesn't make sense for me at all, specially I don't know how ${e}$ plays a role in this formula. could anyone prove that simply with enough explanation?


I am trying to separate a document into components then only include whole components, however one of the components contains an include tag for a tikz diagram and I am receiving: LaTeX Error: \include cannot be nested.  Is there any way that I can simply include the Tikz figure within that component, that will allow it to be included in the main document as is?  This is the set up:  a.tex (diagram)  \begin{tikzpicture} ... \end{tikzpicture}   component.tex  \begin{center}     \include{diagrams/a} \end{center}   main.tex  \section{"component"} \include{components/component}

There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there more things like them to be aware of?


Let $G=\Bbb Z/n \Bbb Z$ and assume $d\mid n$.     There exists a unique subgroup of $G$ of order $d$.   The mod $n$ reduction of $n/d\in \Bbb Z$ generates a $d$ element subgroup of $\Bbb Z/n\Bbb Z$, so that takes care of existence.  What about uniqueness?  If $H\leq G$ is any subgroup of order $d$, then $G/H$ has order $n/d$, right? What result did I use here?  In particular $n/d\cdot g\in G/H$ is trivial, so $n/d\cdot g\in H$ for $g\in G$. Taking $g=1$ we have $n/d\in H$ and there are $d$ multiples of this in $H$, so $H$ is the same group as above. Does this argument work?

Lemma $1.92$ in Rotman's textbook (Advanced Modern Algebra, second edition) states, Let $G = \langle a \rangle$ be a cyclic group. (i) Every subgroup $S$ of $G$ is cyclic. (ii) If $|G|=n$, then $G$ has a unique subgroup of order $d$ for each divisor $d$ of $n$.  I understand how every subgroup must be cyclic and that there must be a subgroup for each divisor of $d$. But how is that subgroup unique? I'm having trouble understanding this intuitively. For example, if we look at the cyclic subgroup $\Bbb{7}$, we know that there are $6$ elements of order $7$. So we have six different cyclic subgroups of order $7$, right? Thanks in advance.


I just bought a new computer and it has Ubuntu already on it, and I want to get rid of it and install windows 7. SO I put my disk in, and I click "Auto Run," And it says the archive manager has had an error. MY computer also came with driver update and installation CD's, same thing happens. The archive manager fails. I also cant download anything from the internet. The archive manager wont let me open anything. How do I get rid of Ubuntu when I cant even run or download anything????

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Based on feedback in comments tried this command:   In a terminal window this works:   gnome-terminal -x bash -c "sudo ./serial"; xdotool getactivewindow windowminimize    However when running the command in Startup Program the xdotool seems to be ignored. The pc boots with terminal windows on the screen, not minimized.  Background History:  I'm trying to determine a way to minimize the terminal window with the gnome-terminal command. I need my Ubuntu 14.04LTS remote pc to run several scripts and a C program at startup.  This remote pc is for customer viewing so the monitor needs to be clean. I did not see an option available to minimize: .  The best I could do was to make the terminal windows small, which is acceptable if I don't find a better way.  This is my command entered into Ubuntu's "Startup Applications" program:  gnome-terminal --geometry=60x2 --command "sudo ./My_C_Program"   My programming/Linux skills are mediocre, but growing. I'm looking for a better way to do this.  Based on a comment/feedback tried this:  gnome-terminal -x bash -c  "sudo ./serial_ver2_machine3_free_air_3_95"; wmctrl -r :ACTIVE: -b add,shaded   This works just the way I want when executing in a Terminal window!! The Terminal window is shaded but program is still running and it reappears when I click twice on Ubuntu's Terminal icon.  However when executing within "Startup Applications" the Terminal window is not 'shaded'.  Using 'add,hidden' does not work.  Using 'add,below' works,  except I'm using my desktop background image as part of the customer viewing.

How can I minimize the Terminal window using a command? For example: I use the clear command to clear the terminal output, which command can I have to use to minimize the terminal window?


How to copy a file in current directory? e.g. I have  a file at /abc/xyz and I am in the current directory mno -- I want to copy a file from /abc/xyz/file.txt into mno.   cp command:   cp /cp_file_path /Destination_path    But what about destination path as my current directory?

When i use the cp or move command in a terminal window, i'm currently with bash in a certain folder like this.  NES@server:~/Desktop/dir1$   And now i wanna copy a file from here ~/anotherdir/dir2 into the current chosen folder in bash (dir1) i would use the command  cp ~/anotherdir/dir2/file ~/Desktop/dir1   does a shortcut string exist to refer to the current chosen directory? So that in this example i don't have to provide the full path to the target dir, but the command knows it should use the current chosen directory in bash? i.e. as ~ stands for the home directory?


The code:     cout << log(25.0/9.0)/log(5.0/3.0) << endl << floor(log(25.0/9.0)/log(5.0/3.0));  results: 2 1  Why does C++ considers floor(2) = 1? What I tried: When saving the fraction in a float it returns the correct value: float a = log(25.0/9.0)/log(5.0/3.0); cout << a << endl << floor(a);  results: 2 2

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I proved that $\mathbb Q$ is not finitely generated as $\mathbb Z$-module using Nakayama Lemma. Now I want to prove the following:     $\mathbb Q$ is not finitely generated as $\mathbb Z$- algebra.   I don't want to use the result that: A field which is finitely generated $\mathbb Z$-algebra is finite.  Any help will be appreciated. Many thanks.

Suppose $k$ is a field that is finitely generated as a ${\mathbb Z}$-algebra.  (That is, $k$ is a quotient of ${\mathbb Z}[X_1,\dots,X_n]$ for some $n$). Does it follow that $k$ is finite?


A user posted his/her  and asked a question regarding a specific section. However, it is clear from whatsoever code he/she posted that the program inherently has several other bugs. However, the answers given are restricted only to that specific query and not for other errors. Is it some kind of protocol being followed?

Is answering beyond the scope of the question a valid thing? Or should we just stick to the question asked and ignore any potential bugs which might be present (of course OP is unaware of that, as of now).  To make myself more clear, please have a look at this .  There are 3 answers which talk about the issue asked and that's it. If you look at my answer, I've added an additional point about a potential bug which the OP has missed now (may find out later). So is it a good thing to point out such potential bugs or not? Should this practice be encouraged?


I am trying to run a script like :  ./script.sh file  but I am receiving ( if I use a txt file ):  =:        cannot open `=' (No such file or directory) test.txt: ASCII text Second   If I use a gz file:  =:           cannot open `=' (No such file or directory) test.txt.gz: gzip compressed data, was "test.txt", last modified: Wed Jul 20 09:17:58 2016, from Unix Second   ( I have the script and the file in the same directory )  script:  #!/bin/bash  file = $1  if [[ $file == *.gz ]];then      echo "First" else     echo "Second"  fi

What is the difference between below variables assignments?   var=23 var =23 var= 23 var = 23   Is there any difference in space around the assignment operator?


I'm developing a game and it is intended to be a multiplayer game. I have experience in writing servers and clients in Java, but the game is written in C++.  The server will be written in Java for sure.   I have 3 questions:    Am I forced to write the client in C++ ?  If not, is there a way to write the client in Java as well, and somehow communicate with the game program? The game includes characters moving. Is the correct approach to calculate the positions of every dynamic object on the server and for the clients to only receive the current positions of everything from the server? The only thing the clients would send is their input(click, spell casts etc.).

Based on :     Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.   I know the theory about sockets, servers, clients, protocols, connections and such things.  Now I wonder how one can learn to write a network game:   How to balance load problems? How to manage the game state? How to keep things synchronized? How to protect the communication and client from reverse engineering? How to work around latency problems? Which things should be computed local and which things on the server? ...   Are there any good books, tutorials, sites, interesting articles or other questions regarding this?  I'm looking for broad answers, but specific ones are fine too to learn the difference.


Here's my command for formatting a particular word.  \newcommand{\foo}{\textsf{FOO}}   Used like this  This is \foo and \foo.   it produces the following    In plain text, the output is FOOand FOO., with no space after either FOO.  I want my command to behave spatially as if I had typed FOO instead of \foo. That is, the space which follows \foo should not be collapsed, so there would be whitespace before the and but not before the full stop.  How can I do this?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


For the first couple of years that I had this MacBook Pro (Early 2015, 13 inch) I had a keyboard protector on it. After awhile, the protector left some pretty obvious marks on the screen from it rubbing up against the screen when laptop was closed. I eventually took it off and tried to clean the screen, but none of the regular methods have seemed to do the trick. Instead, they just spread whatever grime was on the screen over the screen more. Never really bothered me, but now I'm looking to sell this laptop and want to fix this issue so it doesn't affect the resell value.  Does anyone have any ideas for a solution? Has anyone else had this same problem?

I try to clean my mid-2015 Macbook Pro with Retina display by wiping the screen with a damp cloth and then immediately drying.  However, there seems to be left some residue/streak marks, which look very oily. Sometimes these disappear after a few minutes, but they are still very unsightly, and a bit worrying (is there something wrong with my screen?)  I'm wondering if there are other cleaning techniques which avoid this issue, or whether this is completely normal behaviour.  Thank you!


Ubuntu 16.04: Verify latest youtube-dl version:  $ sudo apt-get install youtube-dl youtube-dl is already the newest version (2016.02.22-1). 0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded.   Why does video's URL fail?  $ youtube-dl -F  https://www.youtube.com/watch?v=ZFzSCJHp0lo [youtube] ZFzSCJHp0lo: Downloading webpage [youtube] ZFzSCJHp0lo: Downloading video info webpage WARNING: Unable to extract video title ERROR: This video is unavailable.   Python Version  $ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V' /usr/bin/python2.7: Python 2.7.12

I use youtube-dl to download videos for watching later offline. Usually, it works fine. However, due to frequent changes on the video sites, it sometimes requires a quick update. It wasn't a problem before on 13.04 but after upgrading to 13.10, I get  # youtube-dl -U It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.   I tried updating it via apt-get but there is no new package. So the app's update mechanism has been disabled and the maintainers aren't keeping up, what is the solution? How do I update it?  And why was it changed at all? It was updating a package manager version just fine in raring.   I'm already running into compatibility problems.   $ youtube-dl "http://vimeo.com/55784152" [vimeo] 55784152: Downloading webpage [vimeo] 55784152: Extracting information ERROR: Unable to extract info section; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.   QUICK UPDATE:  As requested,  # type youtube-dl youtube-dl is hashed (/usr/bin/youtube-dl)  # apt-cache policy youtube-dl youtube-dl:   Installed: 2013.08.29-1   Candidate: 2013.08.29-1   Version table:  *** 2013.08.29-1 0         500 http://pl.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages         100 /var/lib/dpkg/status


Is it I should be grateful for an early response or  I would be grateful for an early response. In formal UK English it is the former but even there I see it less often these days. Since I was brought up on UK English I should be grateful for an early response.

The NOAD reports the following notes about should and would:     The traditional rule is that should is used with first person pronouns (I and we), as in I said I should be late, and would is used with second and third persons (you, he, she, it, they), as in you didn't say you would be late. In practice, however, would is normally used instead of should in reported speech and conditional clauses: I said I would be late; if we had known, we would have invited her.   I thought that should and would really had a slightly different meaning. Am I wrong?


How can I give space " " as input in shell script ?  Ex :   echo " Enter date for grep... Ex: Oct  6 [***Double space is important for single date***] (or) Oct 12 " read mdate  echo $mdate   I get the output as Oct 6 but I want Oct  6.

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


Every time I try to edit a file in /etc I get "access denied".  I tried using different text editors and nautilus and I couldn't save or change any files there.  I don't understand. Am I not supposed to have this access?  What do I do now?

I can't seem to edit and save config files in the root system (eg: /etc/dhcp/dhcpd.config); it just says "permission denied" or the save option is blocked in the text editor.  I'm pretty sure I'm a root user, but how do I make sure? If I am a root user, how do I fix this?


I have data in localStorage set with user details like this  {"name":"aa","email":"aa@aa.aa","password":"aaaa","confirm_password":"aaaa"}   and another one like  {"otp":"1235"}   Now, I want to retrieve this as an single object like this  {"name":"aa","email":"aa@aa.aa","password":"aaaa","confirm_password":"aaaa","otp":"1235"}   Please help. Thanks.

I have two JSON objects with the same structure and I want to concat them together using Javascript. Is there an easy way to do this?


So I've upgraded the guild so I have all the fences around the ragged flagon, I've done all the quests in my quest log that relates to the guild. When I came back from returning the Skeleton Key (nothing glitchy about that quest, it showed up as completed and everything) I was expecting for Brynjolf to walk up to me when I got back and ask me about the key and say "Why don't you become guild master?" or something but he had disappeared form the guild completely and I couldn't find him anywhere. And if I spawn him in he's wearing the guild master's armor and the only dialogue option I had was "How is the Guild doing ?" he would reply about how its better with Mercer gone and the guild is in such a prosperous state and he said he was proud of the guild and of the guild master. - WHAT? no other dialogue options appear for me and I'm so confused and If I use the -setstage TGleadership 0- console command nothing happens! Karliah is in the Nightingale Sanctuary, just chilling out, completely normal BTW. Please help.  Something similar happened on the Dark BH quest HAIL SITHIS! where the final dramatic Emperor's cutscene wouldn't trigger and no console commands could fix it so I can never, ever finish the Dark BH quest line...

I've completed the Thieves Guild main questline () and chosen my special power (Shadowcloak of Nocturnal). It says completed in my quest log.  I also completed the  in each city you can give Thieves guild influence to (Markarth, Whiterun, Windhelm, and Solitude) and done their special jobs from Delvin. They show completed in my quest log. I've even done at least one of each kind of job from Vex and Delvin (but not in each city).  I got  in the Ragged Flagon and have done the quest for Tonilia (delivering the Moon Sugar to a caravan) and Vekel (getting the 4 books). I've also upgrade one of my pieces of Thief Armor.  I talk to  to become guild master and I get no dialogue options but he just says he's busy and we'll talk another time. There is a guild chest in front of his desk but it's locked and I don't have the key.  What am I missing? Is there some bug I've encountered?


Let $f$ be a function which is derivable in $[0,1]$ with $f(0)=0$ and $f(1)=1$.  Show that for every $n$ in $\mathbb{N}$, there exists numbers $x_1,x_2,.....,x_n$ all in $[0,1]$ such as \begin{equation} \sum_{k=1}^n \frac{1}{f'(x_k)}=n \end{equation}  I think the mean value theorem should be applied: \begin{equation} \exists\; x_1 \in (0,1): f'(x_1)=\frac{f(1)-f(0)}{1-0}=1 \end{equation} \begin{equation} \exists\; x_2 \in (0,x_1): f'(x_2)=\frac{f(x_1)-f(0)}{x_1-0}=\frac{f(x_1)}{x_1} \end{equation} etc.  We have the sum  \begin{equation} 1+ \frac{x_1}{f(x_1)} + \frac{x_2}{f(x_2)} +....+\frac{x_{n-1}}{f'(x_{n-1})} \end{equation} But than I get stuck. I was wondering if anyone could be so kind to help  Thanks in advance for your time and assistence

Let $f(x)$ be a function which is differentiable on $[0,1]$ with $f(0)=0$ and $f(1)=1$. Show that for every $n\in \Bbb N$ there exists numbers $x_1,x_2,\ldots,x_n\in [0,1]$ such as $$  \sum_{k = 1}^n \frac{1}{f' (x_k)} = n $$ I think the mean value theorem should be applied. So there exists $x_1$ in $[0,1]$  such that $f ' (x_1) = \frac{f(1) - f(0)}{1-0} =1$  and there exists $x_2$ in $[0,x_1]$ such that $f ' (x_2) = \frac{f(x1) - f(0)}{x1-0} = \frac{f(x1)}{x1}$, so on and so forth for $x_3 ,x_4, \ldots,x_n$ and we have the sum $$1+\frac{x_1}{f(x1)} + \frac{x_2}{f(x2)} +\cdots+\frac{x_{n-1}}{f(x_{n-1})}$$  and from here I have no idea what to do . I was wondering if anyone could be so kind to help ?


this is my first question, I hope I am right here. My problem is, that I have a float that is placed on a new page above a new section, as I want it by using the placeins package. However the spacing between the caption of the figure and the new section is less than the spacing between normal text and a new section, like in this example: \documentclass{scrreprt} \usepackage[utf8]{inputenc} \usepackage{blindtext} \usepackage[draft]{graphicx} \usepackage[section]{placeins} \usepackage[onehalfspacing]{setspace} \usepackage{parskip} \setlength{\parindent}{0cm}  \begin{document}  \section{This is a test} \blindtext\par \blindtext \section{This section has normal spacing above it} \blindtext \begin{figure}[htb]     \centering     \includegraphics[width = \textwidth]{test.png}     \caption{This is a caption with a somewhat longer text, therefore I write stuff untill at least one line is full.}     \label{fig:my_label} \end{figure} \section{This section has less spacing above it}  \end{document}   How do I change the space between the caption and the section to be the same as between normal text and a section? I already tried adding `\vslace, but it didn't work, probably because the float gets set behind the vspace and even if it worked, I wouldn't know, how much space was right. Thank you and best wishes, Jannik

I was wondering if there is any way to lessen the spaces between figures and text. In my paper I have a lot of figures (graphics) and it is inconvenient for me to have default (large) spaces between text and graphics. Is there any command I could use to change the default settings?


I want to insert 4 figures in structure of a square i.e. in two rows and two columns, the structure I talk about is given in the image below;    Please help me with piece of code. Thanks.

I am having an issue with latex placing my figures incorrectly. I have 4 related plots that I want to appear together as a single figure (with a,b,c,d sub-references).   \begin{center} \begin{figure}[h] \subfigure[All instances]{ \includegraphics[width=0.4\textwidth]{timeregression/graphs/bucketing/all_Q_time} \label{fig:q_time_all} } \subfigure[SAT instances]{ \includegraphics[width=0.4\textwidth]{timeregression/graphs/bucketing/all_sat_Q_time} \label{fig:q_time_sat} } \subfigure[UNSAT instances]{ \includegraphics[width=0.4\textwidth]{timeregression/graphs/bucketing/all_unsat_Q_time} \label{fig:q_time_unsat} } \subfigure[Uniform Random Sample]{ \includegraphics[width=0.4\textwidth]{timeregression/graphs/bucketing/sample_Q_time} \label{fig:q_time_sample} } \caption{Q metric plotted against time} \end{figure} \end{center}   This should display an even 4*4 grid of plots, each the same size. However what happens is that the top right plot is offset on the x-axis, such that the left hand side of it is in the middle of the space (i.e. roughly offset by 50% of its width)  Any suggestion of how to fix it?


What are the proper latex inputs for typesetting the bare d'Alembertian operator, and the d'Alembertian operator with either a tilde or a hat or a bar on top in a document prepared using classicthesis documentclass? I understand that the package eulervm is used in classicthesis.

Normally, most people use the symbol $\Box$ to represent the  (including the linked to Wikipedia page).  Recently I wanted to use \hat\Box and \tilde\Box, but they do not render very well.    What is the "best" way to create such symbols?    Aside: The above image is rendered using my local install of pdflatex: pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian). The symbols seem to render fine on some online services: e.g. "" produces    from   \begin{align*} \Box &= \sum_a \partial^a\partial_a \,, & \hat\Box &= \sum_a \mathcal{D}^a\mathcal{D}_a \end{align*}


Is the product of all primitive nth roots of unity equal to 1? Equivalently, is $\Phi_n(0) = 1$ for $n>2$?  More exactly, I'm trying to prove that $$x^{\phi(n)} \Phi_n(x^{-1}) = \Phi_n(x).$$  Since  $$\Phi_n(x) = \prod_{\substack{k = 1 \\ (k,n) = 1}}^{n} \left(x - e^{\frac{2k\pi i}{n}} \right),$$ and since the inverses of all primitive nth roots is still the set of primitive nth roots, we have $$\Phi_n(x) = \prod_{\substack{k = 1 \\ (k,n) = 1}}^{n} \left(x - e^{-\frac{2k\pi i}{n}} \right)$$ and so $$\Phi_n(x^{-1}) = \prod_{\substack{k = 1 \\ (k,n) = 1}}^{n} \left(x^{-1} - e^{-\frac{2k\pi i}{n}} \right) = \Phi_n(x) = \prod_{\substack{k = 1 \\ (k,n) = 1}}^{n} \left( \dfrac{e^{\frac{2k\pi i}{n}} - x }{xe^{\frac{2k\pi i}{n}}}\right). $$  I have basically finished, because $\phi(n)$ is even so I can switch around the terms in the parantheses, but I still need the products of primitive nth roots of unity to be equal to 1.

I know there is a formula for the sum of the primitive $ n $th roots of unity which is the Mobius function of $ n $. See:   I am curious about the existence of a formula for the product of the primitive $ n $th roots of unity.


Since the new update, it is impossible on my cell phone to swipe the list of questions to the left. I can swipe right on questions that were previously scrolled over, but I can't go back again.   This is happening in the main question feed, on a Oneplus One

This only happens with the top few feed items (new since refresh maybe, or actually, maybe feed items before the update are OK, ones after aren't) but when I drag right to left to scroll between questions as soon as i get half way it snaps back. Sometimes I can get it to scroll and when I can scrolling back (left to right) works fine.  I'm on a stock Nexus 5.  P.s. On the plus side the app has some really nice ui improvements.


How do I evaluate this?  $$\lim_{n\to \infty }\sum_{k=1}^{n}\frac{k}{k^2+n^2}$$  I got concerned for that, I've tried make it integral for Riemann but it still undone.

How to find the value of $\lim_{n\to\infty}S(n)$, where $S(n)$ is given by $$S(n)=\displaystyle\sum_{k=1}^{n} \dfrac{k}{n^2+k^2}$$   is unable to calculate it.  This is a question from a questions booklet, and the options for the answer are--  $\begin{align} &A) \dfrac{\pi}{2} \\ &B) \log 2 \\ &C) \dfrac{\pi}{4} \\ &D) \dfrac{1}{2} \log 2 \end{align}$


I have Java ArrayList<Map<String, Object>>. Is it okay to remove elements from that list as follows:      for (Map<String, Object> anObject : manyObjects) {         if (anObject.get("x").equals("y")) {             manyObjects.remove(anObject);         }     }   Is there anything fundamentally wrong with this approach?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I've run into some difficult selecting a point as the "primary selection" (not sure if this is proper terminology) I've been using this function to select a single point from a mesh: def select_append_point(index):     #getting proper mode for selection (its object, this is counter intuitive)      bpy.ops.object.mode_set(mode = 'EDIT')      bpy.ops.mesh.select_mode(type="VERT")     bpy.ops.object.mode_set(mode = 'OBJECT')     #selecting point from index number     cube_ob.data.vertices[index].select = True     #note I show how cube_ob is defined below      #returning to edit mode     bpy.ops.object.mode_set(mode = 'EDIT')   This results in a selection like this:  it is orange in the viewport, therefore not a primary selection I'd prefer a selection like this:  It is white in the viewport and a primary selection. This is for the application of using the following code: bpy.ops.mesh.shortest_path_select(edge_mode='SELECT')  that code outputs this between two selected points:  But does not work as intended for an appending application unless one of the points is white not orange. Thank you for any help!!! How cube_ob is defined: cube_ob = bpy.context.active_object bpy.context.view_layer.objects.active = cube_ob cube_ob.select_set(state=True)

I am having a problem trying to set the active vertex in blender. I have a list of vertices but I cannot set the active vertex. I am able to retrieve the active vertex through select_history of the bmesh, but I cannot set it, says its not writable  #get bmesh bm=bmesh.from_edit_mesh(bpy.context.active_object.data)  #print active vert print(bm.select_history.active)  #if I do something like this, error not writable bm.select_history.active = bm.verts[5]


I get error on      java.lang.NullPointerException: Attempt to invoke interface method   'java.sql.Statement java.sql.Connection.createStatement()' on a null   object reference at   com.example.jacquesarroyo.onlinelibrary.suggestions$3.onClick(suggestions.java:81)   Here's the code I used:  add = (Button) findViewById(R.id.btnadd); errorlbl = (TextView) findViewById(R.id.lblerror); title = (EditText) findViewById(R.id.txttitle); author = (EditText) findViewById(R.id.txtauthor); year = (EditText) findViewById(R.id.txtyear); location = (EditText) findViewById(R.id.txtlocation);  ipaddress = "10.0.0.5";    db = "SampleDatabase";  username = "admin" password = "admin"; connect = ConnectionHelper(username, password, db, ipaddress);  add.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             try {                 st = connect.createStatement();                 preparedStatement = connect                         .prepareStatement("Insert into Books(Title,Author,Year) values ('"                                 + title.getText().toString()                                 + "','"                                 + author.getText().toString()                                 + "','"                                 + year.getText().toString() + "')");                 preparedStatement.executeUpdate();                 errorlbl.setText("Data Added successfully");             } catch (SQLException e) {                 errorlbl.setText(e.getMessage().toString());             }         }     });  @SuppressLint("NewApi") private Connection ConnectionHelper(String user, String password,                                     String database, String server) {     StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()             .permitAll().build();     StrictMode.setThreadPolicy(policy);     Connection connection = null;     String ConnectionURL = null;     try {         Class.forName("net.sourceforge.jtds.jdbc.Driver");         ConnectionURL = "jdbc:jtds:sqlserver://" + server + ";"                 + "databaseName=" + database + ";user=" + user                 + ";password=" + password + ";" + "ssl=false";         connection = DriverManager.getConnection(ConnectionURL);       } catch (SQLException se) {         Log.e("ERROR", se.getMessage());     } catch (ClassNotFoundException e) {         Log.e("ERROR", e.getMessage());     } catch (Exception e) {         Log.e("ERROR", e.getMessage());     }     return connection; }   line 81 is: st = connect.createStatement();

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?


My form input Sanitizing function:  function clean_input($data)              {               $data = trim($data);               $data = strip_tags($data);               $data = stripslashes($data);               $data = htmlspecialchars($data);               return $data;             }      My SQL lines:  $q  = "SELECT * FROM users WHERE username = {mysqli_real_escape_string   ('$username')} AND password = {mysqli_real_escape_string('$password')}";                             $r = mysqli_query($dbc, $q);   Is this correct usage ?

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


What is the precise mathematical description of an incoherent single-frequency signal for any type of wave? The reason I'm asking is because of the following apparent paradox in which incoherent light cannot exist. Consider sunlight, for example, which has passed through a polarizing filter and frequency filter, so that only waves with wave numbers very close to $k_0$ are allowed to pass through. Since sunlight is totally incoherent, it seems reasonable to model the signal as a sum of sine waves $E_\alpha(x,t)=A_\alpha\sin(k_0x-\omega_0t+\phi_\alpha),$ where $E$ is the electric field in the direction of the polarizing filter, $\omega_0=ck_0$, $A_\alpha$ is a random amplitude, and $\phi_\alpha$ is a random phase shift. If the light were coherent, then the $\phi_\alpha$'s would all be identical; so it seems reasonable that for "maximal incoherence" the $\phi$'s and $A_\alpha$'s would be different and uniformly distributed. But then for every component with phase shift $\phi$ and amplitude $A$, there exists a wave $A_\alpha\sin(k_0x-\omega t-\phi-\pi)$, which cancels the original. Hence all components cancel and there is no wave (spectrometer detects nothing). So what's the flaw here? I'm guessing the model of incoherent light is where the problem lies, but maybe it's in the reasoning. I'm also curious whether or not the answer necessarily relies on quantum mechanics. EDIT: Since there are some votes to close based on the proposed duplicate, I'll just say that both questions get at the same idea, but I think mine (which could also have focused on polarization) is more specific, since I'm asking for a precise model and whether quantum physics is a necessary part of the explanation. From what I can tell, the answers to the linked question do not address these points.

As far as I know, unpolarized light is defined as light which has no clear axis of polarization, but electric field vectors in all directions. However, I also know that electric fields can be superpositioned. So this leads me to the conclusion that if unpolarized light has equal $\vec E$ vectors in all directions, they should cancel.   Obviously, though, this is wrong (we've got light!). What's the explanation?


I've installed both deadbeef and foobar2000 and neither one lists my storage HDD other than the main OS SSD.   Rhythmbox lists all HDDs and I can drag & drop music files with QMMP. And I'm trying to set deadbeef as the primary music player.   How can I do that?

I have Ubuntu 18.04 LTS installed. I inserted USB-flash to my laptop. It was automounted to /media/username/DISKLABEL and opened in Nautilus. I can read and write objects to it. How can I access it from the application, which is installed as Snap? I tried snaps of the following applications such as gedit, arduino-mhall119, organize-my-files. All them show me errors if I navigate to /media folder:    Could not read the contents of Media Error opening the directory of '/media': permission denied  Output of active Snap  is below: $ snap interfaces  | grep -v ".*-$" Slot                             Plug :browser-support                 organize-my-files :core-support                    core:core-support-plug :cups-control                    gedit :desktop                         gedit,organize-my-files :desktop-legacy                  gedit,organize-my-files :gsettings                       gedit,organize-my-files :home                            arduino-mhall119,gedit,organize-my-files :network                         arduino-mhall119,gedit,organize-my-files,pulsemixer :opengl                          organize-my-files :pulseaudio                      organize-my-files,pulsemixer :unity7                          arduino-mhall119,gedit,organize-my-files :wayland                         gedit :x11                             arduino-mhall119,organize-my-files,pulsemixer gnome-3-26-1604:gnome-3-26-1604  gedit gtk-common-themes:gtk3-themes    gedit gtk-common-themes:icon-themes    gedit gtk-common-themes:sound-themes   gedit -                                arduino-mhall119:serial-port -                                gedit:avahi-observe -                                gedit:mount-observe  Updates:  connecting mount-observe to Gedit with snap connect gedit:mount-observe does not help. it seems that we need special Snap with support of  interface.


Our kid spends so much time avoiding homework and chores, that it is time for bed before either thing is finished.  My wife and I find ourselves standing over her and spending all our time refocusing her and it is not fun for any of us.  It is creating strife.  Punishments for not getting things done have not worked.  I'd love some fresh ideas.

My child just entered third grade, and the homework load is much higher this year, with a lot of writing and math drills. It is all work that she can do easily, but it's causing the whole family a lot of pain, because she's have a really hard time just sitting down and doing it — asking many questions about things she clearly actually knows, and getting distracted by the smallest thing going on around her. (Setting up a special quiet area isn't helping, because the distractions could be her pencil or a sudden burst of word association based on something in the lesson.)  So, a page of writing and a couple of pages of math which could be done in fifteen minutes total is taking an hour and a half. She can easily explain the reasoning behind the math problems, but when it comes to writing down what she just said, it's like pulling teeth. She'll slowly write a word, sounding it out in slow motion as she writes each word. And she'll say that she doesn't understand a question, but when she actually gets her mind pointed at it, she can write a great answer. And she's clearly picking up the concepts in class; I have no doubt that she actually understands, which is part of our frustration.  My wife feels like she's just wanting attention, but I think it's more about our daughter's own ability to focus. We both feel that sitting down and working painfully through each question isn't really helping her. That works, but my wife feels like it's just rewarding the behavior, and I feel like it's not really helping her learn any better focus on her own, which, you know, she'll need in actual life. And, we're happy to spend child with our kid, this pretty much the opposite of quality time.  Neither rewards or consequences seem to have any effect, and nor do charts. All of those things basically just seem to add another layer of complication, distraction, and misery. What else can we do?


I am attempting to add validation for my ArrayList if it is null, below is my current implementation:  List<Person> personList = new ArrayList<>():  if(personList!=null){  //do something  }   However, this still throws an exception If the list is deemed to be null, how can I fix this?


Let $M=(0,\infty)$ be supplied with the metric function $d(x,y)=|\arctan(x)-\arctan(y)|$ and let $\{n\}_{n=1}^\infty$ be a sequence of positive integers.  a) Is the sequence a Cauchy sequence in $(M,d)$?  b) Is the sequence a convergent sequence in $(M,d)$?  I am pretty sure it is Cauchy but not convergent. What I have so far is:  $|\arctan(n)-\arctan(m)|<\epsilon$ if $n,m$ are sufficiently large: $|\arctan(n)-\arctan(m)|≤|\arctan(n)-0|+|\arctan(m)-0|=\arctan(n)+\arctan(m)<\cdots$   This is where I'm stuck.

I have to show that the real numbers equipped with the metric $ d (x,y) = | \arctan(x) - \arctan(y)| $ is an incomplete metric space.  Certainly, I have to search for a Cauchy sequence of real numbers with respect to given metric that must not be convergent. But I am unable to figure out that.  Can anybody help me with this.   Thanks for helping me.