I have two shapefiles, one is polyline, one is points. I use points to split the polyline. How to record the FID of splited points(two end points each line) in the field of polyline.  First I use split tool  then I execute the following code to update the attribute table of polyline  import arcpy from arcpy import env env.overwriteOutput = True sj = r"in_memory\sj"  inPoints=r"Y:\Desktop\road\city\city_merge1.shp" inPL = r"Y:\Desktop\road\highway.shp" arcpy.MakeFeatureLayer_management(inPoints, "city_points") arcpy.MakeFeatureLayer_management(inPL, "road")  for i in range(0,500):     expr = " [FID] =" + str(i)      arcpy.SelectLayerByAttribute_management(inPL, "NEW_SELECTION", expr)     arcpy.SpatialJoin_analysis(inPL, inPoints,sj,"JOIN_ONE_TO_ONE","KEEP_COMMON")      ## update the attribute table of road, recording the FID of the city in the attribute table of the road


Regular Expressions in java trying to match a string in specific format (format consists of | sysbol)

Regular Expressions in java   String s1="Anil-anilorg|anotherorg"; String s2="Anil-anilorg|";   I want to find weather s2 is present or sub-string of s1 by using regular expressions, but while I am doing that it is considering this symbol  "|" as logical OR I am using hbaseStringRegexComparator to compare


All my database on the fail over server showing in "Synchronizing" state

Current Configuration: I have two SQL Servers, which are connected by the failover mechanism, meaning one is primary and one is secondary. I restarted both services on both servers sequentially. On the secondary server, all the databases are in the "Synchronizing" state. AG replication mode is synchronous. It has been 12hr it's still showing "Synchronizing" state. What I did so far to resolve Drop the database from the secondary server and remove the database from AG group on the primary server and add it back. Any insight on this, I am using SQL Server 2017.


Selenium: Unable to automate file upload

Can someone please help me in automating file upload on this page-    I tried everything, but the file upload is very dynamic.


I wanted to set environment variables JAVA_HOME and PATH. So I wanted to open ~/.pam_environment since it is the best place to set environment variables relevant to a particular user according to the link . The link states:  Session-wide environment variables Environment variable settings that should affect just a particular user (rather then the >system as a whole) should be set into: ~/.pam_environment - This file is specifically meant for setting a user's  environment. It is not a script file, but rather consists of assignment expressions, one per line.  The problem I have is that I am not able to open the file ~/.pam_environment by using the command gedit ~/.pam_environment. I do not know whether this is the right way to open this file, please point me in the right direction.


Prove $\binom{n}{m}\binom{m}{k} = \binom{n}{k}\binom{n-k}{m-k}$

I need to prove the following:  If $n,m,k\in \mathbb{N}$ and $k\leq m \leq n$, then  $$\binom{n}{m}\binom{m}{k} = \binom{n}{k}\binom{n-k}{m-k}$$.  I did the following steps:   \begin{align} \require{cancel} \binom{n}{m}\binom{m}{k} &= \binom{n}{k}\binom{n-k}{m-k} \\ \frac{n!}{m!(n-m)!}\cdot \frac{m!}{k!(m-k)!} &= \frac{n!}{k!(n-k)!}\cdot \frac{(n-k)!}{(m-k)!(n-k-m+k)!}\\ \frac{n!}{\cancel{m!}(n-m)!}\cdot \frac{\cancel{m!}}{k!(m-k)!} &= \frac{n!}{k!\cancel{(n-k)}!}\cdot \frac{\cancel{(n-k)}!}{(m-k)!(n-k-m+k)!} \\ \frac{n!}{k!(n-m)!(m-k)!} &= \frac{n!}{k!(n-m)!(m-k)!} \end{align}  The question is: is my proof correct? Are all my steps valid?  Thanks


Proving the AM-GM inequality for 2 numbers $\sqrt{xy}\le\frac{x+y}2$

I am having trouble with this problem from my latest homework.  Prove the arithmetic-geometric mean inequality. That is, for two positive real numbers $x,y$, we have $$ \sqrt{xy}≤ \frac{x+y}{2} .$$ Furthermore, equality occurs if and only if $x = y$.  Any and all help would be appreciated.


How would you represent "religion" in an icon, neutrally?

I am involved in a web application where items in a list have a category. Each category of an item is shown through the use of an expressive icon. One of the categories is religion.  My coworker, a graphic designer, is at a loss on how he would represent religion in a logo "neutrally". Some of the items may be associated with Christianity, Islam, Buddhism, etc. so a religion-specific icon would not work and may be potentially offensive.  So, is there a way we can represent it in a different way?


Get new c# guid into javascript function using razor in asp.net mvc

I have js function: function getGuid(){     var guid = '@Guid.NewGuid()';     return guid; }  But every time I execute this function I get 1 constant value. Is there a way to rerender guid or it's better to write generating guid into plain javascript?


I just upgraded to ubuntu 20.04 and I can't hide my desktop icons, I've tried dconf-editor and tweaks but none of them worked.     In deconf-editor I've disabled the show-desktop-icons option in org/gnome/desktop/background but it has no effect on the desktop.


Divergence of the series of the inverses of the prime numbers

Can you help me prove that the $\sum \limits _{p \text{ prime}} \dfrac 1 p$ is divergent?


I logged into google hangouts at my mothers house, on her tablet, through her wifi. How can google give a address to a house eight miles away?


I setup a image box of Vista Business to ghost a couple of weeks ago. I turned it on today and I seem to have forgotten the password. I've tried using OPH-Crack to crack it but with no luck. Does anybody have software that they use to crack user account passwords or know of a work-around for Vista?


Let V be a complex vector space. If $\langle T(v),v\rangle\in \mathbb R$ for every $v \in V$, then is T self adjoint?   I know how to prove reverse claim. Not sure about this one.   Thanks!


Calculate analytically the time until two spheres meet due to gravitation

Imagine you have two homogeneous spheres with the same diameter of $d=0.1 m$. They have the same mass $m = 1 kg$. The distance between the centers of mass is $r= 1 m$. Their electrical charge shall be disregarded. At $t=0$ the spheres do not have any relative motion to each other. Due to gravitation they will accelerate and start moving towards each other. After some time they will touch each other.   How to calculate analytically the time it takes the two spheres to meet each other. I'm not interested in a numerical solution.   I have already tried several ways but I don't get to a solution.    Imagine that the 2 spheres have different masses and diameters.  $m_{1}=2 kg$, $m_{2}=5 kg$,  $d_{1}=0.03 m$, and $d_{2}=0.3m$.  How to calculate analytically when and where the 2 spheres are going to meet?    How do you calculate the second problem taking the theory of relativity into account? I know that it will not change the result that much but I am interested in the mathematical solution.


How to statically compile an SDL game on Windows

I have been trying to produce a statically linked "single binary" version of my game for windows. I want to link with sdl, sdl_image and sdl_mixer which in turn pull in a few support libraries. Unfortunately I haven't found a way to get them all to compile and link using cygwin/mingw/gcc. As far as I can tell all existing public versions are only shared libraries / dlls.  Please note that I'm not talking about licencing here. The source will be open thus the GPL/LGPLness of sdl is not relevant.


In the summer of 2003 my parents decided to take my brothers and I to the US. I was 9 years old at the time. We entered the country legally with our visas, but exceeded our 6 month permit. I ended up staying in the US until May of 2014 (20 years old at the time). I left the country because I wanted to continue studying and it would be rather expensive to do so under such circumstances. I am now studying architecture here in Mexico, currently my second year. My family still lives in the US I was the only one who returned to Mexico. I want to reapply for a visa as I do have friends and family I would like to see. I never got into any sort of legal trouble with authorities the time I was there. And I really have no intentions of overstaying as I am devoted to my career. Now a lot of questions come to mind. Such as if there would be any sort of ban for my overstay (I really had no choice I was only a kid). Would that ban only come into effect for the time I overstayed after turning 18, so I would have overstayed 2 years in the US? Would the fact that my family still lives in the US affect my approval?


How do you print the current month, day and year using awk and date?

I can't seem to grab the month, day and year using   awk '{print $2, $3, $6}' date    Does anyone know how to?


Fujitsu Esprimo Q510 (mini PC) as a Ubuntu headless server

Can you install Ubuntu server on this hardware? Any problems?  Fujitsu Esprimo Q510 (mini PC) Intel G2020T 2.5GHz  Further question: is the fan loud?  I want to use it as a ubuntu server for mini-projects at home.  Cheers!


How do you find a Plantera’s bulb on Terraria mobile?

I have defeated most of the bosses on IOS or Mobile Terraria, but still haven’t found the bulb. I would really want to know how to find it on mobile.


I'm trying to drive a 12v (14W) solenoid and have problems figuring out the components for the driving circuit.  The solenoid draws about 1.166A and the MCU is being operated at 3.3V.  I've seen many driving circuits and they all look something like this:         – Schematic created using   My questions:   What datasheet parameters should I look for when designing this circuit? Is the IRF530PBF-ND a suitable MOSFET for driving this solenoid?    Also, how do I calculate R1's value?  I don't want to blindingly copy a circuit that may or may not work, I want to understand it.  Thank you so much in advance!


I have had a search but can't find exactly what I want to achieve, in CSS anyway I'm not sure if there could be a jQuery script that could help.  I want to create a div on my website which fills the entire height of the page (no further than the area below the scroll just the first area of the screen filled vertically). I want this to adjust to the height of device so on a desktop and iPhone for example the whole screen vertical height is filled.   I'm not sure if I can post websites but this is the look I'm after


Which timeline illustrates “I have finished my homework” most accurately?

I have learned Present-perfect in school. But I felt that foreigner used in different way of Present-perfect. What is the right tense of this sentence?    Please choose the right picture that shows the exact meaning of the sentence i.e. I have finished my homework. Is it No.1  or No.2?  I heard that the Present-perfect tells the nearest past. The blue part of the picture shows the tense of the sentence. I think No.2 is the right picture that shows the right meaning of the sentence (I have finished my homework.) The sentence below include the nearest past of Present perfect tense. Am I right?


How do I get Steam Indie Games to run under Linux or even a Mac?

I am interested in getting Children of Morta or similar games to run on Mac or Linux. They are pretty decent machines with dedicated AMD GFX cards.  How to emulate Windows for gaming or get such games to run which are natively NOT supported off Steam. Anybody had any success which such Steam Indie game titles?


Does anyone know how prove the following?   Suppose that $f,g$ are holomorphic functions on a non-empty open connected set $\Omega \subset \mathbb{C}$ and that $|f|^2+ |g|^2$ is constant on $\Omega$. Show that $f$ and $g$ are constant on $\Omega$.


C# StackTrace not aligned with source code

