How to find previous boot log after Ubuntu 16.04+ restarts?

My question is, how can I find boot log from previous system boot attempt?  Today when first powering on my PC, boot process stopped on Ubuntu logo, when I pressed Esc I have seen several lines containing some kernel error and restart required at the bottom, so I pressed Ctrl+ALt+Del and next boot went OK without problems.  I have trouble finding messages from the screen I have seen during the first unsuccessful boot. Should I have taken picture to my phone?  /var/log/boot is there but empty, I searched  and  for strings I remembered with today's date like error but found nothing familiar to what I have seen on previous boot screen.  $ journalctl -b -1 gives me only kernel messages during boot, I can find that elsewhere too, and they are not what was appearing on screen during boot, journalctl is useless for me, I am looking for messages appearing on screen during boot time.  For now, only option is take a photo of write the message on paper.


No Launcher at all, just blank desktop (with bg image)

So, okay, I've been using Ubuntu 12.04 and this just came out yesterday when the launcher disappeared. I cant right click on screen 'cause nothing happens, I can open TTY with ctrl+alt F1, F2 and so on...I've been able to run a terminal with   DISPLAY=:0 gnome-terminal   And switch to it with Ctrl+alt+F7. I do this in case something goes wrong with TTY.  I also can run nautilus with   sudo nautilus  I can access to my desktop and files but everything looks bad and basic, I can't access to media e.g. a usb wich I want to backup my files in. Here are the things that I already tried:  DISPLAY=:0 ccsm  Which seems.to be okay, first time I went there Unity was unchecked and I checked it and clicked okay to the additional dialogs that checked another options also like OpenGL...After this, nothing happened. I rebooted like 6 times and same. Weird thing.is that when I reset to defaults the  Unity option unchecks itself.  unity --reset WARNING: no DISPLAY variable set, setting it to :0 ERROR: the reset option is now deprecated  Then I run the display =0 and it just goes.with the last error.   Updating nvidia Drivers Removing nvidia Drivers Installing nvidia Drivers ReInstalling nvidia drivers Same with Compiz, Unity, Unity Desktop, and Xorg. Reseting lightdm Changing to GDM Unity Tweak Tool Reseting compiz with dfcon-tool Installing Xubuntu to have the kind of back up desktop manager...but same ..nothing. I need to say this that I think is where the problem is... whenever I open Unity from the terminal and/or TTY, it crashes;  it loads the compiz (core) plugins but it stucks in:   .... compiz (core) - Info: Loading plugin: unityshell compiz (core) - Info: Starting plugin: unityshell Segmentation fault (core dumped)   There's a very limited info about this one and posts offer what I already my previous tries to solve the issue. Im sorry I cant put the complete  tty info as Im posting this from my phone ...thanks in.advance!! I really need some.files and pretty much tried everything out there!  :(


When taking a multi-segment flight, is it guaranteed that you would get all boarding passes at the first airport?

I have a flight with three segments, the first is from Bangkok to Cochin (India) with Thai AirAsia, the second from Cochin to Doha with Qatar Airways and the third from Doha to Frankfurt also with Qatar Airways.  Only the flight from Bangkok to Cochin has online check-in.  My question is, whether I can get my boarding pass for the flights with Qatar Airways already in Bangkok at the Qatar Airways booth. Because I don't have a visa for India, so I can't leave the transit area to collect my boarding pass at the regular check-in counters.  I didn't find my option in the answer of this post   Also I didn't understand where the hotel agent in this answer came from or whether I can make use of this option:


Google search results show my title incorrectly twice

Does anyone know why Google shows my title twice in search results? And it's the wrong title too.  Here's a screenshot:


Whether the given number is divisible by 24?

Let $a$ be an integer which is not divisible by 2 and 3. Prove that 24 divides $a^2-1$.  This, $a$ can be written as $a=2x+1$ or $a=3z+r$ where $r=1,2$ and $x$ and $z$ are integers.  This $a^2-1= (2x+1)^2-1$ or $(3z+r)^2-1$  Taking first case : $4x^2+4x$  But, how to prove that it is divisible by 24? Is my method correct? Please give me some hints on how to do this.


I have a process that runs on a @reboot cron job.  The process needs to run an executable file.  I have noticed that I have to put the executable in /usr/bin/.  I can't just put it in a folder in my $PATH list.  So my question is, if processes run by cron jobs do not look in the $PATH list of directories, where do they look?  Obviously they at least look in /usr/bin/.


Integral of $\sqrt{1-x^2}$ using integration by parts

I was asked to solve this indefinite integral using Integration by parts.  $$\int \sqrt{1-x^2} dx$$  I know how to solve if use the substitution $x=\sin(t)$ but I'm looking for the Integration by parts way.   any help would be very appreciated.


What kind of objects can be used with the "using" keyword in C#

I want to know what kind of objects can be used with the "using" keyword in C#? Other than adding a namespace


A bounded linear operator from $X ^*\rightarrow Y^*$ is weak*-weak* continuous iff It is the adjoint of some Bounded linear operator $X\rightarrow Y$

