Convert one line json into multiple lines to write to a file (Ruby)

I've run into a situation where I'm retrieving a json string in ruby, but I'm attempting to write it to a file structured like your usual json file (for example:  {     "top":{         "mid1":"bot1",          "mid2":"bot2"     } }   However, the way the json string is structured is like so:  {"top":{"mid1":"bot1","mid2":"bot2"}}   I've seen other posts mention doing JSON.parse in order to get what I want, however that just causes it to look like this:  {"top"=>{"mid1"=>"bot1", "mid2"=>"bot2"}}   Is there a way that I can just convert the json string into what it looks like in the first code block above?


Midpoint with a connected subset and continuous function

Given a connected subset $A$ of $\mathbb{R}^p$ and a continuous function $f:A\to \mathbb{R}$.  If I have points $b,c \in A$ and a point $x \in \mathbb{R}$ that satisfies $f(a) < x < f(b)$,  how do I show that there is a point $c \in A$ such that $f(c) = x$?


Can you use an Equinox fully upgraded with range to fly from Madrid to New York?

I am level 13 and I would really like to know from anyone if I could fully upgrade an equinox with range to fly from Madrid-New York or New York-London? Thanks


How are regression, the t-test, and the ANOVA all versions of the general linear model?

How are they all versions of the same basic statistical method?


Please provide a language pick-list for syntax highlighting

I saw on  that mods have access to a nice pick-list for languages in certain scenarios (this one was about setting the default language for tags):    I'd love to be able to use such a pick-list when formulating a question or answer, so that I can set all code samples in my post to a specific language (regardless of the default language for the overriding tag). This way I don't have to remember this list above when manually typing in my own <!-- language: ... or <!-- language-all: ... HTML comment/entity. Ideally it would be a list in the WYSIWYG editor, and it would insert the chosen language complete with the surrounding entity syntax, but I'd be perfectly happy with just seeing the list of valid languages instead of having to memorize them.   Note, of course, that I'm not asking at all for the ability of peons to change the default language associated with a tag. Just for the ability to pick the formatting for my post using a nice convenient list instead of trying to remember the syntax.   In addition to addressing my laziness and forgetfulness,  I also think this would make such ability much more visible to less experienced users, who might not know that they even have the possibility of setting the language and/or aren't aware that the syntax highlighting behaves differently at all for different languages. I often see SQL code that's highlighted for C# and vice-versa, and I don't always have the motivation to fix it for precisely these reasons.  As an aside, I'm not sure this list is complete. I'm fairly certain I used PowerShell recently.


Changing boarding point for advance UK train tickets

I'm supposed to be taking a friend to Edinburgh in a few days, we booked advance tickets with LNER from Kings Cross to Edinburgh together using their disabled persons railcard. I was supposed to meet them in London, they are holding both tickets and we're going to give me mine when we met, but it now seems I won't be able to get there in time for a number of reasons. However, I can get to York, which is a stop couple of hours into the journey.  As my friend hold both tickets and the railcard, can they board the train in London, and I board later in York using my planned ticket?  There are no ticket barriers so my only issue boarding is with the ticket inspector on the train. Is this allowed or should we attempt to amend the booking?  The emphasis is on the use of the disabled persons railcard. It gives 1/3 off the cost for both tickets as they were bought together. Ordinarily advance tickets are inflexible, but here one person (the card holder) will complete the entire journey and occupy the reserved seats, while only the second person will board the train later.


Minimize size of a figure (tikz - pgf) in LaTeX

I'm using MikTeX and WinEdt for writing an IEEE conference paper. To create a neural network structure I used this code :  \begin{figure} \begin{tikzpicture}[ init/.style={   draw,   circle,   inner sep=2pt,   font=\Huge,   join = by -latex }, squa/.style={   draw,   inner sep=2pt,   font=\Large,   join = by -latex }, start chain=2,node distance=13mm ] \node[on chain=2]   (x2) {$x_2$}; \node[on chain=2,join=by o-latex]   {$w_2$}; \node[on chain=2,init] (sigma)   {$\displaystyle\Sigma$}; \node[on chain=2,squa,label=above:{\parbox{2cm}{\centering Activate \\ function}}]   {$f$}; \node[on chain=2,label=above:Output,join=by -latex]   {$y$}; \begin{scope}[start chain=1] \node[on chain=1] at (0,1.5cm)   (x1) {$x_1$}; \node[on chain=1,join=by o-latex]   (w1) {$w_1$}; \end{scope} \begin{scope}[start chain=3] \node[on chain=3] at (0,-1.5cm)   (x3) {$x_3$}; \node[on chain=3,label=below:Weights,join=by o-latex]   (w3) {$w_3$}; \end{scope} \node[label=above:\parbox{2cm}{\centering Bias \\ $b$}] at (sigma|-w1) (b) {};  \draw[-latex] (w1) -- (sigma); \draw[-latex] (w3) -- (sigma); \draw[o-latex] (b) -- (sigma);  \draw[decorate,decoration={brace,mirror}] (x1.north west) -- node[left=10pt] {Inputs} (x3.south west); \end{tikzpicture} \caption{NN} \label{fig_neuron} \end{figure}   How can I minimize size of total figure? It is a little big for two column article.


How can I prove that I didn't plagiarize?

This year I have decided to take a Computer Science course on FLVS, an online learning institution. Throughout the whole year, I worked well, and I had a lot of fun with the course. I was close to finishing the second semester of it, and I randomly lost access to the course. I was surprised to find out that they took a some of my assignments (about 6~7), and they flagged me for academic integrity, claiming that I used the answers from an online answer source. Another problem is that because it's so many assignments, they have kicked me out of the course, without me even communicating with them the issue. My teacher had no idea about this, and she can't do anything about it. She told me to talk to academic integrity themselves. I now have a 0 for the course, and I'm very angry, and I have no idea what to do. I can show them I didn't cheat by answering on the phone any questions they have, and I've already studied for the exam and I plan on taking it, and I'm very confident I can get a good grade. I've also used the knowledge I've learned from the course, and I've created iPhone applications as well as games and other software. I've left the academic integrity team a message stating that I need to speak with them ASAP, but how can I communicate to them that I didn't plagiarize the work?  UPDATE: I have done some research as to how I present my case, and I found a couple things regarding appeals. FLVS claims that its so called "academic integrity" team is fair and not biased and they utilize a lot of technology to ensure that their claims are as factual as possible, such as . I have found a Customer Support number that I can voice my concerns to, so I'm going to present my case to them. UPDATE #2: After speaking with customer support (see update above), the person on the other line wrote down my grievance in an email, and she sent it to the academic integrity people. I also received a copy of the email. She told me she's sorry for my problem and that I should expect a call in the next 48-72 business hours. Hopefully I will fix this. UPDATE #3: We had a long talk with the academic integrity team yesterday, and apparently (I had no knowledge of this) they claim I have copied work from my twin brother Varun from about 20 assignments. Going through these assignments, there seems to be evidence of similar code, but that's because certain instance variables and functions had to be created as per the assignment's instructions, but the overall design of the program is different. They also say that we had the same typesetting (meaning me and him had the same spacing and tabs and white space), although we're both very experienced programmers, and we follow the conventional format of tabbing and spacing. I'm most likely going to court :D. UPDATE #4: This is the best part. After talking we academic integrity before (see above update), we decided to check all of the assignments she flagged and come up with legitimate reasons as to why I didn't cheat on them. After coming up with a long list, we sent an email to the academic integrity people and told them that we came up with a lot of reasons as to why we didn't copy, so she said that she would call us in a couple of days. After 2 days, she sends another email stating that her reasons are legitimate, according to her "boss", and that she won't discuss the issue any further. I am now super angry about this, and I have legitimate reasons as to how I didn't cheat. She won't tell me anything, and my teachers haven't returned any of my calls. I really hate FLVS.


If $\left(1+\sin \phi\right)\cdot \left(1+\cos \phi\right) = \frac{5}{4}\;,$ Then $\left(1-\sin \phi\right)\cdot \left(1-\cos \phi\right)$

If $\displaystyle \left(1+\sin \phi\right)\cdot \left(1+\cos \phi\right) = \frac{5}{4}\;,$ Then $\left(1-\sin \phi\right)\cdot \left(1-\cos \phi\right) = $  $\bf{My\; Try::}$ Given $\displaystyle \left(1+\sin \phi\right)\cdot \left(1+\cos \phi\right) = \frac{5}{4}\Rightarrow 1+\sin \phi\cdot \cos \phi+\sin \phi+\cos \phi = \frac{5}{4}.$  So $\displaystyle \sin \phi+\cos \phi+\sin \phi \cdot \cos \phi = \frac{1}{4}\Rightarrow \left(\sin \phi+\cos \phi\right) = \frac{1}{4}-\sin \phi \cdot \cos \phi.$  Now $\displaystyle \left(1-\sin \phi\right)\cdot \left(1-\cos \phi\right) = 1-\left(\sin \phi+\cos \phi\right)+\sin \phi \cdot \cos \phi =\frac{3}{4}+\sin 2\phi$  Now How can I calculate $\sin 2\phi.$  Help me, Thanks


Does partitions need to be physically neighbor to combined

Back in the day i had dual boot(windows10) so i have a few NTFS partitions in my drive, but i deleted Windows long ago still not combined these part of my drives. I mount NTFS style but its not ideal. I want to combined some of NTFS areas to Linux file system.  Here's my current situation with gParted.  I can delete /sda2 its currently fully empty. But can deleting /sda2 make it combine with /ext4 ?


I get the following errors when trying to update:  W:Failed to fetch http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/wily/main/source/Sources  404  Not Found W:Failed to fetch http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/wily/main/binary-i386/Packages  404  Not Found E:Some index files failed to download. They have been ignored, or old ones used instead.


Prevent DIV from overflowing margin-bottom

I got a div that has margins and inside it, I got 2 other divs: One on top and one below it. I want the div below the top div to fill the empty space to the margin of the main div.  Here's my structure:

   CSS:  .main {     width: 90px;     height: 30vh;     min-height: 225px;     margin: 0;     margin-left: 5px;     margin-top: 25px;     margin-bottom: 25px; }   .main div's height resizes by viewheight. .top div is a form which has an height of 220px. .bottom div should fill the empty space between the .top and margin-bottom.    I've tried everyhing I know. If I try vh or %, it overflows the margin-bottom once I resize the browser. If I fix it to the bottom, it overflows the .top div. Top div has transparent elements and I can't hide the .bottom div under the top div.  My guess is that somehow I need to get the distance from the .top div to the margin-bottom and set it as height for the .bottom div. But I've looked for solutions for over an hour and nothing.  And no. This question is not a duplicate of the ones under the title. I'm looking for compatibility too. Flexbox and Js is not good.


How to create a database directory structure for MySQL?