I've been using the C# StackTrace feature in relation to some SW testing.  I've seen that the StackTrace is not always 100% aligned with the source code. For example, line numbers might be a bit off. My best guess is this has to do with some compiler optimizations.  Does anyone have experience with this or a reference to some documentation mentioning this?  Also, does anyone know whether I might get into the same problems using [CallerFilePath] feature?  Thanks in advance.


I'm sorry i'm newbie at Ubuntu, i'm using Ubuntu 14.04 LTS with my laptop Asus N43SL  I want to share my wireless internet from my laptop as Access Point, why? because i using android smartphone, so i can't create ad-hoc wireless  i know there's so many thread here about creating Access Point but sorry i really not get it..  I'm following this site to create it    but when i start the hotspot, terminal always show  Starting Wireless Hotspot...   please is there a script to do this or an application to do it easier? give me the link if there is


Is it "time off of work" or "time off work" without 'of'?  Ex: I need to take some time off (of) work next month.


Why is this sentence grammatically incorrect?

I was reading one of Olivia Rodrigo's :  I say, ‘I've never felt this way for no one' which is completely grammatically incorrect.  Why is that incorrect? It is a part of her song, Driver's license, lyrics.


View only the new entries in a growing log file

tail -f x.log   I use this command to see a growing log file in the command prompt.  I am interested only in seeing the log lines that are written to the file after running tail -f and not interested in the logs that were written to the file before doing tail -f. But tail -f command on start, takes the last 10 lines and displays it.  This confuses me, at times if these logs are freshly generated (or) they are old logs?  So, how can i customize tail -f to output only the new entries?


Stack Exchange needs a better way to inform their moderators about feature and policy changes

With the ever-growing network of Stack Exchange sites as well as the increased traffic and therefore larger number of moderators, the way policy updates and feature changes are currently announced makes it almost impossible for moderators to catch up. Currently, if you as a moderator want to be up to date on what's happening, you have to:  Hang around on Teacher's Lounge all day and be sure to check the starred or pinned messages Visit Meta Stack Overflow and look at the recent feature changes as well as the top questions for the last week or months Wait a few weeks until you receive a newsletter, which only covers the major issues  What you could be missing… This is a process that needs moderators to actively check for any new info. For example, two things I completely missed as a moderator unless some others had informed me:   – I've always been strict about quality flags but it took me a while to see this topic. I just had a talk with @ChrisF yesterday who apparently hadn't seen the topic until now. No offense, but if you want moderators to act consistently, you have to get this information out more reliably. There are new ways for moderators to check review statistics. Those are buried somewhere in a list of links. Unless you check out that page (which I don't do that often), you just won't find these links. The rationale can't be that "you'll find this out when you see it, and then play around with it" – why make these tools in the first place if they shouldn't be used right away?  Now, I can imagine that – even on the larger sites – there are moderators who simply cannot afford to spend the entire day in chat, or even on Meta. Moderating is something most of us to "just for fun", and often while working. … and why that's bad? But yet, we moderators are the first port of call for support on our sites. You wouldn't want the site mods to respond "Umm, no idea, they must've changed that recently." And you want them to act consistently (e.g., with regard to the low quality flags). I dare say that if an otherwise very active moderator isn't there for two weeks, they'd miss out on important (policy/feature) changes. A new information feed What I propose is that Stack Exchange actively pushes out small bits of information to all moderators of all sites. Unlike the newsletter, which is only sent every few months, these messages could be kept really short and to the point. In the mod page, you could make a counter for updates:  And there, list all the new stuff, for moderators to read:  You could then just write a small message:  Be more strict on very low quality flags If a very low quality flag doesn't exactly apply, consider declining it with an appropriate message. This is to ensure that validated flags are accurate. See more:   And done. Now you get the information out to every moderator, in a feed that now pushes out the important bits instead of waiting for moderators to find them. This would ensure that moderators who can't check in every day still get news of the critical feature and policy changes, which results in a more consistent moderation experience for the users, and in the end it might also save the team from repeated questions about new features or policies.


Is the following statement true?  Suppose, $ f:D\to \mathbb C $ is an analytic function where $ D $ is the unit disc of radius $ 1 $ around $0 $. Suppose, $ f $ is analytic on the boundary of $ D $ as well. Then prove that, if $ f $ is one-one on the boundary of $ D $, then $ f $ is one-one on $ D $.  P.S. I think I got a solution. But I was wondering if this problem has a trivial solution.  Here is my solution, since nobody has posted a solution yet:-  Suppose, $ \gamma $ is the boundary of $ D $(assuming $ \gamma(t)=e^{2\pi it} $). Then $ f\circ \gamma $ is a simple continuously differentiable curve. So by Jordan curve theorem, $ f\circ \gamma $ divides $ \mathbb C $ into 2 path connected regions $ A_1, A_2 $ such that if $ a\in A_1 $, then $\int_{f\circ \gamma} \frac {1}{z-a} dz=2\pi i$ and if $ a\in A_2 $, then $\int_{f\circ \gamma} \frac {1}{z-a} dz=0$. So, $ f(z)=a $ for some $ a\in A_1,z\in D $ implies $ \int_{\gamma} \frac {f'(z)}{f(z)-a} dz=2\pi i $. So $ f(z)=a $ has only one solution in $ D $. Similarly if $ a\in A_2 $, then $\int_{\gamma} \frac {f'(z)}{f(z)-a}=0 $, so $ f(z)=a $ has no solution in $ D $. If $ f(z)=a $ for some $ z\in D, a\in f\circ \gamma $, then by open mapping theorem, $ f(z)=a' $ for some $ z\in D, a'\in A_2 $, which is not possible. So $ f $ is one-one in $ D $.


Why does this XPath select the links rather than href values?

I'm following the accepted answer from this question:   The answer claims the XPath query being used gets the href values from the links but this doesn't seem to be the case with my code. To clarify, this is the accepted answer:  //div[@class="widget-content"]//a/@href   My XPath is as follows:  //tr/td//a/@href   This only seems to select the links, rather than the href values.    So in this case, I then have to use a foreach loop to select the href values.  foreach(var link in links) {     var hrefValue= link.Attributes["href"].Value; }   First question, why does this happen? Second question, is there a way to directly get the href values?  For further context. I'm trying to select all href values from inside a HTML table.  EDIT: Example of HTML I'm trying to parse:


How to interpret the output of a 3-pin computer fan speed sensor?

I have a 3-pin 12 V computer fan and I want to interpret its speed sensor output. At the yellow wire I get something that looks like pulse-with modulation. How would I interpret the output without actually connecting the fan to a computer?


My linear voltage regulator is overheating very fast

I'm using a 5 V / 2 A voltage regulator () without a heatsink. I'm testing the circuit with a microcontroller (PIC18FXXXX), a few LEDs and a 1 mA piezzo buzzer. The input voltage is aprox. 24 VDC. After running for a minute, the voltage regulator starts to overheat, meaning it burns my finger if I keep it there for more than a second. Within a few minutes it starts to smell like it's burnt. Is this a normal behavior for this regulator? What could cause it to heat that much?    Other components used in this circuit:  L1:   R2:   F1:


Many typfaces come with different fonts for different font sizes. For example  has a Book style for main text and a Display style for headings (or in general, large text). Another example is the open source project  which if scaled down to smaller text needs kerning pair adjustments (which result in a different font).  In these cases one could redefine the \Huge or \footnotesize environment and use the fontspec package to associate different fonts with those commands. This however is a rather hacky way and could lead to more problems. So hence my question.  Is there a simple way to manually change font with font size in XeTeX?  EDIT: I should point out that fontspec recognises optical scaling and would therefore automatically pick a different font for a different size if available. There are a lot of SizeFeatures too (as described in the fontspec manual) such as changing colour, kerning values et cetera. Is it possible though to change font? For example:  \setmainfont{Typeface}[SizeFeatures = {{Size =   -8, <Font_A>},                                        {Size = 8-12, <Font_B>},                                        {Size = 12- , <Font_C>}}]   For the argument's sake Font_A should be Garamond and Font_B should be Times New Roman and Font_C can be Surveyor Pro Display.


Selecting a database in mysql with spaces in its name

I want to select my particular database in mysql console, but the problem is that my database name has a space in between and mysql ignores the part after the space. For instance, when i give the command:  use 'student registration'   I get the message:  cannot find database 'student'


Which of the followings have a fixed point?

Consider the following sets :  $$S=\left\{(x,y)\in \mathbb R^2:x^2+y^2=1\right\}.$$  $$D=\left\{(x,y)\in \mathbb R^2:x^2+y^2\le 1\right\}.$$  $$E=\left\{(x,y)\in \mathbb R^2:2x^2+3y^2\le 1\right\}.$$  Which of the following are correct ?  (a) If $f:D\to S$ is continuous then $f$ has a fixed point.  (b) $f:S\to S$ is continuous then $f$ has a fixed point.  (c) If $f:E\to E$ is continuous then $f$ has a fixed point.  We know from Brouwer's fixed point theorem , " A continuous mapping of a closed & convex set into itself necessarily has a fixed point. "  From this theorem we have , option (c) is correct & option (b) is wrong.  But what about options (a) ?  Are there any theorem for a continuous function from one set to another set have to a fixed point?


How can I make command aliases in Windows' Command Prompt like I would with bash?  I found out about doskey in , so I can do something like:  doskey ls=dir /b   ...and now the command ls acts a little more like ls on Unix.  (I type ls so often in cmd, it isn't even funny.)  But how do I get this to stick between sessions?  It goes away the next time I open cmd.exe.  (Is there something like .bash_profile?)


Exception in thread "main" java.lang.NullPointerException, JFrame

I'm trying to build a game and I have an error that comes up.  I'm relatively new to coding so any help is appreciated.  I try to run the following in Java to set up a frame using the JFrame library, but end up getting an error.  Thoughts on a solution?  package com.key.gameproject;  import javax.swing.JFrame;  public class MainClass {  public static void main(String args[]) {     System.out.println("Test");     JFrame frame = new JFrame();     frame.setSize(640, 480);     frame.setResizable(false);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.setVisible(true); }   }  Error:  Test Exception in thread "main" java.lang.NullPointerException     at java.awt.Window.init(Window.java:497)     at java.awt.Window.<init>(Window.java:537)     at java.awt.Frame.<init>(Frame.java:420)     at java.awt.Frame.<init>(Frame.java:385)     at javax.swing.JFrame.<init>(JFrame.java:189)     at com.key.gameproject.MainClass.main(MainClass.java:9)   Update: I reinstalled Eclipse, Java and still running into the same issue.  Tried in a different IDE and also ran through terminal (javac, java) and still nothing works  Update 3/11 - I'm trying to run this on Mac high sierra which results in the above error.  However, on Windows it seems okay. javax.swing.JFrame (JFrame.java:189) looks exactly the same on both machines.  Again, I have already reinstalled multiple times and appreciate the help so far (@camickr).  The issue is still not resolved and I can't find a similar issue on Stack.