Let $X,Y$ be normed vector spaces and $B:Y^*\rightarrow X^*$ a linear operator. We want to show that $B$ is $weak*-weak*$ continuous iff $B=A^*$ for some $A \in \mathcal{L}(X,Y)$. My intial idea was to set $A=\iota^{-1}_Y\circ B^{*}\circ\iota_X$ where $\iota:X \rightarrow X^{**}$ is the canonical embedding $x \mapsto ev_x$, the evaluation map of $x$ ie $\iota(x)f=f(x)$. I think this will work except how can I know $\iota^{-1}$ is defined (that is, how can I guarantee $B^*(\iota(x)) \in \iota (Y))?$ If this where Banach space I would be done, but I don't know what to do in this setting. Am I even on the right track? EDIT: I found  but I'm not clear on the setting. It looks to me (admitly naively) they are assuming reflexivity of $Y$ (and, or that $Y$ Banach, which I don't have?


How does the racial feature Mask of the Wild apply in practice (how is it beneficial?)

My interpretation of Mask of the Wild is that players with this feature are able to hide in situations that other players are unable to. For example, a wood elf can attempt a stealth roll in heavy rain, while other players would not be able to because it is too easy for them to be seen without this feature. This has been my interpretation based on a fair bit of reading and sticks to RAW more than offering advantage etc.  Unfortunately I am struggling to find ways to apply this feature in most circumstances. The feature only helps in situations associated with natural phenomena, so towns, dungeons, vessels, palaces, etc. are largely excluded from the feature. But when I consider a forest, I recognize that all players can attempt to roll stealth checks by hiding behind trees easily enough. It seems silly to imagine a situation in which only a wood elf can hide but others cannot (you're in a forest, but all of the trees are so skinny that only a person with Mask of the Wild can hide?).  It seems Mask of the Wild is only helpful when natural phenomena are not enough for the average player to hide, but are still enough for a wood elf to hide (moderately tall grass, short bushes, very light forest, heavy rain or snow in open spaces, and moderate but not heavy mist outside of forests), which seems relatively limited. In addition, I would probably need to make effort as a DM to create these types of situations specifically to allow mark of the wild to be beneficial. I don't typically differentiate between forest and light forest, or tall grass and taller grass.  I am running a campaign in the jungles of Chult, which presumably almost always offers an opportunity for any player to attempt to hide, which makes things worse.  How does Mask of the Wild apply its benefits in practice? When is this a beneficial feature?    This question is different from the other question  as it relates to the mechanical benefits of the feature, rather than flavour.


Why do italics sometimes work and sometimes do not work?

This is definitely the most irritating aspect of an otherwise excellent service:  As of 6/4/14:  No Italics:  app/controllers/users_controller.rb  Italics:  app/models/user.rb  Why? Because there's an underscore in the first path? This is a bug, right?


Adobe Illustrator: Lines with stroke < 2.0pt doesn't change color

I created lines using the line segment tool in Adobe Illustrator (latest Adobe Cloud version) and I can't change the color of the stroke (through the Appearance panel) if the stroke weight is less than 2.0pt.   If the stroke is 2pt or more, then the color around the line changes but not the line itself.    The whole behavior is odd for me as I've never faced in Illustrator before.  Edit: added screen below with the line selected.


Does a character with 10 Constitution only need to eat every 4 days?

According to the food rules,     A character can go without food for a number of days   equal to 3 + his or her Constitution modifier (minimum   1). At the end of each day beyond that limit, a character   automatically suffers one level of exhaustion.   A normal day of eating resets the count of days   without food to zero.   According to this, a character with a Constitution modifier of 0 can eat normally every 4th day*, and get no penalties from hunger despite only eating twice a week. This seems a tad ridiculous, and I'm wondering if there are other rules that I'm missing that make it a bad idea to eat less often like this, or if eating every 4th day is a totally fine thing to do, by the rules.  * They can get away with four days, because they'll only get the exhaustion penalty if they don't eat by the end of the fourth. This is even assuming the 'minimum 1' doesn't apply to the con mod portion.


Asking the position of a person in a sequence

How to ask the position(?) of a president (like 10th) of a country, correctly?


How to protect a java code easily from reverse enginnering?

i have programmed a library in java i want to protect from reverse engineering. I read about obfuscation and understood that it is only making it a little more difficult to read instead of making it completely impossible to decompile.  Iam not very expierenced in it-security/ software protection.  I found  a free tool for java/ android obfuscation. I have tried different ways to obfsucate the jar file. My problem and also question is, can i actually import a jar file in to a different project after obfuscation??  My library was not working anymore as i imported it in a project.  Do i have to obfusacate the whole java application at the end? or can i obfuscate my library i want to protect and use it in different projects?


What ZIP compression method do common OS's natively support?

7-zip gives me 5 options for the compression method to zip files with:   Deflate Deflate64 LZMA BZip2 PPMd   On my Windows 8 machine, the built-in Windows Explorer utility appears to handle LZMA with no problem can list the files in an LZMA-compressed file with no problem...but not actually read them. I know Deflate is the most compatible, but for some files I'm attempting to distribute, the maximum setting results in a file that's 2x larger than the LZMA-compressed file. However, because the people I'm distributing it to have whatever OS, I need a widely-supported format.   What compression methods to the native zip utilities on Windows 7, 8, and Mac OS X support?


Is there a general formula for $I(m,n)$?

Consider the integral  $$I(m,n):=\int_0^{\infty} \frac{x^m}{x^n+1}\,\mathrm dx$$  For $m=0$, a general formula is $$I(0,n)=\frac{\frac{\pi}{n}}{\sin\left(\frac{\pi}{n}\right)}$$  Some other values are $$I(1,3)=\frac{2\pi}{3\sqrt{3}}$$ $$I(1,4)=\frac{\pi}{4}$$ $$I(2,4)=\frac{\pi}{2\sqrt{2}}$$  For natural $m,n$ the integral exists if and only if $n\ge m+2$.      Is there a general formula for $I(m,n)$ with integers $m,n$ and $0\le m\le n-2$ ?


I have download and install lineage 2(game) and i search on internet how to run it the only  think i found was to download wine and then i will be able to play it.but i downloaded  and  when i  double click on the l2.exe i can see it on the system monitor running for 1 min but then dissapear , and the game is not running at all.  i dunno know what else to do  can you help me? I have download and install lineage 2(game) and i search on internet how to run it the only think i found was to download wine and then i will be able to play it.but i downloaded and when i double click on the l2.exe i can see it on the system monitor running for 1 min but then dissapear , and the game is not running at all. i dunno know what else to do can you help me?


Salesforce CLI issue while creating Project

When I try to create project with manifest I am getting the following error:   Starting SFDX: Create Project >  > 10:25:36.141 sfdx force:project:create --projectname AmDev > --outputdir c:\Users\shruthim4\Documents\VS Code --template standard --manifest { AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Program Files > (x86)\Sfdx\client\node_modules\salesforcedx-templates\lib\templates\project\standard\ScratchDef.json >     at EditionInterface.exports.copy (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3) >     at EditionInterface.module.exports [as copyTpl] (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8) >     at ProjectGenerator.writing (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\lib\generators\projectGenerator.js:57:17) >     at Object.<anonymous> (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:427:27) >     at C:\Program Files (x86)\Sfdx\client\node_modules\run-async\index.js:25:25 >     at new Promise (<anonymous>) >     at C:\Program Files (x86)\Sfdx\client\node_modules\run-async\index.js:24:19 >     at self.env.runLoop.add.completed (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:428:13) >     at runCallback (timers.js:705:18) >     at tryOnImmediate (timers.js:676:5)   generatedMessage: false,   name: 'AssertionError [ERR_ASSERTION]',   code: 'ERR_ASSERTION',   > actual: false,   expected: true,   operator: '==' } { AssertionError > [ERR_ASSERTION]: Trying to copy from a source that does not exist: > C:\Program Files > (x86)\Sfdx\client\node_modules\salesforcedx-templates\lib\templates\project\standard\ScratchDef.json >     at EditionInterface.exports.copy (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy.js:49:3) >     at EditionInterface.module.exports [as copyTpl] (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8) >     at ProjectGenerator.writing (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\lib\generators\projectGenerator.js:57:17) >     at Object.<anonymous> (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:427:27) >     at C:\Program Files (x86)\Sfdx\client\node_modules\run-async\index.js:25:25 >     at new Promise (<anonymous>) >     at C:\Program Files (x86)\Sfdx\client\node_modules\run-async\index.js:24:19 >     at self.env.runLoop.add.completed (C:\Program Files (x86)\Sfdx\client\node_modules\salesforcedx-templates\node_modules\yeoman-generator\lib\index.js:428:13) >     at runCallback (timers.js:705:18) >     at tryOnImmediate (timers.js:676:5)   generatedMessage: false,   name: 'AssertionError [ERR_ASSERTION]',   code: 'ERR_ASSERTION',   > actual: false,   expected: true,   operator: '==' } 10:25:38.556 sfdx > force:project:create --projectname Amodev --outputdir > c:\Users\shruthim4\Documents\VS Code --template standard --manifest  > ended with exit code 0   I am facing the same issue even when I tried to create project from CLI. I have installed latest Salesforce CLI and I have added correct path to Environment variables still I am facing this issue. Please help me revolve this issue.


Method required to enable a toy "vehicle" to follow a "target" wirelessly?

I am trying to create a small robot toy car with the ability to follow a person around, with a range of about 50 m.  Ideally the person will be provided with a small transmitter of some kind, and the car will have a receiver which will allow it to determine the direction to the transmitter so that the car can follow the person holding it.  However,  I understand that systems such as infrared require line of sight to operate, while others like WiFi are too omnidirectional to pinpoint the transmitter direction.  Is there any recommended method or system that would meet my requirement?    Added:  Notes:  To elaborate, it is more for remote photo taking. A person would hold a remote tag and trigger a command; after which the robot would seek out the person, and position itself in the same direction to take a shot. Unfortunately GPS not not a solution as for this application is mostly for indoors. I understand RFID tags may work although i am not sure if it has sufficient directionality


javascript mystery - how functions get access to outside variables

I am kind of new to javascript and trying to understand some non trivial - at least so i hope :) things.  my question is general, but i have a specific example which can help me ask my question and help you understand what i mean.  the example:  function updateBookmark(bookmark){     var index = _.findIndex($scope.bookmarks, function(b){         return b.id == bookmark.id;     });     return index; }   obviously the findIndex function is declared somewhere (in our case - lodash.js)  and it gets two parameters (at least two visible parameters: a data set, and a function)  first question:  in this example, what is b? how does b gets its value? i understand b is each of the data set's objects, but i mean - what is going behind the scenes here so b will be what it is??  second question:  the author chose to pass an anonymous function which equals b.id with bookmark.id,  i understand that he can use bookmark.id where he is using it, but how does findIndex has access to this bookmark?!   this function as i concluded earlier is declared somewhere else, does it get all the variables in the scope some how? what is going on here?  Thanks in advance to responders and sorry for the messy question... Jim.


Why can't 10K users search for others' deleted posts?

I have been trying to get to 10 thousand reputation for a while on Science Fiction & Fantasy (taking a while :P) but learned something weird a few weeks ago: users with 10,000 reputation can't search for others' deleted posts.  What is the point of this? If those users are able to see the questions, why make it hard to find the questions to see?  That's like giving someone in the government a lot of security clearance, but not letting them into DC except if they find a link to there (weird analogy).


This question is already asked  but it does not quite answer my question.  When I review, I get some posts that are answers of very poor quality, or I get flags declined on questions with the message flags should not be used to indicate technical inaccuracies, or an altogether wrong answer.  So posts should be down voted. But if the post belongs to other domains you are active in, such as .net, but the post actually is in PHP, then your Reputation Point will detect I got it from .  My Question is: If a post is not good, then we should down vote. But if this post simply belongs to another category, a point should not be deducted. So why are Reputation Point deducted in this case?


Can a phd thesis be in a different area than the master thesis?

First of all let me begin with saying that I have seen there is a question quite similar to this one, but I thought I'd ask again so I could get more specific about my situation since I am guessing it's different for every major. I am currently doing a master in mathematics, thinking about possibly pursuing a phd after that. During my undergraduate studies in mathematics, I mainly took pure math classes with an extra emphasis on algebra related courses(group theory, field theory, applied algebra). So far I thought that if I were to do a phd it would be in algebra. During my masters I also continued with pure math classes, such as real analysis, algebra etc. But I am currently taking a class in theory of computation and it has really caught my attention. That along with the fact that during the last year of my undergraduate studies I took a class in design & analysis of algorithms which I really enjoyed, has made me thinking that maybe if I were to do a phd, it wouldn't necessarily be in algebra after all but maybe in something in the interface of mathematics and theoretical computer science or in foundations of mathematics,or maybe even something that combines algebra with theoretical computer science if there's even something like that. Not really sure yet. My questions are:  1. Can my master thesis area be different than my phd area? If yes, how different?Say if I were to do a master thesis in pure or applied algebra, would it be possible to then pursue a phd in something that maybe combines math and theoretical computer science?  2. What kind of background is needed for a phd in a topic somewhere between pure math and theoretical computer science? Would maybe a second masters in computer science be needed? (Also I guess a good 3rd question would be if maybe having taken only 2 classes in theoretical computer science that I enjoyed is not enough for me to be able to tell if I would actually like something like that?)


likewise-open | 14.04 | other easy way to connect AD?

we use a lot of Linux-Servers with active-directory membership for user-authentication. This are made with the likewise-open packet. We tested the beta-Version of ubuntu Server 14.04 LTS. Everything works fine after one minute (install, domain-join, import registry, edit sudoers, done). Now, from beta to production-release likewise-open is removed from repository.  Is there any equivalent easy way for AD-domain-join and (AD-)group-based login-management (without manually installing and editing config-files for samba, winbind, nsswitch, pam etc....?  thanks a lot Silvio


Why $\sqrt{-1 \times -1} \neq \sqrt{-1}^2$?

We know $$i^2=-1 $$then why does this happen? $$ i^2 = \sqrt{-1}\times\sqrt{-1} $$ $$ =\sqrt{-1\times-1} $$ $$ =\sqrt{1} $$ $$ = 1 $$  EDIT: I see this has been dealt with before but at least with  I'm not making the fundamental mistake of assuming an incorrect definition of $i^2$.


For every $\epsilon>0$ there exists $\delta>0$ such that $\int_A|f(x)|\mu(dx) < \epsilon$ whenever $\mu(A) < \delta$

Hello all mathematicians!! Again, I am struggling with solving the exercises in Lebesgue Integral for preparing the quiz. At this moment, I and my friend are handling this problem, but both of us agreed this problem is a bit tricky. The problem is following.   Let ($X,\mathcal{A},\mu$) be a measure space and suppose $\mu$ is $\sigma$-finite. Suppose $f$ is integrable. Prove that given $\epsilon$ there exist $\delta$ such that   $$ \int_A |f(x)|\mu(dx) \;\;<\;\;\epsilon $$  whenever $\mu(A) < \delta$.  Could anybody give some good idea for us? Think you very much for your suggestion in advance.


Add button to watch questions/get notified on edits, comments, etc

I often have the situation that I read a question and leave a comment requesting an edit to provide more information by the OP.   Currently, I add the phrase that he/she should please also write a comment containing "@ByteCommander" to notify me when they're done. This is not optimal as it's additional typing and often the OP does not follow it.  I know that the star/favorites feature allows me to bookmark questions and see on my user profile site how many/which questions had a recent change. But I think this is pretty complicated. I don't want to fill up my list of favorites with tons of questions and I don't really want to check that section out regularly.  My suggestion is to add a button similar to the "watch"-button on GitHub that enables notifications on edits, answers and/or comments without ping to appear in my global inbox instead of being hidden somewhere down in my profile.  Do you think this would improve the usability of the sites and increase the question solving rate? I do.


jQuery execute when content and external content is done loading

My website loads from a few external sources (photos and movies in iframes, Youtube etc)  The code below is executed when my page is loaded but also if external sources are still loading.  $(function() {     //some code });   Which code should I use if I want a script to be executed when all the sources are loaded? (including external sources)


Proving $\lim_{x\to 1} x^3=1$ with $\epsilon$-$\delta$ definition

Problem: I need to formally prove that $$\lim_{x\to 1} x^3 = 1.$$ My work: This is what I have so far and I'm generally a bit stuck with these proofs from here onwards. Because$$-\epsilon < x^3-1 < \epsilon  =  | x^3-1 | < \epsilon,$$ then $$ -\epsilon < x^3-1 < \epsilon$$ $$-\epsilon+1 < x^3 < \epsilon +1$$ $$ \sqrt[3]{-\epsilon+1}< x < \sqrt[3]{\epsilon+1}.$$ Hoping that what I have done so far is correct. Am I right in thinking that $$ \sqrt[3]{-\epsilon+1}< x < \sqrt[3]{\epsilon+1}$$ is giving me an interval where $x$ is going to give me a $f(x)$ value that falls within the distance $\epsilon$ from the limit on the $y$-axis ? Or is this interval smaller than the $\epsilon$-distance on the $y$-axis?


If the norm of the velocity vector is continuous, is the velocity vector itself continous?

I was seeing some facts about the arc length function for vector-valued functions of a real variable and I stood upon the fact that "If $\overrightarrow{v}(t) = \overrightarrow{r'}(t)$ is continuous on $t \in [a,b]$ then $\overrightarrow{r}(t)$ is rectifiable and we have $\Lambda(a,b)$ (arc length when $t$ goes from $a$ to $b$) is less than or equal to $\int^b_a||\overrightarrow{v}(t)||dt$" and that "If $||\overrightarrow{v}(t)|| = v(t)$ is continuous, then we have $\Lambda(a,b) = \int^b_av(t)dt$" by the additivity property and the former fact. Then it came to my mind the question "If $\overrightarrow{v}(t)$ is continuous, of course $v(t)$ is also continuous (since limits can "enter" into square roots and squares since they're both continuous)... but what if we only had $v(t)$ being continuous, would $\overrightarrow{v}(t)$ necessarily be continuous?" Intuitively, that converse seems to be wrong to me, since, in my head, I couldn't make a way to force each component to be equal to its limit at the point we're analysing, but I also don't know how to make a counter-example to make sure that my intuition is right (or see if it's actually wrong)... Any help on this approach would be very much appreciated! Edit: Mark S. made me see the other question, so if I define $\overrightarrow{v}(t)=f(t)(1,1,...,1)$ (in $R^n$) in such way that $f(t) = 1$ to $t \in Q$ and $f(t) = -1$ to $t \in R-Q$, we'd have $v(t) = |f(t)|\sqrt{n} = \sqrt{n}$ which is constant and, by such, is continuous in any interval, thanks so much for the answers!


How could the Vulcans in First Contact Speak English?

In Star Trek: First Contact, when the Vulcans come to Earth and meet Dr. Cochrane, the one very clearly says "Live long, and prosper."  But how would the Vulcans know how to speak English? Up until this point they considered mankind to be 'too primitive' for first contact, and likely wouldn't have bothered to learn any of the languages from Earth. This was also about 90 years before the creation of the universal translator. So how was it that they were able to communicate with Dr. Cochrane and the other humans?


How to properly implement relationship between a user and multiple other users

I have a table with the following structure:  Table_1 --- UserId (int) --- UserName (varchar)   A user can have a relation with other users. Meaning, a UserId from Table_1 can have a relation with other UserIds. So, the question is, how should I structure a second table to implement this?  The second table needs to contain the UserId of a user and other UserIds that the user has relations with. So, should I structure the second table as follows:  Table_2 --- UserId (int - Primary Key) --- OtherId (varchar)   In the structure above, in OtherId I was planning to store all other UserIds in conjunction, like one column would contain all other UserIds that the principal UserId is related with, but each UserId in the OtherId column would be separated with a comma (,). The way I would retrieve them would be by taking the value from the OtherId column and then, in code-behind, splitting the string by (,) into an array. Then I would use each value from the array to retrieve the UserName from Table_1.  This was the idea I had. I tested it on a database of 300,000 records in Table_1 and one relationship string consisting of almost 3000 UserIds in the second table. This took a significant amount of time (10s) to process all the data, including the splitting of the string.  I am almost certain that my idea is nowhere near to ideal practices. Can someone just give me some ideas on how I should go about this?


If someone uses Polyjuice potion on someone who has already used it, would they turn into the normal or "disguised" person?

What would happen, if person A would take person B's hair and drink Polyjuice potion. Wait until transformation is complete and then take a hair from person A (as person B) and make person C drink Polyjuice potion.  Would person C turn into person A or person B and if it would be the first, wouldn't that be a method to determine whether or not someone has taken Polyjuice potion?


Composition of Absolutely Continuous Functions

I'm aware through a plethora of counterexamples that for two functions $f$, $g$ that are absolutely continuous, their composition is not necessarily so. However, before seeing these examples, I had written out what I thought was a proof confirming that it was true, and I'm not sure where my error is. My proof is as follows:  Assume that $f$ and $g$ are absolutely continuous. Let $\epsilon_f > 0$. Since $f$ is AC, there exists a $\delta_f$ such that for any finite disjoint collection $\{(a_k,b_k)\}$  $$ \sum_{k=1}^n [b_k - a_k] < \delta_f \Longrightarrow \sum_{k=1}^n |f(b_k) - f(a_k)| < \epsilon_f$$  Since $g$ is absolutely continuous as well, let $\epsilon_g = \delta_f$. Then there exists $\delta_g$ such that  $$ \sum_{k=1}^n [b_k - a_k] < \delta_g \Longrightarrow \sum_{k=1}^n |g(b_k) - g(a_k)| < \epsilon_g = \delta_f \Longrightarrow \sum_{k=1}^n |f(g(b_k)) - f(g(a_k)| < \epsilon_f $$  Thus, the composition is AC. I realize that the only difference between this is that in the composition, for the domain of $f$, I'm assuming that the sum $|g(b_k) - g(a_k)|$ in absolute value is less than $\delta_f$. However, I'm not quite sure why that absolute value should matter in the case of continuity. It's left out of the original definition because it's assumed that $b_k > a_k$. Other than that, though, I don't see any errors in logic. Thoughts?


Today I clicked in this link in TeX StackExchange  and I got this message (screenshot below).  In particular, what does it mean that "Latex Productions International has acquired  the world wide exclusive rights from D.F.Knuth" !?   Obviously ctan.org changed hands or something, what happened to ctan.org?  what would be a good link to use for TeX packages?


Determinant of the sum of matrices: $\det (A + B^T) = \det(A^T + B)$

How can you show that $$ \det(A + B^T) = \det(A^T + B)$$ for any $n\times n$ matrices $A$ and $B.$


I have the following custom extension method, which allows you to dynamically specify which field will be sorted - it is used to tie into a JQuery DataTable.  public static IQueryable<T> OrderByField<T>(this IQueryable<T> q, string SortField, string SortDirection) {    var param = Expression.Parameter(typeof(T), "p");   var prop = Expression.Property(param, SortField);   var exp = Expression.Lambda(prop, param);    var method = SortDirection == "asc" ? "OrderBy" : "OrderByDescending";    var types = new Type[] { q.ElementType, exp.Body.Type };   var mce = Expression.Call(typeof(Queryable), method, types, q.Expression, exp);    return q.Provider.CreateQuery<T>(mce);  }   It is then called as follows: .OrderByField("ColumnName", "asc") where the two params are strings.  I wish to modify this function to allow "thenby" to be called immediately after, however I am unsure how to do this.   Any help greatly appreciated.


Two  tags on all pages showing same content

Hi I have a little problem. The website theme we are using displays the website name at the top of every page as an  element the title of the post then gets displayed as an  element again. Effectively having two  tags on the page. Here is an image with example:    The circled content in the top left corner of the image gets displayed on every page, than my actual h1 tag gets displayed in the body section as can also be seen on the image  My Question   Is the above a problem? Will it affect my sites overall SEO performance even though we are producing quality content? The bottom line is this: Should I get a developer to fix it or is it okay/safe leaving it as is?


Prove the inequality $({1+\frac{a}b})^n$ + $(1+\frac{b}a)^n$ $\geq$ $2^{n+1}$

Let $a$ and $b$ be positive real numbers and let $n$ be a natural number prove that   $$\left({1+\frac ab}\right)^n+\left(1+\frac ba\right)^n\ge2^{n+1}.$$


Best Practices for preventing you from looking like a spammer

I'd like to feel more confident setting up mail for my clients with regards to false positives.  Here's what I know:  SPF records are good, but not every spam filter service/software (SFSS) uses them.  reverse DNS (PTR) records are pretty much a necessity.  Open relays are bad. (Here's "other tips" I've read):  the reverse lookup of the IP address of your mail server should resolve to the domain that you're sending mail out from.  your server should say HELO FQDN.of.your.mail.server.com when speaking to other mail servers.  the A host records in MX records should be (or resolve to to the IP address) your FQDN.of.your.mail.server.com   Feel pretty good about 1 and 3.  Here's where I'd like some clarification/suggestions: 2 and 4: I did alot of digging and this seems to be incorrect as most spam-filters are looking for a PTR in general and one that's not generically-assigned by the ISP; it doesn't appear that the domain you send mail out as has anything to do with this (i.e. if you owned two domains you used for mail, you'd need to send out from two IP addresses with PTRs for each?)  This makes sense, but does it care what that FQDN resolves to?  Should it resolve to the IP address that's currently sending said HELO?  Again, another one from various Google searches; don't see how this would work if you used Postini as your gateway service (or any other smarthost for that matter).   And what about sending on behalf of another domain that you're not authoritative for? I have some clients (some.branchdomain.tld) that are required to send mail out as @some.corporatedomain.tld, even though said corporate HQ won't setup a relay/smarthost for them to use.  corporatedomain.tld can create SPF records to show that some.branchdomain.tld is allowed to send mail, but would that still be considering "spoofing", especially if said SFSS doesn't check SPF records?  Should I be concerned about this?


Our server is launching brute force attacks on other websites, please advise

Misc Situation:  -Server login is obtained by hacker, hacker places malicious brute force file in /hacked/bruteforce/  -Server password is then changed, hacker can still run script by navigating to their file on the server which will run upon their request (I am assuming?)  Question:  Would a combination of changing the server login password as well as adding a password protected .htaccess file to / stop the hacker in their tracks? Or can an .htaccess still be avoided in terms of rerunning the hacker's script?  I am very new to server security but am eager to learn anything and everything anyone can tell me! I highly appreciate any and all advice. Any recommended knowledge resources would also be fully utilised!  OUR SITUATION:  Here is the information provided to us by our host.  your Server/Customer with the IP: * has attacked one of our servers/partners. The attackers used the method/service: bruteforcelogin on: Sat, 14 Nov 2015 -exact time provided here-. The time listed is from the server-time of the Blocklist-user who submitted the report. The attack was reported to the Blocklist.de-System on: Sun, 15 Nov 2015 -exact time provided here-  Here is some more:  Lines containing IP-ip here-: NOT SORTED (from many different Machines)! DESTINATION-IP: -ip info here-  DESTINATION-IPs: -ip info here-  -ip here- - - [14/Nov/2015:-exact time provided here-] "POST wp-login.php HTTP/1.1" 200 4366 "referer-domain.tld" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"  -ip here- - - [14/Nov/2015:-exact time provided here-] "POST /wp-login.php .... truncated .... 0"POST wp-login.php HTTP/1.1" 200 4366 "referer-domain.tld" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"  -ip here- - - [14/Nov/2015:-exact time provided here-] "POST wp-login.php HTTP/1.1" 200 5117 "referer-domain.tld" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"  Regards, Jay.


How to prove this limit exists: $a_{n+2}=\sqrt{a_{n+1}}+\sqrt{a_{n}}$

Question: Consider a sequence $\{a_{n}\}$ such that $a_{1},a_{2}>0$, and for all $n \in \mathbb{N}$ we have:  $$a_{n+2}=\sqrt{a_{n+1}}+\sqrt{a_{n}}$$  Prove that :  $\displaystyle\lim_{n\to\infty}a_{n}$ exists and find this limit.  My work: If this limit exists, let $\displaystyle\lim_{n\to\infty}a_{n}=x>0$; then we have $$x=\sqrt{x}+\sqrt{x}\Longrightarrow x=4$$ But I can't see how to prove the limit of $\{a_{n}\}$ exists. Thank you for you help!


I would like to merge multiple List into one but I am not sure on how to do it .. My code is the following: public with sharing class ApprovalDashboard {     public ApprovalDashboard(){              }          @AuraEnabled(cacheable=true)     public static List<Object> approvalTableData(){         List<Object> FinalList = new List<Object>();         List<AggregateResult> OppList = [SELECT Opportunity__r.Id  FROM Approval__c                                       WHERE (Type__c = 'Investment_Committee' OR Type__c = 'Pre_IC')                                      AND Status__c != Null                                      AND CALENDAR_YEAR(Date__c) = 2021                                      GROUP BY Opportunity__r.Id];                  for(AggregateResult item: OppList){             List<Opportunity> OppData = [SELECT Id, Name, StageName                                          FROM Opportunity                                          WHERE Id = :item.Id];                          List<Approval__c>ApprovalList = [SELECT Name, date__c FROM Approval__c WHERE Opportunity__r.id = :item.Id];             system.debug(OppData);         }                                             return OppList;              }  I would like to mege OppData and ApprovalList into one big List in the format [{}, {},{}] .. Any help ?


Static pointer to class member causes undefined reference

of my problem is:  class Callee { public:   int m1()   {     return 5;   }    constexpr static int (Callee::*method)() = &Callee::m1; };  template <class O> int call(O &o, int (O::*m)()) {   return (o.*m)(); }  int main() {   Callee callee;   return     (callee.*Callee::method)() // works fine     *     call<Callee>(callee, Callee::method) // causes undefined reference in GCC   ; }   This code compiled in clang (3.4-1) but failed in gcc (4.8.4) with message:  undefined reference to `Callee::method'   Shorter, I can call some class method by its pointer directly, but I can't call it from templated function. (It is more unclear, than I inherit from Callee, because both methods works fine) Why?


Is there a limit to how hot an object can get?

If heat is the measure of how fast the atoms are moving in an object, than isn't there a limit to how hot that object can get as nothing can go as faster than the speed of light. So because the atoms can't vibrate that fast, will there be a limit to how hot the object can get?


Is the field extension of $\mathbb{R}$ over $\mathbb{Q}$ a countable infinity or uncountable infinity?

In looking at other questions/answers here on MSE, $[\mathbb{R}:\mathbb{Q}]$ is infinite, but they didn't specify whether it was a countable infinity or uncountable infinity. I would guess uncountable since even a union of countably infinite many copies of a countable set like $\mathbb{Q}$ is still countably infinite, and the irrationals $\mathbb{R} - \mathbb{Q}$ are uncountable, but I'm not sure if a set-theoretic argument like that would transfer over to a statement about field extensions. Thanks for any advice.


Suppose that a real sequence $u_n$ is such that $$u_{n+1}-u_n \rightarrow0$$  That is not enough to prove that $u_n$ is convergent (take $u_n=ln(n)$)  Now what if $u_n$ is bounded ? I guess it does converge, but how to prove this ? I tried to show that it had only one accumulation point...


I downloaded Hex Workshop, and I was told to read a .dbc file.     It should contain 28,315 if you read   offset 0x04 and 0x05   I am unsure how to do this? What does 0x04 mean?


After some searching on stack / google I decided to ask this here, this is the second time I'm facing this issue this time with blender 2.8, previously with 2.7 and without a clue to how I got here.  Some of my objects appear hidden(10/12), and I can't seem to find a way to unhide them.  Solutions to the most common rookie mistakes seems to be   In local-view solved by pressing numpad / hidden by pressing H or Shift + H, unhiding with Alt + H   I'm not in local view, I can toggle visibility for 2/12 objects with Shift + H & Alt + H, but the rest stays gray in the collection.  Last time I solved this by exporting the whole model as STL and importing it back again, I then had to re-group all the pieces but there must be a more simple solution.  Here's the .blend if someone wants to have a go at it:


I'm looking for a very basic backup script/package for a directory on my Ubuntu server. Currently I'm using a cronjob like this:  0 5 * * 1 sudo tar -Pzcf /var/backups/home.tgz /home/   But I want a solution which adds a timestamp to the filename and does not override old backups. Of course this will slowly flood my drive so old backups (e.g. older than 2 months) need to be deleted automatically.  Cheers, Dennis    UPDATE: I've decided to give the bounty to the logrotate-solution because of it's simplicity. But big thanks to all other answerers, too!


Could someone explain this shebang line which uses sh and then does exec perl?

This is from . It's about executing a Perl script.     Finally, if you are unfortunate enough to be on an ancient Unix system   that doesn’t support the magic #! line, or if the path to your   interpreter is longer than 32 characters (a built-in limit on many   systems), you may be able to work around it like this:   #!/bin/sh -- # perl, to stop looping eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0;   Can you explain step by step what's going on here? I'm trying to make it work or encompass, but to no avail.  At execution of just the above, I'm getting this:  /bin/sh: 0: Illegal option --


3 square in a circle (geometric question)

There is three square in a circle like the picture attached.   How can find radius of circle  ? I know that's not a hard problem,but I was away from geometry for years.  If possible give me hint or idea to start to solving.   Thanks in advance.   the smallest side is $6$ and medium square side is $6+6$ and big side is $6+6+6$ But I got stuck here and not to go over there ...


I have seen executable .exe files for all programs installed in Program files folder for Windows OS. Is there any equivalent folder in Ubuntu 16.04 where I can find the executables of installed programs ?  Also, what is the extension of Ubuntu executables ? Thanks.


Unique Canonicals for related product Webpages

For a site that carries "lists" of products, what is the best approach to using canonicals? example.com/green-watches.php - this is the MAIN page (by main, it means that this should be indexed in Search results, and this should be the landing page). It will carry list of FIRST 10 products (i.e. first 10 green-watches as listed in the catalog). Now, there can be a total of 55 green-watches in the catalog, so the rest of the pages can have example.com/green-watches.php?list=11 (page2 - having 11th to 20th watch) example.com/green-watches.php?list=21 (page3 - having 21st to 30th watch) and so on.. example.com/green-watches.php?list=51 (page6 - having 51st to 55th watch)  Obviously, the content on each of these pages (main page, as well as page2 to page6) will be different. But I do not want the landing page to be from page 2 to page6....landing should be on the main page only as that's where I wish the site visitor to start. Further, the basic PHP page in all these URLs remains the same - which is example.com/green-watches.php. Its only the argument attached to it ( ?list=11 and ?list=21 and the likes) which are changing. I am catching these arguments in a FORM-GET method. Question - from SEO perspective, do the rest of the pages (page 2 to page 6) need to have their own unique canonical URL, or is it recommended to have their canonicals point to that of the main page? Any other implementation suggestions for above for better SEO?


Spanish Schengen visa can I enter another country due to Covid

I have a multi entry Schengen visa issued by Spain for tourism, I live the UK which has imposed a 14 day quarantine on people returning from Spain, can I cancel my Spanish trip and use the visa to go to a different Schengen Country


Why do you need explicitly have the "self" argument in a Python method?

When defining a method on a class in Python, it looks something like this:  class MyClass(object):     def __init__(self, x, y):         self.x = x         self.y = y   But in some other languages, such as C#, you have a reference to the object that the method is bound to with the "this" keyword without declaring it as an argument in the method prototype.    Was this an intentional language design decision in Python or are there some implementation details that require the passing of "self" as an argument?


i am trying to add a text to my output   def as():        a = 0         return a   def d():     return d


What factors should one look for when purchasing a speedometer? Does wired vs wireless or anything else factor into its accuracy?


Windows 10 on asus x44h touchpad scolling not working

I have just updated Windows 7 to Windows 10.  My touchpad scolling (right-side) is not working anymore.    I have no idea how to fix this in Windows 10.  I have hit the start button and typed "synaptic", but have found nothing useful.  I used to have an icon on the taskbar that showed where I was touching the touchpad.  I used to be able to right-click that icon to change settings, but Windows 10 has not brought that icon over.  Also, the asus website has no synaptic touchpad drivers available for Windows 10.  I have tried the enaltech drivers, but upon the installation atempt I am told that my hardware is not correct.


I am using AUCTeX on Emacs. When invoking preview.el with e.g. C-c C-p C-p I obtain previews of external figures (figure environment with .ps files), but not of TikZ pictures.  Is it possible to obtain previews of figures drawn with TikZ?


jQuery click function not being called for removing dynamically generated text boxes

I'm having issues with remove buttons on dynamically generated text boxes. The click function does not get called at all, and I'm not sure why. Can someone please point me in the right direction?   Here is the code:  HTML

Additional Authors

         <input id="addAuthorButton" type="button" value="Add Author" class="btn btn-lg btn-default btn-block" />

     JS  $(document).ready(function(){      var counter = 0;      $("#addAuthorButton").click(function () {          if(counter==5){             alert("Only 5 additional authors allowed.");             return false;         }          counter++;          var newTextBoxDiv = $(document.createElement('div'))             .attr("id", 'additionalAuthor' + counter).attr("class", 'additionalAuthor input-group');          newTextBoxDiv.after().html("<input class='form-control' type='text' placeholder='Author Name'>");          newTextBoxDiv.appendTo("#additionalAuthorsTextboxes");      });      $(".removeAdditionalAuthor").click(function () {         $(this).closest('div').remove();     }); });   CSS  @import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'); @import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css');    I also have setup a JSFiddle page:


I am having trouble with an ImageView that I am using which is returning null. The issue seems to be with findViewById and causes a problem when I ateempt to getX() for the imageView. I have tried everything and still can't get it to work. Any help would be greatly appreciated!  xml:  ImageView     android:layout_width="100dp"     android:layout_height="100dp"     android:layout_alignParentBottom="true"     android:layout_centerHorizontal="true"     android:src="@drawable/character"     android:id="@+id/character"     android:scaleType="fitCenter"     android:clickable="false"     android:longClickable="false" /   Java: package fozard.backuptestapp;  public class Play extends AppCompatActivity {  private GameThread thread; private float charX=0; ImageView character;  public void setCharacter(ImageView character) {     this.character = character; }  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_play);      }  @Override protected void onStart(){     super.onStart();     thread=new GameThread();     thread.setRunning(true);     thread.start(); }  public boolean onTouchEvent(MotionEvent event){     switch (event.getAction()){         case MotionEvent.ACTION_DOWN:             thread.setMovementSpeed(5);             thread.setMoving(true);             break;         case MotionEvent.ACTION_UP:             thread.setMoving(false);     }     return true; }    public void updateCharPos(float movementSpeed){     Log.d("Updating", "Should be able to update");     character = (ImageView)findViewById(R.id.character);     charX = character.getX();     System.out.print(charX); }   }  stack trace:  11-24 09:32:32.918 16706-16706/fozard.backuptestapp D/Updating: Should be able to update 11-24 09:32:32.923 16706-16706/fozard.backuptestapp D/AndroidRuntime: Shutting down VM 11-24 09:32:32.923 16706-16706/fozard.backuptestapp W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41cbc700) 11-24 09:32:32.933 16706-16706/fozard.backuptestapp E/AndroidRuntime: FATAL EXCEPTION: main                                                                       java.lang.NullPointerException                                                                       at fozard.backuptestapp.Play.updateCharPos(Play.java:71)                                                                       at fozard.backuptestapp.GameThread$1.run(GameThread.java:88)                                                                       at android.os.Handler.handleCallback(Handler.java:730)                                                                       at android.os.Handler.dispatchMessage(Handler.java:92)                                                                       at android.os.Looper.loop(Looper.java:176)                                                                       at android.app.ActivityThread.main(ActivityThread.java:5419)                                                                       at java.lang.reflect.Method.invokeNative(Native Method)                                                                       at java.lang.reflect.Method.invoke(Method.java:525)                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)                                                                       at dalvik.system.NativeStart.main(Native Method)


Prove: $\alpha \rightarrow \beta, (\alpha \rightarrow \lambda) \rightarrow \beta $ proves $\beta$ in HPC

I want to prove $\alpha \rightarrow \beta, (\alpha \rightarrow \lambda) \rightarrow \beta $ proves $\beta$ in HPC  I use MP and the axioms listed here:   I guess that the end of the proof should look something like this:  $(\alpha\rightarrow(\beta\rightarrow\lambda)) \rightarrow ((\alpha \rightarrow \beta) \rightarrow (\alpha \rightarrow\lambda))$  $(\alpha \rightarrow \beta) \rightarrow (\alpha \rightarrow\lambda)$   $\alpha \rightarrow \lambda$  $\beta$  but I can't find out how I can get to $(\alpha\rightarrow(\beta\rightarrow\lambda))$ given my premises  would be happy for some help


printf double with up to n decimals but not more as needed

I want to trail the output of a double to 2 decimals or less. Consider following example:  #include <stdio.h>  int main() {     printf( "%.2f\n", 2.    );     printf( "%.2f\n", 2.5   );     printf( "%.2f\n", 2.25  );     printf( "%.2f\n", 2.125 ); }   The output is  2.00 2.50 2.25 2.12   Is there any way to print the values with less than 2 decimals, in case less are needed? I mean the desired output is  2 2.5 2.25 2.12   Answers with iomanip are allowed. I'm focusing on C++, not C but the example is c-only.  I know, that it is often not possible because double values are not precise, but in my examples they are because all fractional parts are powers of 2


Unexpected difference using List vs using Set

I have sets of objects CustomObjectA, CustomObjectB, CustomObjectC... that I need to pass to a method. I would like to put them in a Map of type Map< String, Set< sObject > >, but when I try, I get an error:  Incompatible types since an instance of Set<CustomObjectA> is never an instance of Set<sObject>. Incompatible types since an instance of Set<CustomObjectB> is never an instance of Set<sObject>.  When I change it to lists instead of a sets (using Map<String, List<sObject>>) and lists of my custom objects, I don't encounter the same problem. Why would that occur?


Badges should encourage good behaviour. But what when a badge encourages more bad behaviour than good?  We hear it all the time - robo reviewers, badge-hunters. The review system fights with that users that only want badges and not want to help.  There are many suggestions how to find such robo-reviewers or how to make it difficult to robo-review. But why not cut them off at the source? Don't make them want to review for badges at all.  Remove the Reviewer and Steward badges! The Custodian Bronze badge should suffice to bring a user to the review system. And we really only want users doing reviews who want to help and not doing it for the badges.


Limit involving the exponential of an expression plus a small-o

I'm trying to formalize the following limit:  $$\lim_{x \to \infty} \left[1+\frac{a}{x}+o\left(\frac{1}{x}\right) \right]^x= e^a$$ however I can't see how to rigorously show this identity.  Any suggestions?


Can it be inferred from canon whether Quirrell was a willing host to Voldemort? Was he a supporter of him before he became his host?  If he was tricked, for example, by meeting a weakened, ghostly form of Voldemort who promised great reward for helping, and then afterwards he was just forced to do all the evil he did, I would not count it as being a willing host.


Currently try to highlight the "searched term" found in the "table" by putting the "results found" into a . I get an error of "unexpected string" and with no results. Can some take a look and tell me where I am doing wrong?    //string are words in table var str = ("table#id tr td"); //regexp is the word entered in input field var re = $("#search-criteria");  var found = str.match(re); console.log(found);  if (found !== "") {     //surround word found with span     $(found).appendTo($"");} else {     //remove all span.s_val if not found     $("table#id tr td").children(.s_val).remove; } span.s_val{     background-color:yellow; }
     <input type="text" id="search-criteria" />

         apple	         banana	         red	         green	         ee	         ana


How do I put a double-faced card in my deck?

I was reading recently about double-faced cards. Basically, they are cards that are otherwise typical creature cards, but some condition allows you to flip them over so that they become a new card.   , introduced in the Eldritch Moon set, are one fairly noteworthy example. For instance, this    Becomes this when you flip them over    How do you actually put double-faced cards like this in your deck, given that they do not have Magic: The Gathering card backs? Is it only playable with sleeves (requiring you to pull it out and flip it over)? Or is there some other aspect that I'm unaware of?


I have obsidian everything, and it just won't work.


Questions first, then my rough estimations:   Is it possible to perform moon laser ranging with amateur motorized 114 mm telescope? My calculations suggest that for 1 mJ laser it should receive ~2 photons per source 1 mJ laser pulse.  Given that we already talking about individual photons, how it was possible to perform moon laser ranging BEFORE retro-reflectors were deployed to the moon? Retroreflector sends back light in ~1 arcsecond angle, while bare lunar surface - in ~6 archours, which means we supposed to receive signal $\sim(6\times 60 \times 60)^2 = 4.5 \times 10^8$ weaker, i.e. even with 2.5 meter telescopes we are talking 1 photon per 250 pulses of 1 J each.   My rough estimations: Given that atmosphere turbulence limits telescope resolution to ~1 arcsecond (adaptive optics was not available when laser ranging experiments started, nor it is available now for amateurs), if we use telescope with diameter larger than ~150 mm (so that we are limited by atmosphere, not diffraction) to expand the laser beam we will get ~1939×1939 meter illuminated area on the moon surface ($\tan(1\:\mathrm{arcsec}) \times 400,000\:\mathrm{km}$). Which means only 1/(1939×1939) part of our energy will reach reflector.   Retroreflector is ~1×1 meter in size. It will reflect the light with same beam divergence - 1 arcsecond. Too sad, as diffraction limit for retro-reflector of such size is ~0.2 arcsecond.  So, if our receiving telescope has area of ~1 $\rm m^2$, we will receive again 1/(1939*1939) part of what reached the moon, so total attenuation is ~$1.4\times 10^{13}$.   If we use 532 nm pulse laser with 1 mJ pulse energy, it will emit 2.67*10^15 photons, which means we are going to receive ~190 photons per pulse. Sounds realistic.   These calculations suggests that 114 mm amateur telescope should be able to detect 2 photon per pulse - again should be detectable statistically.


Am I or anyone else allowed to comment in a question of mine requesting an answer from a particular person?

I am not talking of a  style , but am I or anyone else allowed to comment in a question of mine requesting an answer from a particular person? Example,  Persons_name I would really appreciate an answer from you.  OR  It is an area of expertise of Persons_name and I would appreciate an answer from him/her.  OR  This question maybe best answered by persons_name  The reason being that particular question might be a speciality of that person.  The necessary assumption should be that:  it's a very new question, that particular person is a frequent visitor who also sees almost every question, so there is a good chance that he/she will probably see the comment, He/she hasn't yet commented in any part of the question and its existing answers (if any). The Stack Exchange site is not Stack Overflow, hence the maximum questions per day is 15.


Why are vector components themselves not vectors?

My introductory physics textbook, Young & Freedman, University Physics with Modern Physics (13th Ed), makes the following claim on page 14:     Caution: Components are not vectors - The components $A_x$ and $A_y$ of a vector $\vec{A}$ are just numbers; they are not vectors themselves. This is why we print the symbols for components  in light italic type with no arrow on top instead of in boldface italic with a arrow, which is reserved for vectors.   To me however, it seems that the components of any vector $\vec{A}$ are just vectors with pure x, y, or z directions, and $\vec{A}$ is simply the vector sum of those components.   Can anyone explain why this is not the case?


Cannot See Files in Windows 7 with Ubuntu 14 LTS Server

I am totally new to setting up a home server, Ubuntu and Linux programming.  I installed Ubuntu 14.04 LTS server and I can see the Ubuntu server under networks in Windows 7, but I cannot see any files when I go to the file browser. I have noticed during the boot process that smb/cifs file and active directory is failing to boot.  I have reinstalled the software several times hoping that it would correct itself but it did not. I have scoured the wikis and read many forums trying to solve the issue myself. Can someone guide me in the right direction please..?


Order independance between specifiers; and operators?

There is some "type of commutativity" between specifiers, as in:  int const arr[5] = { /*initial (and only) values*/}; const int arr[5] = { /* -//-*/};   where regardless of the sequence of the type name int and const specifier in the definition, the interpretation is the same: an array of const ints. Similarly, when accessing an predefined array element:  int a = arr[4]; int a = 4[arr];   there is equivalence between both ways of access.  Are there any other frequently used* similar cases?  *highly used expressions that exhibit similar behaviour and could be possibly misunderstood


How to rate-limit in nginx, but including/excluding certain IP addresses?

I'm able to use limit_req to rate-limit all requests to my server.  However I'd like to remove the rate restriction for certain IP addresses (i.e. whitelist) and use a different rate restriction for certain others (i.e. certain IPs I'd like as low as 1r/s).  I tried using conditionals (e.g. if ( $remote_addr = "1.2.3.4" ) {}) but that seems to work only with rewrite rules, not for rate-limit rules.


Question 7.1 of Introduction to analytic number theory ( Apostol)

I am self studying number theory from Tom M Apostol and I couldn't think about how to solve this particular problem.  let h and k are given positive integers (h, k) =1 and A(h, k) = { h+kx : x=0,1,2,... } .   Without assuming dirichlet theorem prove that for every integer $n\geq 1$ , A(h, k) contains infinitely many  numbers relatively prime to n.  Attempt:  I assumed that let there exist only finitely many terms( say m)in A(h, k)  relatively prime to n in hope of finding contradiction. So, for other integers in A(h, k) which are infinitely many  say $l_i$(n,  $l_i$) =d, d>1 . Intutively, one can say that n would be very large only so that's not true for every n . But I am not able to prove it rigorously. Can you please prove it rigorously or give an alternative approach which is straightforward. Thanks!!


Why do planets not radiate EM waves in their orbits?

Despite being overall near-netural, I would expect the individual electrons and proton to radiate long EM waves as we accelerate around the Sun or rotate around our poles. Is the acceleration so small that the radiated energy is miniscule?  Or is it that somehow the macroscopic neutrality prevent radiation? If this is so, what mechanism causes single electrons or nuclei to fail to radiate?


In the template of a Springer journal there is no numbering procedure specified for the equations and there is only following lines as an example of an equation:  \begin{equation} a^2+b^2=c^2 \end{equation}   This results in continuous numbering of equations. However, I've seen that in published papers of the same journal, the numbering restarts at each section.   Am I doing something wrong or it is the way it is supposed to be?   If numbering should restart at each section, how is that done?


I need a command to know if a file is linking to another file

How I can know if file1 is a symbolic link to a file2? I need an if condition.


$$m\angle EBC = 50° $$ $$m\angle ABE  = 30° $$ $$m\angle DCB = 60° $$ $$m\angle ACD = 20° $$   What is  $\alpha = m\angle CDE$?   It seems a bit confused. Where should I start from?  Regards


How does (echo 'text' ; cat file.txt ) > new file.txt actually work?

So, here's a simple code:  (echo "Some text to prepend"; cat gero.txt) > file.txt   And I can't really grasp the mechanics of this code. So basically gero.txt is an already existing file, we create a new file.txt with "Some text to prepend"+gero.txt The thing I don't get is that part in parentheses. How exactly does it redirect the output of echo to cat with no evident operator like pipe | etc.?


Find the arc length of lemniscate $r=2(\cos(2\theta))^{1/2}$

I have to find the arc length of a lemniscate with polar equation $r=2(\cos(2\theta))^{1/2}$.  So far I got like $\sqrt{4\cos(2\theta)+\left(-2\frac{\sin(2\theta)}{\sqrt{\cos(2\theta)}}\right)}$.  I don't know how to proceed, I can't seem to figure out how to approach this.


Can I mask certain edges/vertices/faces from a subdivision surface modifier? I am working with small models and want to have some edges sharp yet others smoothed. Because of how think the object is and how I beveled it, it looks horrible when smoothed. I'd like it if I could somehow mask certain edges or faces from it, or to choose faces that should be sharper? I have tried to add loop cuts and bevels, but with how badly I made the model, it wont work with the vertices. I will try moving them and seeing if they may be overlapping, or I messed up by making a complicated panel without extra edges. But loop cutting isn't working as it should. I also tried adding creases but they didn't change anything about how the model looks with the modifier. I will show images of all that I tried. I want to have the sides sharp, but the inside smoothed out. I don't know if shade smooth renders, but it it does it still looks weird for what I am going for. I also tried using an edge split modifier, but it didn't change anything either, like the previous answers. I did clean up the vertices, there aren't doubles.


Reputation chart gets misaligned when toggling visibility of certain sites on it

When I toggle the visibility of certain sites on my reputation chart the reputation milestones (on the left) and the dates get misaligned. To show you what I mean by that here's a few screenshots:    In this case it's admittedly not much of a problem. You can see that the numbers on the left aren't in place with the lines. Here's another one:    The 400 and 800 are close together when they shouldn't be (ignore the dates in this image).  I don't really think it's browser-related since others seem to have the same problem, but in chrome://version I see the following:  Google Chrome  83.0.4103.61 (Official Build) (64-bit) (cohort: Stable) Revision  94f915a8d7c408b09cc7352161ad592299f384d2-refs/branch-heads/4103@{#561} OS  Windows 10 OS Version 1903 (Build 18362.836)   I normally use Chrome in a smaller window, but on a full window it's still happening, even when I press F11 to access complete fullscreen.  On Microsoft Edge I'm still having the same problem:    The dates are very misaligned and the numbers on the left are indeed misaligned as well.  You can test this for yourself on  to see if you're having the same problem. Try randomly hiding and showing certain sites on the chart by clicking the color codes on the right.


When I click the edit button next to Favorite Tags and add a succession (2+) of tags and reload the page, all the separate tags appear as one big tab globbed together. For example, if I type in c#, click add, type in python, click add, and refresh the page, I will have a tag that says c#python, and NOT two separate tags. I tested this in both IE and Chrome, and the same thing happens in both.


$\text{div} \ \vec{F} = \vec{0}$ for a conservative force?

I saw from "Advanced Engineering Mathematics, 10th Edition" by Kreyszig, p. 400, that the solution $V$ of the Laplace's equation,  $$\nabla^2 V = \frac{\partial^2V}{\partial x^2}+\frac{\partial^2V}{\partial y^2}+\frac{\partial^2V}{\partial z^2} = 0,$$  is a potential function.  However I thought I can manipulate the expression as $\nabla^2V=0 \ \rightarrow \ \nabla \cdot (\nabla V)=0$. Because $\vec{F}=-\nabla V$, I can write the expression as $\nabla \cdot \vec{F} = 0$.  I did an example calculation with the gravitational force:  $$\vec{F} = - \frac{GMm}{r^2} \hat{r} = - \frac{GMm}{(x^2+y^2+z^2)^{3/2}} \ (x, y, z)$$  and I got $\text{div} \ \vec{F} = \vec{0}$.  But why is this not introduced in most mathematics / physics books?  Or is there any exception?


Difference between ServerName and ServerAlias

I'm not quite clear on the difference between ServerName and ServerAlias. It looks like both of them work as host name settings, except that ServerAlias only works within the <VirtualHost> tag.  That is, I can do:  ServerName www.domain1.com ServerName www.domain2.com   or:  <VirtualHost *:80> ServerName www.domain1.com ServerName www.domain2.com </VirtualHost>   and both domains work on the same box. Can I use either ServerName or ServerAlias in this case?


Possible Duplicate:        How do I virtualize Mac OS X on Windows XP host with VirtualBox?


What is the physics behind these balancing forks?

I saw this video and was amazed by seeing this incredible balance. I wanted to know how is this thing balanced and what are other things that can be balanced using physics.


Association bonus isn't mentioned in help pages where it would be expected

Perhaps it's not technically a privilege, but one would expect the  (awarded at 200 rep) to be listed along with all the other awards mentioned on the .


How can i use varaible from outer scope of the callback function

How do I use the variable from the outer scope of the function. I have created this simple example here  var view = {     init(){     const targetOne = document.querySelector(".targetOne");      const targetTwo = document.querySelector(".targetTwo");      var val = "outer scope";      targetOne.addEventListener('click', (e) => {       console.log('target one', val)      });     targetTwo.addEventListener('click', this.handleEvent);   },    handleEvent(e) {         console.log('targetTwo ', val);     } }  view.init();    JS fiddle link:   For the targetOne callback I can use the variable val, but when i define a function for the targetTwo callback, that variable val is not defined in the scope. I feel like I am missing something very simple here, I refreshed on scope chaining and closure but I am not able to get it


I do not know if it is correct to use a hyphen between the words wrap, and around, in describing a porch that wraps around a house.


colored text without any module windows python

I'm have windows 10. I'm can print colored text in windows without any module? (like colorama) if I run: GREEN =  '\033[32m'  print (GREEN + "This is some green text!")  then I got ←[32mThis is some green text! why?


Two inner products being equal up to a scalar

I would appreciate a hint on the following problem:     Let $V$ be a finite dimensional vector space over $F$. There are two scalar products such that: $$ \forall \ w,v \in V \ \Big(\langle v,w\rangle_1=0 \implies \langle v,w\rangle_2=0\Big) $$ Show that $$ \exists \ c \in F \ \ \forall \ w,v \in V \ \Big(\langle v,w\rangle_1=c \langle v,w\rangle_2\Big) $$   I have tried to define an orthonormal basis with respect to $\langle \cdot,\cdot\rangle_1$ hoping that the transformation matrices would be different by a constant, yet it seems to lead nowhere.


Compatibility of the new Touch Bar with Ubuntu

I'm considering buying the MacBook Pro (Late 2016) with Touch Bar. As I'm a programmer and a Ubuntu user, could anyone tell me if the Touch Bar is compatible with Ubuntu?


How come the locate command doesn't find obvious files?

The locate command sounds intuitive. I would expect it to locate files on the filesystem. However, it rarely finds files on the system that are indeed present:  $ locate ipsec.secrets   This gives  no results, even when run from filesystem root directory /. The file is indeed present:  $ whereis ipsec.secrets ipsec: /usr/sbin/ipsec /etc/ipsec.secrets /etc/ipsec.d /etc/ipsec.conf /usr/lib/ipsec /usr/share/man/man8/ipsec.8.gz   Why was locate unable to find this file?


I have installed UBUNTU 13.04 32bit,afer installing CCSM and NVIDIA drive,Unity launcher,top panel,Dash and title bar disappeared. Now what should I do?


What is the recommended viewing order for young first-timers to watch Star Trek TV episodes and movies?

Some things are best read/viewed in the order of release, regardless of chronology.  Some works are better taken in a sequence that reflects the order of the events represented.  And for some others, it's a blend of the two.  I'd like to introduce my 8-year old daughter to the Star Trek franchise, and hope to eventually cover it completely.  That is, to fully include:   TV series   The Original Series The Next Generation Deep Space Nine Voyager Enterprise  Movies   The Motion Picture Star Trek: II - VI Generations First Contact Insurrection Nemesis Star Trek (2009) Star Trek Into Darkness (2013)    I've found a * that seems to thoroughly cover the chronological order down to individual episodes.  Should I use this, or should I go in order of release?  Or, is there another recommended alternative order?  I am not interested in any answers that recommend exclusion of any series, episode, or movie from those listed above.  However, lists that add more content are certainly welcome.  Also, unless someone offers a compelling reason to do otherwise, I'm planning on leaving the 2009 movie for last since it represents the beginning of a completely new canon.  *On a slightly related note, it would be really nice if somebody with sufficient time and resources could add episode numbers to that list.


I'm trying to modify the table environment to apply small and centering, along with \figuversion{tabular} (this is some font-specific stuff), to all tables in the document.  What would be the best way to achieve this?  Here is how I tried to do this:  \renewenvironment{table}     {%         \@float{table}%         \small%         \centering%         \figureversion{tabular}%     }%     {%         \end@float%     }   However, optional placement identifier is lost here, i.e., if I write \begin{table}[h!], I get the table, and [h!] is printed above the table.  Here is the minimum working example:  \documentclass[a4paper]{book}  \makeatletter \renewenvironment{table}%     {%         \@float{table}%         \small%         \centering%         %\figuversion{tabular}%     }%     {%         \end@float%     } \makeatother  \begin{document}  \hbox{}  \begin{table}[b!]     \begin{tabular}{cc}         Entry 1 & Entry 2 \\         Entry 3 & Entry 4     \end{tabular} \end{table}  \end{document}   P.S. I cannot use the floatrow package as it clashes with the float package that is not used directly, but some package in my document requires it.    EDIT: This question has already been answered. I repeat the solution here:  \renewenvironment{table}[#1][ht]     {%         \@float{table}[#1]%         \small%         \centering%         \figureversion{tabular}%     }%     {%         \end@float%     }


Is there a way in LaTeX to separate the endnote text from the place where it should be placed/invoked?

I want to insert a few fairly large endnotes. The problem is that if I insert them with \endnote{text text} it makes it very difficult to follow the flow of the main text (as the endnote spans a few paragraphs). Is there a package that would allow me to separate the place where the endnote is invoked from its contents? Something like say \lendnote{Label1} to invoke and \begin{lendnote}\label{Label1}<<here goes the endnote body>>\end{lendnote}


$\mathbb{C}/\mathbb{Z}$ is isomorphic to multiplicative group $\mathbb{C}\setminus\{0\}$

I have to show that $\mathbb{C}/\mathbb{Z}$ is isomorphic to the multiplicative group $\mathbb{C} \setminus \{0\}$.   Proof. Let $f:\mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}/\mathbb{Z}$ be the map $$ f(\alpha) = \alpha \mathbb{Z}.$$ This map has inverse $f^{-1}(\alpha \mathbb{Z})  = \alpha$ so it is bijective. Furthermore, $$f(\alpha  \beta) = (\alpha \beta)\mathbb{Z} = \alpha \mathbb{Z} \beta \mathbb{Z} =f(\alpha) f(\beta)$$ and $f(1) = \mathbb{Z}$, so the map $f$ is also a homomorphism.  Question.  Is this correct? It feels a bit like I am cheating.


Find the infinite sum $\sum_{n=1}^{\infty}\frac{1}{2^n-1}$

How to evaluate this infinite sum?  $$\sum_{n=1}^{\infty}\frac{1}{2^n-1}$$


How viable is using Quantum Entanglement for long distance communication?

In fiction, (notably Ernest Cline's novel Armada and Charles Stross's books Singularity Sky and Iron Sunrise) Quantum Entanglement is used for long distance communication.  In reality, given our current understanding, how feasible is this?   Is Quantum Entanglement potentially predictable enough and stable enough to act as a method of communication? I understand that our current level of technology might not be sofisticated enough to create such a device today (please correct me if I am wrong).  I am wondering if our current understanding of Quantum Entaglement today suggests that such a device may be possible in the future?  Or does our current understanding indicate that such a device would only be possible in the realms of fiction?


Constructing a triangle given 2 sides and the inscribed circle's radius

A Triangle has 2 sides of length 4 and 9. The largest circle than can be drawn in the triangle so as to touch all 3 sides has radius 1 cm. Find the length of the 3rd side.


The "award bounty" button is indistinguishable from the "bounty awarded" indicator in the mobile site

This post has examples from blender.SE but I think all sites use the same theme on mobile (through the browser, not the SE app).  I've recently offered a bounty on a question. Then I visited the page on mobile and I thought I had mistakenly awarded it! There was a blue +150 under an answer!  I then realized that on mobile there is no distinction between the "award bounty" button and the "bounty awarded" indicator:    ←  mobile  On desktop, at least in Blender.SE, the difference is highlighted by the color of the box:    ←  desktop  and the mouse-over tooltip also helps removing any ambiguity.  Should this difference be highlighted on mobile as well?


Where are my options in Safari Share menu

This is a typical share menu:    For an unknown reason, mine looks like this:    How can I recover all others missing options?  This is what I get when I hit on more:    After the last update of OS X Yosemite to Version 10.10.2 (14C81f) the issue seems fixed, but only for one day. Then all options gone again.


Any way to add CSS for a single page/node?

I'm cleaning up my big crazy style sheets (possibly pertinent to a future question) and I'm wondering the best way to add custom CSS to a specific node or page. In particular, my work site's home page is a Panel Page and it has a bunch of different styling. Right now the CSS is just included with the main theme style sheet. Is there a way to say, "if this is node Foo, then add foo.css"? Is  what I'm looking for? I might be interested in generalizing this to other nodes/sections/etc, but at the moment I just want to handle this one item.


How to write s-lim with the the limiting value (for eg. $n \rightarrow \infty)$) right under the s-lim

I have this    \documentclass{article}  \usepackage{amsmath}  \DeclareMathOperator{\slim}{s-lim}   $\underset{n\rightarrow \infty}{\slim} A_n= B$   \end{document}   I dont want to write \underset{...} always rather I would like to code it in the preamble and be able write any limit   (say,   n\to \infty    or   x \to 0    or   bla-bla-bla   ) right under \slim by writing something like \slim_{bla-bla-bla} or \slim\limits_{bla-bla-bla}. \slim\limits_{...} is not giving me the argument under the \slim. Any help would be appreciated.


Can you sell part of a pack to buy another pack in AL?

Adventurer's League player guide:  Selling Equipment. You can sell any mundane equipment that your character possesses using the normal rules in the PHB. Purchasing Equipment. You can purchase any equipment found in the PHB with your starting gold.  Starting character is a wizard, who takes scholar's pack.  Scholar's pack contains a "book of lore" (worth 25 gold), which I assume serves no real use in AL?  Book sells for 12.5, buy an explorer's pack for 10, sell the extra backpack for 1.  You now have an explorer's pack plus some free ink and paper, plus 3.5 gp. I honestly can't see any reason to take a scholar's pack and not also buy an explorer's pack, you're going to at the very least need rations, so can you just do it this way if your background doesn't give you 10 gold?


How can I add line number to my algorithm? I want to write line number in the front of the algorithm line. How can I get that with the \usepackage[ruled]{algorithm2e}?  Code:  \documentclass{article} \usepackage[ruled]{algorithm2e} \renewcommand{\baselinestretch}{1.5}  \usepackage{listings} \usepackage{blindtext} \begin{document} \blindtext  \vspace{1cm}  \begin{algorithm}[H]    \SetAlgoLined    \KwData{$next\_id, speed,stop\_distance, mac$}    \KwResult{Find the initializer. }    int $next\_id1$ = find a  record with $speed > 30$ \\ for this $mac$ in the next table;\\    int $next\_id2$ = find record with $speed <7$ and \\ $stop\_distance < 60$ for this mac in the next table;\\    \If{$next\_id1 < next\_id2$}{       find the related $stop\_name$ for this mac;\\       return  $stop\_name$;    }    \caption{Algorithm to find intializer.} \end{algorithm} \vspace{1cm} \begin{lstlisting}[caption = {MYSQL query to find the initializer.}, label={lst: initializer}] SELECT speed, stop_name from next where stop_distance < 60 and speed < 7   and mac = ? and next_id > ?  LIMIT  1 \end{lstlisting}  \clearpage \end{document}


Using pgfplots, how do I arrange my data matrix for a surface plot so that each cell in the matrix is plotted as a square?

I have a matrix of size MxN and I want to make a surface plot directly from above so that each cell in the matrix is drawn as a square. None of the pgfplots shaders really do what I want, since they draw squares between the cells of the matrix (i.e. a 3x3 matrix ends up as 2x2 cells when plotted). The example hopefully makes it clearer:  \documentclass{article}  \usepackage{fullpage} \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable}  \pgfplotstableread{         0 0 0         0 1 1         0 2 2          1 0 3         1 1 4         1 2 5          2 0 6         2 1 7         2 2 8 }\data  \begin{document} \foreach \shader in {interp, flat, flat corner} { \begin{tikzpicture} \begin{axis}[         title={\texttt{\shader}},         title style={                 at={(0.5, 1.5)},                 anchor=north,         },         width=.3\linewidth,         view={0}{90},         colormap/hot2,         colorbar horizontal,         colorbar style={                 at={(0.5, 1.02)},                 anchor=south,                 xticklabel pos=upper,         }, ] \addplot3 [surf, shader=\shader] table {\data}; \end{axis} \end{tikzpicture} } \end{document}      How do I arrange my data so that each cell in the matrix is drawn as a separate cell in the output?  EDIT: I realised after entering the question that the answer is very simple, so I'll just answer this myself.


I don't know whether this has been asked before, but is it possible to access the history of questions viewed by a user while logged in on SE sites? I have noticed there is a viewed counter if that helps. So how can I view my SE history?


Show null pointer error while saving in database

I declared two Strings as below and initialise them as blank but in output one vale is blank and other show null.    String insert_brand_from_table="",insert_model_from_table="";    System.out.println("brand:  "+insert_brand_from_table);    System.out.println("model:  "+insert_model_from_table);  But output is :    brand:      model:  null  Now the null value of model showing null pointer exception error when i try to save model as blank into database.


How can I randomise the output of a redstone circuit?

I have 5 buttons and only one of these can be correct, all others must be false. These 5 outputs will go into 2 outputs, in between there needs to be a circuit which changes which single button out of the 5 will go down the "correct" output of the final 2. The 4 remaining buttons must go to the second of the final 2 outputs. Both final outputs must give out a true signal for a brief period the same as a button on its own would produce. There should also be a way of activating the circuit. Not sure if that is explained well enough so I have made a basic diagram of what I need.  The diagram shows how I need the signal to be split. However in between the buttons and the final two wires there needs to be a circuit (marked by the grey box). This circuit changes the single button connected to the left wire. The right input should start the circuit and randomise the 5 buttons. There are no limits to size, amount of materials used or method used. This question is similar to the one asking about , but I am specifically working with Redstone circuitry - the commands solutions do not apply here


How to get multiple maximum values from a dict

I have a dict like: example = {'a':2, 'b':2, 'c':1, 'd':1}  I want to keep only the maximum values and keys. The output should be: {'a':2, 'b':2}  This is different from just getting the maximum value, as has been asked in other places. What is the best way to do this?


proving than every $2\times 2$ is similar to a united form

I'm having troble proving this: Let $A\in M_n(R). $ If $n=2$ and $A$ has exactly one eigenvalue $\lambda$ then $A$ is similar to $\begin{bmatrix}  \lambda & 1\\ 0 & \lambda \\ \end{bmatrix}$ or to $\begin{bmatrix}  \lambda & 0\\ 0 & \lambda \\ \end{bmatrix}$ I did prove that if the geometric multiplicity of $\lambda$ is $2$, then $A$ is similar to $\begin{bmatrix}  \lambda & 0\\ 0 & \lambda \\ \end{bmatrix}$, but I'm struggling with the case when $A$ is not diagonalizable. Any thoughts?


WiFi not working on Ubuntu 16.04 on my Asus X550JX

I can't see any available WiFi networks or anything that even resembles WiFi settings. Output of lshw -C network   lshw -C network  WARNING: you should run this program as super-user.  *-network UNCLAIMED    description: Network controller    product: BCM43142 802.11b/g/n    vendor: Broadcom Limited    physical id: 0    bus info: pci@0000:03:00.0    version: 01    width: 64 bits    clock: 33MHz    capabilities: bus_master cap_list    configuration: latency=0    resources: memory:f7900000-f7907fff   Output of lspci -knn | grep Net -A3:  lspci -knn | grep Net -A3     03:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11b/g/n [14e4:4365] (rev 01)         Subsystem: Lite-On Communications Inc BCM43142 802.11b/g/n [11ad:6605]         Kernel modules: wl     04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd.   RTL8411B PCI Express Card Reader [10ec:5287] (rev 01)  Output of wget -N -t 5 -T 10  &&   chmod +x wireless-info &&   ./wireless-info


Is $\mathbb Z[1/2]$ a finitely generated $\mathbb Z$-module?

Consider the subring  $$  \mathbb Z\left[\frac{1}{2}\right] = \left\{ \frac{k}{2^n} : n \ge 0 \right\}. $$ As $1/2$ is the root of $2X - 1$, this is an intergral extension. Now according to  we have the equivalence  that if $A \subseteq B$ are rings with $b \in B$ $$  \mbox{$b$ is integral over $A$} \Leftrightarrow  \mbox{the subring $A[b]$ is a finitely generated $A$-module}. $$ But why is $\mathbb Z[1/2]$ a finitely generated $\mathbb Z$-module, as I see it the elements $1, 1/2, 1/4, \ldots$ are infinitely many generators?


Is the Cesàro summation of a sequence divergent to infinity divergent?

More specifically the question is: If I have a sequence $(u_n)_{n\in\mathbb{N}} \subset \mathbb{R}$ that diverges to infinity. Then it's Cesàro summation sequence $(s_n)_{n\in\mathbb{N}}=(\frac{1}{n+1}\sum_{k=0}^n u_k)_{n\in\mathbb{N}}$ is also divergent to infinity.  This seems true but I can't prove it.


How to upgrade from Ubuntu 10.10 to 11.04?

I want to upgrade from ubuntu 10.10 to ubuntu 11.04.


If we know that $\lambda_1$ and $\lambda_2$ are eigenvalues of matrix $A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}$ prove that then $\lambda_1^2$, $\lambda_2^2$ and $\lambda_1\lambda_2$ are eigenvalues of $B=\begin{bmatrix} a^2 & ab & b^2 \\ 2ac & ad+bc &2bd \\ c^2 & cd &d^2\\ \end{bmatrix}$  I tried to calculate eigenvalues of matrix A and matrix B and then to compare them, but it is way to complicated to calculate, is there any easier solution to this?


Coefficients in binomial expansions of $(x+y)^n$

Is it true that if we expand $(x+y)^n$ where $n$ is a prime number, then all the coefficients are divisible (except the first and last term) by $n$?  Note. There are many examples of when $n$ isn't prime, and the coefficients are not divisible by $n$.


As I  and found out the command \thepage doesn't always output the correct page number.  The proposed alternative is to use \pageref{here}\label{here}. But this seems too unhandy, because I have to change the label every time I want to get the current page, which makes it impossible to just replace it by a simple new command.  P.S.: In the end I want to define this:  \newcommand{\see}[1]{\cref{#1}\ifthenelse{\equal{\pageref{#1}}{\thepage}}{}{ on \cpageref{#1}}}   where the part on \cpageref{#1} should only be output if it is not the current page.


Parallel universes: are there an infinite amount of universes?

Parallel universe: in every universe, you are presented with a different decision. Does that mean there are an infinite amount of parallel universes? I.e., if in one universe I choose to go left, I am then presented with different choices vs if i choose right, and that creates more universes with more decisions to be made.  Or does it mean that in the end of one's life we end up in the same place, meaning that its just one parallel universe that eventually collides with the other.


Minkowski's complex Euclidean space vs. the real pseudo-Euclidean version

The SR invariance formula makes space-like intervals imaginary (e.g., the distance $x$ in a given frame has interval $ix$). Yet modern physicists consider it bad form to define the distance itself as $ix$, as Minkowski did. It seems to me that this distinction is trivial—what’s wrong with defining the distance as the value of its interval? An answer to a previous question of mine on this topic referred to a paper by Visser showing that there is a way to do this that can be generalized to GR.  So what’s the fuss about? Even if there weren’t such a way, I don’t see how that would invalidate Minkowski’s definition for SR. Since the interval measure is what’s important, what fundamental difference can it make whether one defines the distance as x or as the imaginary interval $ix$?  The whole idea of a LT being an imaginary rotation (important, because phi is additive) depends on the use of the invariant measure, which is the complex length between two points in C2, the space in which complex rotations exist, and so the space in which the x-t plane is being considered to be embedded when we talk of complex rotations. In C2 it can easily be shown that the angle between any two axes, real or imaginary, is a real right angle, and this explains the invariance formula—it is simply the Pythagorean theorem for that complex triangle. So all this ‘invariant interval geometry’ is an integral part of special relativity. If you insist that distances are real and use a Pseudo-Euclidean metric, which would imply entirely different values for these angles, you are throwing out an enormous portion of SR. It is hard to see how that can be billed as an advance in our understanding.


What is the best way to parse parameters in shell script command, and then validate it?  For example bash someScript.sh -p <some_path> -o <some_other_param> -i (User forget to provide value).  How to parse all of this parameters and when user forget to input some parameters or value of this parameter show some error message and terminate executing of script?


Proving that the estimate of a mean is a least squares estimator?

I think this is a really simple question so please bear with me - I just had my first class in regression and I'm a little confused about nomenclature/labeling.  Does anyone recommend some good weblinks that explain beginning linear regression really well?  There's a question I've been looking at for a while and I'm not sure how to do it (although I'm sure the solution is simple):  Show that the sample estimate $\hat{\mu}(X) = \frac{1}{n} \sum X_i$ is a least square estimator of $\mu$ for a variable $X$ given $X_1, \ldots, X_n$.  My first thought was,  $\mathrm{SSE} = \sum (\mu - \hat{\mu})^2$  But I'm not sure if thats right. I'm confused about what the beta is (is it n?) and I don't know if there are enough parameters to expand it.  Thanks so much for your patience and if this doesn't make sense, I can clarify more. Thanks!


How can I get the DateTime for the start of the week?

How do I find the start of the week (both Sunday and Monday) knowing just the current time in C#?  Something like:  DateTime.Now.StartWeek(Monday);


Ubuntu 17.04 has a Unity 8 option besides the default. Can I remove one of the options, and which one should I keep?

When I upgraded from Ubuntu 16.04 to 17.04 I got 2 desktop shells, a default one and Unity 8. Which is the newer one, and how can I get rid of one of them?


Is it possible to export object schema(objects, fields, datatypes ) from sandbox to excel?  I tried following tools no use-Cloud Converter, EasyDescribe and Object Snapshot.  Please let me know, Greatly Appreciate your help!


Why doesn't C3PO recognize Leia in R2's recorded message?

At the start of A New Hope, when the corvette is being attacked, C3PO says something to the effect of:     There'll be no escape for the princess this time.   But when Luke stumbles onto Leia's message in R2D2, C3PO seems to not know who the figure in the message is:     I'm afraid I'm not quite sure, sir. I think she was a passenger on our last voyage. A person of some importance, sir - I believe.   Is C3PO feigning ignorance to protect her, or does he really not recognize her?


Given $p$ is prime number, find all pairs of positive integers $m,n$ such that $\gcd(m,n)=1$ and  $$\frac{p+m}{p+n}-\frac{m}{n}=\frac{1}{p^{2}}$$  We can write this equation as: $$\frac{p(n-m)}{n(p+n)} = \frac{1}{p^2}$$    Since we have positive RHS and $n(p+n)>0$, we also have: $$p(n-m)>0 \implies n>m$$ I found that $n>m$, but I have no idea to complete. Please give me some ideas, thank you very much!!


Show that $|x-y|\leq |x|+|y|$.   I know this probably applies the triangle inequality in some way, but I can't figure it out.


Cone space is homeomorphic to geometric cone

Given a topological space $X$ consider the quotient space $X \times [0,1]$ such that all points $(x,0)$ are identified to a single point $p$. This space $CX/X \times 0$ is called the cone over $X$. Suppose $X$ is a compact subset of $\mathbb{R}^n$ for some $n$. View $\mathbb{R}^n$ as a subset of $\mathbb{R}^{n+1}$ in the usual way. Choose a point $x_o \in \mathbb{R}^{n+1}-\mathbb{R}^n$. Let $C$ be the subspace of $\mathbb{R}^{n+1}$ consisting of the union of all line segments from $x_0$ to points in $X$. Show that $C$ is homeomorphic to the cone over $X$ as defined above. I am going to try and construct a map $f:CX \rightarrow C$ and use the universal quotient property as described in this problem to show it induces a homeomorphism $g:CX/X \times 0\rightarrow C$.  Define $f:CX \rightarrow C$ by $f(x,t)=x_ot+(1-t)x$. Now I am concerned with how to show $(x',t') \sim (x,t) \implies f(x,t) \sim f(x',t')$. Suppose $(x,t) \sim (x',t')$. Then $x_ot+(1-t)x=x_ot'+(1-t')x'$ or $t=t'=0$ and $x=x'$. Am I on the right track with this? If so how should I finish it up to prove it is a homeomorphism? So by the universal quotient property $g:CX/X \times 0 \rightarrow C$ is continuous.


I have a Lenovo Ideapad Y510P. I recently removed Ubuntu 12.04 from it, and did a reset on the Windows 8 Partition. However, I still have the Ubuntu option in the firmware (not bios) boot menu, and I want to get rid of it.  The problems are (I looked this up ahead of time):   In order to boot into the Ubuntu USB I have, I need to be in Legacy Mode. In order to run sudo efibootmgr in Ubuntu, I need to be in UEFI Mode. Right now, when I run it, I get the:  couldn't open either sysfs or procfs directories for accessing EFI variables    error (I tried sudo modprobe efivars before it and after it and it looked like it did nothing). I can't be in both modes at once.


$\mathbb{R}^3$ \ $\mathbb{Q}^3$ is a union of disjoint lines, The lines are not in an axis direction.

I have a folowing question:  $\mathbb{R}^3$ \ $\mathbb{Q}^3$ is a union of disjoint lines. This exercise is in the book: Set theory for the working mathematician of Krzysztof Ciesielski.  Any can give help me in how make a selection of the disjoint lines?  Thanks.


What is the difference between toughness and hardness?

What is the difference between  and ? I came to know about some materials that have low toughness but high hardness such as  ceramic tiles and glass. I want to know if it is true that high toughness also implies high hardness.