I was following this tutorial:    So far, I installed mysql-server mysql-client libmysqlclient-dev, and I was suppose to tell MySQL to create its database directory structure where it will store its information using sudo mysql_install_db.  $ sudo mysql_install_db  [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize [ERROR]   The data directory needs to be specified.   I thought running mysqld --initialize would solve the issue:  $ mysqld --initialize   mysqld: Can't create directory '/var/lib/mysql/' (Errcode: 17 - File exists) [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). [ERROR] Aborting   How do I tell MySQL to create its database directory structure where it will store its information?


File is uploaded to my server by someone

I keep getting a file called "wp-sil.php" uploaded to my one specific folder. When i copy the file to my desktop so I can examine it, it removes itself.  When I open the url sting live on my website, I see the entire folder content and options to delete/edit/modify.  At the bottom there is a signature:   Of course I deleted the file from each folder that I found it in but I am worried it will come back again.  I have changed every password I could think of, changed all ftp access and only have a few people accessing the ftp (to a specific folder), added godaddy's malware protection to scan everything and it came back with nothing. I blocked a bunch of different country's IP addresses.  I back up the files weekly so I am not worried losing anything but it will cause an slight inconvenience if the current live files are effected.  Is there a way to block a filename from being uploaded or block unauthorized uploads in general? Or at least check who is behind this?


How to find if an array contains a specific string in JavaScript/jQuery?

Can someone tell me how to detect if "specialword" appears in an array? Example:  categories: [     "specialword"     "word1"     "word2" ]


How to deal with variable number of steps in discrete progress bar?

We have an application that various other departments will use to create questionnaires. These questionnaires can hide or show extra questions based on responses to previous questions.  When creating the questionnaires, authors may decide to display completion as a percentage or with a progress bar, with the progress bar working off of author-defined milestones.  Because of the dynamic nature of the questionnaire, we can't reliably know how many questions the user must answer. We have agreed it is bad to show negative progress, so for percentages we assume all questions will be shown and if we pass a group of questions that we will not show, the percentage may jump a significant amount (e.g. progress may move from 5%, to 10%, to 15%, then we skip a group of questions and end up at 70%).  Our progress bar looks something like this:  (O)===(O)===(X)---()---()---() or  (O)===(O)===(O)===(O)===(X)---()  We aren't sure to handle the dynamic questions for this display. We have discussed a few options:  1) Only show the extra milestones once we know they are necessary. We don't like this, because we feel this is similar to reducing progress percentage -- suddenly the user is ambushed by extra work, or so it would seem.  2) Stop showing the milestones once we know they aren't necessary. This may result in, for example, a user going from step 3/8 to step 4/5. We are worried this may confuse users as it changes the number of apparent steps.  3) Show all the milestones, but simply skip ahead in the display. This may result in the user going from step 3/8 to 7/8. We are worried this ALSO may confuse users as they won't know why they have been moved forward or why they don't have access to those questions.  We are leaning towards option 3.  How should we best solve this problem? Are we on the right track with option 3, above? Is option 2 better and we just worry too much?  If we skip steps, as in option 3, should we differ how we display the skipped steps from how we display completed steps?  If it matters, the questionnaire authors will be typical office staff (not technically inclined) so we can't guarantee we can pass the problem off by training them to build questionnaires and choose milestones based on progress bar limitations. End users (people taking the questionnaires) must be assumed to be relatively uncomfortable with technology in general.


Is $ (A∪B)×(C∩D)=(A×C)∪(B×D)$ true for all sets A,B,C and D?

Is  $(A\cup B)\times(C\cap D)=(A\times C)\cup (B \times D)$ true for all sets $A$,$B$,$C$ and $D$?  I have no idea what to do here. How could I possibly go about trying to prove this?  Or disprove it? It's not exactly the same question with the previous one First I tried to prove that both sides are equal if $(A\cup B)\times(C\cap D)\subseteq(A×C)∪(B×D)$ and $(A×C)∪(B×D)\subseteq(A\cup B)\times(C\cap D)$ .  Thank you!


the continuity of total variation function of a continuous function of bounded variation

Let f  be a continuous function of bounded total variation (refer to   for the definition) on $[0,1]$, i.e., $\text{Var}_{[0,1]}f<\infty$. Then the total variation  of $f$  on $[0,x]$, denoted by $\text{Var}_{ [0,x]} (f):=V(x)$, is continuous on $[0,1]$. How to prove it? Or any counterexample?


When setting a custom status code response with PHP using header() is:  header("Status: 404 Not Found");   Correct, or:  header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");   Which is the http standard? Or, should you set both?


The problem is to define all subgroups of $(\mathbb Z_n,+), n \in \mathbb N$. My guess is if n is prime number, then there is only trivial subgroups. If n is not prime, then I can factorize it, and every prime divisor will generate it's own subgroup in $(\mathbb Z_n,+)$. That means that $(\mathbb Z_n,+) \cong (\mathbb Z_h,+) \times (\mathbb Z_k,+) \times \dots$ , $h,k \in \mathbb N$ are the prime factors of $n$. The problem is that I don't know how to prove it. It's pretty easy to show that, for example, in $(\mathbb Z_6,+)$ $ [2]_6$ and $[3]_6$ generate their own subgroups and $[1]_6$ generate entire $(\mathbb Z_6,+)$, but I don't know how to show that $[5]_6$ do the same, except by showing it all: $[5]^2_6 = [4]_6$ and so on.


What is the source of Pokéstops and Gym trivia

I found some Pokéstops and Gyms with rather odd sounding descriptions. One spot, for example, was a classical statue of a woman with exposed breast. The description sounded like it was created by either some lusty 15 year olds or some high level trolls.  So my question is what is the source of these location informations. I've heard they're the the same spots as in the game Ingress. But even then, is all location information provided by Ingress/Pokémon Go users, or is a public database containing photos with location data being used (eg. Panoramio or similair).


Is it okay to omit "to be" when using adverbs and infinitives?

Which of the following is correct?        The room needs cleaned.    The room needs cleaning.     The room needs to be cleaned.


How to change spacing between columns for just one page in the document

I'm using the multicol package for my columns. So far, I have \setlength\columnsep{10pt} in the preamble to set the default column separation. But for one particular page, I'd like to set the columnsep to 30pt.  I wasn't able to get it to work by inserting a new \setlength at the start of the page.  Here's an example:  \documentclass{article} \usepackage{blindtext} \usepackage{multicol} \setlength\columnsep{10pt} % This is the default columnsep for all pages \begin{document}  \begin{multicols*}{2} \blindtext  \newpage \setlength\columnsep{30pt} % I want the columnsep to be wider only on this page. Right now, nothing happens. The default 10pt is still being used. \blindtext \columnbreak \blindtext  \newpage \blindtext  \end{multicols*} \end{document}   Any help would be appreciated.


How to suppress Terminated message after killing in bash?

How can you suppress the Terminated message that comes up after you kill a process in a bash script?  I tried set +bm, but that doesn't work.  I know another solution involves calling exec 2> /dev/null, but is that reliable? How do I reset it back so that I can continue to see stderr?


How can we prove that any bijection on any set is  a composition of 2 involutions ?  Since involutions are bijections mapping elements of a set to elements of the same set, I find it weird that this applies to any bijection.  Thanks for your help !


Avoiding errors due to unexpanded asterisk

In bash I often use for-loops such as the following  for file in *.type; do    sommecommand "$file";  done;   to perform an operation for all files matching *.type. If no file with this ending is found in the working directories the asterisk is not expanded and usually I will get an error message saying that somecommand didn't find the file. I can immediately think of several ways to avoid this error. But adding a conditional does not seem to be very elegant. Is there a short and clean way to achieve this?


Badge icon temporarily appeared wrong in history

I edited a wiki on Woodworking.SE Meta. It was an old post so I got the excavator badge for it. The notification for the badge came while I was reading a Science Fiction & Fantasy post.   So I checked my notification and saw that I got the badge for WW but it had the SF logo.     Refreshing the page then displayed the beta badge icon which was correct.   No, I don't think we need to torch and pitchfork the doors of StackOverflow to get this fixed. Just thought it was worth bringing up.   If it matters I am using Chrome Version 46.0.2490.86 m


Find $17^{341}\mod 5$.  I know this has to be solved using the Chinese Theorem or Fermat's Little Theorem, $341$ is a Poulet number, and the result equals $2$. But how can I prove this? I'm fairly new to modular arithmetic.


How to Delete Camera "Track To" Constraint, But Keep Transformation Settings?

I have the camera tracking an object with a "Track To" Constraint.  After the camera is done tracking the object I want it to continue, but I want to delete the constraint at a certain keyframe and keep the camera set to the exact same coordinates. When I delete the constraint the camera jumps back to it's state before the constraint was added.  How do I get around this? In other words: Can you apply a Constraint?


prevent fiber threads in sweet potato halwa

I like sweet potato and i'm trying out different recipes with it as a main ingredient. One of them is the sweet potato pudding/halwa. It tastes good, but i would like to get rid of the threads of fibre that keep getting stuck.  Please suggest how to make the pudding without the threads.  I remove the ends of the sweet potato to avoid major fibrous part. And the strings are mainly present in the middle part n not near the skin. The potato near the skin is smooth and doesnt contain strings.


Is it correct to say e.g. "I like your way of wearing" or "the way you wear looks perfect"?  Is it politely? Is it in use or not?  Thank you for your suggestions in advance.


VB.Net doesn't allowing inline initialization of list

I am trying to create list of object using inline code.  Dim lstPopupProps As New List(Of Object)(New Object() With {.Name = "", .Age = 20})   but I am getting an error     Object initializer object cannot be use to initialize an instance of System.Object   Is there any way to create list of object like this or I will have to add objects one by one?


How to open an application in terminal and detach it?

I opened Cairo-dock in my terminal with: open cairo-dock and that worked but if I close the terminal it goes with it. How can I keep it open regardless of the terminal?


Function that is continuous only on the transcendental numbers

Recently I saw Thomae's Function, also called the Popcorn Function, which is continuous at the irrationals and discontinuous at the rationals.  This made me wonder: is there a function which is continuous at every transcendental number and discontinuous at every algebraic number?


Why does a JSON element return text when it's not text?

When I try to access a JSON element using ->>'elementName' I get a texttype.  SELECT pg_typeof(x1->>'a'), jsonb_typeof(x2) FROM ( VALUES   ('{"a":5}'::jsonb, '5'::jsonb) ) AS t(x1,x2);   pg_typeof | jsonb_typeof  -----------+--------------  text      | number (1 row)   However, ...     When converting textual JSON input into jsonb, the primitive types described by RFC 7159 are effectively mapped onto native PostgreSQL types, as shown in Table 8-23.   Here is the table reproduced from the docs,  Table 8-23. JSON primitive types and corresponding PostgreSQL types  JSON primitive type     PostgreSQL type  Notes string                  text             \u0000 is disallowed, as are non-ASCII Unicode escapes if database encoding is not UTF8 number                  numeric          NaN and infinity values are disallowed boolean                 boolean          Only lowercase true and false spellings are accepted null                    (none)           SQL NULL is a different concept