Old question title for (cross-site) links

I have  on ruSO.meta. That answer contains a link to the MSE question . When I added the link to MSE question the question's title had a typo, in particular "rephasing" (no "r" letter). After that I fixed the typo on MSE, but the question's title from link on ruSO.meta remains old:    Maybe I just have to blame caching but still... looks like a bug. Almost 2 days have passed.


How to remove a USB drive without worrying if its been unmounted?

Sometimes I unplug my USB drive only to find out files were not written to it.  I suppose the only way to ensure files are written to it is to right click on the USB drive on the desktop and then select "un-mount", but sometimes I forget.  What is the best way to ensure files are written to the USB drive instantly? This way I can remove the USB drive as soon as I notice the LED light on the USB drive stopped blinking.  OS: CentOS 6


Can a random forest be used for feature selection in multiple linear regression?

Since RF can handle non-linearity but can't provide coefficients, would it be wise to use random forest to gather the most important features and then plug those features into a multiple linear regression model in order to obtain their coefficients?


Why don't Lightroom or PSE recognize CR2 files from my Canon 7D mk II even though they are up to date?

I ordered a Canon 7D mark II (to replace a stolen 7D),and shot a friend's  wedding in RAW. But now, I can only view the pictures in very poor quality on my computer's photo viewer. I am not able to import the pictures into Lightroom 3 or my PSE 13. The software says no updates are available. What is wrong and what can I do?


Expected value and indicator random variable

