Why does the picture appear in a different position in XeLaTeX?

Min reprex:  \documentclass{article} \usepackage{graphicx} \usepackage{adjustbox} \usepackage{showframe} % just to illustrate  \begin{document} \adjustbox{trim={.5\width} 0 0 0,clip}{\includegraphics{example-image}}%  \end{document}   The clip is essential to reproduce.  Potential clue:  I am trying to display a two-page picture. I am using the .   When I use pdflatex the picture displays as I intend it to, immediately under the caption.      When I use XeLaTeX, however, it displays half-way down the page (for gull.jpg or is completely absent for example-image).     \documentclass[twoside,b5paper]{scrbook} \usepackage{graphicx} \usepackage{geometry} \usepackage[strict]{changepage} \usepackage{afterpage,adjustbox} \usepackage{caption}  \makeatletter \newcommand{\twopagepicture}[4]{%     {\afterpage{%     \begin{figure}[#1]             \caption{#4}%         \makebox[\textwidth][l]{%             \let\mywidth\linewidth         \adjustbox{trim=0 0 {.5\width} 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%             \caption*{.}%     \end{figure}%     \begin{figure}[#1]             \caption*{\phantom{#4}}%         \makebox[\textwidth][l]{%             \let\mywidth\linewidth         \adjustbox{trim={.5\width} 0 0 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%     \end{figure}%     }}% } \makeatother  \begin{document} . \twopagepicture{t}{l}{example-image}{Top caption}  \clearpage\clearpage \includegraphics{example-image}  \end{document}   \listfiles   *File List*  article.cls    2014/09/29 v1.4h Standard LaTeX document class   size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option) graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) graphics.sty    2016/05/09 v1.0r Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2016/01/02 v1.10 sample graphics configuration    xetex.def    2016/04/06 v4.08 LaTeX color/graphics driver for XeTeX (TeX Liv e/RRM/JK) infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)  ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO) adjustbox.sty    2012/05/21 v1.0 Adjusting TeX boxes (trim, clip, ...)  xkeyval.sty    2014/12/03 v2.7a package option processing (HA)  xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)  adjcalc.sty    2012/05/16 v1.1 Provides advanced setlength with multiple back- ends (calc, etex, pgfmath) trimclip.sty    2012/05/16 v1.0 Trim and clip general TeX material collectbox.sty    2012/05/17 v0.4b Collect macro arguments as boxes tc-xetex.def    2012/05/13 v1.0 Clipping driver for xetex ifoddpage.sty    2016/04/23 v1.1 Conditionals for odd/even page detection varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages showframe.sty    2011/02/24 v0.1i showframe (new impl., RN)  eso-pic.sty    2015/07/21 v2.0g eso-pic (RN) atbegshi.sty    2016/05/16 v1.17 At begin shipout hook (HO)    ifpdf.sty    2016/05/14 v3.1 Provides the ifpdf switch   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)    color.cfg    2016/01/02 v1.6 sample color configuration example-image.pdf    Graphic file (type QTm)


Frozen pizza kept at room temp (23 C) for 48 hours - safe to use?

I bought a salami pizza and a Hawaii pizza (ham & pineapple) the night before yesterday, but forgot to put them in the freezer.  This is the latter, soggy part removed:   Normally they should cook for 16 minutes, but they are completely thawed. Will cooking them at 190 degrees Celsius for 11 minutes make them safe to eat?    , with 66% in favor of cooking, but i'd like some expert advice.


How to control sound of connected external monitor?

I know this is not natively supported in macOS, but I think it could be easily solved by an app that does the following:   Set the sound volume on the external monitor to a desired maximum level. The app is a global volume slider for all the sounds generated by the MacBook. You can use the app to easily control the sound volume of the external monitor.   Is there an app that does exactly this?  EDIT:  I tried SoundFlower but it was buggy and caused problems with other sound extensions. I discovered  which exactly does what I want. Even the built in macOS sound control works.


how do I change the way directories are shown in the terminal

when in the terminal it is showing the full path of the working directory which can take up most if not all of the screen width. How do I change it so that it only shows the name of the current directory?


How do you send a HEAD HTTP request in Python 2?

What I'm trying to do here is get the headers of a given URL so I can determine the MIME type. I want to be able to see if http://somedomain/foo/ will return an HTML document or a JPEG image for example. Thus, I need to figure out how to send a HEAD request so that I can read the MIME type without having to download the content. Does anyone know of an easy way of doing this?


Show that the matrix $\big(\frac{1}{a_i + a_j}\big)_{n\times n}$ is positive semidefinite

Given positive real numbers $a_1,\dots ,a_n$, how can I prove that the symmetric matrix composed of the entries $\frac{1}{a_i + a_j}$ is positive semi-definite  *this is not a hw question but a self study question from the matrix theory book by xinghzi zhan.


Bi-directional motor control with 3 push buttons

I am trying to create a system where there are 3 input buttons (PTM) and a dc motor output. The motor needs to be bidirectional. The 3 buttons are: forwards, stop and backwards. once the forwards or backwards button is pressed, the motor keeps running until the stop button is pressed, or if the other button is pressed in which case the motor will turn in the opposite direction. It would need to be a latched system (I don't need to hold down the button) and have some protection against unintended input (for example if I accidentally press 2 or all the buttons at the same time, it should ignore it). I am trying to not use any microcontroller (Arduino) or software on this project. Ideally, something with logic gates, transistors and a motor driver chip (l293d) will be good. Any suggestions on the circuit for this project or where I can start?


I encountered the following version of \mathcal{H} and like it a lot:    This is slightly different from the usual one from Computer Modern font:     I have done some search and tried different fonts, e.g., mtpro2, mathptmx, and mathpazo etc., but could not find the first \mathcal{H}.  Here is my question: Is there a way that I could get the first one? Is it some sort of "old \mathcal symbols"?  Any help would be highly appreciated.  PS: I have found an example for the source of the first \mathcal{H} .  I downloaded the *.tex file of that pdf, and here are all the packages used there:  \documentclass[11pt]{article}   \usepackage{xcolor}   \definecolor{labelkey}{rgb}{0,0.08,0.45}   \definecolor{refkey}{rgb}{0,0.6,0.0}   \definecolor{Brown}{rgb}{0.45,0.0,0.05}   \definecolor{dgreen}{rgb}{0.00,0.40,0.00}   \definecolor{dblue}{rgb}{0,0.08,0.45}    \usepackage{amsmath}   \usepackage{amssymb}   \usepackage{theorem}   Of course, typing \mathcal{H} in this setting yields the second one, but somehow the \mathcal{H} in the link looks like this:     So I guess there must be something "weird" going on here.  PS:  I often see the first one in papers published by Springer, e.g.,  (it appears right in the title)   I also saw the first one \mathcal{H} in this question .


My questions keep getting closed; how do I improve?

Often when I ask a question it gets closed, but I don't understand what makes it too broad or off-topic and people aren't explaining it in comments.  I'm getting frustrated; I want to contribute constructively but I've run into this enough that I've hit an automatic block and don't know how to fix it.  I've reached out several times to the people who closed my questions, and they all just re-directed me to the standard Stack Exchange help talking about how to write a good question. And it may be just me but after reading through it several times I think I'm already doing what it recommends.  Despite the times my posts have been flagged I had many posts that did well, got useful feedback, and got at least 40 upvotes. Yet I have been question banned on Stack Overflow because of low-quality questions that "don't help the community".  They provided a link to another Stack Exchange page showing what I can do to fix this, but it sounds like it will be a very long time before the ban will be lifted.  It appears obvious to me that this site isn't a bunch of bad people trying to be mean or trolling. I've found some really nice people here on Stack Exchange. But I'm having trouble understanding this ban I'm now under.  Now I'm not innocent; I have quickly run through and posted a question about the bash terminal in the Ubuntu community when the question wasn't strictly Ubuntu. But it seems like people are being harsh for no apparent reason.  I don't know, maybe I'm just not good at gathering information from the stack exchange tips, or maybe it is them, I don't know. But since the flaggers didn't help me, I would like to ask here in public before I can no longer ask questions here either. Am I missing something? Are there just that many harsh people on the stack exchange community? Are the Official Stack Exchange tips really unhelpful or am I missing something? I could really use your help.  I'm, not looking for , nor am I asking for anyone to reopen one of my closed questions without me making modifications first.


I just signed in to MySQL and am trying to connect to a database so that I can begin to write tables. My research understanding is that you use "use" followed by the database name, and end with ;  The database name that I am trying to connect to is 3 words with space in between them (i.e., A B Database)  When I try use A B Database; it says there is a syntax error at the B. Any reasons why this may be happening?


Other manufacturer's USB data cable for charging?

Is there any harm in using a USB data cable of any other phone (say LG) for charging up a Nexus S? "Any harm" here means will it adversely effect my battery life or the Nexus S device in any way?


Hartshorne Algebraic Geometry Proposition 1.5 (page5) In a notherian topological space $X$, every nomempty closed subset $Y$ can be expressed as a finite union $Y=Y_1 \cup \cdots \cup Y_r$ of irreducible closed subsets $Y_i$. If we require that $Y_i \nsupseteq Y_j$ for $i \neq j$, then the $Y_i$ are uniquely determined. They are called the irreducible components of $Y$.    I understood the existence of such a representation. But I can't understand a sentence in  the uniqueness part, which I highlighted: Let $Y=Y_1 \cup \cdots \cup Y_r$ and $Y=Y'_1 \cup \cdots \cup Y'_s$ be two such representation. Then we can deduce that $Y_1=Y'_1$ (the details are in the textbook). Now let $Z=(Y-Y_1)^-$, then $Z=Y_2 \cup \cdots \cup Y_r$ and also $Z=Y'_2 \cup \cdots \cup Y'_s$.  What is the operator $^-$? I understood it as a closure, is it right? But then how can I deduce that $Z$ is represented as $Z=Y_2 \cup \cdots \cup Y_r=Y'_2 \cup \cdots \cup Y'_s$?


Is it possible to automatically empty the firefox search bar?

I often select something I want to google with the mouse (no [ctrl-c], I'm on X11/Linux), so I can paste it into the search engine box in firefox. However, there's usually already something in there from a previous search, so I can't just paste it. This sits in my way all the time, so here's my question:  Is there a way to clear the search form as soon as I hit [enter]? So it'll be empty for the next time I search for something?  On Linux, I find that the [ctrl-c] ... [ctrl-v] should not be neccessary in that case, as it forces me to move the hand back to the keyboard (i'm left-handed).  This would also be helpful in cases I did google something that I don't want others to see. It's easy to forget that your last search is still up there, despite you closed the tab already.


How do I make a bootable USB from Ubuntu? I've been looking online but end up confused. I see Startup Disk Creator but they way its worded it makes me think its only for making another Ubuntu USB. I'm not very good with Linux. I only have it because I broke Windows. XD  If not clear, I broke Windows and had to install Linux. I am now wanting to know how to make a bootable USB from Linux. I already have the .iso file.


How to make in-text page number retroactively update?

It would be useful to have a page number like (see page # for more details) that is tied to a specific section or figure, and as a consequence, automatically updates the text to say where that page # of that section or figure is if a change pushes it to a new page. Can this be done?


Why do I need to restart OS after some package upgrade?

On Ubuntu, when running sudo apt update; sudo apt upgrade, why sometimes it asks me to restart my OS and sometimes not?   What do the packages that have that restart requirement have in common? Is it not possible to update such a package without restart OS requirement?   If I am correct, sudo apt update; sudo apt upgrade can also update/upgrade kernel. Does kernel update/upgrade also require OS restart?  Thanks.  I often keep my Ubuntu up indefinitely long, because I am always running some programs and I don't want to interrupt them.


How secure is this way of storing passwords?

I understand and recognize that storing passwords in my own database is a massive security hole compared to using services like Google or Facebook, but I was wondering if the following code could be used to securely store usernames and passwords using a salted hash:  $username = $_POST['user'] $salt = md5(openssl_random_psuedo_bytes(24, true)); $pass = sha1($salt.$_POST['pass'])   I believe it's fairly secure, but I'm no expert.  EDIT:  I think this would be better, would it?  $salt1 = md5(sha1(openssl_random_psuedo_bytes(32, true)); $pass = password_hash($_POST['pass'] . $salt1, PASSWORD_BCRYPT);   Am I any closer to finding a decent mechanism for storing passwords?


Do electrons flow only on the surface of a wire?

Since the $\vec{E}$ field inside a "perfect" conductor is zero, do the electrons(the current) flow only on the outer surface? This has bothered me since I studied electromagnetism.   Thank you for your time.


After installing all of the new updates available in TexLive about an hour ago (23/3/14 - previous update 19/3/14), I'm having trouble with some of my TOC entries.  When I have a figure with a separate TOC entry that involves a \ce{} environment, I get error messages saying that the control sequence \aaaa is not defined.  Here's a MWE:  \documentclass[a4paper,12pt,final]{book}  \usepackage[version=3]{mhchem}    \begin{document} \tableofcontents \listoffigures  \begin{figure}[htbp] \begin{center} pretty picture \caption[X-ray crystal structure of [Rh(acac)\ce{(MCP)2}{]}.]{X-ray crystal structure of [Rh(acac)\ce{(MCP)2}].} \label{fig:fig2p2} \end{center} \end{figure}  \end{document}   I've tried using \texorpdfstring, but I end up with the same problem.  I've gone back to older copies of the file that were working fine last night, but I have the same problem.  I suspect that one of the updates I've just installed has done something to cause this, but I have no idea which one, or how to fix it.  Please help!!  I'm using texshop, compiling using dvi.


Using windows server 2016 essentials without licence

I have uninstalled the product key from windows server 2016 essentials using cscript.exe c:\windows\system32\slmgr.vbs -upk from a evaluation copy.   I was just wondering if I can use the server without a license without limitations.   Thanks in advanced.   Cheers,  Jack


While finding escape velocity, does human mass counts as the mass of Earth?

Escape velocity depends upon the mass of earth. my doubt is whether human mass adds into it or not? If it add then Earth's escape velocity would be increasing!


$ mount /dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/cgroup type tmpfs (rw) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) /dev/sda4 on /home type ext4 (rw,commit=0) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=t)   The format of the output of mount is a sequence of lines, where each line has the format "A on B type C".  Do I understand correctly that   B is the mount point C is the file system type. Examples of C are ext4, proc, sysfs, tmpfs, fusectl, debugfs, securityfs, devtmpfs, devpts, pstore, binfmt_misc, cgroup, fuse.gvfsd-fuse. what is A? Examples of A are /dev/sda3, proc, sysfs, none, udev, devpts, tmpfs, binfmt_misc, systemd, gvfsd-fuse.


Proof Verification - Every sequence in $\Bbb R$ contains a monotone sub-sequence

Came across the following exercise in Bartle's Elements of Real Analysis. This is the solution I came up with. Would be grateful if someone could verify it for me and maybe suggest better/alternate solutions.  I also looked up these related questions - , ,  - but was not happy with proofs given there. I seem to need some help understanding these. Any such help is appreciated.      Show that every sequence in $\Bbb R$ either has a monotone increasing sub-sequence or a monotone decreasing sub-sequence.   Let $(x_n)$ be a sequence in $\Bbb R$. Suppose $(x_n)$ is not bounded. Without loss of generality we may assume that $(x_n)$ is not bounded above. Therefore given any real number there is a member of the sequence which is greater. Let $x_{n_1}$ be any member of the sequence.   There is $x_{n_2} \gt \sup\{x_1, x_2, ..., x_{n_1} \}$. For $i \gt 1$ let $x_{n_i} = \{x_1, x_2, ..., x_{n_{i - 1}}\}$ then $(x_{n_k})$ forms a monotone subsequence of $(x_n)$.   Now suppose instead that $(x_n)$ is bounded. By the Bolzano-Weierstrass Theorem there is a subsequence $(y_n)$ of $(x_n)$ which converges to a limit $y$. Without loss of generality there are infinitely many distinct values in $(y_n)$ that are unequal to $y$. Let $y_{k1}$ be the first such element. Let $y_{k2}$ be any element in $\{ y' \in (y_n) \ \ | \ \ |y' - y | \lt |y - y_{k1}|  \}$.   For $i \gt 1$ let $y_{ki} \in \{ y' \in (y_n)  \ \ | \ \ |y' - y | \lt |y - y_{k \ i - 1}|  \}$. Such $y_{ki}$ exists for every $i \in  \Bbb N$ since $ \lim (y_n) = y $. Now let $(y_{kn})$ be the sub-sequence of $(y_n)$ thus formed. At least one of the two following sets must contain infinitely many elements.    $\{ y \in (y_{kn}) \ \ | \ \ y \gt x\}$ $\{ y \in (y_{kn}) \ \ | \ \ y \lt x\}$   The one which does forms a monotone subsequence.


MacBook Air A1465 screen black and full of multi coloured lines how can I fix this?

has horizontal and vertical lines flickering and then screen starts rolling nothing is displayed tried cmd opt rp still not working help!


How to delete duplicate records in my database?

I joined about 12 databases into 1 db and in each database I have some duplicate records.  How can I delete all duplicate records in my joined database?  For example, I want to delete duplicate records when data in column "phone" is the same.


Excel IF Statement identify when cell has contents

How do I tell MS Excel to use the contents from one cell if data exists (this data can be positive negative or zero).  If the data does not exist in said cell, use contents from another cell?


Is it posible to add iframe directly in lightning components?

Is it possible to add iframe directly in a lightning component as below to visible in community sites ?  <aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >     <iframe width="800" height="600" style="border: 1px solid" src="---" /> </aura:component>


How to bridge two wifi networks, one private, one with internet connection, one linux PC with connections to both

I have a local wifi "hotspot" with various devices on it. I have a second hotspot which provides internet access (android).  I have a Ubuntu PC with two wireless cards - one connected to the android hotspot for internet access and the other connected to the private hotspot.  How do I configure my linux PC and other linux devices on the private network to allow temporary access to the linux devices on the private network?


Unable to install OpenJDK 7 in ubuntu 18.04

Unable to install openJDK 7 in Ubuntu machine. getting error like below : $ sudo apt-get install openjdk-7-jre   Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies: openjdk-7-jre : Depends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable E: Unable to correct problems, you have held broken packages.


Firefox launcher icon appears twice for own .desktop file

I want to add my own .desktop file to the Unity Launcher. I created firejailFirefox.desktop in ~/.local/share/applications/:  [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=firejailFirefox.desktop Icon=firefox Exec=firejail firefox %U Terminal=false StartupNotify=false OnlyShowIn=Unity;   Then I go in the Dash (Windows key and typed the name of the application) and drag and drop it to the Unity Launcher. But now the firefox icon appears twice when I click on my firejailFirefox Launcher icon. How to get only one icon after starting firejail firefox from Launcher?  $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 17.04 Release:    17.04 Codename:   zesty


How are string vibration modes related to particle identity?

I understand that the vibration modes of an elementary string determines the identity of its particle. When I first heard this, I visualized a stiff circular steel band-like entity vibrating with 2, 3, 4, 5,... nodes or antinodes, the number determining the particle. This was further supported when I asked a well-known physicist how one gets from equations to physical strings, and he said he recognized the harmonic nature of the solutions.  Bu then I noticed that physicists seem to accept the image of a soft spaghetti-like string flopping about with no well-defined vibrational modes. I asked another physicist about this, and his answer was simply that a string has multiple modes, not necessarily in a harmonic progression.  So my questions are 1) How do you visualize the vibrations of a string, and 2) how are they related to particle identity?


Extreme caching issue allowing answers to closed questions

4 hours ago (at 15:53:08UTC today), I closed  question over on CodeGolf.SE. We've discovered before that it's possible to answer a few minutes "under the line" due to caching before, simply by not refreshing the page. For example,  answer was posted at 15:59:08UTC. However, a few minutes ago, somehow,  answer was posted, 4 hours after closing, which lead to general confusion in our chat room, along with  thought:  if the closure check is client-side could one theoretically just disable it an post an answer to an already-closed challenge? and if it isn't cilent-side, how is Neil able to do that if it should be closed server-side already o.O  by . A few minutes of caching isn't much of an issue, hours of caching potentially is. Is this a problem?


Which is the correct form?    Tommy and she went to the store. OR She and Tommy went to the store.  I hear the second example much more frequently in conversation, but I believe the first one is actually grammatically correct.


Why is macOS limited to 1064 or 2088 processes?

In macOS, the system is limited to running no more than 1064 processes (or 2088 starting with Catalina) systemwide, and individual users are limited to 709 (or 1392 in Catalina). Why is there a limit? Why is it this size? Why not a round number like 2500 or a binary round number like 1024? Update: The limit actually varies in size depending on the version of OS X/macOS and the amount of memory installed in the computer. 1064 was a common limit prior to Catalina and then 2088 became common, but these are not the only limit values a Mac might have.


The render result is just the transparent texture?

I rendered a 1200x800 image, but it's just the transparent texture thing:    I used Cycles for this image. In a test in Blender Render, it worked perfectly, although the materials were made in Cycles so you obviously couldn't see them as you were supposed to.


Let $X,Y \in \mathcal{L}^1(\Omega,\mathcal{F},\mathbb{P})$ and assume that $E[X|Y]=Y$ and $\mathbb{E}[Y|X]=X$.  I want to show that $\mathbb{P}(X=Y)=1$.  I started working on  \begin{align} \mathbb{E}[(X-Y)\mathbb{1}_{\{X>z,Y\leq z\}}] + \mathbb{E}[(X-Y)\mathbb{1}_{\{X\leq z,Y\leq z\}}] \end{align} for arbitrary $z \in \mathbb{R}$. However, I do not know how to continue. Any help is appreciated.


Robocall claiming to be IRS saying they are about to sue - Is it legit?

We got a recorded call with a message claiming to be from the IRS.  It said they were giving final notice and preparing to file a lawsuit against us.  In our case, the message went to voicemail so the end was cut off, but it seemed like a scam all the way. (We don't have any pending problems with the IRS as far as we know.)  The question was whether this is a known scam?


Say you had a Rubik's cube in a certain starting state and chose moves randomly and uniformly. How long on average would it take to solve it?

So say you have a Rubik's cube in a certain state (you can make your own assumptions about what state, I'm guessing the majority of states give about the same answer) and you alter it by randomly and uniformly choosing moves, one after another. Here a move is defined as rotation of a face of the cube either 1, 2, or 3 times (you can't leave the cube the way it is). How many moves on average would it take to solve it? Also, how would you generalize this problem, or what are some general techniques to handle it?


I embed an illustration of variables next to the paragraph describing them:  \noindent\begin{minipage}{.48\textwidth}     \indent Lorem ipsum \end{minipage} \hfill \begin{tikzpicture}     … \end{tikxpicture}   You can already see my use of \noindent to avoid the whole textblock being indented. Then I try to explicitely indent the text in the minipage (I still need the first line indentation, like in any other paragraph).  I learned that minipage sets \parindent to 0pt. How can I set it to the value used in the rest of the document? (I would like to avoid setting a specific value that might fit or might not fit the template.)


A proof that $\mathbb{Z}_{p}$ is an integral domain if and only if $p$ is prime.

I have already seen a proof of this statement here on stackexchange but I would like someone to verify whether "my proof" is correct and also if you could point out issues with the writing style. thanks in advance!  Statement. $\mathbb{Z}_{p}$ is an integral domain $\Leftrightarrow$ $p$ is prime.  Proof.$(\Rightarrow)$ Suppose $\mathbb{Z}_{p}$ is an integral domain. Assume (by way of contradiction) that $n$ is not prime. Then $n=ab$ for some $a,b\in \mathbb{Z}$ where $1<a$ and $b<n$, meaning $ab\equiv 0\pmod n$. This is a contradiction since $\mathbb{Z}_{p}$ is assumed to be an integral domain and therefore does not contain any zero divisors. Therefore $p$ must be prime.  $(\Leftarrow)$ Assume $p$ is prime. Then $a$ does not divide $n$ for any $1<a<n$ where $a\in \mathbb{Z}_{p}$. Thus $\mathbb{Z}_{p}$ does not contain any zero divisors and is therefore an integral domain.


Deriving the expectation of $[\hat X,\hat H]$

For a free particle of mass $m$, with Hamiltonian  $$\hat{H} = \frac {\hat{P}^2} {2m},$$  where $$\hat{P} = -i \hbar \frac{\partial} {\partial x}.$$  The commutative relation is given by  $$[\hat{X}, \hat{H}] = \frac {i\hbar} {m} \hat{P}\tag{1}$$  In the common eigenstate of $\hat{H}$ and $\hat{P}$, $|e, p\rangle$, can we do the following?  $$\langle e, p| [\hat{X}, \,\hat{H}] |e, p\rangle = \langle e, p|\hat{X} (\hat{H}|e, p\rangle) -  (\langle e, p|\hat{H}) \hat{X}|e, p\rangle  \\ = \langle e, p|\hat{X} (e|e, p\rangle) -  (\langle e, p|e) \hat{X}|e, p\rangle \\ = e( \langle e, p|\hat{X}|e, p\rangle -  \langle e, p|\hat{X}|e, p\rangle ) \\ = 0 $$  Since the $\hat{H}$ is Hermitian, the above derivation doesn't seem to show any flaw. Given the commutative relation, Eq (1), we know the result is wrong. What's wrong with the above derivation?  [EDIT]  Following the comment by Luboš Motl, I have worked out the solution and would like to share it here. The link provided by Qmechanic had the solution closely related to this question.  $$ \langle e', p'| [\hat{X}, \,\hat{H}] |e, p\rangle \\ = \langle e', p'|\hat{X} (\hat{H}|e, p\rangle) -  (\langle e', p'|\hat{H}) \hat{X}|e, p\rangle  \\ = (e - e') \langle e', p'|\hat{X}|e, p\rangle $$  Note that:   $$ e - e' = \frac{p^2}{2m} - \frac{p'^2}{2m} = \frac{(p+p')(p-p')}{2m} $$  $$ \langle e', p'|\hat{X}|e, p\rangle = -i\hbar \delta'(p - p') $$  where $\delta'(\cdot)$ is the derivative of the Dirac function, with respect to $p$.  Then we get  $$ (e - e') \langle e', p'|\hat{X}|e, p\rangle \\ = -i\hbar \frac{(p+p')}{2m} \cdot (p - p')\delta'(p - p') \\ = - \frac{i\hbar (p+p')}{2m} \cdot (-\delta(p - p')) \\ = \frac{i\hbar (p+p')}{2m} \delta(p - p') $$  As we take the limit $p \rightarrow p'$:  $$ lim_{p \rightarrow p'}    \frac{i\hbar(p+p')}{2m} \delta(p - p') \\ \rightarrow \frac{i\hbar}{m} p \delta(p - p') $$


For some reason, my (basic) program always prints the text I reserved for my else statement. I am a newb when it comes to Java, so if I am making an obvious mistake I apologize. I also searched high and low for an answer, but couldn't find one. Could you take a look at this:  package test;  import java.util.Scanner;  public class tutorial_7 {      private static Scanner x;          public static void main(String args []) {             x = new Scanner(System.in);              System.out.print("Apples, or oranges: ");             String bog = x.next();              if (bog == "Apples") {                 System.out.print(1);             }             if (bog == "Oranges") {                 System.out.print(2);             }             else {                 System.out.print(3);             }         }     } }   Why is the text reserved for my if statements never being output? Everything seems to be fine.  Regards, JavaNoob


Can i use the /testfor command to check for certain words in chat?

I want to be able to detect if a certain word in chat is said like: Console: Please say yes to be teleported or no to remain Player1: yes Player1 teleported to [insert random coordinates here]  Something that would monitor the chat for a certain word.


Latex: How to produce a "Black Board Bold" Epsilon Symbol

I have been unable to find a latex command for a black board bold variant of epsilon. Is there an easy way to produce this symbol?  I have drawn a rough outline of the kind of thing I have in mind.


I know that $\ell_\infty$ is not separable, therefore has no Schauder basis.  However I cannot understand why the set $\{e_1, e_2, e_3, \dotsc \}$ where $e_1=(1,0,0,\dotsc), e_2=(0,1,0,0,\dotsc), \dotsc$ can not work as a Schauder basis.  Every sequence $x=(x_1,x_2,x_3,\dotsc)$ that belongs to $\ell_\infty$ can be written in one and only one way as $\sum_{i=1}^\infty x_i e_i$.   Could you explain why this is wrong? Thank you!


How are black hole masses calculated from gravitational waves?

I would like to know what data is used from gravitational wave detections to calculate black hole masses and how.  Also, what else can you deduce from gravitational wave detections? What was the exact difference between the detection of the black hole mergers and the one of neutron star collision?  I am writing an extended essay on this (4000 words), and it would be very helpful. Many thanks.


Why can't you get an E on a test in the United States?

So, in testing in the USA, an A is the best score you can get. Then comes B, which most students desire, and then comes a C, where you're on the verge of shattering your gradebook by getting a bad grade. Then there's D (even worse), and an F, where you will surely be very ashamed of yourself. Then, there's this alphabetical pattern, A, B, C, D, and then F. But where's E? Why isn't there an E in it? In an answer given, I want a historical explanation of this question that tells how these letter grades popped up, and why E dropped out (or was never included) in the USA. Thanks in advance!


Throughout Fairy Tail, we see that Erza loves Jellal and just him. Some examples are her blushing, trying to kiss him, and when she was turned into a little child just before Tartaros she thought her biggest problem was Jellal thinking he likes them more matured.  But does Jellal reciprocate those feelings even though he rejected her?


Are "traitor" and "trader" pronounced the same?

Are "traitor" and "trader" distinguishable when spoken with any English accent?  My English-speaking friends seem to pronounce them exactly the same way.


What are the full steps to Unlock Disarm and Destroy?

Another question here has already asked , as my level is too low to comment I ask the question in full.  The final step is: "by doing Bird's side missions."  What is the first step of unlocking or triggering these missions?  A note: I didn't put Bird in the question intentionally as it is a spoiler, some people may not want to know the upcoming villains by reading a question and I do not know the policy here on Spoilers.


How to set default umask in Ubuntu 17.04?

In the past, I have always set umask at ~/.profile. I set a umask of 077 so my documents get a permission of 600 (rw-------). But setting this at ~/.profile no longer works in Ubuntu 17.04.  So as new documents get created in a gnome session on Ubuntu 17.04, where can I configure so that they get created with permission 600?


my code in android studio (i think it is in (toString))

I have a problem in my code in android studio, I created it to say "Hello" when the person "abc" writes but that didn't work . can u plz help me. here is my codes  final Button butt=(Button)findViewById(R.id.butt);  butt.setOnClickListener(new View.OnClickListener() {     @Override     public void onClick(View view) {           final EditText frag =(EditText)findViewById(R.id.frag); final TextView hello=(TextView)findViewById(R.id.hello);       String verb =frag.getText().toString(); if (verb=="abc"){             hello.setText("Hello");


Tab autocomplete in terminal is not behaving properly

There's something odd about my autocomplete in the gnome terminal.  I used to be able to type cp Downtab to get cp Downloads/, and then type Jettab to end up with cp Downloads/Jet\ Pack\ Instructions.pdf  But now, when I have cp Down typed and hit tab, I get cp Downloads with a space afterwards. And if I backspace that and make it say cp Downloads/Jet and hit tab, I get cp Downloads/Jet Pack Instructions.pdf without the backslashes.  It wasn't like this before. How do I fix this?  EDIT: There's a problem with my /etc/bash_completion file, it seems. Just not sure what.


Prove if $f$ and $g$ are entire and $e^f+e^g=1$, then $f$ and $g$ are constant.  I believe the simplest way would be to use Louiville's theorem by using Pick's theorem but I am not sure on how to go about this.


Trouble importing Architectural Interiors as fbx models from online sites into Blender

I am trying to import architectural interiors from online 3d model marketplaces like CGTrader or Turbosquid. My workflow is that I download the fbx file, corresponding textures file and put it in a folder called textures at same level as fbx file. Then goto Blender and import the fbx. What I get after import is always a mesh with no textures applied and totally unlit. No matter whether I choose rendering engine as Eevee or Cycles, the textures never get rendered. In the Shading preview (in lookdev portion), the interior is always dark, even then there are lights included in the downloaded fbx. For example, consider the free 3d model available here:  I download the bathroom.fbx and texture.rar. Then created a folder and placed the fbx inside the folder and also put the texture folder extracted from texture.rar here, at same leves as .fbx (see in the screenshot, my folder structure  ) and here is what I see in Blender  As you can see that in the Viewport Shading using Cycles, the whole interior is dark and with spots like its still rendering (even though Blender completed by saying "Rendering Done"). Here is how it should look like: What am I missing? If it helps, I am using Blender 2.91.


I am new to Java. I want to know what it is the use of public constructor in a private class. Private class inside the class can be initialized from the same class then what it is the use to make the constructor of private class to public?  public class MainActivity extends Activity {      private class AcceptThread extends Thread {         public AcceptThread() {          }     } }


The question: $$\lim_{(x,y)\rightarrow(0,0)}\frac{\sin(x+y)}{x+y}.$$ I tried this using $y=x$ path and $y=0$ path and both approach to the same value, $1$. My problem is to show that this value really approaches to one on any path  using the $\varepsilon$-$\delta$ definition.


The description says "Served as a pro-tem moderator for at least 1 year or through site graduation". I do not know what the phrase "pro-tem" means. In what situation would this even occur? Does it warrant a badge? I feel that it is akin to Area 51. It wouldn't occur nearly enough to warrant having a badge.  Also: The Sheriff badge description ends with a period. No other description has ending punctuation. The badge-earners page has two periods now.  at least 1 year..


Cartesian product of an arbitrary number of sets

Do you know some neat Java libaries that allow you to make cartesian product of two (or more) sets?   For example: I have three sets. One with objects of class Person, second with objects of class Gift and third with objects of class GiftExtension.  I want to generate one set containing all possible triples Person-Gift-GiftExtension.  The number of sets might vary so I cannot do this in nested foreach loop.  Under some conditions my application needs to make a product of Person-Gift pair, sometimes it is triple Person-Gift-GiftExtension, sometimes there might even be sets Person-Gift-GiftExtension-GiftSecondExtension-GiftThirdExtension, etc.


Selecting through one-to-many relationship

I'm trying to make a species distribution project where I can select a species from a non-spatial list of species and the selection would highlight (select) all the counties to which the species has been attributed.  Simplified example data: species, a non-spatial table of species (CSV with header): "species" "Mus borealis" "Mus australis"  species_distributions, a non-spatial relation table (csv with header): "species","county" "Mus borealis","North" "Mus borealis","Central" "Mus australis","South" "Mus australis","Central"  counties, a spatial feature class representing county boundaries (first row = field name): "county" "North" "South" "Central" "West"  So if I select "Mus borealis" from the species table, the "North" and "Central" counties would be highlighted in the map. Seems like a simple scenario, but I have been unable to uncover a solution on my own. The closest I've found is a plugin "Select by relationship" but it doesn't appear to be available for QGIS 3 (I'm using QGIS 3.4.3). I have a PostGIS server available.


I'm trying to use scp to transfer a file from a server (which, admittedly, I know not much about) to my local machine. I ssh'ed into the server, and used pwd in the directory of the file to be sure I had it down correctly. Then, I used pwd in the directory of my local machine where I'd like to place the file, just to be sure. I ran scp myusername@server.com:/path/to/file/file.txt /path/to/local/directory. I didn't get any error messages, only export SROOTBASE="/cvmfs/servername.org/py2-v2". When I looked for the file on my local machine, nothing was to be found. I then tried searching for it by name, and still found nothing. What's going on here?


Let $f$ be a continuous function on the closed unit disk and holomorphic inside it, such that $f(z) = 0$ for all $ z = \exp (it) $ with $0 ≤ t ≤ \pi/2 $. Prove that $ f(z) = 0 $ for all $ z \in \overline{D}(0,1) $.  I have worked this exercise for absurdity, but it has not reached any conclusion. I would like to know a more sophisticated test, perhaps by a direct method.


The equation w.r.t integration of inverse function.

the question is as follows.  $f$ is differentiable on $[a,b]$ and $f'$ is continuous. And $\forall x\in[a,b]$, f'(x) is not 0. Then, show that $$\int_a^b f(x)\,dx+ \int_{f(a)}^{f(b)} f^{-1}(x) \,dx = bf(b)-af(a)$$  I take the $$\int_{f(a)}^{f(b)} f^{-1}(x) \,dx = \int_a^b f^{-1}(f(x))f'(x) \,dx$$  I stuck here. How can i solve?


Why does energy have to be emitted in quanta?

I was reading some popular science book and there was this sentence. It says that energy has to be emitted in discrete portions called quanta. Otherwise the whole energy in the universe would be converted into  high frequency waves.  I'm not a physicist, so this conclusion seems to me like a huge leap.  First, we assume that energy is emitted in a continuous way (not in quanta).  And how do we get to the statement "the whole energy in the universe would be converted into  high frequency waves"?


I've downloaded Minecraft Forge for Minecraft v1.6.4 and I can't find the mods folder! Where do I look? I've looked in my Forge folder but it wasn't there!


Writing 0.001 to Postgres 9.x via data adapter results in a weird 0.00 value

Writing 0.001 to Postgres (9.1 to 9.3) via a .net data adapter results in a weird 0.00 value (in pgAdmin) that appears as zero but is not.  In fact, simple queries like SELECT 1/(SELECT "weird_field" ...) FROM ... correcly gives 1000.  More complicated queries (with division) surprisingly result in a division by zero error.  Also, ordering by in Navicat correctly shows those value between 0.0011 and 0.0009    We use Devart libraries to connect to the database, but the culprit seems to be the data adapter (or at least the combo of these two) because a simple direct query, still via Devart drivers, doesn't produce the same result.  Any idea on what's going on?  --  EDIT:  Type on DB is numeric, in the program is represented as double decimal.  pSQL prints this:   --            0.00 (1 row)  --  EDIT 2:  log_statement = 'all' gives a weirdER result:  UPDATE "TABLE" SET ... "WEIRD_FIELD"=$8 ... WHERE ...  DETAIL:  parameters: $1 = '7', $2 = '7', $3 = '18', $4 = '18', $5 = 'V03', $6 = 'Hz',                      $7 = 'Hz', $8 = '0.00', $9 = '0', $10 = '2', $11 = '0'   The parameter for the weird field is printed as zero (0.00), but clearly it is not...  Note that the value in the DataGridView populated by DataAdapter shows up the correct 0.001.  --  EDIT 3 (Maurice):  The issue with the Devart adapter seems to be fixed. Using the latest version, I no longer see the problem. I think it is related to this specific fix: 7.3.293 20-Nov-14: The bug with precision loss when working with PgSqlType.Numeric via the protocol 3 is fixed I upgraded my software using the latest Devart assemblies and now everything works as expected.


I recently came to learn that Brewster's Millions (1985) with Richard Pryor, is only one of 13 versions adapted from the 1902 book.  What film has the most versions?


Question about 3d collision of 2 particles

I'm wondering about how to calculate the resultant velocity vectors of an elastic collision of two particles of same mass, in 3d. I've seen a post on the subject in which you answered, but I didn't quite get it... I know you have to calculate the velocity and direction of the normal vector but I'm not sure how to do it.


JUnit test delete method Object not null after setting it to null

I have written a method deleteProject(Project project) in Administrator.java which sets the project to null. After this I tried to write a test method which calls the deleteProject(Project project)-method and checks if the Object project == null. This is not the case. I have put 3 system.out.println(project) into the methods. If you look at the output the project is set to null in the deleteProject(Project project), but for some reason it still printed in AdministratorTest.  I can't figure out why project doesn't stay null.  AdministratorTest.java  @Before public void setUp() throws Exception {     admin1 = new Administrator("Sponge", "Bob", "Squarepants", "Spongy");            project = admin1.createProject(new VersionID(2, 3), "ProjectX", "Secret", new Date(93, 10, 17));         }  @After public void tearDown() throws Exception {     admin1 = null;           project = null; }  @Test public void testDeleteProject() {     assertEquals("2.3", project.getVersion().toString());     assertEquals("ProjectX", project.getName());     assertEquals("Secret", project.getDescription());     assertEquals("Wed Nov 17 00:00:00 CET 1993", project.getStartDate().toString());     admin1.deleteProject(project);     System.out.println(project);     assertNull(project); }   Administrator.java  public void deleteProject(Project project) {         System.out.println(project);             project = null;     System.out.println(project);         }   Output  model.Project@6d5380c2 null model.Project@6d5380c2


ADC0808 IC working correctly only at times

I am using  for a project on converting analog signal to digital signal. It has a built in multiplexer which we have to use to provide an analog signal to one of the pins. However what happens is:   Sometimes it latches to a particular value say 1000000 and remains at there no matter how many times start of conversion is pressed which should set the inner counter to 0. Sometimes it gives slightly wrong output off by 100 or 1000 and when I press start of conversion, it gives correct output, so its not reliable every time. And most seriously, suppose the control for multiplexer according to datasheet are such that input pin 1 should be active, instead, it works only when the input is given to pin 5 for one particular IC and pin 3 for other.   Since the frequency of 555 clock is 33Hz I thought switch bouncing would be not a concern, hence avoided it.  I have been trying to fit it in logic since 3 days however each day some new error happens. I have replaced it twice from my college lab and now the technician doesn't want to replace it anymore . What is amiss here ?    This is the circuit design taught to us for the similar ADC0804:  Since it doesn't use capacitors I ignored decoupling capacitors.


Dependence of fluid pressure being on height and not mass

Fluid pressure is calculated as  $$\rho = hdg$$  where $\rho$ is fluid pressure, $h$ is depth from surface, $d$ is density of fluid and $g$ is acceleration of gravity.  It used to make sense to me for square or rectangle shaped containers since pressure means force per unit area.  $$Pressure = \frac{Force}{Area} = \frac{Fluid \space Weight}{Container's \space Bottom \space Area}$$  and  $$h \times d \times g= \frac{h\times m \times g}{v} = \frac{h\times m \times g}{h \times s} = \frac{m \times g}{s} = \frac{Fluid \space Weight}{Container's \space Bottom \space Area}$$  where $m$ is mass, $v$ is volume and $s$ is bottom area.  I thought that pressure being dependent on $h$ and not $m$ would be acceptable since $m$ is also dependent on $h$ since fluids can't go higher when they have spaces to their sides.  One big obvious mistake I made was to assume that all containers would be squares or rectangles. So, now I can't wrap my mind around the concept that pressures on tennis balls in the following image are equal.    Why are they equal when the weight (and mass) of fluid above them is obviously different?


This is my question: Find the last 2 digits of $123^{562}$  I don't even understand where to begin on this problem. I know I'm supposed to use Euler's theorem but I have no idea how or why. Any help? Thanks


I'm following the cup walkthrough on YouTube and for some reason, the inside of my cup has weirdly shaded regions.  Is there any way to fix this easily?  Or did I have an incorrect setting and I'll have to redo it?  I'm entirely new to this software, so any explicit details would be welcome.  Thank you very much.


Why can't cron job find basic Linux commands?

I'm trying to set up a cron job to run a PHP script daily as part of a web-based booking system. It's been running perfectly for several years on a different Apache server using this in the crontab:  0 3 * * * wget -q -O /dev/null http://www.my_other_domain.org.uk/scheduled/my_script.php   I've just installed the script on another Apache server, and it runs correctly when called through the browser.  However when I try to use cron, the cron daemon gives the message:  -: warning: setlocale: LC_ALL: cannot change locale (en_GB.utf-8) -: wget: command not found   When I tried  0 3 * * * /usr/bin/env wget -q -O /dev/null http://www.mydomain.org.uk/scheduled/my_script.php   I got the message:  -: warning: setlocale: LC_ALL: cannot change locale (en_GB.utf-8) -: /usr/bin/env: No such file or directory   Firstly, am I right in assuming that the setlocale warning is not relevant to the problem?  I've also tried   0 3 * * * /usr/bin/php /var/www/vhosts/mydomain/httpdocs/scheduled/my_script.php   which gives    -: /usr/bin/php: No such file or directory   I also tried putting a shebang as the first line of my script, and getting cron to call it using the full path.  The cron daemon reported that there was no such file or directory as /[full_path]/my_script.php .  Trying to use curl was no better.  I haven't got shell access to the server and I've been setting up the cron job through the Plesk control panel.  The cron job seems to be running as scheduled.  The system administrator did the following for me:  #which php /usr/bin/php  #which wget /usr/bin/wget  #which curl /usr/bin/curl   That seems to confirm that the commands are in the right location.  The above is an abbreviated history - I've lost count of the permutations and combinations I've tried, mostly as a result of reading advice in this and other forums.  Can anyone tell me why the cron job is unable to find the commands and suggest a solution?


Bash scripts ran from from gnome/nautilus don't have environment variables

In my ~/.bashrc and ~/.profile I have some variables set to some filepaths:  export MY_VAR1="/path/to/somewhere"   In my ~/bin/ (which is added to my PATH) I have a few scripts that rely on those variables being set.  If I run those commands from the terminal, they work as expected.  However, if I try to double click on a script in Nautilus and run it, it runs as if those variables were not set.  Same thing happens if I add one of the scripts to Gnome's "Startup Applications" using the GUI utility or if I add them to the Gnome menu using the "Main Menu" GUI utility.  I would've thought that since I included these variables in my ~/.profile, which is run at login that gnome and nautilus and processes spawned by them would have access to those variables.  Both Gnome and Nautilus are run under my login user. All my scripts in ~/bin have the bash shebang at the top.  I am new to bash scripting, sorry if I am missing something obvious. I am using Debian Wheezy and Gnome3.


What happens when I terminate a process and the socket send buffer is not empty?

In Windows (and probably in other operating systems), if a process has a TCP connection with another process on another machine, and then I terminate the process, an RST packet will be sent to the other machine to indicate the end of the connection.  Now imagine that when the process is terminated, there were still some data left in the send buffer. What will happen in this case, will these remaining data be sent to the other machine followed by an RST packet, or will these remaining data be ignored and only an RST packet is sent?


Probability of winning a tennis game after a point has been played?

Player A and B both have equal chance of winning any given point regardless of who's serving, so there is a 0.5 probability for either of them to win any point and therefore the game. My question is if Player A wins the first point and goes 15-0 up (as per the tennis scoring system) what are their chances of winning the game? Also what about if Player A is 30-15 up, or 40-15 up?  Thanks for any help, James


Show that $ a，b, \sqrt{a}+ \sqrt{b} \in\mathbb Q \implies \sqrt{a},\sqrt{b} \in\mathbb Q $

Inspired by , I was wondering if there is a simple logical argument to   Show that $ a,b, \sqrt{a}+ \sqrt{b} \in\mathbb Q  \implies  \sqrt{a},\sqrt{b} \in\mathbb Q $  Note that the original link is using a computational method, where as I am looking for a simple logical argument.  I tried (unjutifiably) to argue that if some of two square roots is rational then each one is rational, this is a different than the (incorrect) argument that if sum of two algebraic numbers is rational then each one is rational ( counter example $a=1-\sqrt{2},b= 1+\sqrt{2} $)


Can I enter Romania visa-free if I hold an unused multiple-entry Schengen visa?

I have a plan to attend academic conference in Romania and then take a short stay in Austria. Unfortunately, the Embassy of Romania in Thailand is temporarily closed and I have to go to Philippines for visa issuing instead. They also give me a link as the following    "Holders of Schengen valid visas with multiple entries may enter Romania and stay until the date of the validity of the Schengen visa. Further information available at: "  If I apply for multiple entry Schengen visa for Austria, but I will enter Romania first and go for Austria later. Would it be possible in this case? I have written email to ask Ministry of Foreign Affairs in Romania, but did not get any response for a while.


how to type special characters in wijesekara layout ?

I have used wijesekara layout with windows xp. at there i could use alt+num to type the keys that are not in the keyboard. but now in ubuntu wijesekara layout it seems that this doesn't work. how can i type speciall characters those have to be written in normally by pressing alt and entering a number?


Issue with null Uid using Firebase for a chat function

I received the error      "java.lang.NullPointerException: Attempt to invoke virtual method   'boolean java.lang.String.equals(java.lang.Object)' on a null object   reference at   com.example.socialapp.ChatActivity$5.onDataChange(ChatActivity.java:255)"   and I've been searching other similar issues other people have had. I'm not sure what is showing as null, when I look at the Firebase database, I see uid fields with data in it.  I would like to fix this issue and I would also like to know why this is happening.  This is a snippet of my ChatActivity, my readMessages function, where the error is occurring   private void readMessages() {      chatList = new ArrayList<>();      DatabaseReference dbRef = FirebaseDatabase.getInstance().getReference("Chats");      dbRef.addValueEventListener(new ValueEventListener() {          @Override          public void onDataChange(@NonNull DataSnapshot dataSnapshot) {             chatList.clear();             for (DataSnapshot ds: dataSnapshot.getChildren()){                 ModelChat chat = ds.getValue(ModelChat.class);                 if(chat.getReceiver().equals(myUid) && chat.getSender().equals(theirUid) ||                         chat.getReceiver().equals(theirUid) && chat.getSender().equals(myUid)){                     chatList.add(chat);                 }                  //Adapter                 adapterChat = new AdapterChat(ChatActivity.this, chatList, theirImage);                 adapterChat.notifyDataSetChanged();                 //Set adapter to RecyclerView                 recyclerView.setAdapter(adapterChat);             }          }   The error is at line 255   if(chat.getReceiver().equals(myUid) && chat.getSender().equals(theirUid) ||                         chat.getReceiver().equals(theirUid) && chat.getSender().equals(myUid)){                     chatList.add(chat);                 }   Any help would be so much appreciated! Thank you  Edit: Here's my ModelChat.java file  package com.example.socialapp.models;  public class ModelChat {   String message, receiver, sender, timestamp;  boolean isSeen;   public ModelChat(String message, String receiver, String sender, String timestamp, boolean isSeen) {  this.message = message;  this.receiver = receiver;  this.sender = sender;  this.timestamp = timestamp;  this.isSeen = isSeen;  }   public ModelChat() {   }   public String getMessage() {  return message;  }   public void setMessage(String message) {  this.message = message;  }   public String getReceiver() {  return receiver;  }   public void setReceiver(String receiver) {  this.receiver = receiver;  }   public String getSender() {  return sender;  }   public void setSender(String sender) {  this.sender = sender;  }   public String getTimestamp() {  return timestamp;  }   public void setTimestamp(String timestamp) {  this.timestamp = timestamp;  }   public boolean isSeen() {  return isSeen;  }   public void setSeen(boolean seen) {  isSeen = seen;  } }


I'm going thru a phone swap, and I now realize that I have multiple ID's   "codename" "codename@example.com" "realname@example.com"   I've tested all three, and they all have different login passwords. Not sure how I got here but I'd like to clean the mess up.  Is there any way to delete / remove / erase unwanted ID's so they don't exist anymore?  (Note: their existence creates total havoc with any type of ID edit...)  I see from  that I can't merge the apple ID's, but can I simply delete the unwanted ID's?


Having difficulty getting Windows 10 option in grub2

Here is a report when I run boot-repair off a live-usb   So at this point I can either:  A.  Set my booting priority in BIOS to my SSD with Ubuntu 16.04, get the grub2 menu but no option to boot into Windows 10 but two memtest86+ options.  or  B.  Set my booting priority in BIOS to Windows Bootloader (the SSD with Windows 10), the computer starts up Windows 10 and grub2 doesn't show up at all.  How do I go about dual booting so that I can boot from my Ubuntu 16.04 drive -> grub2 and have the option to select which OS I want to boot from?  On a side note, is there a significance after this process is done for the memtest86+ options?  I've honestly tried a bunch of links but if there is one I missed that addresses this particular case please direct me.  Thank you  EDIT:  A user posted a link to this question:     and after following those steps now I end up with no grub2 menu at all upon startup.  Will edit further after I run boot-repair.  EDIT:  After booting from live-usb and running boot-repair this is my report:    So the original problem has now changed to not being able to boot into grub2 at all.  Please don't direct me to more links that don't answer my question and make my problem worse.


the T-split command in linux as opposed to cat?

so for a question I have to store both messages of x and y to log, since y only exists and x does not I used cat x y &> log to be able to store both messages. However as the second part my professor wants us to use tee to store both messages and output both messages on the screen, i have tried things like cat x y &> log | tee log  ,,,  tee x y &> log ,,, log | x y &> log | tee log  but can't seem to get it to work at all, I even google search how and have absolute no clue, anyone have anything that could help?


Null pointer exception in webdrivermanager

package base;  import java.util.concurrent.TimeUnit;  public class Page{          public static WebDriver driver;           public Page() {         if(driver==null) {           WebDriverManager.chromedriver().setup();           driver.get("https://www.zoho.com/");           driver.manage().window().maximize();           driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);         }     } }


How to combine results of jQuery find() and filter()?

Say I composed a DOM snippet:  var dom = $("

no-match

match!

no-match

 ");   and I want to retrieve all elements with '.abc' (i.e. #root and #child2)  dom.find('.abc') will return all matching child elements (ie. just #child2) dom.filter('.abc') will return all matching root elements (ie. just #root)  How can I either: - Make one call that finds both #root and #child2, or - Combine the results of find() and filter()  I've seen other posts on "combining" results eg:  but that's not really "combining" but rather "appending more results to a pre-existing result"  What I really want to do is something akin to $.extend():  var one = dom.find('.abc'); var two = dom.filter('.abc'); var three = combine(one, two); // or one.somefcn(two); // One is augmented // or three = one.somefcn(two); //    Any info/ideas would be appreciated


Will the UK home office know about 5 previous visa rejections in other countries?

I have been rejected for visas 5 times in 4 countries. 3 of those were Schengen countries. Now, I want to study in the UK. Will it be a big issue?. Will the UK home office know everything about my rejection?


In the photoelectric effect, a light ray of sufficient wavelength causes electrons to be released from metal surfaces. By what process do photons do that?  In my textbook, I have seen that  the photon transfers it's whole energy to the electron as a part of elastic collision and so the electron receives the whole energy and comes out.  But I want to know how does a photon transfers energy and how does the electron comes out?


Shell script throwing /usr/bin/env: ‘node’ on npm install

I cant seem to figure this out, although reading a lot of threads with this problem.  Summarize the problem  From a shell script, login in to remote server, pulling a git repo and trying to run "npm install" with absolute path to Node I get "/usr/bin/env: ‘node’: No such file or directory"  Provide details and any research  I have installed Node with NVM. When running "which node" on remote server I get the following path "/root/.nvm/versions/node/v12.16.2/bin/node". Im logging in as root with SSH-key to the remote server.  My shell script look like this:  #!/bin/sh ssh root@my-ip -p my-port<<EOF cd projectDir/my-project git pull origin master ~/.nvm/versions/node/v12.16.2/bin/npm install pm2 restart all exit EOF   When running the shell script I get the following output:  mesg: ttyname failed: Inappropriate ioctl for device From git+ssh://github.com/xxxx/my-project  * branch            master     -> FETCH_HEAD Already up to date. /usr/bin/env: ‘node’: No such file or directory -bash: line 4: pm2: command not found   NVM-version: 0.35.3 Node-version: v12.16.2  When appropriate, describe what you’ve tried  I have tried with different paths to my Node-version but getting the same result. When logged in to the remote server over SSH as user and not via the shell-script and running "~/.nvm/versions/node/v12.16.2/bin/npm install" it works like a charm.


What's more appropriate? "A scientist or engineer..." Or " A scientist or an engineer"

"A scientist or engineer might be interested in estimating ........"  Or  "A scientist or an engineer might be interested in estimating ........."  Which grammatically correct/appropiate and why? Thanks.


Can't find a command for actuarial angle

I'm trying to properly render the following formula:    This is what I've got so far:  aufgel"ost nach $B^A$ ergibt sich  \begin{equation}     \boxed{B^A = \mathit{VS} \cdot \frac{_{\textbar n}A_x + \mathrm{"a}_{x:n} \cdot \gamma}{(1 - \beta) \cdot \mathrm{"a}_{x:t} - t \cdot \alpha^Z}} \end{equation}  bzw. f"ur $t = n$   Rendered result:    However, I can't find the symbol for the actuarial angle for the letters n and t in the numerator and denominator in the AMS symbols list.


The description states:     earn 150 reputation points on three different sites (not including Stack Overflow) within 15 days.     I have 3 questions:   Does this mean that if I earn 150 reputation combined on 3 sites, eg. 100 rep on Meta Stack Exchange and 50 rep on Ask Different, I would get this badge? Does Meta Stack Exchange count? Is this being awarded now since it states 'within 15 days'?


How does the SO voter fraud detection mechanism work?

A recent post on the Stack Overflow blog () states that the Stack Overflow team has implemented a voter fraud detection mechanism.  I look at the user board and noticed at least one user took a major hit as a result.  I'd like to know how it works.  No, not so that I can better circumvent it, but I'd just like to know that it is fair.


My question is this:      $y^2 = \frac{x^5 - 1}{x-1}$ & $x,y \in \mathbb{Z}$     Source: BdMO 2016 Regionals Set 1 Question 3.   I think this is the exact same question. Actually I didn't get the solution in the link. Please don't mark as duplicate.  I tried solving this same problem by writing code; there seems to be $6$ solution pairs to this equation. How do I get the $6$ solutions mathematically? I indeed need a full solution. Please help.


Why does reboot and poweroff require root privileges?

To restart or shut off Linux from the terminal, one can use reboot and poweroff, respectively. However, both of these commands require root privileges. Why is this so? What security risk is posed by not requiring this to have root privileges? The GUI provides a way for any user to shut off or restart, so why do the terminal commands need to be run as root?  Speaking of the options from the GUI, if the terminal requires root privileges to shut off or restart the Linux computer, how is the GUI able to present an option that does the same without requiring the entering of a password?


Proof of inequality and determining convergence/divergence

Prove that $\frac{1}{\sqrt x}\ge\frac{2}{x+1}$ for all $x\gt0$    I started by letting $\sqrt x=n$, giving me $\frac{1}{n}\ge\frac{2}{n^2+1}$, then taking the inverse and rearranging to get the quadratic $n^2-2n+1\ge0$, which when I solve it, gives me $n\ge1$ and therefore $x\ge1$. This proves that the inequality holds for all $x\ge1$, but doesn't account for when $0\lt x\lt1$? How can I account for that?    Thanks very much in advance


Does kernel: EDAC MC0: UE page 0x0 point to bad memory, a driver, or something else?

kernel: EDAC MC0: UE page 0x0, offset 0x0, grain 0, row 7, labels ":": i3200 UE  All of a sudden today, our CentOS release 6.4 (Final) system started throwing EDAC errors. I rebooted, and the errors stopped.  I have been searching for answers, but they fall into two camps, memory or a chipset. I would like some advice on where to search further to narrow this down to chipset or memory.


Why should the first person pronoun 'I' always be capitalized?

Why should we capitalize the first person pronoun 'I' even when it does not appear at the beginning of a sentence? Why is it not the case for other pronouns?


How do I get Realms for Minecraft: PE 0.8.1?

How can I get access to Realms on Minecraft PE?


Is there a word that describes both "comparing" and "contrasting"?

I'm looking for a more succinct word/small phrase that conveys the idea of "comparing and contrasting". Is there a word that hits two birds with one stone by representing both similarities and differences between two ideas/objects?


Grant an app write access to external storage that does not request it?

I would like to grant the  app write access to external storage in Marshmallow.  The app does not request it explicitly (unlike other apps that seem to use the Storage Access Framework to do so).    In the app permissions screen, there is no permission listed for external storage, only for 'storage' (which seems to mean internal storage).  So there does not seem to be any direct way to grant this permission.   My phone is rooted and I could just run Syncthing as root - but this option creates many problems and sometimes results in the app hanging indefinitely.    Is there any other way around this problem?


jQuery UI Draggable and Resizable stop working after 1 click

I have a fiddle here:  If you click on any of the item boxes, it will drop that box into the container (the white space on the right). The goal is to make the boxes in the container both draggable and resizable.  The jQuery UI resizable handle shows up in the box, but it does nothing. You can only drag the item once. After that the box does nothing.  What am I doing wrong here? $(function() {     var $container = $("#container"),         $objects = $("#objects");      $(".box-selectable").on("click", function() {         var $g = $(this).clone(true, true);             $g               .removeClass("box-selectable")               .addClass("draggable resizable")               .appendTo($container)               .resizable()               .draggable();            $(this).remove();         });   });


Independence of points from same underlying function

I have a function $y=sin(x)$  I sample the points $ x_i=\{0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1\}$ and $$ y_i=sin(x_i) + \epsilon \  \ \epsilon \sim iid\ Normal$$  Now given only the set $\{x_i,y_i\}$ I want to uncover the underlying functional form $f(x)$ given as  $$y=f(x)+\epsilon \ \ \ \ \epsilon \sim iid\ Normal  $$  My question is : ARE $y_i$'s independent ?  My intuition is that $y_1$ and $y_2$ are not independent. This is because given a new ${x}$ say ${x_\star}$ we can use $y_i$'s to learn some information about ${y_\star}$.   Does the fact that the input points come from the same underlying function make them somehow correlated or posses commonalities ? and if not why do most methods (ex: Non-parametric splines, Gaussian process) use the $y_i$'s to get information and learn ${y_\star}$ ? Isn't the fact that if samples are independent then they can't learn new information from each other ?


Why Statistics of top and htop are different

Whenever i use top and htop commands to see memory stats, it always different as shown in figures. Which I should trust.


If entropy has log probabilities, why is exponential entropy used?

For random variable $X$, entropy is calculated as $H(X) =-\sum_i p(x_i) \ln p(x_i)$. Differential entropy, not shown, is its continuous counterpart. Both use log probabilities which convert the original probabilities, whose range was $[0,1]$, to the log scale which changes the range to $[-\infty,0]$. It not uncommon to see exponential entropy being used instead, $\exp( H(X))$, I think to circumvent a singularity at $H(X)=0$. As we know, taking the exponential of a log will undo the log. Given that the raw probabilities have been upgraded to log probabilities in the entropy measure, what is the intuition behind further upgrading the entropy measure by undoing its logs using $\exp$?


How do you set your own intercept in SPSS?

I am trying to specify the constant in a regression model using SPSS. Does anyone have an idea on how to do this?


tput setaf color table? How to determine color codes?

I am in the process of colorizing my terminal’s PS1.  I am setting color variables using tput; for example, here’s purple:  PURPLE=$(tput setaf 125)   Question:  How do I find the color codes (e.g. 125) of other colors?  Is there a color table guide/cheat sheet somewhere?  I’m just not sure what 125 is … Is there some way to take a hex color and convert into a number that setaf can use?


Replaced my Windows hard drive, and now the Grub Menu is gone

So I recently had to get my windows hard drive replaced with a bigger drive, and I have ubuntu 20.10 loaded on a separate drive, but now I can't access the Grub menu even through BIOS. It only gives me one option, Windows, but when I use my 20.04 install drive, it recognizes that my other drive has ubuntu on it, as well as windows on my other drive. How do I get the Grub menu to show back up?


How is $\mathbb R^2\setminus \mathbb Q^2$ path connected?

Prove $(\mathbb R \times \mathbb R)-(\mathbb Q \times \mathbb Q)$ is path connected.  I know I need to let $(x_0, y_0), (x_1, y_1) \in (\mathbb R \times \mathbb R)-(\mathbb Q \times \mathbb Q)$ and then consider each of the cases where $x_0 \in \mathbb Q, x_1 \notin \mathbb Q$ and $x_0 \in \mathbb Q, x_1 \in \mathbb Q$ but I don't know where to go from there.


It is said that if we travel at the speed of light,we will go into future,please could you explain how?Is it possible to make a time machine ever? Please give an easy answer, a simple one!


Why does using char agrv instead of char **argv as the argument of main cause the following output?

When I do this:  int main(int agrc, char argv) {     printf("%d", argv);     return 0; }   I get this input when I run the program from command line:  $ prog_name 0 0  $ prog_name (from 0-7 characters) 48  $ prog_name 12345678 56  $ prog_name 1234567812345678 64  // and so on...   So where do these values come from and why they increment by 8?  What happens when I have this instead:  int main(int agrc, char argv[])   ?


How do I study monotony of $x_{n+1}=1+\frac 1{x_n}$ and how do I prove it's bounded

The secuence ($x_n$) is defined by: $x_{0}=1$ $x_{n+1}=1+\frac 1{x_n}$  First, I know $(x_n) > 0$ because there aren't negative numbers involved, so the second term is always positive. Then I see that the second term is at most $1$ and it can't be $0$ or less, so: $1<(x_n)\leq 2$. Then the sequence is bounded. The problem is I don't know how to rigorously show this in a more formal way. Second, I need to know if the sequence is monotonic. I suspect it isn't based on some values that I've calculated. What's the approach to study monotony of a sequence that involves recurrence? EDIT: I just reasoned the following: $(x_n)$ is increasing $\iff x_n <x_{n+1} \iff 1+\frac 1{x_{n-1}}<1+\frac 1{x_n} \iff x_{n-1} > x_n \iff (x_n)$ is decreasing Which is a contradiction, then $(x_n)$ is not monotonic. Is this reasoning correct? EDIT 2: I don't care about the convergence of the sequence. I just want to know how to see if this sequence is monotonic or is not, how to write it the answer rigorously, how to show it's bounded and additionally if the first edit reasoning is correct or is not. So the links to questions about convergence doesn't really help me.


I have populated my JComboBox with the value of same database table and I need an idea to display the value of JComboBox as it is in JTextField.  I am not using Array list instead I am using database table(mysql),below is the program   import java.sql.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.io.*; class Test extends JFrame implements ActionListener {   JButton b1,b2;  JComboBox jc;  String name;  JTextField t1; Connection con,conn; Statement st; PreparedStatement pst; ResultSet rs,rs1;  Test() {      setLayout(null);             JLabel l1=new JLabel("USER SELECTION :");      l1.setBounds(100, 100, 150, 60);      add(l1);      JComboBox jc = new JComboBox();      jc.setBounds(230,114,120,30);      jc.addActionListener(this);      add(jc);      JButton b1=new JButton("GENERATE PART NO. :");      b1.setBounds(70, 340, 170, 30);      b1.addActionListener(this);      add(b1);      t1=new JTextField (10);      t1.setBounds(270, 340, 200, 30);      add(t1);      JButton b2=new JButton("BACK");      b2.setBounds(190, 420,120, 30);      b2.addActionListener(this);      add(b2);       setSize(500, 500);         setResizable(false);         this.setVisible(true);          this.setLocationRelativeTo(null);         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      try{         Class.forName("com.mysql.jdbc.Driver");   con= DriverManager.getConnection("jdbc:mysql://localhost/d02","root","");   st = con.createStatement();    String s = "select Userdata from user";    rs = st.executeQuery(s);      while(rs.next())     {             String name = rs.getString("Userdata");         jc.addItem(rs.getString("Userdata"));    } } catch(Exception e) {     JOptionPane.showMessageDialog(null, "ERROR"); }     finally {     try     {         //st.close();         rs.close();         //con.close();     }     catch(Exception e)     {         JOptionPane.showMessageDialog(null, "ERROR CLOSE");     } } }    public void actionPerformed(ActionEvent ae)   {  String str=ae.getActionCommand();      if(str.equals("GENERATE PART NO. :"))      {  try      {                 Class.forName("com.mysql.jdbc.Driver");               conn = DriverManager.getConnection("jdbc:mysql://localhost/d02","root","");                String query="select value from user where Userdata=?";               PreparedStatement pst=conn.prepareStatement(query);               String tmp=(String)jc.getSelectedItem().toString();               if(jc.getSelectedItem()!=null)               pst.setString(1,tmp);               ResultSet rs1=pst.executeQuery();               while(rs1.next())               {                   String add=rs1.getString("value");                   t1.setText(add);               }       }          catch(Exception ex)      {            ex.printStackTrace();           JOptionPane.showMessageDialog(null, "ERROR CLOSE");      }              if(str.equals("BACK")==true)             {                 new categ();                 setVisible(false);             }      }  }    public static void main(String[] args) throws IOException    {   Test td=new Test();    }   }


Say $a=b$. Is "Do the same thing to both sides of an equation, and it still holds" an axiom?

Recently I have started reviewing mathematical notions, that I have always just accepted. Today it is one of the fundamental ones used in equations:      If we have an equation, then the equation holds if we do the same to both sides.    This seems perfectly obvious, but it must be stated as an axiom somewhere, presumably in formal logic(?). Only, I don't know what it would be called, or indeed how to search for it - does anybody knw?


Given a user calculate how many bytes their process are consuming

I'm working with linux and I want to make a script that gets an username in the input and it returns the memory that their proccess are consuming.  How can I achieve this.


.sh file cannot be executed without explicitly calling sh

Let's say I have a file called run.sh that contains:  #! /bin/sh -x  x-www-browser index.html   And ls -l run.sh says:  -rwxr-xr-x 1 myusername myusername 39 Jan  9 19:32 run.sh   And ./run.sh says:  bash: ./run.sh: Permission denied   Why does it not work? Why does sh -x run.sh work perfectly?    More info, since it's not so easy apparently  If I do a sudo, it will not output an error, but won't do anything either.  myusername@crunchbang:/mnt/data$ sudo ./run.sh [sudo] password for myusername:  myusername@crunchbang:/mnt/data$


Unable to run any GRASS 7 algorithms in QGIS 2.18.10 on Windows 7(64)

Running Windows 7 Professional (64bit) SP1. I have QGIS 2.18.10 installed from the standalone installer. The GRASS commands (161 algorithms) are present in the toolbox and seem to run ok. However the GRASS GIS 7 commands (314 algorithms) result in the following message box: I have tried uninstalling, deleting all traces of QGIS from the Registry, and then reinstalling using the OSGeo4W64 installer selecting various different options, including adding GRASS 6, also without any success. I deleted the OSGeo4W64 installation and reinstalled it. No change. I then re-installed the standalone QGIS package and copied the \msys folder from the OSGeo4W64 GRASS 6 installation into the \apps folder of the QGIS 2.18 directory. Nothing changed. I have ensured paths are correct in Providers section of Processing options:I have ensured the output folder has no non-ASCII characters as that seems to be another possible cause, but still have not solved the issue.


Which backups does Time Machine keep or delete?

I know Time Machine promises to keep one backup per hour for the past 24 hours, a daily backup for the past month and a backup per week beyond that. What I’m wondering is: if you’ve connected an external Time Machine drive multiple times on a given day, which of those backups gets kept and which ones get deleted?  I had always assumed Time Machine would keep the last backup of a day (and similarly, the last backup of a week), but that doesn’t seem to be true: I made two backups last Sunday and wanted to get a file back from the second one, but found that only the first one is still on the drive. Some digging through the Console logs shows that Time Machine deleted the second Sunday backup yesterday.  Does Time Machine perhaps simply keep the first, rather than last, backup of a day? Or does it use another criterion to decide which backup to keep, for example the smallest or biggest backup of the day?


Database.insert(list, false) run trigger twice?

Example: If we are inserting 10 records in an object, Where 5 records are correct and the remaining 5 records are incorrect.     •   In Database.insert 5 records will be inserted, remaining 5 records will be failed.(i.e. Partial DML Operation).      (record.addError is in after insert trigger.)     (no workflows, flows, or process builder on that object       or validation rules)  Assumption: database.insert goes first time through trigger and in the end of after insert trigger we can do soql and see 10 records ids and etc.(they are not committed yet) then before commit to DB occurs error and system starts again insertion(now only of the correct records) and in trigger goes these 5 correct records(so it goes to trigger the second time) and process continues till the end.  Question: tell me please is that correct? (before answer check please :) ).


How to stop dhclient from updating resolvconf on Debian?

I want to use certain DNS servers regardless of whatever I get through DHCP. I'm trying to configure dhclient to ignore those, but I can't seem to get it to work.  Per advice from  I added supersede domain-name-servers 8.8.8.8, 8.8.4.4; stanza to my /etc/dhcp/dhclient.conf file. I also tried  and removed domain-name-servers and domain-search values from request directive. Both of those, applied separately as well as together, seem to have no effect. After running sudo dhclient -r and then sudo dhclient, I still find following entries in /etc/resolvconf/run/interfaces/enp2s0.dhclient:  domain lan nameserver 192.168.1.1   which prompt resolvconf to put nameserver 192.168.1.1 in my /etc/resolv.conf file.  I double-checked if I don't miss any semicolons or similar syntax elements. How can I get my configuration to work? I don't want to remove resolvconf, since it manages changes in my nameservers when I use corporate VPN and it does it well. It looks like dhclient is the offending party here.  Here's my current /etc/dhcp/dhclient.conf with default comments removed for the sake of clarity:  option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;  send host-name = gethostname(); request subnet-mask, broadcast-address, time-offset, routers,         domain-name, host-name,         dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,         netbios-name-servers, netbios-scope, interface-mtu,         rfc3442-classless-static-routes, ntp-servers;  #supersede domain-name-servers 8.8.8.8, 8.8.4.4;   Update: per request in comment, here's output of ps ax | grep dhcp:  23528 pts/2    S+     0:00 grep dhcp


Business Schengen Visa with no invitation letter

I am a Pakistani National living in the UK on a spouse visa of a British National.  I work for a multinational company and will require to travel to Europe frequently to speak to the governmental regulatory bodies.  My question is that my company does not have any other offices in Europe so an invitation letter will not be possible. Is there any other way I can apply for a Business Schengen as my traveling is going to be very unannounced and getting visas will be an issue with my job and traveling.  Please advise me on the best possible solution.


Property 'itemInstances' and 'processOrder' not valid in version 48.0 error when deploying in Production, even though Production is 49.0

When trying to deploy the converted metadata using VS code sfdx force:mdapi:deploy deploy to my Production Org and I get the error Property 'itemInstances' not valid in version 48.0 and Property 'processOrder' not valid in version 48.0. But when I go to Developer Console and open a class, even though it says 48.0, I have the option to select 49.0, so I am assuming I have 49.0. Yet I get this error. Pretty much all my classes, trigger and components are version 48.0, but I am not sure how that affects flexipages and Approval processes.


Is it still better to overexpose raw images (for use in Lightroom)?

I generally have a tendency to underexpose images to avoid white clipping, especially when doing landscapes so that the sky doesn't get ruined as white clipping looks worse than black clipping. I know you can get use Lightroom tools to recover areas but I aim for the best shot when I'm taking it.  However I just read a book on Camera Raw ('Getting started with Camera Raw' by Ben Long - 2008) which explains you should lead towards overexposure rather than underexposure because the way cameras allocate bits towards capturing brightest is skewed towards the brightest part of the image. And therefore it has more data to play with when making adjustments in the brighter parts of the image than the darker.  Is this still true?  And why does it do this way rather proportionally the same for lights and darks? (The book didn't explain this).


What does the blue point before app name in lauchpad mean?

As the arrows point, the little blue points before Evernote and MS OneNote.


Does anybody known the relationship between the $\Gamma (a)$ and $\Gamma (a+\frac{1}{2})$, is there a equation or approximate equality between this two?


How to insert into a database from a txt file?

I've got a txt file with thousands of words separated by a ";", but it could change for another special character in the future.  How can I use that txt file as input into an SQL query so I create a mass insert?, is it possible?.


Tiebreakers for best loser in a single elimination playoff

In an instance where three teams were beaten by 3:1, 4:2 and 5:3, which team qualifies as best losers?


From what I've read, in the framework of linearised gravity, one perturbs the metric around a Minkowski background, $\eta_{\mu\nu}$, such that  $$g_{\mu\nu}(x)=\eta_{\mu\nu}+h_{\mu\nu}(x)\tag{1}$$  where $h_{\mu\nu}(x)$ is a small perturbation, i.e. $$\big\lvert h_{\mu\nu}\big\rvert<<1.\tag{2}$$  The inverse metric is then found by assuming the following ansatz:  $$g^{\mu\nu}(x)=\eta^{\mu\nu}+\tilde{h}^{\mu\nu}\tag{3}$$  where $\tilde{h}^{\mu\nu}$ is also small (i.e. $\big\lvert \tilde{h}_{\mu\nu}\big\rvert<<1$).   Using this, it is easy to find that  $$g^{\mu\nu}(x)=\eta^{\mu\nu}-h^{\mu\nu} \tag{4}$$  to first order.   My question is, what is the justification for this ansatz? Is it simply that one expects the inverse metric to have a similar form to the metric in order to satisfy $$g^{\mu\alpha}g_{\alpha\nu}=\delta^{\mu}_{\;\nu}~?\tag{5}$$


Uninstall a package that I have installed using a .sh script

I have more older versions of NetBeans installed on my system and I would like to uninstall them.  The problem is that I have installed them all from a .sh shell installer script simply running from cmd and none of Synaptics, apt, dpkg nor Software center knows about any NetBeans installation.  I know I could probably run the installer again and select the Uninstall/Remove option but I have already deleted all of the installers long time ago and downloading them again just to be able to uninstall current installations is not a solution for me.  Is it possible to just delete the local files (since none of the packaging software knows about them) and consider this operation as uninstall? Or is there some better option?


Let be $f,g$ functions analytic in $z_0$, with $z_0$ a zero of order one of $g$ and $f(z_{0})\neq 0$. Show that  $$ \operatorname{Res}\Bigl(\frac{f}{g},z_0\Bigr)=\frac{f(z_{0})}{g'(z_{0})} $$ My attemp... If $z_{0}$ is a zero of order one of $g$, then $g(z)=(z-z_{0})h(z)$, with $h(z)$ analytic and $h(z_{0})\neq 0$, then by analyticity of $g$ and $h$: $g'(z)=h(z)+(z-z_{0})h'(z)$. So,  $$ \frac{f(z_{0})}{g'(z_{0})}=\frac{f(z_{0})}{h(z_{0})+0}=\lim_{z\to z_{0}}{(z-z_{0})\frac{f(z)}{g(z)}} $$  But in the ultimate point I'm not sure


Is "to one of the most genuine people I know" correct?

I am confused if I should use persons or people. Persons sounds weird to me.


How to compare the strings using < (Greater than symbol)


Can you have a Pokemon from every generation in the latest one?

When Gold/Silver came out, I remember being excited that I could transfer over Pokemon from RBY, given a friend's GBA and a link cable. That's the generation I stopped at, but I'm curious if the practice continued indefinitely.  Can I have a Pokemon originally caught in every (mainline) game in ORAS, given the old games and all the necessary consoles and accessories? How far does this extend to (trade-capable) spinoffs, like Colosseum? If I wanted to do this, and had all the games, what consoles and accessories would I need?


Allow only RemoteApp, not Remote Desktop

I found the following question, with a similar premise, however the answer to the question, was the question rephrased as a statement!    How do I allow RemoteApp but disallow Remote Desktop? In order to allow remote app, I'm seemingly having to add the users to the "Remote Desktop Users" group. This allows Remote Desktop.  I tried using the "TS Web Access Computers" group, however this does not give them the authority to run RemoteApp.  Where is the configuration to disable Remote Desktop, while leaving RemoteApp capabilities intact?


There is 1 out.  There is a runner on first, and the ball is hit to the second baseman.  The second baseman gets the ball and runs towards first.  The runner on first stays on 1st base and the batter is running towards first.  If the second baseman with the ball steps on first base, who is out and who is safe?  If the second baseman steps on first, do they still have a force on 2nd base?


Firefox - no option to save address, credit card and other details

I quote to this  at Mozilla.org  Turn autofill on or off   Click the menu button Menu and choose Preferences. Click the Privacy & Security panel. In the Forms & Passwords section, put a check mark next to Autofill addresses to turn it on, or remove the check mark to turn it off.   I have a Privacy & Security panel but no Forms & Passwords section nor an Autofill option.  This is an updated version of Firefox on an updated version of MacOS.  Where are these options? Searching for them using the preferences search returns nothing.


Let $L_1$ and $L_2$ be two undecidable languages.  1) Is it possible that $L_1 - L_2$ is regular and $L_1 - L_2 \neq \emptyset$ ?  Well I know that if I let $L_1 = L_2$ then $L_1 - L_2 = \emptyset$ which is obviously regular. In the case of this question however, I cannot set $L_1 = L_2$ if the outcome is an empty set, which makes me wonder what would $L_1 - L_2$ actually look like if they were not equal to each other.  2)  Is it possible that $L_1 \cup L_2$ is decidable and $L_1 \neq \neg L_2$ ?  This one is also tricky, since the obvious solution here would be to let $L_1 = \neg L_2 $  Does anyone here have an idea as to how to finish my solutions here? I need to prove my solutions in both cases.


PHP function behavior after upgrading from 7.0 to 7.2

my functions have become extra strict about passing ALL of the arguments now instead of just what I need) This used to work function namedFunction($avar, $bvar, $cvar){ ....... }  echo namedFunction('a','b');  Now NOTHING works unless I pass echo namedFunction('a','b','');


Prevent the OP commenting on their own post?

Unsurprisingly, most long discussion threads under a post involve the OP — and preventing them from commenting on their own question or answer will help to reduce comments being used for discussion.  If the OP wants to discuss someone's comment, they should have the immediate option to 'take discussion to chat' instead, and be able to @reply from there.  Obviously this would change the commenting behaviour of the OP, but there may be a significant side benefit: a reduction is comments that solicit discussion from other users as we come to realise that we can't simply start a discussion thread on the post any more. All the  would still work, as none usually require discussion:        Request clarification from the author;   Leave constructive criticism that guides the author in improving the post;   Add relevant but minor or transient information to a post (e.g. a link to a related question, or an alert to the author that the question has been updated).


Object detection/recognition, pre-processing error

My Imports: # Importing modules  import numpy as np  import pandas as pd  import os import matplotlib.pyplot as plt import cv2  from keras.utils import to_categorical from keras.layers import Dense,Conv2D,Flatten,MaxPool2D,Dropout from keras.models import Sequential  from sklearn.model_selection import train_test_split  My Code: np.random.seed(1)   train_images = [] train_labels = []  shape = (108,108)  label_path = 'Beer/ModelSet/'  train_labels.append('miller_lite') train_labels.append('stella_artois') train_labels.append('michelob_ultra') train_labels.append('belgian_blue')  for folder in os.listdir(label_path):     for files in os.listdir(label_path+folder):         img = cv2.imread(os.path.join(label_path,folder,files))         train_images.append(img)   train_labels = np.asarray(pd.get_dummies(train_labels).values)  train_images = np.asarray(train_images)   x_train, x_val, y_train, y_val = train_test_split(train_images, train_labels, random_state=1)  The part that fails     x_train, x_val, y_train, y_val = train_test_split(train_images, train_labels,  random_state=1)  The reason it fails ValueError: Found input variables with inconsistent numbers of samples: [20000, 4]  My Error: 2020-08-03 23:47:11.117431: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 Traceback (most recent call last):   File "/Attempt-2.py", line 40, in <module>     x_train, x_val, y_train, y_val = train_test_split(train_images, train_labels, random_state=1)   File "python3.8/site-packages/sklearn/model_selection/_split.py", line 2127, in train_test_split     arrays = indexable(*arrays)   File "python3.8/site-packages/sklearn/utils/validation.py", line 293, in indexable     check_consistent_length(*result)   File "python3.8/site-packages/sklearn/utils/validation.py", line 256, in check_consistent_length     raise ValueError("Found input variables with inconsistent numbers of" ValueError: Found input variables with inconsistent numbers of samples: [20000, 4]  The Goal: Create a classification model that distinguishes between 4 different brands of beer bottles. MillerLite,StellaArtois,MichelobUltra, and BelgianBlue. Background Note: I have never had any practical/work experience with either software engineering, data science, software development, machine learning etc. I am just a student messing around for my own amusement/fun. The Question: How exactly do I fix this? I understand the problem is that matrix x is not the same size as matrix y. X is 20000 images of size 108,108 and 3 channels RGB. Y is the label matrix: [[1 0 0 0][0 1 0 0][0 0 1 0][0 0 0 1]] in order to split into train/test images the error says I need to have the same len/size array/matrix for both x and y.


What does it mean to "program to an interface"?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


Symmetric difference and approximation of measure

Let $\scr{A}$ be an algebra of subsets. Let $(\Omega, \sigma(\mathscr{A}), P)$ be a probability space. Then for each $B \in \sigma(\scr{A})$ and $\epsilon > 0$, there exists $A \in \scr{A}$ such that $$P(A \Delta B) := P((A \setminus B) \cup (B \setminus A)) < \epsilon.$$  There is a suggestion to consider a collection of such all sets $B$ satisfying the condition. I guess I should look at $$G = \{B \subseteq \Omega :\ \mbox{there exists} \ A \in \mathscr{A} \ \mbox{such that} \ P^*(A \Delta B) < \epsilon \ \forall \epsilon > 0\}$$ (I am not sure here that I should use the measure $P$, or its corresponding outer measure $P^*$ instead).  I find that the hint does not much helpful for me, can anyone suggest more about this problem ?


Fast way to get a position of combination (without repetitions)

This question has an inverse:     What would be the most efficient way to translate a combination of $k$-tuple into its positions within the $\left(\!\!\binom{n}{k}\!\!\right)$ combinations? I need this to be fast for combinations of $\left(\!\!\binom{70}{7}\!\!\right)$ order of magnitude - very large, but not exceeding 2 billion (fits into int32 maximum value).  Below is an example of $\left(\!\!\binom{6}{3}\!\!\right)$, where the aim is to quickly translate (a, d, f) tuple to value 9, while in the real problem $k$ ranges between 5 and 8.  $$\begin{array} {cccccc|c} a&b&c&d&e&f&^{combination}/_{sort\_order}& \\\hline x&x&x& & & &1\\ x&x& &x& & &2\\ x&x& & &x& &3\\ x&x& & & &x&4\\ x& &x&x& & &5\\ x& &x& &x& &6\\ x& &x& & &x&7\\ x& & &x&x& &8\\ x& & &x& &x&9\\ x& & & &x&x&10\\ .&.&.&.&.&.&.\\  & & &x&x&x&20\\ \end{array}$$  I know that I could pre-calculate all the combinations and reverse the lookup dictionary. However, such dictionary would not be efficient in terms of memory usage. Therefore I am looking for either calculation-based approach, or a more efficient data structure to perform this mapping.