1080ti and 2080ti in one machine. Is it possible? n2

I have 2 1080tis. What if I replace one of them on 2080ti? Will I have both cards operational for evee and cycles? like sharing CUDA cores, optix denoising, rtx for ever? P.S. Duarte Farrajota Ramos, every man has a right to be conceited until he is successful. And yeah, my question was not answered here: . not the same at all.


What's the drinking age in the duty free area?

Is the drinking age in the tax free/duty free area the same as in the country you are in or is there no real drinking age?  Can I buy spirits in the tax free even though the country's law doesn't permit me? Are there ID checks in the duty free area? Are the same rules enforced in the lounges?


How to make a sprite jump up and then return to original position android java

I am just starting out in game development and I am trying to make a simple android game using GDXLib. I want to make my sprite "ball" jump straight up in the air and then return to where it originally was. How would I do this? I have looked at multiple other answers from similar questions but none seem to work with my code. This is my code so far:  @Override public void create () {     batch = new SpriteBatch();     background = new Texture("gamebackground.png");      ball = new Texture("ball2.png");     ball.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);      spike1 = new Texture("spike1.png");     spike1.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);     spike2 = new Texture("spike2.png");  }  @Override public void render () {      batch.begin();     float scaleFactor = 2.0f;     batch.draw(background, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());     batch.draw(ball, 80, 145, ball.getWidth() * scaleFactor, ball.getHeight() * scaleFactor);     batch.end();  Gdx.input.setInputProcessor(new InputAdapter () {         @Override            public boolean keyDown (int keycode) {             if(keycode==Keys.UP)             {                ball.setHeight(ball.getHeight()+50);             }             return true;      }   @Override public void dispose () {  }   }


How can we insert multiple objects with the same name into the Windows Recycle Bin?

I want to understand why objects in the Recycle Bin don't need to be renamed when two or more objects have same name. In other places, two objects cannot have the same name: we are forced to rename them.


Remove the white space between the item label and the equations

Here is a question. I want to know how to remove the white space  between the item label and the equations?  For example, I want to remove the blank between the number 1 and the equation f(X)=...   The code and picture are as follows   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \begin{enumerate} \item \begin{eqnarray*}    f(X)&=& AD+SF SF SDF+DFDF FA \\ &+&SADSADDDDDDDDDDDA D+D DADS AD \end{eqnarray*}  \item \begin{equation*} G(X)=ADSA DASD SAD ASD ASD \end{equation*}  \end{enumerate}


Which Unicode math fonts support \setminus?

What can i put into \setmathfont{<...>.otf} for the unicode-math package to make it all work (with XeLaTeX or LuaLaTeX)?  There are several suggestions on the  of unicode-math, but the first option is commercial, and the second and the third do not work with the following example:  % !TEX TS-program = xelatex  \documentclass{article} \usepackage{unicode-math} \setmathfont{latinmodern-math.otf} % \setmathfont{texgyrepagella-math.otf} % \setmathfont{xits-math.otf}  \begin{document} $X\setminus Y$ \end{document}   I do not get the \setminus character in the output.  The \setminus character is also missing if i do not set a math font at all (i do not know which font is used in this case).  It works with xits-math, but i do not like it.  Is it expected by the way that the \setminus character is left blank without giving any warning?


How can I change the angle of an edge loop?

How can I change the angle of an object like at 19:44 of  when he adds wingtips?


Intuitive explanation for $E[X]=\int_{0}^\infty P(X\ge x) dx$

I have come across two proofs for this on , but I cannot wrap my head around the intuition behind this. Why should this hold?  I am looking for a possible geometric interpretation of the area under the curve.


Checking first argument of a script if it is -e or -d

I am writing a bash shell script at the moment and one of the specifications is that I need to print an error message if the first argument, $1, is not -e or -d, this is what I have done:  if [ "$1" != "-e" ] || [ "$1" != "-d" ]; then         echo "Error: First argument must be either -e or -d"         exit 1 fi   this does not seem to work however, as even if i used -e or -d for the first argument, this error message is still printed. What am I doing wrong and how do I fix this?


Transitions don't work with table elements ( tbody, tr)?

I've been playing around with Bootstrap collapse and other possible accordion effects. I'm trying to achieve an accordion effect on rows of table with a transition. But somehow, the transitions don't work on either tbody or tr.  Here's a sample that I've come up with -   I've checked out most of the links here on Stackoverflow regarding tables and accordion effects, but haven't found anything proper.  Relevant code snippet :    function customCollapse(that) {   $(that).next('tbody').toggleClass('closed'); } .slider {   overflow-y: hidden;   /*max-height: 500px;*/   /* approximate max height */   display: table-row-group;   transition-property: all;   transition-duration: 5s;   transition-timing-function: cubic-bezier(0, 1, 0.5, 1); } .slider.closed {   /*max-height: 0;*/   display: none; }

       Some data

       Some data

       Some data again

       Some data again

     Some relevant code of what I tried using Bootstrap:
                     Some data

     Some data again	     Some data again	     Some data again	     Some data again	     Some data again


Complex Analysis books/online resources for self study

I am looking to self-study complex analysis. While I have a good grasp of undergraduate real analysis (sequences, series, analysis of single-variable functions, point-set topology), I have forgotten most of the complex analysis I have studied. The book we used was by Bak and Newman, which I didn't like much. Are there any good books or online resources available?


In the movies, the Death Eaters leave a smoky trail behind them as they fly. As the Order arrive in the Ministry of Magic in Order of the Phoenix, they leave a silvery trail behind them. In the books, there’s no mention of how they’re doing this. And J.K. Rowling said in the books that only Voldemort and Snape could fly like this; first seen in the Battle of the Seven Potters.  Please can somebody explain how the Death Eaters are able to fly like this?


Judy wanted to know if the flight ticket to Shanghai was valid.  Can I replace "if" with "whether" in the sentence above?


Im trying to split the stings into even parts. For example if I have ['abcdef'], expected output should be ['ab','cd','ef']. I keep getting the same input for the first test 'asdfadsf'/   def solution(s):      lists = []      for i in s:         if len(s) % 2 == 0:             lists.append(s)             zip(*[iter(lists)]*2)         return lists  test.describe("Example Tests")  tests = (     ("asdfadsf", ['as', 'df', 'ad', 'sf']),     ("asdfads", ['as', 'df', 'ad', 's_']),     ("", []),     ("x", ["x_"]), )   for inp, exp in tests:  test.assert_equals(solution(inp), exp)


How can I get rows for terminals? (vs. 'echo $COLUMNS')

I've finally gotten ssh onto my phone, but having done so, I realize that some of my ancient hard-coded scripts are very specific to an 80x24 resolution.  I'm aware that $COLUMNS will give me my 80, and allow me to do some things, but I'd like to figure out where I can access the other dimension of the terminal I'm getting to look at.  I'd hate to have to hard-code a set for every terminal, phone, or other hardware I might use, but right now it's looking like that may be the best option.  My phone gives me 53x13 with ConnectBot (couldn't find a better solution?), in case anyone cares.


How to Run Entire Test Plan continuously for multiple Times in JMeter(Not thread group )

I created Test plan in JMeter with 2 Thread group. one Thread group consisting of 100(user) Number of thread and other consisting of 10(user) Number of thread. So i want run this entire Test plan continuously multiple times. means i want to automate the entire test plan and  run 10,20,30.......n times like this is there any way to achieve this stuff please tell me  with simple demo.Means i don't want run thread group in loop(i know how to do that)  i want Entire .JMX(TESTPLAN) file run 10,20,.....n (for example i set some how test.jmx file =10 it should run 10 time with any manual operation ) is this possible ....? please tell me


Cell Fracture addon leaving unfractured boxes?

I have been trying to make a short clip of a bullet hitting a wine glass with wine in it, but I keep running into the same problem with the add-on. Every time I have used it the result has left me with at least a partial box being generated as several of the fractured pieces.  I have tried subdividing and/or adding a sub-surf modifier but the result only changes where the large distorted fragments end up. I have been having trouble with this for quite some time and I would greatly appreciate any help.


i have a point of sale program made with C#  when pressing submit button it submit the sale and print the invoice i want to make a shortcut for it so when i press a shortcut key on the keyboard it does the buttons work  here is my button Code:  private void btnCompleteSalesAndPrint_Click(object sender, EventArgs e) {     DialogResult result = MessageBox.Show("Do you want to Complete Sale and Print?\n\n -If you need any item [duplicate] (1 item  2 piece) \n -Please Increase item Quantity \n ----- by clicking + sign  ", "Yes or No", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);      if (result == DialogResult.Yes)     {         if (txtPaidAmount.Text == "")         {             MessageBox.Show("Sorry ! you have not enough product \n  Please Purchase product or Increase Product Quantity");             // detail_info go = new detail_info();             // go.ShowDialog();         }         else         {             try             {                 sales_item();                  //Save payment info into sales_payment table                 payment_item();                  // 5 % Rewards Point add to customer Account for total Payable amount                  AddCredit();                  PrintPage mkc = new PrintPage();                 mkc.saleno = txtInvoice.Text;                 mkc.vat = txtVATRate.Text;                 mkc.dis = txtDiscountRate.Text;                 mkc.paidamt = txtPaidAmount.Text;                 mkc.subtotal = lblsubtotal.Text;                 mkc.ShowDialog();                  showincrement();                 ClearForm2();             }             catch (Exception exp)             {                 MessageBox.Show(exp.Message);             }         }     } }


What is E[X|Y>c] where Y=X+Z, and X, Z are normally distributed rvs?

Suppose X, Z are normally distributed random variables and independent ($X$ follows $N(\mu,\sigma^{2})$ and $Z$ follows $N(0,\sigma_{z}^{2})$), and that Y=X+Z.   What is E[X|Y>c], where c is just a constant - how do you derive this?


Please help me to prove the following result:  I recall that the holomorph $Hol(\Gamma)$ of a group $\Gamma$ is the semidirect product $Hol(\Gamma)=\Gamma\ltimes_{\phi} Aut(\Gamma)$ where $\phi: Aut(\Gamma)\to  Aut(\Gamma)$ is the identity map.  Let $G=Hol(C_8)$. In addition let $f(x)\in \mathbb{Q}[x]$ be an irreducible polynomial of degree $8$, $L$ a splitting field of $f(x)$ over $\mathbb{Q}$ and suppose that $Gal(L/\mathbb{Q})\cong G$     Show that there is a subgroup of $S_8$ isomorphic to $G$   Thanks in advance.


Whether to publish one big paper or many smaller papers for a given research project?

Let's say I invented a system to solve a problem. To run this system, I made my own algorithm.I also created some other things for that system. The main contribution was supposed to be the system.So is it a good idea to have as many research papers out of the project as I can? Or to publish a single research paper?  I have seen a lot of researchers where they were targeting a single problem and they proposed a single solution. Now, what they would do is write a research paper for every component separately. Then they would write a single research paper showing how all the components would fit together.  So is it a good idea to try and increase the number of publications you can have out of a single research project?   My own personal opinion is that the quality of your research matters not the quantity. But I have also seen a number of institutions requiring a specific number of publications to even apply for their jobs.


Use a string from a config file to initilize a generic type

I have a class:  public class MyClass<T>   I have a config file that I am reading that has, say, Guid for the type T.  How do I do this, except using the string from the config file instead of the actual type (instead of hard-coding Guid)?  MyClass<Guid> = new MyClass<Guid>();


Why in KNN Euclidean distance is preferred over Manhattan for low dimension dataset whereas for high dimension, manhattan is preferred?


How do I prompt for yes or no before writing to bash history?

My use case is that I just want to save the command in the bash history after the confirmation. I need something like "Would you like to save this command in bash history" after the command has been executed?


Can't turn on iPhone, no backup and updating isn't successful. Is there anyway to retrieve the data?

I am posting this for a friend.  For some reason the iPhone 5 suddenly won't turn on anymore.  When the power button is pressed the screen lights up, the apple logo shows and then it switches to another screen where the following url is shown: support.apple.com/iphone/restore, the iTunes logo and the a picture of a cable beneath.  What I have tried:  I have visited the url and followed the steps listed on the page, namely holding the power and home buttons for ten seconds, waiting and then trying to turn the phone on again.  I have connected to iTunes and tried to update the phone but this is unsuccessful and produces an error, with error code 26 which gives me this link here: .  I have followed the steps on this page as well.  What I think the problem is:  I believe the phone started to update but didn't have enough space and at some point the update failed midway and now the phone can't turn on.  I believe this is also the reason why it wont update via iTunes.  I do not know however as I wasn't present during this time and my friend isn't sure either, all she knows is it wont turn on anymore.  The phone has no backup and my friend would very much like to keep / retrieve the data on the phone somehow.  Therefore we have avoided trying a factory reset at this point.    We have taken it to a shop and they referred us to a specialist shop saying it would cost ~2000€ to decrypt and retrieve the data before performing a reset which is ridiculous.    Are there any steps or methods we could further try before resorting to a factory reset and losing the data or having to cough up all this money?  Any help would be greatly appreciated.


It was many years now since I stopped using std::endl to end lines when writing to std::cout, and started using "\n" instead.  But now I start seeing more snippets of code using '\n' instead, and I started wonder what might be best.  Besides the obvious that one is a string, and the other a character, is there any advantage to using this:  std::cout << variable << '\n';   Over this:  std::cout << variable << "\n";     Late addition:  When I asked this question I seemed to think that newline '\n' flushed the buffer. Now I know that it depends.  By default std::cin is tied to the old C stdin FILE* stream, and std::cout is tied to stdout. The flushing on newline comes from this tying. By default stdout, if connected to a terminal, is line-buffered. That means a new line will flush its buffers. So when printing a newline using std::cout, that will lead to stdout being flushed.  If stdout is not connected to a terminal (for example the output has been redirected or is piped), or if the tie between std::cout and stdout is broken, then newlines will not flush anything.


Why is it that when I want to mention in a comment or an answer a user, sometimes it displays the name, and other it just doesn't? I'm not sure if that is supposed to happen? Is it because some of them have a space in their user names? Why?


Is there a way to load data from an ini file when writing a test case?

I need to pull data from a ".ini" file for the test case to operate on. Which of the three: [InlineData], [ClassData] or [MemberData] attribute is best to use? I'm relatively new to C# programming, kindly bear with me. Thanks in advance!


Does it look good to edit the question you're answering?

I have a question about editing practices:  Does it look good to edit a question you have just answered?  For example: say I had just answered a question, then saw that the question had some minor formatting issues. Should I edit it? Does it turn up voters off when they see that I am answering a question I changed, possibly to better suit my answer?


How long will a sauce last for when placed in a refrigerator and in a freezers?

How long will a sauce last for when placed on freezer and in a refrigerator?


Can a Tunisian with a US A-2 visa visit Canada?

I am Tunisian and I am in the USA and on an A-2 visa. Can I visit Canada?


$2i\equiv2j\pmod{\!m}\Rightarrow\,2i\equiv2j\pmod{\!2m}\, $ for odd $\,m\,$

If $$2^6k+2\equiv4\pmod9$$ then this implies that $$2^6k+2\equiv4\pmod{18}$$since both sides are even. Can anyone explain to me why this inference is true?


Architecture a for a central renderer rather than self-rendering

For the architectural side of rendering, there's two main ways: having each object render itself, and having a single renderer which renders everything.  I'm currently aiming for the second idea, for the following reasons:   The list can be sorted to only use shaders once. Else each object would have to bind the shader, because it's not sure if it's active. The objects could be sorted and grouped. Easier to swap APIs. With a few macro lines, it can be easy to swap between a DirectX renderer and an OpenGL renderer (not a reason for my project, but still a good point) Easier to manage rendering code   Of course, if anyone has strong recommendations for the first method, I will listen to them.  But I was wondering how make this work.     First idea The renderer has a list of pointers to the renderable components of each entity, which register themselves on RenderCompoent creation. However, I'm worrying that this may end up as a lot of extra pointer weight. But I can sort the list of pointers every so often.  Second idea The entire list of entities is passed to the renderer each render call. The renderer then sorts the list (each call, or maybe once?) and gets what it wants. That's a lot of passing and/or sorting, however.  Other ideas ??? PROFIT  Anyone got ideas? Thank you.


I ran a robust regression using the rlm package but I see that p-value of the coefficients are not returned. What is the best way to test the coefficients returned from rlm for significance?  I was looking at the rlm function here:   pvalue are not returned:  summary(rr.huber <- rlm(crime ~ poverty + single, data = cdata)) ##  ## Call: rlm(formula = crime ~ poverty + single, data = cdata) ## Residuals: ##    Min     1Q Median     3Q    Max  ## -846.1 -125.8  -16.5  119.2  679.9  ##  ## Coefficients: ##             Value     Std. Error t value   ## (Intercept) -1423.037   167.590     -8.491 ## poverty         8.868     8.047      1.102 ## single        168.986    17.388      9.719 ##  ## Residual standard error: 182 on 48 degrees of freedom   Thank you.


Nullity and rank of the linear transformation $T[f(t)] = \int_a^b f(t) \sin (x-t) dt ~\forall~x \in [a,b]$

Let $V$ be the linear space of all real functions continuous on $[a, b]$. If $f\in V, g=T(f)$ means that $$g(x)=\int_a^b f(t)\sin(x-t)\,dt\hspace{1 cm} for\ a\le x\le b$$  Then, the nullity and rank of such a transformation?  Attempt: Let $g(x)=0 \implies g(x)$ is the constant function $0 $.  $\implies 0 = \int_a^b f(t)\sin(x-t)\,dt$  Could anyone please tell me how to move forward from here?  Thank you very much for your help in this regard.


Entering Hungary from India with German student visa

I am a student from India studying in Germany. I plan to visit India in a few days. However, I shall be taking the flight to India from Budapest and not Germany. I shall also be coming back to Budapest from India by flight and then travel to Germany by bus/train.   I just wanted to know if there would be issues at the immigration in Budapest. According to my knowledge there should not be a problem since Germany and Hungary are both Schengen countries. However, a confirmation of whether my assumption is correct would be really helpful.


How does Python 3.x deal with indeterminate forms such as 0/0?

So just as the question states, I'm wondering how python calculates equations such as   def indeterminate(x):     return (x - math.sin(x)) / math.pow(x, 3)   where Limit approaches 0. I'm asking because when I input   >>> indeterminate(0.0000001) 0.17205356741102978   Where as   >>> indeterminate(0.00000001) 0.0   Shouldn't the output be approaching 1/6? And if it becomes too close, wouldn't a ZeroDivisionError message be more suitable than 0.0?  Another question I have is how do I calculate the actual number of   indeterminate(0.00000001)   The correct answer using L'hopital's rule should be 1/6 but (0.166666...) and not 0.1720...


Can contractible subspace be ignored/collapsed when computing $\pi_n$ or $H_n$?  Motivation: I took this for granted for a long time, as I thought collapsing the contractible subspace does not change the homotopy type. Now it seems that this is only true for a CW pair...


Restore from "iOS7 backup" to an iOS6 phone

A friend upgraded my device to iOS7. It didn't work properly so I downgraded it a few days later to iOS6.  I have backups both in iCloud and on OS X (iTunes). When I try to restore either I get a message:     To restore this iPhone from this backup, you must first set up the   iPhone as new and restore the software to the latest version.   Without this backup I am very inconvenienced, so I ask is it possible to restore an iPhone from a iOS7 Backup if you downgraded the phone to iOS6?


Are we doing work when we compress a ball?

Take a sponge ball and compress it. The net force acting on the body is zero and the body isn't displaced.  So can we conclude that there is no work done on the ball?


Why am I not accelerated by the reaction force applied by Earth on me?

Newton's third law says that "to every action, there is always an equal but opposite reaction". And Newton's second law of motion says that, $F=ma$ $=>$ $a=\frac{F}{m}$. People says that If I stand on earth's surface, I am applying a force on earth which is equal to my weight and Earth, in return, is applying force to me which is equal in magnitude to my weight but opposite in direction. I know that these forces will not cancel each other out since they are applied on different bodies and not a single but I ask if net force is not zero then according to the equation, $a=\frac{F}{m}$, I must have some acceleration produced in my body. Because the equation is telling us that the force applied on me is same as my force applied to earth but since masses are different and acceleration is inversely proportional to the mass then I must experience some acceleration as my mass is lesser than earth and so acceleration produced must be greater.


Using variables in list comprehensions leads to value deviation

first list1 = [0 for i in range(3)] length = 5 width = 3 data = [[list1 for i in range(length)] for j in range(width)] data[1][0][0] = 1 print(list1) print(data)   second list1 = [0 for i in range(3)] length = 5 width = 3 data = [[[0, 0, 0] for i in range(length)] for j in range(width)] data[1][0][0] = 1 print(list1) print(data)    What I want to get is the second code result. Why can't I get it with the first code? Also,in the first,both data[0][0][0] = 1 and data[2][0][0] = 1 will get the same result as data[1][0][0] = 1


How to simplify return's statement from try-catch

How can I simplify the following code:  try {     var metadata = GetMetadata();     return metadata ?? _provider.GetLatestMetadata(guid); } catch (AuthenticationException) {     return _provider.GetLatestMetadata(guid); } catch (HttpUnauthorizedRequestException) {     return _provider.GetLatestMetadata(guid); } catch (WebException) {     return _provider.GetLatestMetadata(guid); } catch (VcenterException) {     return _provider.GetLatestMetadata(guid); }   I would like to avoid code duplication.   Is it possible?


No Wifi in new Ubuntu 16.04 LTS installation on Lenovo y50-70

I'm having trouble connecting to my WiFi Network on my Lenovo y50-70 LapTop on Ubuntu 16.04. I had it run on Windows for the first couple months, so I am positive, that it does have WiFi capabilities. I didn't have any such problems on my old Lenovo LapTop on Ubuntu 14.04 however. I just installed the OS, but couldn't install updates or set the clock with that. Now it doesn't show any wlan connection at the menu on the top right. It does show a wired Ethernet connection however, when I go Edit Connections.  I tried:  -rfkill list all & sudo rfkill unblock all which seemed to remove a softblock on my wlan  -I can't install the proprietary BCM drivers since I don't have an Ethernet port.  -ifconfig wlan0 & ifconfig wlan0 up -> wlan0: error fetching information: Device not found & wlan0: ERROR while getting interface flags: No such device  -iwconfig  lo  no wireless extensions. enp9s0 no wireless extensions.


i'm new to php password hashing since i'm also a beginner in php coding. I was able to make a simple login form, it requires a username and password. This password will then be saved to a database by Inserting into table using $_POST['password']. However i read that this is unsafe because its a plain text, you need to hash it.   I tried researching about password hashing in php. i found several write-ups but most of it are not clear for a beginner like me. Though i got some basic ideas but can't think on how to implement it.  Some of my questions: 1. How do I hash the password inputted by the user? 2. Once it is hashed, how do i pass it and save it to my database? 3. Is the password will then be saved as a hash (not plain text) in my database? if so, do i need to extend field length in my database to accommodate long hash passwords?  Those are some of my queries which is obviously from a beginner. I hope someone would enlighten me or show me where to start. I prefer basics so that I can comprehend.   Thank you very much!  EDIT: ok found some answers on the link provided. Thanks for tagging it as duplicate and i'm sorry for that. cheers!!


Can "board wipes" kill creatures with protection?

Can  kill a creature with protection from black? My friend says it can't because protection gives it complete defense from black.


Why is the angular momentum defined as the cross product of linear momentum and the radius?

I first searched why is Torque defined as a cross product and a lot of people answered that it is defined as a cross product because angular momentum is defined that way and it is only logical that Torque and angular momentum have the same direction.  I know the cross product is used for the direction of angular momentum but why does the direction of angular momentum have to be in the direction of axis of rotation and even if it has to be in the direction of axis of rotation then why does it have to be a cross product and not some other mathematical product.  also why is the magnitude of angular momentum defined as $$ ||p||*||r||*\sin{\theta} $$


Will Customs in India figure out that I have two laptops?

I am going back to India soon from the US. Can I take a laptop in my carry-on luggage and another laptop in my checked baggage, so that I don't have to pay customs duty for either of the laptops? Will they ever figure out that I have two laptops? Does Indian Customs check the combined luggage of every person to see how much electronic goods they are carrying?  In case, a laptop is not allowed can I carry 2 NVMe SSDs and a RAM module in my checked baggage, without them complaining?


Intuition behind creation and annihilation operators?

Here I am talking about Harmonic Oscillators with Hamiltonian $$ H=\frac{1}{2m}(p^2+(m\omega x)^2), $$ with eigenstates $|1\rangle,|2\rangle,\ldots$  Many textbooks define the annihilation operator to be $$ A=\frac{m\omega x+ip}{\sqrt{2m\hbar\omega}}, $$ So $A|n\rangle=\sqrt{n}|n-1\rangle$.  The definition of $A$ look very complicated, so my question is, how can people possibly come up with it at the first place? Just imagine you are the first one who discover the operator $A$. How can you possible discover it?  More precisely, we want $A$ to have the property that, if $|\phi\rangle$ is an eigenstate, then so is $A|\phi\rangle$. Also, $A|\phi\rangle$ must not be a constant mutiple of $|\phi\rangle$. Can we obtain an expression of $A$ starting from this property?


7 sphere, is there any physical interpretation of exotic spheres?

Basically an exotic sphere is topologically a sphere, but doesn't look like a one. Or more accurately:     homeomorphic but not diffeomorphic to the standard Euclidean n-sphere   The first exotic spheres were constructed by John Milnor (1956) in dimension n = 7 as S3-bundles over S4.  It looks like an SU(2) gauge field on S4? But I don't know more about this? I guess there is lots of expertise here. Could you give a physical interpretation of this 7 sphere? Just to make it more intuitive.    Thank you!


Movie where some children play a game and experience what happens on the board

There was this movie I saw around ten years ago where some children play a board game and then experience whatever happens on the board. There was this one scene I remember in which one child gets trapped inside an elevator. The movie happens when the parents go out somewhere and the children start playing this board game. The board game ends just before the parents arrive back home. The children in the movie were kids of around ages 8 or 9.


How to hide certain plugins from other admins?

I'm running a WP site for a client (who has an admin account) and I'd like to hide certain plugins that I've installed. Is there a way to hide certain plugins (not all) from the list for specific users? I'm not interested in user roles, rather hiding certain plugins from specific user names. Thanks!


C++ static library linking in a C project

I am trying to statically link a C++ library to a C project but can't seem to figure a way out. I read multiple posts but nothing helped. Below is the snippet of my Makefile:   CFLAGS += -I../path/to/headers  LIBS += ../path/to/lib.a   I get the below linking error:  "undefined reference to ... collect2: ld returned 1 exit status"   I checked this post for ordering but I don't that is an issue here:   I wanted to know if it is even possible. If so, what flags I would need to add into my C project Makefile.


What is the synonym for "to raise the inner parts of the brows"?

I'm not looking for the name of the face expression (e.g. sad, or sorry, or "inner brow raise", etc.), I'm looking for the name of the movement that is made. I thought maybe there was a less complicated and more appealing version of it than "to raise the inner sides of the brows"? For example, "in the pictures the guys are ... their brows". I can't really find any pics because I simply don't know what to type in in a search bar. But I remembered a couple of movie scenes, so here you go:     EDIT: I found a source which suggests "eyebrows slopped outwards". Sounds weird to me :/  Can that actually be a thing? (context: "By pushing together the eyebrows and pulling up the forehead, the eyebrows can be made to slope outwards.")  EDIT 2: If I said "his eyebrows raised in (a) sorry", would that make sense and be understood? If yes, would the article before sorry be needed?  EDIT 3: Here are some more pictures I could find:


Isometric map (2D) - Click detection - Mouse mapping - How to implement it?

I'm building an isometric engine.  I use TILE_SIZE * TILE_SIZE (minecraft like) tiles. (I'm using 64 * 64 tiles but I can change the number when I want)  I can access for each tiles to this informations :   - OFFSET_LEFT(same for every tile on a layer)  - OFFSET_TOP(same for every tile on a layer)   - x (classic 2D tiled coordinates)  - y(//)   - isometric i   - isometric j   Tile are drawed at (i * TILE_SIZE, j * TILE_SIZE) I use the following formula to get from x to i and y to j :  int i = (x - y) / 2,     j = (x + y) / 4;   No problem for displaying, I got my diamond shape :    I try to find a formula to convert my cursor coordinates into those isometrics ones(i, j) with the following questions in mind I wrote on the screenshot.  After doing i * TILE_SIZE, etc... Finding a way to handle offsets(??????)...  I'm gonna render this off-screen :    And banzai, tile detection with some getPixel()...  But to do that, I have to resolve the problems I highlighted with the balise  in the following topic.  Final purpose : get the tile index in my tile array(wich I suppose I can have with i + j ?)  I'm without a clue for days, reading a lot of topic, but some of them sprout some chinese like sqrt(what the... is this creature ?) or matrix transform ????  So even with all the topic on the subject here, I was unable to find a proper solution fulfilling my project's need. Thanks for reading me; ask me if I missed some informations.  EDIT : About the link you gave :  int i = y / tile_size + x / (2 * tile_size), j = y / tile_size - x / (4 * tile_size);   This one give some 'good results'(I don't really know if it's working but the numbers seem rights) but I can't handle :  - offsets - when I click outside the map


How to make an environment such as "theorem" not have italics

I found this:   as well as this:  Neither however seem to make sense to me as I have been using the following:  \newtheorem{theorem}{Theorem}[section] \begin{theorem} \emph{(Fundamental Lemma)} Let $A$ and $A'$ with collections $\partial$ and  Stuff goes here: But it becomes "italicized" \end{theorem}   However it seems that with the above two links one is either just defining whole new constructs (which I somewhat understand), or just using \textbf, which I don't want the \textbf to override the italics as I don't want bold faced text.  What I am after is being able to construct a "Theorem" which keeps track of the numbering and updates itself i.e. 1.1 to 1.2 if another theorem tag is added before.


Problem with random permutation and conditional probability

Let $\pi_1,...,\pi_n$ be a random permutation of numbers $1,...,n$. If you are told that $\pi_k > \pi_1,...,\pi_k > \pi_{k-1}$, what is the probability that $\pi_k = n$?  What I've tried:  Let $A_j$ be the event that $\pi_k = j$. Let $H$ = be event that $\pi_k > \pi_1,...,\pi_k > \pi_{k-1}$.  Then $P(A_n|H) = \frac{P(H|A_n)P(A_n)}{\sum_{j = 1}^n P(H|A_j)P(A_j)} = \frac{\frac{1}{n}}{\sum_{j=1}^n P(H|A_j)\frac{1}{n}} = \frac{1}{\sum_{j=1}^n P(H|A_j)} = \frac{1}{\sum_{j=1}^n P(j > \pi_1,...,j > \pi_{k-1})}$.  How to calculate that last sum?


Is there a way to derive the second linearly independent solution to ODE whose characteristic quadratic has double roots?

I know that one can use an  to determine that $te^{rt}$ is a solution to the ODE $a\ddot{x}+b\dot{x}+cx=0$ where $r$ is the double root of the characteristic polynomial. Is there a way this can be derived explicitly without such an "educated guess"?


Is it normal to get hundreds of break-in attempts per day?

I just checked my server's /var/log/auth.log and found that I'm getting over 500 failed password/break-in attempt notifications per day! My site is small, and its URL is obscure. Is this normal? Should I be taking any measures?


How to make sure I'll be pingable in chat for a few days?

Let's say I want people to be able to ping me in a certain chat room for a few days.  Do I have to actually say something there, or is it enough to simply join the room? And do I remain pingable even after closing the room? If yes, for how long? And for how long if I said something?


I try `intval(6.02 * 100)`, the result is 602, but why the result of `intval(5.02 * 100)` is 501?

I try intval(6.02 * 100),the result is 602。but why the result of intval(5.02 * 100) is 501?


With nmcli, I can modify VPN data like this:  nmcli con modify myvpn vpn.data 'refuse-pap = yes, user = xxx'   So I'm wondering if I can set password this way as well?


If $E$ is a field, $F/E$ is a field extension, let $A$ and $B$ be two matrices with entries in $E$ then $A$ is similar to $B$ in $E$ if only if $A$ is similar to $B$ in $F$. I think it's true, but I don't know how to prove it. Any suggestion? Thanks.


How to remove trailing spaces from. a variable in a shell script?

I have the following script ,how do I remove the leading and trailing spaces for variable TAG ?  TAG=`find projectversions -build Current${BUILD} ${PROJECT}|grep ${PROJECT}`  echo "TAG  $TAG"


Is it legal to dribble the ball above your shoulder?

I am having confusion in whether you can dribble the ball above your shoulder or not.


Deriving the sub-differential of the nuclear norm

Let $$f(K) = \| K \|_*$$ be the nuclear norm (sum of the singular values) of $K=U\Sigma V^T$. How can one compute the subdifferential $\partial f$? This may be a basic question, I'm trying to work my way through a paper in which minimizing $f$ over a convex set of matrices plays a central role. For what it's worth, I have found papers that display the end result, but not the derivation. EDIT:  by Tao and Candes derives an expression, but refers the proof to "Characterization of the subdifferential of some matrix norms" which does not prove it as far as I can tell. I also found a class homework assignment posted online that said this was easy to "grind out" with matrix derivatives, but that there was another way via projections. Any guidance would be greatly appreciated.


When I cast the double value 44.000000 to int, I get the desired value of 44. But, When cast the same double value (44.000000) that was derived by some arithmetic operations to int, I get 43. How can I get rid of this problem and get 44 instead of 43 in the second case? Below is the code I used, #include<stdio.h> #include<math.h>  int main(){      double newd = 44.00;     printf("Simple Direct Conversion: %d\n\n", (int)newd);      double d = 100.44;     double decPart;     double fracPart = modf(d, &decPart);      printf("Original Values:      %lf - %lf\n", decPart, fracPart);     printf("Multiplied by 100:    %lf - %lf\n", decPart * 100, fracPart * 100);     printf("Converted to Integer: %d - %d\n", (int)(decPart * 100), (int)(fracPart * 100));      return 0; }  and the output is,  Simple Direct Conversion: 44 Original Values:      100.000000 - 0.440000 Multiplied by 100:    10000.000000 - 44.000000 Converted to Integer: 10000 - 43


I split the question into two parts and included some answers.  1. Alternatives to the permute-package  The permute-package is very old (version 0.2, 1999) and can lead to .  Is there an up-to-date package (or possibility) that generates similarly appealing results with the same ease?  Consider the following small working example, which demonstrates just a few possibilies of permute:  \documentclass{article} \usepackage{permute} \begin{document}  That's what I want to have:  % $\pmt{(123)(45)}$ without star: no spacing between numbers  % $\pmt*{(123)(45)}$ with star: no difference (see note)  \renewcommand*\pmtseparator{\;} % thickspace, but see note below  % $\pmt{(123)(45)}$ without star: no spacing between numbers  $\pmt*{(123)(45)}$ with star: spaces between numbers  I do \emph{not} want to write something horrific like $\begin{array}{llllll}(1&2&3)(4&5)\end{array}$.  Of course I could write $(123)(45)$ or $(1,2,3)(4,5)$,  but I would like to have an apperance different from that of tuples, and numbers greater than 10 rule out the first possibility anyway. \end{document}   Notes:   Concerning \pmtseparator. The separator is included if the *-variant of \pmt is used. It is predefined as a space  . Hence, it only appears in text mode. Redefining it to \ , as the manual suggests, makes the space visible both in text and math mode. If you use \pmt only in math mode, it is better, as Philippe Goutet pointed out, to use \, for a thinspace or \; for a thickspace. (.) Verbose permutations can be created with \pmtv.   Solutions so far:   There seems to be no alternative, but the package permute works. Alternatively, if you do not insist on a special appearance, you use one of the two possibilities from the last paragraph.   (However, the permute-package has some limitations concerning the order of multiplication and the use of numbers greater than 9, but this could be discussed later and in another question.)  2. Typesetting permutations with LaTeX  Or what do typographers or other authors say about (1 2 3)(4 5) vs. (1,2,3)(4,5) vs. (123)(45)?


Here is the script to create my tables:   CREATE TABLE clients (    client_i INT(11),    PRIMARY KEY (client_id) ); CREATE TABLE projects (    project_id INT(11) UNSIGNED,    client_id INT(11) UNSIGNED,    PRIMARY KEY (project_id) ); CREATE TABLE posts (    post_id INT(11) UNSIGNED,    project_id INT(11) UNSIGNED,    PRIMARY KEY (post_id) );   In my PHP code, when deleting a client, I want to delete all projects posts:  DELETE  FROM posts INNER JOIN projects ON projects.project_id = posts.project_id WHERE projects.client_id = :client_id;   The posts table does not have a foreign key client_id, only project_id. I want to delete the posts in projects that have the passed client_id.  This is not working right now because no posts are deleted.


Number of automorphisms of a direct product of two cyclic $p$-groups

Suppose I have $G = Z_{p^m} \times Z_{p^n}$ for $m, n$ distinct natural numbers and $p$ a prime. Is there a combinatorial way to determine the number of automorphisms of $G$?


Best practices for making a WordPress site "movable"?

I'm planning to buy a domain and install a WordPress site on it at a web-hosting company.  But first I'll need to iron-out some bugs...  I got a working LAMP-stack at my home-computer, so I'm thinking about first installing my site locally - off the Internet.  I'll be mostly tweaking and making "test-posts" to check that everything works, but I'll probably also make some posts I'd like to keep when I move the site and take it online.  When I'm done chasing bugs; I guess I'll just package the public_html|www directory-tree and upload it to the web-hosting company, and also export the database from my home-computer to the web-hosting.    What I'm wondering if there are some "best practices", some do-s and don't-s, some major pits to take note of?    For example, how can ensure the smooth transition of domain-name in posts and links as such, from localhost to whatever-i-end-up-buying.com (I know from previous attempt of running WordPress at my home computer, that this didn't always work quite well...).


I was wondering if some one here would please recommend an abstract algebra text book. In particular, I am seeking a text from among one of these:  1) Abstract Algebra by Dummit and Foote  2) Algebra by Michael Artin  3) Topics in Algebra by Herstein.  I was wondering which text is best for a high school student and has great exposition and good problems. My goal is study some algebraic number theory some time later in the near future as I liked elementary number theory.


Insert a zero between 0 to 9 when iterating with python

I'm writing a code to take a rain time-series and save hourly files for each day in order to feed a hydrological model, so, basically, I need to save each file with the hour of the day with tho digits, like this: rain_20200101_0000.txt rain_20200101_0100.txt ... rain_20200101_0900.txt rain_20200101_1000.txt .. rain_20200101_2300.txt  But python doesn't put a zero before numbers between 0-9, so if I use a range(24) to do that it will save the first 10 hours like "rain_20200101_100.txt" The solution I found was to put an if for x<10 and x>=10 inside the range(24) and insert a "0" before the hour for the first condition, but I think that is too rude and should be a more eficient way to do that. Could you help me with a simpler solution for this code?


Where can I ask questions when I don't know which SE is the right one?

On which SE should I ask a questions if I don't know which is the right place for it.   For example, I asked a question on Stackoverflow about websites with programming challenges (recommendation), because I couldn't find a website recommendation SE (like software recommendation) and thought it would fit into SO, but it didn't.  Second questions to this topic: Why are some normal questions put on hold because of off-topic when they are completely normal. First, as a new user, I was very insecure if my questions is right in that SE.


When visiting a Stack Exchange review url on a mobile device, such as , it looks like the desktop website, not the mobile website.


Replace links with page titles when referring to most linked sources (MSDN, Wikipedia, ...)

Both MSDN and Wikipedia are very referenced documentation resources.  Would be possible to automatically replace not formated links, like:    with the page title:    or you're only implementing this on SE sites because all it requires is a database query instead of scraping the title?  I'm in doubts about if this is allowed in MSDN or Wikipedia, but that's not for evil purposes, totally the opposite.  I've seen many questions linking MSDN / Wikipedia without formatting the link, like:           Of course, I'm refering to the post editor, and not about comments, because as Jeff said in , comments are processed on the fly.


jQuery - simple dropdown function does not work with appended HTML

I have two simple jQuery functions, one standard dropdown function and another function that appends HTML content on click. The problem is that the dropdown function does not work with the appended HTML.   Here's my HTML:  New Line

      Popup
ddd

   And the jQuery functions:  $(function() {     $('.dropdown-toggle').click(function(){        $('.dropdown-menu').not($(this).next('.dropdown-menu')).hide();       $(this).next('.dropdown-menu').toggle();       });  });  $(document).ready(function() {    var wrapper = $(".lines");    var add_button = $("#new_line");     $(add_button).click(function(){           $(wrapper).append('
Popup
ddd

');     });  });   Please check the following example on codepen. You'll see one "dropdown" link which works. Once you click on "New Line" new dropdown links will appear, but those do not work. Any idea how to make them work?   Thanks!


Let's suppose I have such code:  public class OuterClass{     InnerClass myInnerClass = new InnerClass();     public class InnerClass{      } } // somewhere I have created an OuterClass instance: OuterClass outerClass = new OuterClass(); // do something // ... outerClass = null;   The question: is it enough to set only the outerClass to null to avoid the memory leak? InnerClass has a reference to OuterClass, and OuterClass has a reference to InnerClass. Thus, as both of these objects have references to them, they cannot be garbage collected!


If $\sqrt{n}$ is not an integer, are there any rational numbers $x$ such that $x^2 = n$?

I have a feeling this has something to do with prime numbers, but I'm totally lost. I'm not sure how to write the proof that proves (or disproves) the following: "Let $n$ be an integer. If $\sqrt{n}$ is not an integer, then there is no rational number $x$ such that $x^2 = n$."


Everytime I try to make chicken fried rice like I get at the take out place it never tastes like it does when they make it. We all know the basic ingredients Should you put the eggs or the rice first


What is the basic difference between absolute pressure and gauge pressure?


What do you do when you need whole-words search in Firefox?

Example: I am looking to see if "arg" is a special keyword in Lua. I go to the Lua reference manual at . I search for "arg". I find hundreds of occurrences of the word "argument(s)" or "vararg".  Any ideas? I know Firefox won't implement whole words as a core feature (something about cluttering up the ui... argh...), and I couldn't find a good addon that implemented this well.


Null pointer exception when I added my product in wish list in firebase

Error message:     Error -   Attempt to invoke virtual method 'java.lang.String   java.lang.Object.toString()' on a null object reference   and it's about this line  final String productId = task.getResult().get("product_ID_"+x).toString();   Please help me.  public static void loadwishlist(final Context context, final Dialog dialog, final boolean loadProductData){     wishlist.clear();     firebaseFirestore.collection("USERS").document(FirebaseAuth.getInstance().getUid()).collection("USER_DATA").document("MY_WISHLIST")             .get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {         @Override         public void onComplete(@NonNull Task<DocumentSnapshot> task) {             if(task.isSuccessful()){                 for(long x = 0; x < (long)task.getResult().get("list_size");x++){                     wishlist.add((String) task.getResult().get("product_ID_"+x));                     if(DBqueries.wishlist.contains(Productdetailsactivity.productID)){                         Productdetailsactivity.ALREADYADDEDTOWISHLIST = true;                         if(Productdetailsactivity.addtowishlistbtn != null) {                             Productdetailsactivity.addtowishlistbtn.setSupportBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#9e9e9e")));                         }                     }else {                         if(Productdetailsactivity.addtowishlistbtn != null) {                             Productdetailsactivity.addtowishlistbtn.setSupportBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#9e9e9e")));                         }                         Productdetailsactivity.ALREADYADDEDTOWISHLIST = false;                     }                     if(loadProductData) {                         wishlistModelList.clear();                         final String productId = task.getResult().get("product_ID_"+x).toString();                         firebaseFirestore.collection("PRODUCTS").document(productId)                                 .get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {                             @Override                             public void onComplete(@NonNull Task<DocumentSnapshot> task) {                                 if (task.isSuccessful()) {                                      wishlistModelList.add(new WishlistModel(productId,task.getResult().get("product_image_1").toString()                                             , task.getResult().get("product_title").toString()                                             , (long) task.getResult().get("free_coupens")                                             , task.getResult().get("average_rating").toString()                                             , (long) task.getResult().get("total_ratings")                                             , task.getResult().get("product_price").toString()                                             , task.getResult().get("cutted_price").toString()                                             , (boolean) task.getResult().get("COD")));                                      mycartFragment.cartAdapter.notifyDataSetChanged();                                  } else {                                     String error = task.getException().getMessage();                                     Toast.makeText(context, error, Toast.LENGTH_SHORT).show();                                 }                             }                         });                     }                 }              }else {                 String error = task.getException().getMessage();                 Toast.makeText(context, error, Toast.LENGTH_SHORT).show();             }             dialog.dismiss();         }     }); }


Non-pejorative term for behaviour that discriminates against people based on their birth place

A big theme of the UK May 2014 MEP elections is immigration - there is a great deal of political rhetoric about it that I would describe as racist or xenophobic, but I don't think either term is entirely suitable given how they are used now in UK media.  In addition these terms (racist especially) are generally considered to be pejorative, so as soon as you use them people get defensive and miss the point. The debate becomes about the ethnic mix of their social circle or supporters, both of which are irrelevant.  This rhetoric is characterised by the location of people's country of origin rather than their race.  An example statement would be:     "I'm not racist, but only British people should be able to apply for British jobs."   or      "26 million people in Europe are looking for work. And whose jobs are they after?"   I don't think these statements are racist exactly, as a person could be any race and be British, or not be British and still be of an Anglo-Saxon white origin.   However they do represent a kind of discrimination: they state that if the most skilled person for a job is not from the UK they should be rejected in favour of a less skilled local. They state that someone who isn't British should not get the same rights and privileges as someone who is.   The rhetoric that goes with these statements tends to also make value statements about the immigrants in question, often describing their intentions as parasitic or that these immigrants would be seeking to change British culture or legislation.  Is there a term for that kind of discrimination or prejudice?  Please note that I'm not trying to encourage any kind of political debate on here - I'm just looking for a way to describe this kind of political argument as discriminatory without referring to race.  Update  This question has been flagged incorrectly as a duplicate. I know that the legal definition of racism includes discrimination based on nationality. However, in the UK political sphere at least, the common interpretation of of racism is limited to racial groups. The political parties that use this rhetoric do not consider it to be racist, and the pejorative nature of the term means that using it just ends any chance of building an argument that they might actually listen to.    I understand that racist is technically correct, I'm asking for constructive alternatives.  The answers to that question do not help with this issue.  Update 2  Xenophobic is a good answer, but not really what I'm looking for as it implies the motivation for the behaviour, rather than describing the behaviour itself.  For instance a typical response might be:     "I've got nothing against foreigners, I just think Britain is full - there's no more room."   This moves the argument to a different point (whether they hate or fear foreigners) and I don't want to do that. I want to describe the discrimination against foreigners without making my own judgements about their motivation for doing so.  Update 3  This question has been flagged as a duplicate of another question, but these are different questions with different answers. The supposed duplicate asks:  - I'm specifically not asking about prejudice; I'm asking about discrimination.   I can state that a political party's policies or proposals are inherently discriminatory if the action treats one group differently from another. I'm not making a judgement about them if I do so, I'm just stating a deduction.  I can't state for certain that this discrimination is due to their prejudice - they may or may not have prejudiced opinions, but accusing them of prejudice causes offence and any constructive discussion ends there.  So, is there a way to describe behaviour that discriminates without making guesses as to the motivation or any prejudice behind it?


Suppose we have two $n \times n$ square matrices A and B such that $AB=BA$. It is known that A, B and AB all have n distinct eigenvectors that is a basis of $\mathbb{C}^n$. Can we then show that there is a basis of $\mathbb{R}^n$ that comprises entirely of vectors that are eigenvectors of both A and B?      I have no idea on solving this problem. Any form of help is appreciated. Thanks!


question: How many integers between 1 and $10^4$ contain exactly one 8 and one 9? I try do this, but i don't know if this is good, i ask my teacher and she says this:  IN A_3 more accounts look at lines 2 and 4 from bottom to top are the same numbers,    I advise you to ask yourself first about the ways to put 8, 9 and then the remaining numbers.


Select a group of lines in regex that are under a heading line

Here's my problem. I am creating a parser for a movie-type script (not a computer script, but a screenplay), and I need to select all of the lines underneath a certain scene heading. Here's an example script from Shakespeare's Hamlet.  #Scene 1# Bernardo: Who's there? Francisco: Nay, answer me: stand, and unfold yourself.  #Scene 2# Horatio: Tis now struck twelve; get thee to bed, Francisco. Marcellus: Peace, break thee off; look, where it comes again!   I need a way to select everything between "#Scene 1#" and '#Scene 2#'. Bernardo and Francisco should match, but Horatio and Marcellus should not.   I've tried using lookahead and lookbehind, but apparently they don't work across multiple lines.  /(?<=#Scene 1#)(.*)(?=#Scene 2#)/gim   If it's important, I'm using Python 2.7.


Optimizing a function on the complex unit circle

In my complex class we are given this problem: Take a continuous function from the complex plane to the real line: $f(z): \mathbb{C} \rightarrow \mathbb{R}$. We also know that $|f(z)| \leq 1$. Show that $$\bigr| \int_C f(z) dz\bigl| \leq 4$$ Where $C$ is the unit circle.  The way I started this was by saying: $$\bigr| \int_C f(z) dz\bigl| \leq \int_C |f(z)| dz \leq \int_C dz = \int_{0}^{2 \pi}ie^{i \theta} d{\theta} = 0$$This to me does not seem right, given what I am doing here is actually assuming the function is analytic, which was never given in the problem!  So now I am trying this: $$sup_{f}\bigr| \int_C f(z) dz\bigl| = sup_{f}\bigr| i\int_{0}^{2\pi} f(e^{i\theta}) e^{i\theta} dz\bigl|$$ While keeping in mind that $|f(z)| \leq 1$ and $f(z): \mathbb{C} \rightarrow \mathbb{R}$  I am however not too sure of how to attack this problem in a smart way, by not just plugging in functions and see what happens.   Thank you for your insight!


User seems to edit and flag own questions for deletions

seems to be making edits to his own questions and saying that he's flagging them for deletion (not sure about the flagging part though since I don't have enough rep for that, but that's according to his newly edited questions. However according to his reputation - 10 currently - he shouldn't even have flagging privileges yet).  I stumbled upon one of his questions in the close queue, it had an accepted answer so I reverted the question back one step, and having seen that he's done the same thing to multiple questions I'm not sure about how this should be handled. I am not sure about if he has access to the delete button on his own questions or not.  As I'm not sure how to handle this I wanted to bring it to the community's attention and ask for support for how to handle future cases like this. Should all questions be reverted back? Should they be closed (possibly with the motivation "user seems to want this question gone")?


Why does Eve die in Mass Effect 3 even though i saved maelons data

I saved the data to cure the genophage but eve still dies when i play through the mission. I saved the data in three previous times i played the trilogy  from the first game to the last and she always dies. Why does that happen?


Im was trying to do the update command sudo apt-get update and the error comes. Whats wrong? Please help me.  Error:    W: mistake by getting ppa.launchpad.net/aapo-rantalainen/games/ubuntu/dists/vivid/… 404 not Found  E: Some index files failed to download. They have been ignored or old used in their place .#


Can someone help me prove that $\tau(n)$ is odd iff $n$ is a perfect square.

Can someone help me prove that $\tau(n)$ is odd if and only if $n$ is a perfect square.   So basically I have to prove that $\tau(n)$ is odd iff $n = k^2$ for some integer $k$.  $\tau(n)$ is the function which gives the number of positive divisors of n, including n itself.


Are there different species of modern day humans?

I've been watching nature shows on Netflix (Wildest series) and different animals of the same "family" are actually different species.   e.g. Asian elephants vs African elephants. Asian elephants are much smaller than their African counterparts.  Also with monkeys, different locations have their own species. Take langurs for example (see link below)      Just in the Indian subcontinent, there are many species of the same "gray langur".  In saying all that, how many species are there of modern day humans? It can't be just 1 homo sapiens it's quite obvious there are differences based on location. (Africans have darker skin. East asians have distinctly-shaped eyes and etc). Monkeys have lots of species even of the same "family" (see example above) and we're also primates.  thoughts? thanks


$$\iiint xyz \,dV$$ T is the solid tetrahedron with vertices (0,0,0) (1,0,0) (1,1,0) (1,0,1).  How do I figure out what z=f(x,y) is with these points? The equation of a tetrahedron is x/a+y/b+z/c=1  But with the 4 points given I don't know how to use the formula.


What to do in that case? As far as I know, there is no way to request a particular member to answer my question. I put this up nearly a day and a half ago      No one answered, and this post has moved way down the list. What should I do? Should I delete and repost it?   It's not just about my post. This caters to anyone who does not get answers to their questions on there.


procmail and libnotify: how to display emails received?

I am trying to get procmail to work with libnotify (notify-send). My .procmailrc has a couple of recipes, which just essentially filter mails into different folders.. nothing fancy.  Most of my recipes are like:  :0: * ^TO_*(address) FOLDER/   I add the following to my .procmailrc, after all the rules. I copied this recipe from Google. What I want is that on every new mail (before or after processing my other recipes), notify-send command below is run.  :0 ic: | DISPLAY=:0.0 notify-send "New mail!"   But This doesn't work. What am I doing wrong??


I have a Hudson/Jenkins installation which runs on port 443, so I can access it with https://ci.mydomain.com. I do not have a webserver running on port 80 like Apache Httpd, but I want if a user types http://ci.mydomain.com  it should be redirected to https://...  I tried it with iptables:  /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 443 /sbin/iptables-save chkconfig --level 35 iptables on   But the browser tells me, that the connection failed. So I do not want to install Apache webserver, I only  want to have a redirect from http://ci.mydomain.com to https://ci.mydomain.com.


Full width of the textbox on the screen or not

Apologies if this comes as a naive question.   From design point of view basically a textbox control (or any control) in a grid container, does it makes sense to have a textbox in fullwidth of the screen.  For e.g. if we have a form with one textbox. On full destkop screen it would look weird to have a textbox to the full length of the screen. The same textbox would look good (or ok) on mobile devices.   Any thoughts or suggestions?  Using flex instead grid would help in this?  Thanks


I have built a multiclass perceptron, which predicts the values of the Iris dataset. To more accurately classify the data points of the Iris Dataset, I used a Kernel to define a non-linear manifold learning technique. Specifically, I created a non-linear version of PCA to project the data onto a high-dimensional subspace. After that, I used grid-search to find the best combination of the hyper-parameters. First question: How do I exactly find the best combination? Is it the smallest number of Principal Components and highest accuracy attained? Second question: Is the data linearly separable? I am getting good results (high 90s) when I'm predicting with Principal Components in the range 1-60, and all gammas. Here is a heatmap:  So is the data linearly separable or not? And why? (I have seen , and it does not answer my question)


The following query returns NO data:    select * from ediImport  WHERE glnfact NOT IN (select GLN from Clients)   After some search, I found the data I want, this way:  select * from ediImport  WHERE glnfact NOT IN (select GLN from Clients WHERE gln is not null)   But I feel like the first query SHOULD return the information (and I think it WOULD return it in Access). So my questions:  - why is first query not working  - is there a better, more efficient way to do this ? I found EXISTS and ANY but I can't see any advantage over the old school way.      Note: I don't want to use a left join here since my REAL need is to perform an UPDATE:    UPDATE ediImport SET Status = 2  WHERE glnfact NOT IN (select GLN from Clients WHERE gln is not null)


$\qquad^{\star\star}(b)$ Prove, more generally, that   $$f'(x) = \lim_{h, k \to 0^+}\frac{f(x + h) - f(x - k)}{h + k}$$   ONLY HINTS PLEASE.  The denominator is the issue. I thought of $u = h + k$ but that created an issue  for the limit bounds. I tried adding and subtraction $f(x)$ in the numerator but the denominator causes issues.  ONLY HINTS PLEASE!  Attempts:  $$f'(x) = \lim_{h, k \to 0} \frac{f(x + h) - f(x + h + k) + f(x + h + k) - f(x - k)}{h+k} $$  $$ = \lim_{h, k \to 0} -\frac{f(x + h + k) - f(x + h)}{h+k} + \frac{f(x + h + k) - f(x - k)}{h+k}$$  let $u = x + k$. As $k , h\to 0,$ $u \to x$ and $x - k =  u - 2k$  Which makes things weird.


Formal Proof for $\textbf{Vect}_k\cong\textbf{Mat}_k$?

Where this question came from: I was researching about the graphical languages for monoidal categories involving the category $\textbf{PROP}$ and wanted to see if I could create a graphical language for $\textbf{Vect}_k$ because of $\textbf{Mat}_k$. (probably not the exact reason however this is what I remember)  Let $\textbf{Vect}_k$ be the category of vector spaces for some field $k$ and $\textbf{Mat}_k$ be the category of matrices under the same field $k$.   I know that we can define an equivalence between categories between $\textbf{Vect}_k$ and $\textbf{Mat}_k$ because given vector spaces $V=k^n$ consisting of all $n$-tuples over $k$, and $U=k^m$ consisting of all $m$-tuples over $k$ where $U,V\in\text{Obj}(\textbf{Vect}_k)$, then $\text{Hom}_k(V,U)$ creates the vector space $k^{m\times n}$ representing the set of all $m\times n$ matrices over $k$. Thus showing that $k^{m\times n}\in\text{Obj}(\textbf{Mat}_k)$. If $X=k^{m\times n}$ and $Y=k^{n\times q}$ (set of all $n\times q$ matrices over $k$), then $\text{Hom}(X,Y)=X\otimes Y$ where the tensor product, $\otimes$, is the cross product between the set of matrices $X$ and $Y$. The cross product rules still apply where $\text{Hom}(Y,X)=\emptyset$.  Now lets define the functor $F:\textbf{Vect}_k\to\textbf{Mat}_k$. We have a morphism $f:V\to U$ and the image of $f$ in $\textbf{Mat}_k$, $Ff$, will connect the image of $V$ to the image of $U$. Now I am pretty sure I might be thinking about this wrongly and I hope you could help me with this but I think that $Ff:FV\to FU$ is a morphism from the set of all $m\times1$ matrices to the set if all $1\times n$ matrices. Thus makes $\text{Hom}_{Ff}(FV\to FU)=FV\otimes FU$ which means the cross product between matrices $FV=k^{m\times1}$ and $FU=k^{1\times n}$.   I know this connection however I do not know how to form a formal equivalence proof for $\textbf{Vect}_k\cong\textbf{Mat}_k$. If I could get some help I would greatly appreciate it.  Sources:


How can I install ebaysdk-python library?

I'm running Ubuntu 18.04.1 on a server and trying to install ) but am having trouble as I'm quite new to Ubuntu and the instruction raise errors.  The installation instructions from the project give the commands:  sudo easy_install ebaysdk   or   sudo easy_install https://github.com/timotheus/ebaysdk-python/archive/master.zip   Both of which give the error:  sudo: easy_install: command not found   I haven't been able to pip install it either because it isn't available in Ubuntu packages.  Is there another simple way to install this python package?  Many thanks  Edit: I've not been able to get easy_install to work by following answers in other posts. Is there another way to install from a url?


Line feature reshape tool reshapes unselected lines

I have QGIS 2.18.18 installed in my PC. I need to reshape large number of roads/tracks to match with Imagery. QGIS Reshape tool reshapes roads that are not even selected. Any suggestion?   Below are the screenshots for your reference    After making selection I modified the road using reshape tool    As a result, tool reshaped unselected adjacent road


just like the title says, I'm trying to figure out the duty cycle of a GPS's Pulse Per Second Signal. This post and accompanying answers seem to indicate something like a 10% duty cycle:   Whereas the waveform shown at 2:43 in this youtube video show something like a ~25% duty cycle:  Is it variable? Is there a standard? I also crawled wikipedia and some of the documentation links to military standards there, but it was a little dense for me and I didn't see anything really jump out... thank you for your kind and generous help!


If black holes are mass of the star concentrated on a single point then how can it be moving through a 3-dimensional space? How can they spin?


If $X$ and $Y$ are coprime to $Z$, then so is their product $XY$

Given is $X$ is coprime to $Z$ and $Y$ is coprime to $Z$ prove $XY$ is coprime to $Z$.  I know you can use Bezout's lemma to say $1=aX+bZ$ and $1=cY+dZ$ but I don't know how to actually do the proof.  Any ideas?


I pay triple the price originating a flight from US, (L.A.- Amsterdam) versus the opposite (Am-L.A)

I heard that the reason why we pay almost triple the price from a flight originating in the US is because the US charges over $700 in taxes on an international flight. How to avoid this?


Prove that $\sin \theta=\frac{3 \sin \alpha+\sin^3 \alpha}{1+3\sin^2 \alpha}$ using given condition

If $$\tan(\frac{\pi}{4}+\frac{\theta}{2})=\tan^3(\frac{\pi}{4}+\frac{\alpha}{2})$$, then prove that $$\sin \theta=\frac{3 \sin \alpha+\sin^3 \alpha}{1+3\sin^2 \alpha}$$  I tried using the fact that  $\frac{\cos A}{1-\sin A}=\tan(\frac{\pi}{4}+\frac{A}{2})$ but now not able to eliminate $\cos \alpha$ and $\cos \theta$. How should I proceed?


Azure Service Fabric: Connecting through HTTP is 10-30 times faster than through HTTPS. TLS handshake takes too long

I have a .NET Core microservice (API) that is a apart of an Azure Service Fabric application. The Service Fabric consists of 3 nodes. I have made the service run both on HTTP and HTTPS with a valid certificate. The problem is in the performance difference between the HTTP and HTTPS connections.  I am using a Let's Encrypt certificate. (I have also tried other free trial SSL certificates just to see if it makes a difference.) I am exposing the endpoints with Kestrel, defining them in the Service Fabric ServiceManifest and ApplicationManifest, and opening the ports via Azure Load Balancer. This is how I setup the endpoints using Kestrel:  .UseKestrel(options => {     options.Listen(IPAddress.IPv6Any, 80);     options.Listen(IPAddress.IPv6Any, 443, listenOptions =>     {         listenOptions.UseHttps("ssl.pfx", "password");         listenOptions.NoDelay = true;      }); })   When I hit the endpoint of my API from HTTP, the response time is consistently 0.06-0.2sec. However, when I hit it from HTTPS, it is not consistent and a lot slower (generally 10-30 times); the response time bounces from 0.5 (rarely) - 3-4 seconds. This inconsistency is unacceptable. My suspicion is that the TLS handshake is taking very long. Unfortunately, I have no idea why.  EDIT: The  explains the general behavior for HTTPS and I knew that before. However, my case is specific to the described environment, so the given answer doesn't fully satisfy my question. I have a running .NET web app using HTTPS on Azure that hasn't got this huge performance difference.


Some Stack Exchange sites allow to ask an anonymous question by specifying a one-time user name and an email which is "required, but never shown". However the Gravatar attached to the email is shown anyway. Anonymous users do not want their picture to appear - someone can find their identity via google image search or someone that knows them.  Example: open incognito window and :


Reputation gained tooltip for top tag is squished

On the new , there is a top tag section of the reputation box, which shows the reputation earned next to the name of the tag.  However the hover tooltip is unnecessarily squished horizontally making it hard to read. This seems to be regardless of the length of the tag.           Could the width of this tooltip be extended, like the other tooltip for the total reputation earned?