During a period of $n$ days, two persons drink beers, one each. There are $n$ different beers $B_1, B_2, B_3,\ldots, B_n$, where $n\geqslant 1$ is an integer. t Person1 drinks the beers in order, i.e., on the $i$-th day, she drinks beer $B_i$. Person2 takes a uniformly random permutation $a_1, a_2, \ldots, a_n$ of the set $\{1, 2,\ldots, n\}$ and drinks beer $B_{a_i}$ on the $i$-th day. Let $X$ be the random variable whose value is the number of days during which person 1 and person 2 drink the same beer. Determine the expected value $\mathbb E(X)$ of $X$.  I know that I should let $X$ be the number of days during which both persons drink the same beer. And  $$ X_i = \left\{\begin{array}{rc} 1,&\text{if they drink the same beer on the }i\text{-th day} \\ 0,&\text{if they drink different beers on the }i\text{-th day}\end{array}\right. $$  Then  $$\begin{align} \mathbb E[X_i] &= 1\cdot P(X=1) = P(\text{Person 1 and Person 2 drink beer }i) \\&= P(\text{Person1 drinks beer }i)P(\text{Person 2 drinks beer }i) \\ &= 1\cdot P(\text{Person 2 drinks beer }i) = \frac{1}{(n-i)!} \end{align}$$   So, is my approach right? If it's will the next step be: $\mathbb E(X) = n\cdot\frac{1}{(n-i)!}$?


I am currently using  for my master thesis in computer science. One thing it complains about is the usage of e.g.. What is wrong with that?  For example, I wrote:  1. In the case of many classes (e.g. 1000~classes of ImageNet) ... 2. This threshold can either be set automatically (e.g. such that 10% of all pairs are above the threshold) or semi-automatically ... 3. \item Color space (e.g. RGB, HSV)


How to set up a fallback error page in nginx?

I'm configuring nginx's handling of some error pages and other "default" media files (such as favicon.ico and robots.txt) at the moment and I ran into a minor problem getting things to work the way I want for certain error pages.  Basically, what I'm trying to do is serve certain files for a server under the root for that server, e.g. /var/www/someserver.com/robots.txt. If that file does not exist, I want nginx to go to the "default", i.e. /var/www/default/robots.txt. This is the basic gist of how I have that (successfully) configured:  server {     ...     root /var/www/someserver.com;      location ~* ^/(robots\.txt)$ {         error_page 404 = @default;     }      location @default {         root /var/www/default;     } }   That works great.  I'm trying to do the same for error pages, and I'm not able to make that happen though:  server {     ...     root /var/www/someserver.com;      error_page 404   /404.html;      location ~* ^/(404\.html)$ {         error_page 404 = @default;     }      location @default {         root /var/www/default;     } }   Note that this "works" in the sense that if you visit someserver.com/404.html, it will first try to load /var/www/someserver.com/404.html and then fall back to /var/www/default/404.html if that's not found. However, if you visit someserver.com/blahblah, it only shows the 404 page if it's set in /var/www/someserver.com/. It does not fall back to the default directory if that file doesn't exist.  Anyhow, you can probably what I was trying to accomplish (that's why I included the first working example).  Any ideas?  Edit:  Based on Martin F's answer, this is what I ended up putting together:  # Doesn't work when error page is returned on a POST request server {     ...     root /var/www/someserver.com;      error_page  404         = @notfound;     error_page  500 502 504 = @server_error;     error_page  503         = @maintenance;      location @notfound {         try_files /404.html /../default/404.html =404;     }      location @server_error {         try_files /500.html /../default/500.html =500;     }      location @maintenance {         try_files /503.html /../default/503.html =503;     } }   This works awesome. The actual block of error_pages and locations above is in a server_defaults.conf file that gets included with every virtual host, which is why I didn't hard code the path into each location and used a relative path for the defaults.  Edit 2:  This approach has a problem. If you POST to a URL that returns an error, the POST request method gets sent with the try_files attempts. This (for me) results in a 405 Not Allowed error, because nginx is essentially trying to POST to e.g. /default/500.html instead of just getting that page.  Edit 3:  I posted a solution that works that's a lot closer to my original idea.


Is an "on" criteria quicker than a "where"?

Let us suppose we have a join between t1 and t2, like this:  select c1, ..., cn from t1 join t2 on t1.fk = t2.k join t3 on t2.fk = t3.k where (some condition independent from t3)   where (some condition independent from t3) might be anything. Now, consider this query:  select c1, ..., cn from t1 join t2 on t1.fk = t2.k and (some condition independent from t3) join t3 on t2.fk = t3.k   let us suppose that t1 x t2 x t3 along with the join conditions results in count1 rows, while if we filter by the where condition as well, then we will have count2 records, where count2 <= count1.  I wonder whether the where condition is executed for all the count1 rows, or just on the subset of count2 rows? Is it better in terms of performance to include conditions into the on conditions as soon as possible versus appending them at the end of the query?


I have a trigger on Contact which gets fetches 2 custom field from account (customfieldaccount) and contact(customfieldcontact). I am having null value for the custom field on the Account object. Here is the code; trigger DeleteTrigger on Contact (before delete) {      for(Contact ctact : Trigger.Old){         if (customfieldcontact == 'something' && ctact.Account.customfieldaccount == 'something' ){             Trigger.oldMap.get(ctact.Id).addError('Error message');         } else if (customfieldcontact == 'something' && ctact.Account.customfieldaccount == 'something'){             Trigger.oldMap.get(ctact.Id).addError('Error message');         }     } }


How did Hagrid and Dumbledore know the Potters had been killed?

In Harry Potter and the Sorcerer's Stone it says:     "No problems, were there?" [Dumbledore asked]   "No, sir - house was almost destroyed, but I got him out all right before the Muggles started swarmin' around. He fell asleep as we was flyin' over Bristol." [Hagrid said]   Dumbledore and Professor McGonagall bent forward over the bundle of blankets. Inside, just visible, was a baby boy, fast asleep. Under a tuft of jet-black hair over his forehead they could see a curiously shaped cut, like a bolt of lightning.   Sorcerer's Stone - page 11 - US Hardcover   How did Dumbledore - who I'm guessing dispatched Hagrid to go and survey the scene at the Potters' home in Godric's Hollow - know the Potters had been killed? Neither Dumbledore nor Hagrid were the Potters' Secret Keeper for the Fidelius Charm. How was Dumbledore alerted instantaneously that James and Lily had been killed, in order to be able to send Hagrid to the scene quickly enough that he was able to rescue baby Harry before the Muggles were alerted to the situation (which, to be honest, seems a bit unlikely if there was some kind of explosion, which it seems there was seeing as the house was "almost destroyed"). Heck, if the house next door to mine suddenly blew up, it would take me less than 10 seconds to get out onto my porch for a look-see!  How can these events logistically make sense?  ETA: Information on the Fidelius Charm.     When a Secret-Keeper dies, their secret dies with them, or, to put it another way, the status of their secret will remain as it was at the moment of their death. Everybody in whom they confided will continue to know the hidden information, but nobody else.   Just in case you have forgotten exactly how the Fidelius Charm works, it is       "an immensely complex spell involving the magical concealment of a secret inside a single, living soul. The information is hidden inside the chosen person, or Secret-Keeper, and is henceforth impossible to find - unless, of course, the Secret-Keeper chooses to divulge it" (Harry Potter and the Prisoner of Azkaban)   In other words, a secret (eg, the location of a family in hiding, like the Potters) is enchanted so that it is protected by a single Keeper (in our example, Peter Pettigrew, a.k.a. Wormtail). Thenceforth nobody else – not even the subjects of the secret themselves – can divulge the secret. Even if one of the Potters had been captured, force fed Veritaserum or placed under the Imperius Curse, they would not have been able to give away the whereabouts of the other two. The only people who ever knew their precise location were those whom Wormtail had told directly, but none of them would have been able to pass on the information.      I note that there is no canon evidence that Peter Pettigrew told anyone of the Potters' whereabouts except for Voldemort, and Voldemort, following the confrontation, wasn't exactly in the position to be playing Tellyfone with Dumbledore!


I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle?  Obviously xorg configs would change and proprietary ATI drivers and such would have to be recompiled (maybe?). Is there more to it than I'm thinking of?  Assume the 2 computers are from the same era, ie both i7s but slightly different hardware.  Update: Thanks for the answers. This is mostly for my own curiosity. I have my linux system up and running at work, but eventually I'd like to move to a computer that I can get dual video cards into so I can run more than 2 monitors. But not any time soon


Is it:     a spectacular movie   or it is said:     an spectacular movie   I'm writing a book in English but I'm Latino so I might need some help with this, I'd appreciate it a lot


Opened my project today and the panels were in different places. Very uncomfortable to use. How do I move them back to the default location?


I recently made a turtle breeding farm in Minecraft survival mode and when ever I bred the pair of turtles all I got was experience points and that’s it, they did not lay eggs and yes the farm was next to the ocean and there was sand for the turtles to lay their eggs.


Are JDBC's Connection and Statement objects pass-by-reference or pass-by-value?

I'm learning to use MySQL at the moment and my instinct for instantiating and initializing my Connection and Statement objects was as following:  public class ProjectDriver {     public static void main(String[] args)     {         Connection conn = null;         Statement stmt = null;         Initializer.sqlInitialize(conn,stmt);     ...     } ... }   sqlInitialize:  public static void sqlInitialize(Connection conn, Statement stmt) {     try {         conn = DriverManager.getConnection(DB_URL, USER, PASS);         stmt = conn.createStatement();     }      catch (SQLException se) {         se.printStackTrace();     }      catch (Exception e) {         e.printStackTrace();     } ... }   as well as an sqlClose method to close the Connection and Statement later on.  My instinct says that the Connection and Statement objects in the ProjectDriver should be properly initialized to their respective forms after the sqlInitialize method has been run, but that most certainly isn't the case. Eclipse has a null-pointer access warning in the IDE, and a NullPointerException error is thrown upon trying to run stmt.ExecuteUpdate(sql);.  I'm pretty sure this is a stupid question, but I can't figure out how to Google (or inquire of StackOverflow) why this is happening. I know that the code I provided isn't really the proper way to do what I'm doing, but I'm curious as to why this is happening. My understanding of pass-by-reference vs. pass-by-value in Java is that all primitives are pass-by-value, and that all Objects are pass-by-reference. Shouldn't modifications made to the Connection and Statement objects in another class remain, even after returning to the main?


I am building a logistic regression model and one of my independent variable sis heavily skewed. Is it better to use the ln or the log10? Why?  And how to correct the skewness of a variable that contains a lot of zero values?


what is causing gravitational pull in between massive bodies?     according to books, what i learnt is graviton particle & some books are saying quantum field is the cause, so which is causing gravitational pull?


I am planning to do a fresh install of ubuntu 11.10 in my system. Before that i have setuped key based ssh authentication in this machine. Is it possible to take backup of those ssh keys, so that i  can use that in my new installation. Or else i must setup keybased ssh authentication again? If i can take backup, what are the files i need to copy? Can someone explain it in detail pls. Thanks in advance.


Lorentz invariance of Dirac equation if $\gamma^\mu$-matrices were numbers

I was reading Zee's QFT book. At the very beginning of the chapter 2 on Dirac equation, he mentions, that Dirac desired for a relativistic wave equation that is linear in spacetime gradient. He goes on to say that for that to happen, a term of the form $c^\mu \partial_\mu$ was required. I understand this. But then  he says, had the coefficients $c^\mu$ been numbers, this would form a vector and the term, $c^\mu \partial_\mu$ will no longer be Lorentz invariant. I understand why $c^\mu$ cannot be just numbers, but, I don't understand why the term would violate Lorentz invariance, had $c^\mu$ been a vector with the components being simple numbers. What I am looking for is to understand why $c^\mu\partial_\mu$ would violate Lorentz invariance, when $c^\mu$ is vector s formed from simple numbers.


Can't simulate 64-bit operating systems on VirtualBox

My solution  I tried to use VirtualBox to simulate , but experienced problems (see below). My solution was to use Hyper-V (as answered in  comment). How to access Hyper-V: Type in the Start Menu search Hyper-V Manager.  My problem  I'm using Windows 8.1 Pro x64 build 9600. My goal is to simulate Windows 10 Technical Preview x64 on VirtualBox. I downloaded VirtualBox 4.3.16 from . This is my system information:  Steps i've tried:   I enabled virtualization:   I executed command in CMD: "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Windows 10" --longmode on I enabled Hyper-V feature:  I also tried to use a 32-bit ISO of Windows 10 Technical Preview. If the status of Hyper-V is  or , I get the following error when I start simulating Windows 10 Technical Preview:  However, if I  Hyper-V, I get the following error:  If I hit Continue, the following error comes:    I still cannot use 64-bit operating systems:


When I was trying to install wine software in Lubuntu 14.10, I got the following error message without any specific reason. Can you please tell me how to resolve this problem and can I continue the wine installation without any further hindrance? Because, I am a newbie in Linux.  soorej@soorej-HP-Pavilion-dv6000-RZ901PA-ACJ:~$ sudo apt-get install wine [sudo] password for soorej:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Using the flush left align environment flalign

When using the flalign, I either get LHS and the = on te far left and the RHS on the far right.    \begin{flalign} x & = & 1 \end{flalign}   Or I the equation centers itself when I try    \begin{flalign} x & = 1 \end{flalign}   How can I get everything on the LHS?


Why is ubuntu, or any OS for that matter, giving me a blank syslinux screen? (USB)

I'm getting a syslinux screen upon boot from USB, is there any way to avoid this? It's happening for any OS that I'm trying to install.  The exact message is: SYSLINUX 4.03 2010-10-22 EDD Copyright (C) 1994-2010 H. Peter Anvin et al  I've researched this and every response I've found has been tried with no success.  I'd love if someone could help me out, thanks.


What shape has the highest drag coefficient?

illustrates drag coefficients for several shapes:    It is generally accepted that some variation of the teardrop/airfoil shape has the lowest drag coefficient.  I was wondering what shape has the highest drag coefficient.  The image suggests that it is a flat plate, and that would seem to be an intuitively correct answer, but is that correct?  Is there some other shape (perhaps with a concave front or back relative to motion) that has an even higher drag coefficient?


Concepts about limit: $\lim_{x\to \infty}(x-x)$ and $\lim_{x\to \infty}x-\lim_{x\to \infty}x$.

I know that $\infty-\infty$ is indeterminate, the how about $\lim_{x\to \infty}(x-x)$ and $\lim_{x\to \infty}x-\lim_{x\to \infty}x$?   Thank you.


Flathub is telling me do something for LibreOffice. And i honestly don't know how to do it

This is Ubuntu 18.10 dual booted with Windows 10.  Apparently the only way to get latest LibreOffice was either by Flatpak or downloading the zip from Official website.  What and where should make I changes according to below "Note" statement?  $ sudo flatpak install flathub org.libreoffice.LibreOffice Installing in system: org.libreoffice.LibreOffice/x86_64/stable        flathub 1bf7758dc1d7   permissions: ipc, network, pulseaudio, wayland, x11, dri   file access: host, xdg-run/dconf   dbus access: ca.desrt.dconf, org.gtk.vfs.*   dbus ownership: org.libreoffice.LibreOfficeIpc0 org.libreoffice.LibreOffice.Locale/x86_64/stable flathub 4a88b1bc88e1 Is this ok [y/n]: y Installing: org.libreoffice.LibreOffice/x86_64/stable from flathub [####################] 418 metadata, 4841 content objects fetched; 253117 KiB transferred in 776 seconds Now at 1bf7758dc1d7. Installing: org.libreoffice.LibreOffice.Locale/x86_64/stable from flathub [####################] 10 metadata, 71 content objects fetched; 1021 KiB transferred in 7 seconds Now at 4a88b1bc88e1.  Note that '/var/lib/flatpak/exports/share' is not in the search path set by the XDG_DATA_HOME and XDG_DATA_DIRS environment variables, so applications may not be able to find it until you set them. The directories currently searched are:  - /home/pranav/.local/share - /usr/local/share/ - /usr/share/   In case if the case is closed, without me getting actual help:


$\{1,1\}=\{1\}$, origin of this convention

Is there any book that explicitly contain the convention that a representation of the set that contain repeated element is the same as the one without repeated elements?  Like $\{1,1,2,3\} = \{1,2,3\}$.  I have looked over a few books and it didn't mention such thing. (Wikipedia has it, but it does not cite source).  In my years learning mathematics in both US and Hungary, this convention is known and applied. However recently I noticed some Chinese students claim they have never seen this before, and I don't remember I saw it in any book either.   I never found a book explicitly says what are the rules in how $\{a_1,a_2,a_3,\ldots,a_n\}$ specify a set. Some people believe it can only specify a set if $a_i\neq a_j \Leftrightarrow i\neq j$. The convention shows that doesn't have to be satisfied.


Does the sea level increase if an iceberg melts?

It was claimed that if an iceberg melts in the ocean, the sea level won't change as the ice displaces as much water as there will be melted water. The other claim was that the sea level should rise because oceans contain salt, so the water in oceans is denser than the water in the ice. Which one is the correct reasoning?


Why is the intersect negative and what does my regression show

I am trying to get my regression right. I want to see, if subs increase how much increase in revenue is seen. The dependent variable is Revenue while the independent variable is subscribers.  Least squares method regression shows the following equation 24.4x - 189,883,443. I can't make sense of it. If subs increase means increase in revenue, then why this?  There is no 0 value and the lowest value for subscribers starts with 10 m while revenue starts with 180 m  How can i make sense of y = 24.4x - 189,883,443. Why is the intercept negative. Does it mean that one sub increase would mean a revenue increase of 24.4  regression excel


RSA key pair generation using PRNG with same seed

I see a lot of Q/A where persons are trying to generate a specific key pair using static data such as a password. Now say we use a known PRNG (dangerous assumption), seeded with a the data as a static seed, would this always generate the same key pair?  I presume it would generate the same key pair if you would use the exact same generation method - the application would be deterministic. I would however expect differences between implementations. The random data could be used differently, the sizes of p and q could differ and there may be subtle differences when choosing the prime numbers themselves.


Do adventure cards have summoning sickness also?

Do adventure cards have summoning sickness?


What is the logic of downvoting a question without a comment?

According to my idea, downvoting without a comment is not helpful neither for the user nor the community.  Do you see any constructive feedback by just downvoting?  Just downvoting would not let the user to improve. What do you think if we make a comment mandatory if we downvote for a question, but not for an answer?


How to get colored output with tail command

Below is the tail statement:  tail -4 FDECMP1_$$.log   I need to print the last 4 lines of file FDECMP1_$$.log in Red.


I've always been interested in encryption but I have never found a good explanation (beginners explanation) of how encryption with public key and decryption with private key works.  How does it encrypt something with one key and decipher it with another key?


In my 16.10 I could use ctrl+alt+numpad to put a window into any half or quarter of the screen. Now that I've just wiped and installed 19.10 this no longer works :-(  I want to use a modifier keyboard combo with the numpad so that modifier + Num9 would put the actice window into the top right quarter of my screen.   --> What can I do in order to use the numpad to move+resize a window?  The  is useless. Similar questions on this site are from 2011-2014.


Running Ubuntu 12.04 - looking at the PCmanFM  it says the latest version is 1.2.3 (from 14 Oct. 2014) however my version in Synaptic says it is 0.9.10-0ubuntu2 with no option to upgrade.   I have also tried installing with   sudo apt-get install pcmanfm   and got the message:      pcmanfm is already the newest version.   Could someone please explain this?


Replace text starting with & symbom Oracle

I have a string in oracle column example emp.id=100&empHelper.userTab=2 I want to use REPLACE function to replace '&empHelper.userTab=2' with empty string.  & symbol is creating problem , I want to use escape char to consider '&empHelper.userTab=2' as text to replace in replace function instead of using set define off .


I came across this online and was wondering if someone might be able to explain this or at least give me a name of what it might be so that I can at least know what I'm googling for.   int main() {    int myarray[4] = {0, 100, 200, 300};    2[myarray] = -999;  //why does this work? what is this called?     for ( int i = 0; i < 4; i++)        cout << myarray[i] << endl; }   The output is 0, 100, -999, 300  I've ran it. I know it works but why? What is this called?


How to derive a generic formula for $\sum_{k=0}^n k^p$ for any $p$?

I'm able to derive the formula where $p=1$ and $p=2$, but I don't see how the formula generalizes to higher powers without having to derive each one individually. Is there an inductive approach? What is the name of this series?


import java.util.Scanner; public class z { public static void main(String[] args) { String[] arr = {"me", "my", "mine", "i"};     whatIsThis(arr);     for (int k = 0; k < arr.length; k++) {         System.out.print(arr[k] + " ");     }     System.out.println(); }  public static void whatIsThis(String[] arr) {     arr = new String[5];     arr[0] = "I";      arr[2] = "loving"; } }   Why does this code output "me my mine i" instead of "I my loving i" This is a question on my sample final exam and I want to make sure I understand.


Valid FFmpeg parameters for Facebook Messenger video upload

I'm trying to stitch together a bunch of images to form a video with FFmpeg (Latest static release by Zeranoe, 3.2.4).  My current command is:  -i "%d.png" -mbd rd -c:v libx264  -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1 -r 60 -y "Output.mp4"  Where "%d.png" points to all my images.  This command successfully creates a video that can be opened by VLC or Media Player (Classic/Home cinema) yet it fails to open with Movies and TV (Windows 10 app) and it also fails to upload to a Messenger chat.  While reading the Facebook manual, I couldn't find any detail about video encoders and such.   Can you provide me a valid FFmpeg command that creates a valid video (by Facebook standards)?


How to store many smallish time-series in a relational DB?

Input Data  Multiple Tests Beds generate measurement data of various complexity.   In it's most basic form, not considering any meta-data, one measurement on a Test Bed will be a small (1 - a few thousand samples) time-series with a couple of dozen channels/signals/attributes per sample.  Measurements across time and Test Beds will have a similar set of signals, but not always the same as sensors are added and removed for the test setups.  Data volume  Currently we estimate our data rate at 6 testbeds x 4 test per hour x 12 hours a day x 4000 samples per test == 1,152,000 samples per day x 365 == 420,480,000 samples per year  _ x 48 columns per sample (currently 32 bit floats, mostly) ~~~ 75 GB per year  (columns in this case refers to channel/signal)  If/When more testbeds are added the data volume might increase accordingly.   Data Input  The test beds generate the data locally and the data is then imported asynchronously into the db. (A few thousand samples might be generated in a the time of one second, then reviewed locally and then either scratched or imported.)  Queries  We expect queries to be mostly on aggregates of the single measurements. I.e., you like to find all measurements (each having 4k samples) where e.g. the mean of channel_output_voltage is within a certain range.  Database layout?  What is a good way to set up tables for this? What factors have to be taken into account?  Theoretically I could go with one table per measurement generating 100,000 tables per year, but it doesn't strike me as a good idea.  Or I could stick everything into one big table (with hundreds of columns) that has room for all channels and channels get added as needed: One row per sample. Unused channels remain NULL.  MEASUREMENTS ------------ measurement_id } PK time_stamp     } channel_1 (may be NULL for a certain measurement_id ...) channel_2 ... channel_n(+1)   Or I could go with an approach of having one table for the samples (timestamps) and one table containing all the values: (one row per sample in MEASUREMENTS table and n rows per sample in the SAMPLE_VALUES table)  SAMPLES            SAMPLE_VALUES ------------       ------------- measurement_id     sample_id time_stamp         channel_id (links to a channels table where there is a name etc.) sample_id          channel_value   What other options are there? How to further investigate which option we should choose?  Database products  Due to customer constraints we would like to put this in MS SQLS or Oracle.    From :     Don't store the raw data, only store aggregates. Seriously.   This assumes that there is a meaningful way to determine ex antes what queries the customer is going to want to run against their data. No way :-)


Suppose that $X$ is not orientable. How can I show that $X \times Y$ is never orientable, no matter what manifold $Y$ may be?  I've tried supposing that $X \times Y$ is orientable, then using that $\pi\colon X\times Y\to X$ the projection on first coordinate is orientation preserving map, $X$ would be orientable. But something just not sounds right.


I picture light ray as a composition of photons with an energy equal to the frequency of the light ray according to $E=hf$. Is this the good way to picture this? Although I can solve elementary problems with the formulas, I've never really been comfortable with the idea of an object having or being related to a "frequency". Do I need to learn quantum field theory to really understand this?


How to find an index of an element in an array using numpy?

If let's set a=array([1,4,5,57,45,34]) so how do we get the index of one element? say 5 etc.  I know how to get the index in a list, using list.index(ele). But how about an array? Is there any similar function, .index definitely not work as I have tried this? Or we have to develop function by our own?  There are other similar questions using perl, C,etc, but I have not found one using python in this community.


Was the Sorting Hat confused about Harry due to Voldemort's soul?

Harry: Not Slytherin. Not Slytherin. Sorting Hat: Not Slytherin, eh? Are you sure? You could be great, you know. It's all here in your head. And Slytherin will help you on the way to greatness, there's no doubt about that. No?  According to Sorting Hat, Harry was best suited for Slytherin. Was this a confusion came because of Voldemort's soul part in Harry? Or, did Harry originally had attributes to be a great Slytherin?


Why is an $n$th power a norm in a Kummer extension?

Let $F$ be a $p$-adic field containing the $n$th roots of unity.  Then by Kummer theory, $[F^{\ast} : F^{\ast n}]$ (which is finite) is equal to the cardinality of $\textrm{Gal}(E/F)$, where $E$ is $F$ adjoined with all the $n$th roots of unity in $F$.    Also $F^{\ast}/N_{E/F}(E^{\ast})$ has cardinality $|\textrm{Gal}(E/F)|$ by local class field theory.  This would give us $N_{E/F}(E^{\ast}) = F^{\ast n}$ provided we could show just one inclusion.  Why is it that every element of $F^{\ast n}$ is a norm?


Logistic regression with poor goodness of fit (hosmer lemeshow)?

I built a model with 9 categorical predictor variables. Using SPSS, my omnibus test was significant ($\chi^2$=220.01), my -2loglikelihood was 1335.2 (Nagelkerke $R^2$ 0.231), but my Hosmer and Lemeshow Test was significant (chi-sqr=16.2, p=0.042). My sample size is n=1199.  Is it problematic to proceed with this model, despite lack of fit?  I tried removing one of my binary predictor variables, and noticed that in the new model my Hosmer Lemeshow Test was significant (p=0.198), but my -2loglikelihood increased to 1442.2. Is there a trade off between Hosmer Lemeshow and -2loglikelihood?  How do I decide which model is appropriate?   My method for building this model was originally entering in all my predictor variables of interest, and examining the adjusted ORs of my variable of interest. Is my model a poor fit?  Additionally, how does one go about testing for multicollinearity when your predictor variables are all categorical (in other orders, calculating VIF is not possible). I was told in class that as long as the standard errors of Beta coefficients are less than 2 there is no reason to suspect multicollinearity, but I am not sure if this is sufficient?


What does the term "Extended Partition" mean? Is it safe to use this type of partition?

In the image below, what does Extended 103 GB mean?


Baker-Hausdorff Lemma from Sakurai's book

I'd like to show that, given to hermitian operators $A,G$ on a Hilbert space $\mathscr{H}$, the following identity holds: $$ e^{iG\lambda}A e^{-iG\lambda} = A + i\lambda [G,A] + \frac{\left(i\lambda\right)^2}{2!}[G,[G,A]]+\ldots+\frac{(i\lambda)^n}{n!}\underbrace{[G,[G,[G,\ldots[G}_{n\ times},A]]]\ldots]+\ldots $$ where $\lambda$ denotes a real parameter and $[\ \!,]$ indicates the commutator.  This is a proof left to the reader by Sakurai in his books on Modern Quantum Mechanics.


A simple question and probably a simple solution, but I can't seem to find it. As you can see in the example there is a pixel gap between the bottom of the 2 images and the DIV (home-top or home-bottom).  How do I get rid of that?    .container{     width:80%; }  .menu{     width:100%;     background:black;     color:white;     text-align:center; }  .home-top{     background:white;     overflow:hidden; }  .home-bottom{     background:#EEE;     overflow:hidden; }  .footer{     width:100%;     background:black;     color:white; }  .txt-left, .img-left{     width:50%;     float:left; }  .txt-right, .img-right{     width:50%;     float:left; }
     menu

home top

             some text goes here.

home bottom

             some text goes here.

     footer


I'm interested to know the processes involved in designing for large scale output i.e. billboards/ banners.   What Illustrator/ Photoshop document size should I work with. Do I work in a scaled size of the final output version? What resolution do I use? If I'm to use photographed images, what resolution should they be?  Would appreciate all the help I can get on this.   Thanks in advance. :)


I have around 6-7 DOMAINS hosted on linode server where apache is a webserver. One domain is ssl configured and other runs on http only.   Suppose  is ssl configured .  others are   http://www.example1.com  http://www.example2.com http://www.example3.com        http://www.example4.com       What would be the dynamic rule if someone put  or others get redirect to  and so on  like in virtalhost something like     <If "%{HTTP_HOST} != 'example.com'">      Redirect permanent / http://%{HTTP_HOST}/  </If>   above written hack doesn't work . any help?


I have found a very good overview of a topic and I want to cite it in the introduction of my paper. The writers are very well known people in the field. Is it then okay to cite the paper that is not published and is only available in arXiv?


For example, in "Matrix Reloaded", we see that the agents fire on the car driven by Morpheus. We see that the bullets penetrating the body of the car.  If the gun is not real, how did it happen?  If the gun is real, how did they maintain the safety of the actors?


What definition and properties does the notation $ A \equiv B \mod (n, f(x))$ have?

Currently, I'm trying to understand the  on Wikipedia. I was stuck when I saw the notation:     $$ A \equiv B \mod (n, f(x))$$   Wikipedia explains like this:     The notation $A \equiv B \mod (n, f(x))$ means that $A - B = H(x) \cdot n + K(x) \cdot f(x)$ where H, K are polynomials.   I don't understand much about this notation and its properties. Can some explain this to me? I'm trying to implementing this algorithm, but this notation is way too complicated for me to do that.  I also want to know how to calculate $A \mod (n, f(x))$


Delete user shows error code (Ubuntu 17.10 )

When i'm trying to delete user with this code sudo deluser username than this message occurs  Warning: group `username' has no more members. userdel: user username is currently used by process 14804 /usr/sbin/deluser: `/usr/sbin/userdel username' returned error code 8 Exiting.   so, what can i do for that ??


I'm experimenting around with Debian and I'm wondering about their permissions concerning systemd and reboot. I made the following obersvations (Debian Buster with lightdm and i3 WM):   The commands poweroff etc. map to /sbin/poweroff which is a link to /bin/systemctl /bin/systemctl has permissions -r-s------ and is inaccessible to the user As a result, systemctl poweroff etc. will not work, not even systemctl --user mycommand will not work (unlike e.g. on Arch Linux).   However when I install KDE, I can poweroff and reboot from the menu without entering a password! I didn't find any useful answers online and I don't understand how this is possible. How do they achieve that?


How can I unrar files? And please I want a program with UI... WinRAR would be the best (I have a license, I know, I'm like a unicorn). Ubuntu is so confusing and not user friendly at all imho. I just want a program (again, WinRAR would be nice) that gives me a right click menu to extract, a UI to open the files... basically a windows like solution. And please tell me how to install it - noobfriendly please.


Review Commenting/Auditing Issue - "You didn't pass"

My first failed audit was today (as I've read a number of posts to start out this way). When I see a question that I personally have knowledge on, I will comment on it to further the question. Well, I did this, and was preparing to press the "No Action Needed" button afterward, but then I was greeted with the "You didn't pass" message.  This is very irritating - why does the review system assume that a comment must mean I'm critiquing the post due to something about it being low quality? Is the review logic set up in a way that I would have to open the question outside the review panel to add comments about the actual question itself? That just seems daft.


Photoshop - Background color for multiple shape objects on multiple layers

I have multiple layers with rectangle shapes on each, i want to apply same color to every shape at once.   Can anyone share a tip?  Thanks,


I am trying to figure out how to make a simple function that will take 2 arguments and return a new string that will repeat the string a certain amount of times that is described in the 2nd argument.   I would like to have it return hellohellohellohellohello but it is only returning hello once.  example:   This is what I have so far, but it only returns hello once  function repeat (arg1, arg2) {     var counter = 0     while(counter < arg2)         return arg1         counter++  } repeat("hello", 5);


Recently I found out from Webmaster Tools, one of my blogs has 154 duplicate title and 156 duplicate meta description. On closer look, both URLs lead to the same blog post. One is with the date followed by the blog title and the other begins with the blog title. Example:  /2011/06/blog title.html  /blog title/   Is it something to do with the permalink settings? What should I do now?


I create a vector of uint_8t* sometimes with 3, 4 or 5 bytes but when I make the sizeof my array, I always get 4. How can I solve this?   After creating my array I want to get the length of it.  Example:   uint_8t* u8;  u8[0]=...; u8[1]=...;    sizeof(u8)=4 instead of 2.  sizeof(uint8_t) is 1, I Alo triedsizeof(u8)/sizeof(u8[0])` and I get 4


Screenshot Windows 7 at higher resolution

I want to take screenshots of my Windows 7 desktop at a higher resolution than my monitor size (1920*1080). Here's why: I am making a video that would need to zoom in by a scale factor of 2 at various locations of the screenshot, but taking a screenshot at 1920*1080 and zooming in makes it look pixelated.  Many people on the web have said that it simply isn't possible to display at a resolution higher than my monitor, but the point is I don't need to display it on my physical monitor.  I just want to screenshot it at a high resolution and then change the resolution back.  I'm guessing this should be the way to do it (if it's even possible):   Set my DPI to 200% using Control Panel > Display Set my screen resolution to 3840*2160 using Control Panel > Adjust screen resolution Screenshot Set my screen resolution back to 1920*1080 Set my DPI back to 100%   The problem is that I can't do step 2 because the drop-down menu for "Resolution" doesn't have anything more than 1920*1080 as that's the highest resolution that my monitor supports.  Is there anyway this can be done (or it can't be done)?  If it is needed, I'm using Windows 7 64-bit with NVIDIA GeForce GT 555M graphics card.


What prepositions to use in a sentence with "Know where I stand..."

I created a rating chart to be used as a reference in my reviews. In the chart's description, I want to say "This rating chart is for the readers to know where I stand ____ the video game." I know the "on" preposition can be used when telling my opinion on an issue, debate, or these sorts of things. Does the same apply to this case or what other preposition should write down?


We say chi square with $n$ degrees of freedom. It reduces if different constraints are introduced. What is the concept behind degrees of freedom?


Why Integers change their value when zeros are added to the left?

I just wanted to experiment with some integers and assigned the value "0013" to an integer a. When I print the value to the output console I get "11". What causes this? Why I do not get 13 ?   int b = 0013;  System.out.println(b);


Asynchronous capture from a process output not working properly

I'm developing a control for a website, where user can upload his PDF, and after the upload a 3rd party CLI-tool launches to verify PDF against certain profile and generate a corresponding report. The tool mentioned is callas pdfToolbox 4 (available here ^])  The problem is that on my control at the website I need to display in real-time progress bar of checking the PDF-file. All the AJAX-stuff for this functionality is already written (ajax-postbacks, updates of progress-bar, etc), but there's a problem with asynchronous updates from the process, which launches the pdf-checking tool.  If you launch the tool from command-line window, you can see that, it generates output into standard output stream, which contains progress updates (in percents), as well as possible messages about errors in the PDF-file.  However, if the tool is launched by the process which I create in my web-control, I don't receive the OutputDataReceived events until the check has been finished, and then many OutputDataReceived events come at once, one after one.  My code is the following (I've written a small console-app to test things faster):  class Program {          static string appString = "path-to-callas-cli";         static string argString = "path-to-pdf-and-path-to-report-and-path-to-callas-profile";           static void Main(string[] args)         {              ProcessStartInfo pInfo = new ProcessStartInfo(appString, argString);             pInfo.UseShellExecute = false;             pInfo.CreateNoWindow = true;             pInfo.RedirectStandardOutput = true;             pInfo.RedirectStandardError = true;             pInfo.RedirectStandardInput = true;             pInfo.ErrorDialog = true;              Process process = new Process();             process.StartInfo = pInfo;             process.OutputDataReceived += new DataReceivedEventHandler(process_OutputDataReceived);             process.Exited += new EventHandler(process_Exited);             process.ErrorDataReceived += new DataReceivedEventHandler(process_ErrorDataReceived);             process.Start();              process.BeginOutputReadLine();             process.BeginErrorReadLine();              process.WaitForExit();              Console.ReadKey();         }          static void process_ErrorDataReceived(object sender, DataReceivedEventArgs e)         {          }          static void process_Exited(object sender, EventArgs e)         {         }          static void process_OutputDataReceived(object sender, DataReceivedEventArgs e)         {             Console.WriteLine("Received async output: " + e.Data);         } }   As I've said, all the output from Callas CLI comes at once in the end (while the check takes about 35 seconds). To test my own code, I've created a small console app, which outputs numbers 10-20-30-....-100 in 500 milli-second intervals, and it's output is displayed perfectly from the main app, coming with 500ms intervals.  Any ideas?


One Mouse, Two Computers, One-Click Switch

I have two computers set up next to each other - one Mac and one PC. Is there a mouse out there (Bluetooth, perhaps?) that I can use on both - one computer at a time - without linking the desktops? I'm thinking maybe a mouse that has a side toggle that switches which machine it's hooked up to at any given time. Doable?


How can I play a sound when script execution is ready?

I am executing every now and then some python scripts which take quite long to execute.  I execute them like this: $ time python MyScript.py  How can I play a sound as soon as the execution of the script is done?  I use Ubuntu 10.10 (Gnome desktop).


Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa…


In a P.I.D., if $a^m = b^m$ and $a^n = b^n$ for $m, n \in \mathbb{N}$ with $\gcd(m,n) = 1$, then $a=b$

Let $R$ be a principal ideal domain, and $a, b \in R$ with $a^m = b^m$ and $a^n = b^n$ for $m, n \in \mathbb{N}$, and $\gcd(m, n) = 1$. I now want to show that we then already have $a = b$.   I think the statement is easily seen to be true if $a = 0$ (or $b = 0$), since if $a = 0$ and $a^m = b^m$, then $a = b$ since $R$ doesn't contain any nontrivial zero divisors, so $b ≠ 0$ already implicates $b^m = b \cdot b^{m-1} ≠ 0$.  I don't really know how to prove the statement for the general case, where I can't directly apply the fact that $R$ doesn't have any zero divisors except $0$. I most likely have to use the fact at some point that $gcd(a, b) = 1$, but I'm not sure how.


rename files in a directory to insert spaces before and after a dash

I have a directory which contains the following type of files:  01.firstname surname-track1 name1.mp3 02.firstname surname-track2 name2.mp3 03.firstname surname-track3 name3.mp3   I'm looking for a BASH command to batch rename all my files in the directory so that there is a space before and after the dash, such as:  01.firstname surname - track1 name1.mp3 02.firstname surname - track2 name2.mp3 03.firstname surname - track3 name3.mp3   Any help most appreciated!


What happens when a flying creature is knocked prone?

As per the title. The specific example I'm thinking of is an Archer Battle Master Fighter using Trip Attack on a Druid shapeshifted into an Air Elemental floating 120 feet off the ground. If the answer is different for this and the more general case, then answer each separately.  As noted in the tags, I'm looking at strictly RAW here, not RAI or house-rules, so references to specific pages of the PHB are appreciated. If there are any official answers on this, links to those would be helpful as well.


I want to make height of textarea equal to height of the text within it (And remove the scroll bar)  HTML  <textarea id="note">SOME TEXT</textarea>   CSS  textarea#note {     width:100%;     direction:rtl;     display:block;     max-width:100%;     line-height:1.5;     padding:15px 15px 30px;     border-radius:3px;     border:1px solid #F7E98D;     font:13px Tahoma, cursive;     transition:box-shadow 0.5s ease;     box-shadow:0 4px 6px rgba(0,0,0,0.1);     font-smoothing:subpixel-antialiased;     background:linear-gradient(#F9EFAF, #F7E98D);     background:-o-linear-gradient(#F9EFAF, #F7E98D);     background:-ms-linear-gradient(#F9EFAF, #F7E98D);     background:-moz-linear-gradient(#F9EFAF, #F7E98D);     background:-webkit-linear-gradient(#F9EFAF, #F7E98D); }   JsFiddle:


Are the coordinates of a multinomial distributed as binomials?

Given a sample of $n$ iid variables  $$ \{X_i\}_{i=1}^{n} $$  distributed as a multinomial distribution $MN(p,1)$ where $$ p = (p_1,...,p_n) $$ I will have that each $X_i$ is a n-tuple with all zeros except a 1 in a certain (random) position. I have the following doubts:   Can I say that the j-th coordinate of each $X_i$ is a bernoulli with parameter $p_i$? If  $$ Y = \sum_i X_i $$ Can I say that the j-th coordinate of each $Y$ is a binomial with parameter $n$ and $p_i$, $B(p_i,n)?   The source of my doubt is the fact that assuming what written in the two question I have the impression of forgetting the fact that the various coordinates of $Y$ are not independent..


What information about Darth Plagueis do we have in canon?

This question arised while reading through this question: . There it is stated that Darth Sidious was loyal the Rule of Two in new canon.  From the novel Darth Plagueis, we know that   Plagueis existed and was a Dark Lord of the Sith. Plagueis was the Master of Darth Sidious. Plagueis was alive during the events of The Phantom Menace. Plagueis was killed by Darth Sidious.   From these information we can of course conclude that Sidious disobeyed the Rule of Two, since Plagueis, Sidious and Maul co-existed during the events of The Phantom Menace.  But the novel Darth Plagueis is not canon anymore, so my question is:  What information is still valid in canon? And for the points not being valid anymore, what do we still know about them in canon?  If the author of the cited question is correct, than at least 3. must be false in canon. What about the other points?


I've been a programmer my whole life, and now I've found that I really need to start designing my own stuff. I know how to use Photoshop in and out, but I just can't create anything nice. I often visit  and try to get some inspiration, but I get overwhelmed by their creativity. How do they come up with this stuff?   Besides learning the fundamentals to design such as color theory etc, what are the best ways to coming up with some original and nice looking designs? Should I draw on pencil and paper my designs before designing in Photoshop? I'm referring to interface designs mostly. Lately I've just been finding random Dribbble interface designs, and trying to replicate them from scratch. I'm often successful, but I know I couldn't have come up with that on my own.   Another question is how do the creatives do it?   Do they imagine a design in their mind first, then draw it out on paper, then Photoshop?   Or do they just go on Photoshop and just play around until something nice comes out? Or what?


What is the difference between weight and mass?

What is the difference between the weight of an object and the mass of an object?


I have a question:      Does  $$N(0, x)$$ mean a normal distribution with mean $0$ and variance $x$? Or standard deviation $x$?   The notation seems ambiguous sometimes.


How in Python make a dictionary of two lists, one of which consists of functions, and another - strings?

I need to have the following dictionary actions = {'1': c1, '2': c2, '3': c3}  def c1():     print 'c1' def c2():     print 'c2' def c3():     print 'c3'  commands1 = ['1', '2', '3'] commands2 = [c1, c2, c3] actions = {}   What I tried:  for c1 in commands1:     for c2 in commands2:         actions = dict(zip(c1, c2))   But it gives an error argument #2 must support iteration


Can't Boot either Windows 10 or Ubuntu 18.04

I have an HP Laptop, a , recently bought in February. It  came with Windows 10 preinstalled. Since it was not working well for me, I thought of installing Ubuntu 18.04 to use in a second partition, after I did that, I was not able to boot in any of the OS.   When I checked the BIOS setting, I found there was an entry before "OS Boot Manager", that was gone and there is no option that says - "Boot from harddisk" in UEFI boot order.  Even when I change to "Legacy Support", it never boots up. So I thought of installing the clean Ubuntu 18.04 in the whole partition, removing the whole Windows from my machine, still, there is no change, I still get "there is no boot device or boot loader failed".  I have applied all of my knowledge whatever I gained from the internet to fix this. I also tried - efibootmgr to change the boot order, but nothing worked for me, finally now I logged in using Ubuntu Live USB and change the boot order to  Ubuntu first (using efibootmgr -n XXXX), but now I can't shut down or restart my machine. It is running from the installed ubuntu from the hard disk, but it is a temporary fix, until I find a solution to boot from my hard disk.   I am pretty sure there is no problem with the hard disk because I can access my installed Ubuntu, but to access that I need to use the Live USB to change the boot order for the next time. But the boot order is not retained if I shutdown or restart.  I will be very glad if someone can help me with this. If there is any way we can disable the UEFI from the BIOS or we can add Ubuntu in the UEFI boot order list, anything that can fix this.   I have no idea why this Windows Boot Loader went away. Because I am pretty sure while installing Ubuntu in the first place, I did not touch anything related to Windows.  Additional Info:  I installed Ubuntu in the UEFI mode, instead of Legacy Support. Images have been added in the comment section. Please help.


(Please before flagging the question, read it first! I know that similar questions have been asked, yet in different and incomplete forms).  I'm trying to find what the natural and normal way is to handle command line arguments or script options. Assume that script may take any possible type of arguments or options. For example:  ./myscript.pl runabnormal --help /sbin/proc -f filename CONFIG=set.config LOG=me.log  The best way that I'm aware of so far is by using Dumper as follows:  use strict; use warnings; use Data::Dumper qw(Dumper);  print Dumper \@ARGV;   output:  $VAR1 = [       'runabnormal',       '--help',       '/sbin/proc',       '-f',       'filename',       'CONFIG=set.config',       'LOG=me.log'     ];   Any general advice on this? How do perl programmers usually handle the complicated arguments input to their scripts?


I am traveling to India(New Delhi) On 29th December 2020. And I have Belgian -PR Card Holder with electronic Chip, but I have an Indian Passport. My Flight is from Brussels to London Heathrow Via British Airways with 6 Hours Layover and then connecting flight via Air India to Delhi. Do I need a Transit Visa for changing my Flight at London Heathrow airport or Not ? also I have to change terminal T5 to Terminal T2 for connecting flight. please advice!


Classifying non-abelian group(s) of order $18$

Problem: Classify the non-abelian group(s) of order $18$.   I am currently working on the problem above. I think the answer can be $C_{18}$, $D_{18}$, $C_{3} \times C_{3} \times C_{2}$, $S_{3} \times C_{3}$. Can someone show me what the correct answer is? Thank you.


I am trying to add the navigation layout to my activity but I keep getting an error of type       Caused by java.lang.NullPointerException: Attempt to invoke virtual   method 'void   androidx.drawerlayout.widget.DrawerLayout.addDrawerListener(androidx.drawerlayout.widget.DrawerLayout$DrawerListener)'   on a null object reference   What might be the problem of the code  package com.agile.Login;  import androidx.appcompat.app.ActionBarDrawerToggle; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.core.view.GravityCompat; import androidx.drawerlayout.widget.DrawerLayout;  import android.os.Bundle;  public class Homedashboard extends AppCompatActivity {     private DrawerLayout drawer;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_homedashboard);         Toolbar toolbar = findViewById(R.id.too_bar1);        setSupportActionBar(toolbar);          setTitle("Hazina Sacco");         drawer =  findViewById(R.id.navigation_drawer);         ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar,                 R.string.navigation_drawer_open, R.string.navigation_drawer_close);        drawer.addDrawerListener(toggle);         toggle.syncState();      }     @Override     public void onBackPressed() {         if (drawer.isDrawerOpen(GravityCompat.START)) {             drawer.closeDrawer(GravityCompat.START);         } else {             super.onBackPressed();         }     } }   <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:fitsSystemWindows="true"     tools:context=".Homedashboard"     android:id="@+id/navigation_drawer"     tools:openDrawer="start">     <LinearLayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical">         <androidx.appcompat.widget.Toolbar             android:layout_width="match_parent"             android:layout_height="176dp"             android:background="@color/colorPrimary"             android:elevation="4dp"             android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"             app:popupTheme="@style/ThemeOverlay.AppCompat.Light"             />         <FrameLayout             android:id="@+id/fragment_container"             android:layout_width="match_parent"             android:layout_height="match_parent"/>     </LinearLayout>     <com.google.android.material.navigation.NavigationView         android:layout_width="wrap_content"         android:layout_height="match_parent"         app:headerLayout="@layout/nav_header"         app:menu="@menu/nav_menu"/>     </androidx.drawerlayout.widget.DrawerLayout>


What is the difference between "used space", "size" and "size on disk"?

There is only one partition for both system files and personal data, which is C:. The other two partitions are for boot and for recovery.  Now I have two different reports on the size of C: on my Windows 7:   by clicking the property of C:, it shows 59.4 GB for "used space"; by selecting all contents (I have setup to view all hidden files and directories) under C: and viewing their property, it shows 46.9 GB for "size" and 47.6 GB for "size on disk".   Here are my questions:   I was wondering why the two reports are not the same, and where the difference comes? in the second way, why "size" and "size on disk" are different? What do they mean actually? What is the difference between them and "used space" in the first way?   Thanks in advance!


What do these particular lines in the terminal mean? How to set the RESUME variable?

anvit@Lenovo-ideapad-330:~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   firefox firefox-locale-en im-config libexif12 libldap-2.4-2 libldap-common   linux-firmware 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 156 MB of archives. After this operation, 1,125 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 im-config all 0.44-1ubuntu1.3 [25.1 kB] Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 libexif12 amd64 0.6.21-6ubuntu0.4 [78.6 kB] Get:3 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 libldap-common all 2.4.49+dfsg-2ubuntu1.4 [16.7 kB] Get:4 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 libldap-2.4-2 amd64 2.4.49+dfsg-2ubuntu1.4 [155 kB] Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox amd64 82.0.3+build1-0ubuntu0.20.04.1 [55.9 MB] Get:6 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-firmware all 1.187.4 [99.3 MB] Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-en amd64 82.0.3+build1-0ubuntu0.20.04.1 [658 kB] Fetched 156 MB in 41s (3,772 kB/s)                                              (Reading database ... 200549 files and directories currently installed.) Preparing to unpack .../0-firefox_82.0.3+build1-0ubuntu0.20.04.1_amd64.deb ... Unpacking firefox (82.0.3+build1-0ubuntu0.20.04.1) over (82.0.2+build1-0ubuntu0.20.04.1) ... Preparing to unpack .../1-firefox-locale-en_82.0.3+build1-0ubuntu0.20.04.1_amd64.deb ... Unpacking firefox-locale-en (82.0.3+build1-0ubuntu0.20.04.1) over (82.0.2+build1-0ubuntu0.20.04.1) ... Preparing to unpack .../2-im-config_0.44-1ubuntu1.3_all.deb ... Unpacking im-config (0.44-1ubuntu1.3) over (0.44-1ubuntu1.2) ... Preparing to unpack .../3-libexif12_0.6.21-6ubuntu0.4_amd64.deb ... Unpacking libexif12:amd64 (0.6.21-6ubuntu0.4) over (0.6.21-6ubuntu0.3) ... Preparing to unpack .../4-libldap-common_2.4.49+dfsg-2ubuntu1.4_all.deb ... Unpacking libldap-common (2.4.49+dfsg-2ubuntu1.4) over (2.4.49+dfsg-2ubuntu1.3) ... Preparing to unpack .../5-libldap-2.4-2_2.4.49+dfsg-2ubuntu1.4_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.4) over (2.4.49+dfsg-2ubuntu1.3) ... Preparing to unpack .../6-linux-firmware_1.187.4_all.deb ... Unpacking linux-firmware (1.187.4) over (1.187.3) ... Setting up firefox (82.0.3+build1-0ubuntu0.20.04.1) ... Please restart all running instances of firefox, or you will experience problems. Setting up linux-firmware (1.187.4) ... update-initramfs: Generating /boot/initrd.img-5.4.0-52-generic **I: The initramfs will attempt to resume from /dev/sda6 I: (UUID=b21b1cbf-7cc5-46ee-b99f-f6d53c5640fc) I: Set the RESUME variable to override this. update-initramfs: Generating /boot/initrd.img-5.4.0-42-generic I: The initramfs will attempt to resume from /dev/sda6 I: (UUID=b21b1cbf-7cc5-46ee-b99f-f6d53c5640fc) I: Set the RESUME variable to override this.** Setting up libldap-common (2.4.49+dfsg-2ubuntu1.4) ... Setting up firefox-locale-en (82.0.3+build1-0ubuntu0.20.04.1) ... Setting up libexif12:amd64 (0.6.21-6ubuntu0.4) ... Setting up im-config (0.44-1ubuntu1.3) ... Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.4) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for libc-bin (2.31-0ubuntu9.1) ... Processing triggers for man-db (2.9.1-1) ...


How to theme gnome.shell calendar panel button

I was trying to change the theme of panel button : calendar And here is my attempt   I need to make calendar looks like this, specifically how to alter the appearance of the first line or second line in StLabel ..  CSS class name :  #panel .panel-button StLabel     version: 18.10 theme: arc-dark gnome shell theme


What is the cause for low voltage when the breaker is off?

I wanted to find the breaker for directly wired (i.e. no plug + outlet) dishwasher by using a 'non-contact voltage tester' and it showed +ve for three different breakers. Then I hooked up a multimeter (V/AC setting) and tested. The reading for three breakers were 120V, 13.7V and 1.7V.  What could be the cause for the last two? Induction when wires run parallel? Insulation deterioration over time? Neutral is not at 0v? I suspected induction because when the last two breakers both on the voltage drops to 1.3V. However 13.7V seems too high, not that I know anything about what it should be.  The house is 37 years old, but probably it was rewired sometime later.


How does Primordial work with all the dialects?

In dnd-5e, there is a language called primordial, which is the language of the elements. The PHB says it is spoken by elementals, but most elementals actually don’t speak it. They speak “Auran”, “Terran”, “Ignan”, or “Aquan”, languages that are not listed in the PHB. In fact, I don’t think any monsters speak primordial. XGtE says the following, under the Storm Sorcery sorcerer subclass:  You can speak, read and right primordial. Knowing this language allows you to understand and be understood by those who speak it’s dialects: Aquan, Auran, Ignan and Terran.  Does knowing primordial automatically allow you to understand and be understood by all the dialects? Or do you have to be a storm sorcerer? If not, then isn’t the language primordial basically useless, as no one speaks it?


I am currently studying Geometry, and am having trouble parametrizing a Torus. The Torus is defined as being the surface of revolution by rotating the circle: $$y^2+(z-a)^2=r^2, \>\> x=0$$About the $y$-axis. We assume that $a>r>0$.  Now, I believe the parametrization for the circle is given by: $$\phi(r,\theta)=(0, r\cos(\theta), r\sin(\theta)-a)$$ How would the Torus be parametrized as I rotate it about the $y$-axis?


Is 1 hour layover enough from Frankfurt-Albania?

I travel with L.H. from Paris-Frankfurt-Albania. It is one ticket with Lufthansa.  I should arrive in Frankfurt at 19.40 and the flight to Albania is at 20.40 I already booked my ticket and I am now in panic if I can make it. I will greatly appreciate your answer.  Thank you


Was the "Enterprise" Enterprise ever mentioned in Star Trek TOS?

Was Captain Archer's "Enterprise" ever mentioned or acknowledged on the original series of Star Trek (or any series prior to when "Star Trek: Enterprise" was made)? Even if it wasn't actually mentioned, from the evidence of the earlier (broadcast-wise) shows, is it actually possible that a previous starship called "Enterprise" could exist?  I am wondering whether this was a complete ret-con, and since Kirk's "Enterprise" had no letter following it (and the following ones did), it would seem to suggest that the writers had intended that this was the first of its name.


Do package managers check the hashes of packages?

Do package managers such as Synaptic and Apper check the hashes of installed as well as updated/downloaded packages by comparing them to online databases?  Do they maybe even identify packages by their hashes?


Create an indent in an algorithm (without using the algorithm environment)

So I'm trying to create an indent in an algorithm, but I'm not familiar with the \begin{algorithm} environment, so I would just like to do it in a math environment. I'm trying to create an indent, but the code below doesn't seem to work. Please help?   \documentclass{article}    \begin{document}    $S=\emptyset;\ i=k=1;\ N[j]=Z[j]=S^*[j]=COMP[j]=0;\ j=1,2,...,11\\     j=1.\\    \hspace{4ex} VISIT(1)....$    \end{document}


How do I view achievements in minecraft?

I don't know how to view my achievements. I am on Minecraft bedrock edition v.1.14.60. I have actually looked up "how to find achievements in Minecraft bedrock edition 1.14.60" on Google, but even after searching that long phrase and looking everywhere the achievements were on their screens, I still can't find achievements anywhere. Here's proof!


Encrypt an external hard drive with read+write access on both Windows and Linux

I've used NTFS+Bitlocker in the past for USB external hard drives, and it's easy to use in read+write on Windows. But it's less easy to use on Linux: NTFS read+write requires ntfs-3g (which some people don't consider 100% reliable?) and Bitlocker on Linux read+write access requires  (which has less than 1000 stars on Github so it might not be the most secure/tested system available; also there are requirements to have Dislocker in full read+write I'm not sure to meet).  I could use an encrypted ext4 partition on the USB external hard drive, but then it would be complicated to use on Windows (maybe impossible!).   Question: is there an encryption system, supported out-of-the-box on Windows + Ubuntu, that would allow an external USB hard drive to be read+written easily on Windows and Ubuntu? Of course, I want the USB external hard drive to be useless for someone who would steal it, without having the key.


PCA on returns: to scale or not to scale

I am running PCA on time series data that has returns for a particular stock. Usually, when I run PCA for non-financial data I always scale the data with some R command like prcomp(data,scale=TRUE). However, I believe that returns data is scaled to a certain level. So when using returns data should my command be prcomp(returns,scale=False)?


Ask Ubuntu is giving the wrong certificate

When I go to  I get an error:  When I click advanced it says:  This server could not prove that it is www.askubuntu.com; its security certificate is from stackexchange.com. This may be caused by a misconfiguration or an attacker intercepting your connection. NET::ERR_CERT_COMMON_NAME_INVALID  This is on Google Chrome - Ubuntu 14.04, but has been reproduced on Firefox - all Ubuntu.  Just plain old  is fine.  Edit: Now working sometimes, but not always. Same error.


Java multithreading exclusive access to resource in list

I'm getting into java multithreading, and decided to solve a more complex problem, but with little success so far.  I have a production line of workers that will try to get work (create a product) from a list:   i'm using executors to generate the worker threads; each product creation implies the completion of a set of Tasks; each Task has an associated time an resources it needs: exclusive access to each resource is needed, meaning it is impossible to use one in the creation of two products simultaneously.   The concurrent access to the work list was solved with notify-wait:  public class ProductionRequestQueue extends LinkedList<ProductionRequest> {  public ProductionRequestQueue() { }  public synchronized void push(ProductionRequest productionRequest) {     this.add(productionRequest);     notifyAll(); }  public synchronized ProductionRequest pull() {     while (this.size() == 0) {         try {             wait();         } catch (InterruptedException e) {         }     }     return this.removeFirst(); }}   The problem is when i need to guarantee exclusive access to the resources. I have a list of the available resources in the production line, but i need to guarantee access to the resource it self and not the list. My workers does:  public Product createProduct(ProductionRequest productionRequest) {     Product product = ProductionLine.products.get(productionRequest.getProductId());     product.create();     return product; }  @Override public void run() {     ProductionRequest productionRequest;     while (!productionRequestQueue.isEmpty()) {         productionRequest = productionRequestQueue.pull();         createProduct(productionRequest);         System.out.println(productionRequest + " is being manufactured by " + this);     } }   Then i have a class that relates the resource with the time, where it simulates the production process by sleeping the thread:  public ResourceTime(Resource resource, int time) {     this.resource = resource;     this.time = time; }  public void execute() {     synchronized (this.resource) {         Thread thread = new Thread(this);         thread.start();     } }  @Override public void run() {     try {         System.out.println(toString());         Thread.sleep(Integer.valueOf(time));     } catch (NumberFormatException e) {         e.printStackTrace();     } catch (InterruptedException e) {         e.printStackTrace();     } }   I thought that the syncronized block would guarantee exclusive access to the resource, but i keep getting a null pointer exception:  Exception in thread "pool-1-thread-2" java.lang.NullPointerException at production_line_sim.models.Worker.createProduct(Worker.java:14) Any thoughts about this?   Also, how can i demonstrate that the synchronized block guarantees exclusive access to each resource?  I think this solution may lead to a situation where some threads may not be able to access the resource, and some kind of fairness algorithm might be needed, can someone pinpoint me on how to do this?


How can I draw a perspective-correct quad?

I'm trying to draw a quad in 2D (in SharpDX, but that is basically XNA). But texture correction is not working, and I'm getting only an affine textured quad.     I'm using BasicEffect to render it.   BasicTextureEffect = new BasicEffect(Device) {     Alpha = 1.0f,      TextureEnabled = true,     LightingEnabled = false,     VertexColorEnabled = true,      Projection = Matrix.OrthoOffCenterLH(0.0f, ScreenWidth, ScreenHeight, 0.0f, 0.0f, 1.0f), };   It is an 2D isometric game. I have pseudo-3D coordinates in isometric world (it's a shadow on the ground) converted to screen space, and then rendered using DrawQuad.  Do I need to set-up view (or projection?) somehow, to real 3D (emulate the isometric camera), and then draw this quad in 3D coordinates instead? How eventually? Or is there a way to correct this in 2D?  Update:  I've uploaded the actual partial screen-shot (Figure A), for you to see it's almost the same. (I cut it a bit, but it goes all to the corner)                   Figure A                                         Figure B  Update 2:  I can confirm now, that plain SharpDX (XNA) BasicEffect does this with just plain UW mapping (4 corners of a square), and plain DrawQuad. I've temporarily changed it to include center point, and I do draw 4 triangles instead of 2 (Figure B), this reduces effect to minimum, but it's still there. It still needs to be solved, because I won't be using it only on shadow.


Is a business card necessary for a graduate student?

I know some PhD students have their own business cards, but I don't know if it is a standard practice for PhD students to have their own business cards. I think a business card can be useful for networking in conference or collaborating with some industrial partners. So, is are business cards necessary for a PhD student or other graduate students attending conferences?   PS: in case it is field-specific, I would like to know the different practices in different fields