My schema 'test' has 3 tables: 'user', 'post' and 'revision'.  CREATE TABLE IF NOT EXISTS `test`.`user` (   `iduser` INT UNSIGNED NOT NULL AUTO_INCREMENT,   `name` VARCHAR(45) NOT NULL,    PRIMARY KEY (`iduser`)) ENGINE = InnoDB;  CREATE TABLE IF NOT EXISTS `test`.`post` (   `idpost` INT UNSIGNED NOT NULL AUTO_INCREMENT,   `iduser` INT UNSIGNED NOT NULL,   `content` VARCHAR(4000) NOT NULL,   `revision_count` INT NOT NULL DEFAULT 0,    PRIMARY KEY (`idpost`),    INDEX `fk_post_user1_idx` (`iduser` ASC),    CONSTRAINT `fk_post_user1`      FOREIGN KEY (`iduser`)      REFERENCES `test`.`user` (`iduser`)      ON DELETE NO ACTION      ON UPDATE NO ACTION) ENGINE = InnoDB;  CREATE TABLE IF NOT EXISTS `test`.`revision` (   `idrevision` INT UNSIGNED NOT NULL,   `iduser` INT UNSIGNED NOT NULL,   `idpost` INT UNSIGNED NOT NULL,   `content` VARCHAR(4000) NOT NULL,    UNIQUE INDEX `index1` (`idpost` ASC, `idrevision` ASC),    PRIMARY KEY (`idrevision`, `iduser`),    INDEX `fk_revision_user1_idx` (`iduser` ASC),    CONSTRAINT `fk_revision_post`      FOREIGN KEY (`idpost`)      REFERENCES `test`.`post` (`idpost`)      ON DELETE NO ACTION      ON UPDATE NO ACTION,    CONSTRAINT `fk_revision_user1`      FOREIGN KEY (`iduser`)      REFERENCES `test`.`user` (`iduser`)      ON DELETE NO ACTION      ON UPDATE NO ACTION) ENGINE = InnoDB;   And there is the script creates data:  INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (1, 'Ann'); INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (2, 'Bob');  INSERT INTO `test`.`post` (`idpost`, `iduser`, `content`, `revision_count`) VALUES (1, 1, 'this is first post', 1);  INSERT INTO `test`.`revision` (`idrevision`, `iduser`, `idpost`, `content`) VALUES (1, 1, 1, 'this is old content of first post');   I create 2 sessions work concurrently. Session 1 works with query:  BEGIN; INSERT INTO revision (idrevision, idpost, iduser, content) VALUES     ((SELECT max_idrevision + 1      FROM (SELECT max(idrevision) AS max_idrevision           FROM revision WHERE idpost = 1) AS anon_1),     1, 2, 'abc xyz');   Now session 2 works:   BEGIN; UPDATE revision SET idrevision=3 WHERE idpost=1 AND iduser =1; -- will hang by lock  -- but with this update UPDATE revision SET content='nwe asdfs' WHERE idpost=1 AND iduser=1; -- not hang   I don't know what's lock mysql used with query insert in session 1? Is it row lock or table lock or anything else ? If it's row lock, why does second update query in session 2 not hang ?


If spacetime is expanding, shouldn't lengths expand at an equal rate?

I frequently hear that galaxies are moving apart (in some instances, faster than the speed of light) because the fabric of spacetime is expanding.  The common analogy is two people standing on the surface of an expanding balloon. However, this makes no sense.  Since we are made of matter that exists within spacetime, shouldn't we (and all of our unit lengths) be expanding at the same rate?  In the balloon analogy, if the people are drawn onto the balloon, they will expand at the same rate as its surface. If you draw a coordinate grid onto the balloon, distances measured using those coordinates will stay constant as the balloon expands. So what's really going on?  Note: Astrophysicist Nick Lucid from Science Asylum  that it's because electromagnetic force holding our atoms together is so strong, it keeps us at the same size while spacetime expands. But that explanation makes no sense because it would mean the electromagnetic force gets stronger over time (drops off by less than $\frac{1}{r^2}$), and also doesn't explain why galaxies would be spreading apart.


Will the Garbage Collector call IDisposable.Dispose for me?

The .NET  implies that if you write a finalizer, and implement IDisposable, that your finalizer needs to explicitly call Dispose. This is logical, and is what I've always done in the rare situations where a finalizer is warranted.  However, what happens if I just do this:  class Foo : IDisposable {      public void Dispose(){ CloseSomeHandle(); } }   and don't implement a finalizer, or anything. Will the framework call the Dispose method for me?  Yes I realise this sounds dumb, and all logic implies that it won't, but I've always had 2 things at the back of my head which have made me unsure.   Someone a few years ago once told me that it would in fact do this, and that person had a very solid track record of "knowing their stuff." The compiler/framework does other 'magic' things depending on what interfaces you implement (eg: foreach, extension methods, serialization based on attributes, etc), so it makes sense that this might be 'magic' too.    While I've read a lot of stuff about it, and there's been lots of things implied, I've never been able to find a definitive Yes or No answer to this question.


How do I perform a factory reset of my iPhone?

I am giving my iPhone to my daughter. How do I clear my information and set up hers? I want to make sure I do not lose any of my information from my accounts that I use on my current phone.


I'm on Fedora 27. I want to delete a symlink from /usr/lib, but can't because of Operation not permitted. I'm under root and here are commands and the output:  [root@thinkpad lib]# ls -al cpp lrwxrwxrwx 1 root root 10 Sep 15 15:01 cpp -> ../bin/cpp ... [root@thinkpad lib]# lsattr ../bin/cpp --------------e---- ../bin/cpp ... [root@thinkpad lib]# rm -f cpp rm: cannot remove 'cpp': Operation not permitted   SELinux is disabled. Why can't I delete this symlink?  The reason why I want to delete this symlink is because I can't update packages because of this. When I run dnf update, I get the following error:    Upgrading        : cpp-7.3.1-5.fc27.x86_64                                                                                29/77  Error unpacking rpm package cpp-7.3.1-5.fc27.x86_64 Error unpacking rpm package cpp-7.3.1-5.fc27.x86_64 error: unixODBC-2.3.5-2.fc27.i686: install failed error: unpacking of archive failed on file /usr/lib/cpp;5aa2d6ee: cpio: symlink


If a continuous function$f: (X, \mathscr T_X) \to (Y, \mathscr T_Y)$ is injective (Given $Y$ is Hausdorff), show that X is hausdorff

$(X, \mathscr T_X)$ and $(Y, \mathscr T_Y)$ be 2 topological spaces. $Y$ be Hausdorff.  $f$ be a continuous function, $f: X \to Y$. To show that if $f$ is injective $\implies$ $X$ is Hausdorff.  Here's how I tried: Let $f(x_1)$ and $f(x_2)$ be two elements of Y. Since $Y$ is Hausdorff we can find 2 disjoint neighborhoods around $f(x_1)$ and $f(x_2)$. Let it be $U, V$ respectively.  Since $f$ is continuous there exists an open neighborhood around $x_1$ and $x_2$ in X (let it be $E(x_1)$ and $ F(x_2)$) such that $f(E) \subset U$ and $f(F) \subset V$.  After this how to use injectivity property to prove that E is disjoint with F??


I have heard several times that some mathematician has given another and more rigorous for an established theorem, but I don't know what does it really mean and what differences makes it to be more 'rigorous'. My understanding of a proof is that a proof is some explanation to convincing others that a statement is true. If some proof is not rigorous, does it mean that while the proof is acceptable for many but it is not for everybody? If so, the proof is not correct since it going to be rejected by some people and it is not a proof at all. Or, does rigorous mean it uses more advanced tools? If so, why not any alternative (but simpler) proof is also acceptable as rigorous (which is more 'valuable' as well since it's simpler!)?   Saying those limited insight of mine, my questions are:   $1-$ What does rigorous proof mean, in general definition?  $2-$ In order to understand your answers, as an example I am re-writing three of the proofs for the compactness of the torus. Which of the following proofs are most rigorous, 'normal' and least rigorous; and why so?    Theorem: The torus $T^2$ is compact.  First proof: The torus is homeomorphic to the product space $S^1 \times S^1$. The circle $S^1$ is compact. Therefore the torus is the product of two compact spaces, and thus it is compact.   Second proof: The torus $T$ is the subspace of $\mathbb{R}^3$ obtained by rotating a circle about the $z$-axis. The torus is closed since given any point in its complement, there is an open ball of sufficiently small radius centered at that point and disjoint from the torus. Also, the torus is bounded since it is contained in the ball of radius $4$ centered at the origin. Since the torus is closed and bounded in $\mathbb{R}^3$, it is compact.   Third proof: The torus is homeomorphic to a space obtained as a quotient  space of the square by identifying opposite edges. The square is a closed and  bounded subset of $\mathbb{R}^3$ and therefore is compact. Furthermore, a quotient map on the square is a continuous function, and the image of a compact space under a continuous function is compact. Therefore the torus is compact.   Thanks a lot for your guidance.


Is there a name for an element $z$ such that $\,zx = z = xz\,$ for all $x$?

Is there a general name for the following properties, (similar to the properties of existence of an additive identity, existence of multiplicative identity etc):   For any given set, the intersection with the empty set results in the empty set. For any real number, multiplication with zero results in zero.


How much voltage will i generate from this DC motor?

i am using the C23-L33 model.  if i rotated the motor at the rated speed of 3000RPM, how much voltage will i generate?  can I please know the exact steps of finding the answer out using the datasheet above?   thank you.


Double and triple substitution in bash and zsh

Follow-up to the background part in .  In bash I can use ${!FOO} for double substitution, in zsh ${(P)FOO}. In both, the old-school (hack-y) eval \$$FOO works.  So, the smartest and most logical thing for me would be ${${FOO}}, ${${${FOO}}}… for double/triple/n substitution. Why doesn’t this work as expected?  Second: What does the \ do in the eval statement? I reckon it’s an escape, making something like eval \$$$FOO impossible. How to do a triple/n substitution with that that works in every shell?


Nested piped grep results in a string saying "(standard input)"

I'm performing a nested grep like this:  grep -ir "Some string" . |grep "Another string I want to find in the other grep's results"   This works perfectly as intended (I get the results from the first grep filtered by the second grep as well), but as soon as I add an "-l" option so I only get the list of files from the second grep, I don't get anything.  grep -ir "Some string" . |grep -l "Another string I want to find in the other grep's results"   This results in the following output:     (standard output)   I guess piping doesn't work when I just want the list of files. Any alternatives?


What's the limit of the sequence $\lim\limits_{n \to\infty} \frac{n!}{n^n}$?

$$\lim_{n \to\infty} \frac{n!}{n^n}$$  I have a question: is it valid to use Stirling's Formula to prove convergence of the sequence?


Opportunity Access for customer community and customer community licenses

I can't show opportunity tab to customer community and customer community licenses users. And on the profile level there is no any option for this.  I read the documents and type of licenses and according to them opportunity is not available for user which these type of licenses.  But here I've two doubts   1) Here I have a controller and apex page. In controller I can get all the opportunities and all fetched opportunities are saved in wrapper class and then using a this wrapper class I can show opportunity and it is running successfully.  2) Here I have a controller and apex page. In controller I can get all the opportunities and saved in list and this list is a type of opportunity eg List<Opportunity> x. When I try to display oppty (using X) I got exception.  I am access my apex page from community portal.  My question if opportunity is not accessible to Customer portal and C Portal Licenses user the how can controller fetch the opportunities data ans show through the wrapper class and not opportunity type list.


I am having hard time understanding logic of properties , as far as i looked in internet its more logical and safe to use properties instead of public variables. But i want to understand the logic of properties to scratch it on my mind   private int myVar;  public int MyProperty {     get { return myVar; }     set { myVar = value; } } public int myVar;   What are the benefits of using properties instead of public variables ? Why i shouldnt write a public variable in my class and use from instance?


I have spent days trying to get an Lenovo ideapad S340 boot from a USB.   Would someone care to walk me through step by step?   I have searched on the internet, changed BIOS settings, created USBs (universal usb installer, unetbootin ) and am going round in circles.   I do have technical background and can follow instructions, but need some guidance to avoid the pitfalls.   I am stuck with getting this USB to work.


Switch audio output from tray (headphone or speaker)

Installed Ubuntu 18.10 and I'm very happy.  The only function i'm missing is quick switching audio output profiles of my soundcard. In tray menu only volume control is possible, therefore I tried GNOME Shell Extension: Audio output selector, but it only switches between soundcards (internal speakers & USB soundcard) from the tray menu.   I need to switch between the USB soundcard outputs (headphones & 3,5mm audio-out). These are shown as Output profiles "Speaker" & "Headphone".  How can I enable a quick way to switch between these profiles? It's strange Ubuntu doesn't support any quick way to switch audio output from tray. :(    thanks Pappl


How should we refer to the “trilogy” + StackExchange?

Crossposted from StackApps as per a request in there. I'm currently designing an app for the StackApps beta. One of the challenges I found when writing descriptions and user-facing material for my app is how to refer to the "trilogy" + StackExchange. Are Stack Overflow, Super User and Server Fault part of StackExchange, or are they separate? If they are separate, is there a better term than "the trilogy" (which is probably incomprehensible to people not as familiar with the site), and what should we call the combination of them and Stack Overflow?


How many times can I take $10,000 into the USA each month?

Ok so, I have money in my american bank account. I send it through  western union to my mexican bank account. Then I go buy dollars at an exchange house. I do this to make a couple hundred dollars every time I do this, just as an extra money. I travel to USA almost every week carrying no more than $4,000 dollars every time. Every time I go into USA I get asked how much money I have on me, I allways tell them with no problem whether I have 2, 3, or 4 thousand. Yesterday, they took me into revision, asked me a lot of questions and made me fill in a Fincen 105 form which I read that it’s designed to declare more than 10,000 usd. I filled it in for the ammount of $3592. So, the officers never answered my question: How often can I bring $10,000 or less without having to report it? Is it every week?, is it every month? Is if every time I get into the USA regardless if I go in every day? I felt that they made me fill that form that by law I was not required to do so. Can some one give me an answer? Thank you.


How can I use another macro in a string macro in C?  I have this:  #define MAX_OPERATION_COUNT 10 #define MSG_TOO_MANY_OPERATIONS "Too many operations! Only the first 10 were applied."   But I would like the second macro to use the value of the first one instead. In Java for instance, I would have had something like:  public static final int MAX_OPERATION_COUNT = 10; public static final String MSG_TOO_MANY_OPERATIONS = "Too many operations! Only the first " + MAX_OPERATION_COUNT + " were applied.";   Is there a way to do something similar in C?  Edit: The solution to this turned out to be very similar to the solution to , but I believe the problem itself is quite different and should be treated separately.


The command   \DeclareMathSymbol{\sha}{\mathalpha}{cyrletters}{"58}   produces the russian letter Sha (III)  Which number do I have to replace 58 with in order to get the labial b?


How long are you supposed to stay out of Israel after your 3 month tourist visa has expired in order to get another tourist visa? I am Chilean citizen and I tried to get a meeting for extending my visa at the ministry but unfortunately they don't have any dates until October and my visa will end in September.


virtual box doesnt shows 64 bit os in ubuntu14.04 64 bit

I installed 64 bit Ubuntu 14.04 in my home PC and Virtual Box in it. But the real problem is V box only shows 32 bit OSes. I had a same problem in 12.04 also(and i didn't got a solution!). Is there any solution for that? I really need to install 64 bit windows as a VM. I use V Box version 4.3.10.


I'm new to these forums, but I thought I'd take a stab at asking about my situation. I have two BS degrees, one in electrical engineering and the other in physics. I'm wanting to go to grad school in either physics, engineering, or something in between. My problem is that I have a 2.3 cumulative gpa, however I do have a slew of other things going for me that I was wanting to get opinions on how much they would help with admissions.  I've done research in plasma physics for over 2 years. It was due to that project that I was place into the McNair Scholars program and was given the opportunity to travel overseas to perform research at a European fusion energy lab last year. I've graduated, but was hired by the same research group to perform data analysis work for the project. I learned alot about experimental physics: solid state particle detectors, vacuum chambers, spectrum analysis, linux operation systems, and so on.  In my engineering major I become involved with a team that built, tested, programmed and will be launching an amateur radio satellite. I worked on the power systems of the craft, and learned alot about surface mount soldering, solar cells and battery charging power circuits, etc. I'm also planning the building and programming of a rotating machinery for our ground antennas. Out of this might come the chance to work with a mechanical engineering group launching their own satellite.   I also work in the power industry, currently as an intern, where I've done a few projects related to internet monitoring of devices attached to power lines, learned pcb design skills here. My job also had me write a paper (so I'd be first author there) related to cyber security that will be going to a conference later this year. Not sure if this will help specifically since that work isn't necessarily what I want to do graduate research in.   I'm currently taking a year off to work, pay off debts, and study for good scores on the general and subject GRE's. I was also plannig on taking 1 or 2 grad courses and planning to ace them. My bad grades came from my first year courses, not from my junior and senior in-major courses. Come application time I can get plenty of good recommendation letters from various sources (not just in my university). I know my gpa is going to hurt me, but I was wondering if anyone has any experience about how much things I've done outside the classroom would offset that. Thanks for any opinions that might be helpful. Sorry for the wall of text.


What do you call these infographic icons?

What do you call these simple, basic types of graphic elements that are used in infographic commercials, and the like?  They are vector based, look like pixel art, but have smooth edges, and are icon-like but not icons.  The example below is only a pallet of assets used in the short animated film .  Anyone know what one might call these?  Here's an example:


cd.. and cd- commands not found - how do I use the cd command?

I am using Precise pangolin. As far as I know, commands like   cd..   or   cd-   are used to browse through folders in the terminal.  But whenever I enter one of this commands, it gives an error saying no such command or filename found. Do I have to perform any additional task before I use commands involving cd?


Is there any proof that $\sum_{k=0}^{n}$ ${n-k}\choose{k}$ $=f_{n+1}$, when $f_{n}$ is a Fibonacci number? (I tried to write in some $n$'s and it looked true, but I don't really know how should I prove it.


Where can the latest API documentation be found?

Some of my scripts scripts are broken e.g.  bpy.ops.pose.armature_layers(layers=sel_layers) # 2.6 api   has been (unnecessarily) renamed to  bpy.ops.pose.bone_layers(layers=sel_layers) # 2.7   In the 2.71 RC1  bpy.ops.anim.keyframe_insert(type='BUILTIN_KSI_LocRot')   leads to an error:  TypeError: Converting py args to operator properties:  enum "BUILTIN_KSI_LocRot"  not found in ('Available', 'WholeCharacter')   And seems no longer to respect the bone/armature layers.  The latest documentation I found is:    which is not accessible from the navigation pages from blender.org, manipulating the version part of the URL neither works (tried 2_71, 2_71RC1, 2_71_RC1).   Where can the 2.71 API be found?


Looking for a word meaning a person who thinks he's the one to do everything

Since English isn't my first language I think this is the best place to ask this question. I had no luck while looking for an answer on Google.  I'm looking for a word describing a person that thinks they’re the one and only person doing everything (e.g. in a business) while it is not necessary the case.  It could also be a word with a meaning similar to a person claiming all the success of a business but none of the failures.


How to get the caret column (not pixels) position in a textarea, in characters, from the start?

How do you get the caret position in a <textarea> using JavaScript?  For example: This is| a text  This should return 7.  How would you get it to return the strings surrounding the cursor / selection?  E.g.: 'This is', '', ' a text'.  If the word “is” is highlighted, then it would return 'This ', 'is', ' a text'.


Internal render, emit material and shadows

How to adjust the drop shadow when the scene is illuminated by object with emit material


vim unable to write to files even though sudo is used

I find that with vim, if I try and edit a file which as a normal user I do not have write access with, even if I use sudo, I am unable to write to it, although if I use nano to edit the same file it works.  So for instance if I do:  sudo vim /var/path/to/file.conf   I will get this in the file and not be able to edit that file:  "/var/path/to/file.conf" [readonly]   But if I instead do:  sudo nano /var/path/to/file.conf   It will be able to write to the file, why is this, why does sudo not give vim write access like it does with nano? Is this some sort of bug? Or is this just something which is meant to be? Because it is very annoying.    OS Information:  Description:    Ubuntu 15.04 Release:    15.04   Package Information:  vim:   Installed: 2:7.4.488-3ubuntu2   Candidate: 2:7.4.488-3ubuntu2   Version table:  *** 2:7.4.488-3ubuntu2 0         500 http://gb.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages         100 /var/lib/dpkg/status


How does memory allocate for struct and union in C program?

In structure, memory space will be created for all members inside structure. In union memory space will be created only for a member which needs largest memory space. Consider the following code:  struct s_tag {    int a;    long int b; } x;  struct s_tag {    int a;    long int b; } x;  union u_tag {    int a;    long int b; } y;  union u_tag {    int a;    long int b; } y;   Here there are two members inside struct and union: int and long int. Memory space for int is: 4 byte and Memory space for long int is: 8   So for struct 4+8=12 bytes will be created while 8 bytes will be created for union. I run the following code to see a proof: C  #include<stdio.h> struct s_tag {   int a;   long int b; } x; union u_tag {      int a;      long int b; } y; int main() {     printf("Memory allocation for structure = %d", sizeof(x));     printf("\nMemory allocation for union = %d", sizeof(y));     return 0; }   But I can see the following output:  Memory allocation for structure = 16 Memory allocation for union = 8   Why memory allocation for struct is 16 instead of 12? Is there any wrong in my understanding?


I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error:  (Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test  (udisks-error-quark, 0))   and this happen also to any attached usb to my laptop.


Where do executables look for shared objects at runtime?

I understand how to define include shared objects at linking/compile time. However, I still wonder how do executables look for the shared object (*.so libraries) at execution time.  For instance, my app a.out calls functions defined in the lib.so library. After compiling, I move lib.so to a new directory in my $HOME.  How can I tell a.out to go look for it there?


What is the "opaa7g6" for in my terminal?

Today when I'm taking a look at my terminal, I realized that there is a weird string in my shell prompt.  It seems that I've never seen this weird string before.  What is that for?


I have Debian stretch with systemd running (installed by default). I want to start a 2 lines bash script at boot via cron.   echo something > file.txt   xfce4-terminal  [...] --command="watch [....]" 2>&1 &    the script works fine when launched manually: A window is opened and  a 'watch' command is launched.  I use use the first line to check if it's launched at boot (like a kind of stamp).  I have tried with root user and non root.  I edited cron with crontab -e and vi (export VISUAL="vi")  @reboot /path/to/script/script.sh   At boot, the script is launched (I checked file.txt), but the window opened by xfce4-terminal is not there. And... 'Systemd' looks like big Berta for just launching a script at boot....  Any idea? thank you folks!


Hyphens in words with prefixes like neo-Nazism

I have a question regarding the use of hyphens in words with certain prefixes. For example,     Neo-Nazism   Neo-Confucianism   Neo-liberal     are words with a hyphen, but     Neoplatonism   Neocolonialism   are words without hyphens. I'm especially confused with neo-Confucianism and neoplatonism: one contains  a hyphen and a capital letter and the other doesn't.  Is there a specific rule for hyphens in words with prefixes or is it purely arbitrary?


What is the difference between : and true?

In bash:  $ type : : is a shell builtin $ type true true is a shell builtin   Looks like they are the same, but they don't give the same system trace:  $ strace : strace: :: command not found $ strace true execve("/bin/true", ["true"], [/* 82 vars */]) = 0 [snip] exit_group(0)                           = ?   I tried diffing strace bash -c : 2>:.txt and strace bash -c true 2>true.txt, but couldn't find any differences between them except for the memory locations.  In dash:  $ type : : is a special shell builtin $ type true true is a shell builtin   OK, so they are not the same. help : and help true aren't very useful, and they return the same in bash and dash. Is there any practical difference at all between them, except that : saves three bytes and makes scripts less readable?


Why is there a word for the letter H, but not for the other letters?  In –formerly Oxford Dictionaries–for example, H = aitch, as in     ‘drop one's aitches’


What makes light to be a special part of the electromagnetic spectrum that it has a particle?

Why only light has photons while x-ray or micro/radio waves don't?   If we build a device that can iterate over all frequencies, what will be so special about the light range that it will start to generate photons while in all other ranges no photons will be made?  Are there special 0 mass particles for x-rays and radio waves or do they also generate photons? (the latter is highly unlikely since radio doesn't travel in a straight line)


Boolean vs !!. What is better for performance in JS?

I have some concerns about my code. What approach in JavaScript is preferential when conversion to the boolean value needed? Boolean(2) or !!2?


My Chinese in-laws intend to visit us in one month from now. Their visa is valid from Nov 23rd. Would it be possible for them to take the airplane on November 22nd in China and arrive in Schengen area on November 23rd?  Or does the visa already have to be valid upon departure?  In our particular case, they still need to transfer in Beijing first. The actual flight to Schengen zone effectively only departs on the 23rd so I guess that should be completely fine then?


Disable/Enable Comment Block With Macro?

Is there a way to make a macro within a LaTeX document, which would enable or disable a comment block?  I do this sort of thing in C and C++, but am not sure about LaTeX.  For example, near the top of the document I would like some sort of line(s) which have a 0 or a 1.  I would change between the 0 and 1 at my discretion.  If 0, then my later portion would look like:  \begin{comment} \begin{figure}[ht]     \centering     \includegraphics[width=0.5\textwidth]{BLARG.jpg}     \caption{\label{fig:}HONK.} \end{figure} \FloatBarrier \end{comment}   But if the macro number were 1, it would disable the comment function, so it would effectively leave the document with:  \begin{figure}[ht]     \centering     \includegraphics[width=0.5\textwidth]{BLARG.jpg}     \caption{\label{fig:}HONK.} \end{figure} \FloatBarrier   Is this possible?


Natural problem in S2P not known to be in any smaller class

Is there a decision problem in $\textsf{S}_2\textsf{P}$ that (presumably) requires the full power of $\textsf{S}_2\textsf{P}$-computations? Specifically, is there a language in $\textsf{S}_2\textsf{P}$ that doesn't obviously belong to any 'natural' smaller class? The two 'natural' classes that I have in mind are $\textsf{P}^{\textsf{NP}}$ and $\textsf{BPP}$.


Can Blender render pngs with the background transparent?

I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?


17.10 Frequent Mouse Battery Low Notifications

For more than 3 months now I get frequent notifications stating:     Mouse battery low   Wireless mouse is low in power (10%)     I use a Logitech M705 mouse with Unifying Receiver in my living room with a tiny desktop which is connected to my tv. It appears that these notifications seem to appear most frequent when wireless reception is not optimal (although distance is only 2,5m). They appear 4-5 times successively, reappearing rapidly after dismissing them.  If batteries are indeed low they should be completely dead by now.  Does anyone know how I can turn this off?  This question is different as this has been going on for months now, previous question was about a mouse running on 0% batteries and notifications appearing about that for a few days. Mine are at 10% now, for at least 3 months. There's nothing I have to do te reproduce this problem as it happens automatically all the time.  I want to know how I can turn this off as there's no solution offered.  The suggestions from the answers to the linked question are for the battery of a laptop, not for the mouse and therefore it doesn't work:   Jetblackster says: "For ubuntu 17.10 go to org --> gnome --> settings-daemon --> plugins --> power Alter the "percentage-low" setting to what you want. I changed from 10% to 4%."  See this post about laptop battery notifications (not what I need)


I am using dataSnapshot to get a value from my Firebase Database, but I keep getting a null reference error. The path to my firebase is correct and I have Datasnapshot defined, so I am not too sure why this error is coming up.   Here is the snippit that is giving me issues      User user = new User();     String username;     username = (String) datasnapshot.child("Users").child(uid).child("userName").getValue();     user.setusername(username);     navuserName.setText(username);   and this is the error that it is giving me.  java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.database.DataSnapshot com.google.firebase.database.DataSnapshot.child(java.lang.String)' on a null object reference   I have Datasnapshot dataSnapshot; defined in the class but the error is being thrown. Any suggestions?


Can I determine the potential term in the Schrödinger equation based on the eigenvalues?

Let's imagine I knew a certain system could be described by a one-dimensional Schroedinger equation. I know the mass/momentum term, but not the shape of the potential. Further for some reason I know all energy eigenvalues. Could I determine the corresponding potential?  How does this generalize to more than one dimensions?


I need to retrieve table parent-child relationship from "WHERE" clause like this:  select ... large list of fields with aliases ... from ... list of joined tables ...  where ((`db_name`.`catalog`.`group` = `db_name`.`catalog_group`.`iden`)  and (`db_name`.`catalog`.`iden` = `db_name`.`catalog_sub`.`parent`))   Is there a some regex to get identifiers from each condition? Say in an array element[0] = table from the left side, element[1] is table from right. Ident's name may be any. So only sql operators like 'where' 'and' '=' may be keys.  Any help would be greatly appreciated.  CLARIFY  I dont want to get references from WHERE clause by WHERE clause. I just want references as such. So as could I see there may be regex to replace all sequences   `.`    to   .    and then match all backticked pairs by   ` @ ` = ` @ `   Backticks around identifier always present in any may query by default. All string values surrounded by double quotes by default. I thought it's not a complex task for regex guru. Thanks in advance.  PS It's because myISAM engine does not support references I forced to restore in manually.  ENDED with:  public function initRef($q) {      $s = strtolower($q);     // remove all string values within double quotes     $s = preg_replace('|"(\w+)"|', '', $q);      // split by 'where' clause     $arr = explode('where', $s);      if (isset($arr[1])) {          // remove all spaces and parenthesis         $s = preg_replace('/\s|\(|\}/', '', $arr[1]);          // replace `.` with .         $s = preg_replace('/(`\.`)/', '.', $s);         // replace `=` with =                    $s = preg_replace("/(`=`)/", "=", $s);           // match pairs within ticks         preg_match_all('/`.*?`/', $s, $matches);         // recreate arr         $arr = array();         foreach($matches[0] as &$match) {             $match = preg_replace('/`/', '', $match); // now remove all backticks             $match = str_replace($this->db . '.', '', $match); // remove db_name             $arr[] = explode('=', $match); // split by = sign         }         $this->pairs = $arr;      } else {         $this->pairs = 0;     }  }


Why is the tension force equal to the applied force when someone is lifting themself with a pulley?

While I can get the right answer for these problems by memorizing how to do it, I want to understand it conceptually.  There is a (massless) pulley with a rope through it. A person sits (in a bucket/chair/box) and pulls down on the other end of the rope to lift herself up. The question is how much force she needs to pull down with to lift herself at constant velocity.  From practice, I know the answer is half the force of her weight. This is because the pulling force is equal to the tension. When she pulls on the rope, it creates tension throughout the rope. The tension pulls her up on both sides, so the total upward force is twice the tension (2T). Then, you subtract her weight (mg) from the upward force to get 2T - mg. Since velocity is constant, acceleration = 0, so according to Newton’s Second Law the net force is 0. Thus, you set the equation to 0 and solve to get T = mg/2. I do understand why the answer ends up being half the weight, and why the tension pulls on both ends of the rope. (I’ve clarified the question to focus on what I’m actually confused about.)  My question is, why is the tension equal to the pulling force applied by the person? If an object hangs from a rope, the tension in the rope is equal to that object’s weight. The person is, after all, hanging from the rope as she pulls it. So as she pulls herself up, why does the tension only equal her pulling force, and not include her weight? Doesn’t the person’s weight strain the rope more?   I would really appreciate any and all help. Thank you.


Does the technology exist to generate AC current with a frequency high enough such that when used in a circuit, could generate visible light?

The rapidly fluctuating magnetic field should generate a rapidly fluctuating electric field which propagates away from the wire at the speed of light. I'm not sure how rapidly current can be switched in a wire, but perhaps radio waves could be generated in this way? This probably would not be a cost effective way to generate light but I am curious if we could.


Bought a new battery, do I need to calibrate it?

My original battery is bloated and is dying quickly after a full charge so I now bought a replacement. Do I need to calibrate this new battery using a calibration app?


Is it possible to configure Keychain to share passwords in Chrome on OS X Catalina? The problem I face is that some websites function better in Chrome than Safari and I would like to be able to switch between the two browsers and use auto-logins in each. Currently I can do this in Safari if use Keychain and Password autocomplete. I would like to be able to do same or similar in Chrome.


Any tips for how I can place these divs in the center of the page?

I'm a beginner programmer I'm working on a website with my friend Alex, we're both beginners actually, I took on the task of designing the landing page to get some practice in. I want to have these divs which contain nothing but text centered horizontally and vertically (or dead center), I've tried some things other people have suggested on other posts on this site but nothing seems to be working. Could one of you gurus please help me? And thanks in advance :D (I should probably mention that I'm using DW with the Bootstrap framework)  Here's the html:  <!DOCTYPE html>               <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>     <meta charset="utf-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1">     <title>Untitled Document</title>          <link href="css/bootstrap.css" rel="stylesheet">     <link href="css/stylesheet.css" rel="stylesheet" type="text/css">

 About

 Sign up

TEXT I WANT CENTERED

         TEXT I WANT BELOW CENTERED TEXT
                              Heres the css:  @charset "utf-8"; /* CSS Document */  .background {      background: url(../img/bg1.jpg) no-repeat 50% 50% fixed;      margin: 0 auto;      max-width: 80%;      min-width: 50%;      width: 80%;      height:auto;      background-size: cover;      -webkit-background-size: cover;      -o-background-size: cover;      -moz-background-size: cover;  }       li {      display: inline;      letter-spacing: 2px;      padding-right: 0.5em;      float: right;      font-size: 125%;      font-style:normal;      font-weight: bold;      text-transform: uppercase;      text-decoration:none;      color:#ffffff;      text-shadow: 4px 3px 0px #000000, 9px 8px 0px rgba(0,0,0,0.15);  }   #welcome {     font-family: 'Montserrat', sans-serif;     max-width: 90%;     min-width: 80%;     height: 50%;     font-size: 350%;     font-style:normal;     font-weight: bold;     text-transform:uppercase;     text-decoration:none;     text-align: center;     color:#ffffff;     position: relative;     text-shadow: 4px 3px 0px #000000, 9px 8px 0px rgba(0,0,0,0.15);     z-index: 9998;  }   welcome p {      width: 300px;      height: 100px;      padding: 20px;   }   #best {     font-family: 'Montserrat', sans-serif;     max-width: 100%;     min-width: 70%;     font-size: 200%;     font-style:normal;     font-weight: bold;     text-transform:uppercase;     text-decoration:none;     text-align:center;     color:#ffffff;     position: relative;     text-shadow: 4px 3px 0px #000000, 9px 8px 0px rgba(0,0,0,0.15);  }    p {      text-align:center;   }   a {      color: #FFFFFF;  }   a {      hover: #2a7315;      text-decoration: none;  }


How to disable touchscreen permanently on ubuntu 18.04

I am trying to disable the touchscreen on my Asus S200E laptop.  In Ubuntu 16.04, I was able to do so with this:  Section "InputClass"     Identifier "evdev touchscreen catchall"     MatchIsTouchscreen "on"     MatchDevicePath "/dev/input/event*"     Driver "libinput" EndSection   How can this be done on Ubuntu 18.04?


Should I Address a Letter to "Professor" xyz when they are actually a "Lecturer in Discipline"?

I am writing thank-you notes to Professors before I graduate from my Bachelors' program. I am unsure how to address letters to two specific individuals:   One is listed as a "Lecturer in Music" on my school's website and has no vita published online. He has a DMA (Ph.D equivalent for composers), but I can't determine if he has held the title of Professor at another institution. He has been at my school for 10 years, so this is unlikely.  The other is listed as a "Lecturer in Discipline" on my school's website but his vita, which is on the same webpage, lists his title as "Adjunct Assistant Professor". He has his Ph.D in Economics. He has held Assistant Professorships elsewhere but his career has largely been in the private sector.   I feel like I shouldn't be listing either of them as "Professor" in my recipient addresses, but I don't want to be disrespectful. I call them Professor in person and in class.   What would be the most appropriate way to address these letters without ruffling any feathers?


5x ≡ 3 (mod 12) how do you find the first three xs without listing them?

5x ≡ 3 (mod 12). The question asked me to find the smallest positive non zero integers that can be plugged in the place of x. I only know how to find the answer by making a list.  5, 10, 3, 8, 1, 6, 11, 4, 9, 2, 7, 0, 5, 10, 3.  It took 12 for 3 to get back to another 3. So the answer is 3, 15(=3+12), 27(=3+12+12). But is there any shortcut or formula to get them more easily?


MCU: Agents of SHIELD/Age of Ultron viewing order?

So, as has been known for a while (and which should surprise absolutely no one), . Can someone please name, without any spoilers, where Age of Ultron should fall for the best cross-MCU story?  (Clarification – Here's what I mean by best: My mom watched all of AoS S1 before watching Winter Soldier. Clearly a bad move, as Winter Soldier was obviously meant to be the big reveal for what then shakes up the remainder of AoS. When, relative to the recent/upcoming AoS S2 episodes, should Age of Ultron be watched to make sure all the big reveals happen at the proper time?)


How to deal with the child when both the parents are not on the same page?

The kid will soon grow up to the age when she'll need to be disciplined.  My husband and I are NOT on the same page regarding disciplining the child.   I think if the kid cries because one parent has refused to give into her demands and decided to time out her, the other parent should not intervene and console the child since that'll give the child a message that mama is bad and daddy is nice rather than letting her understand the problem.   My husband thinks if daddy doesn't intervene to console the child when she cries (w.r.t above mentioned situation), the child will think that both parents are on each other's side and no one loves her.  I don't know whose opinion is correct. I also don't know how to deal with child if both the parents are not on the same page.


How to verify that $\mathbb R^\mathbb R$ is a direct sum of the Ue and Uo

The $U_e$ and $U_o$ denote the set of all real-valued even/odd function on $\mathbb R$ respectively.


Hide current working directory in terminal

As a default, the terminal prompt shows something like:  user@system:/folder1/folder2/folder3/folder4$   the deeper you go into the filesystem, the less space is left for typing in commands. Can I change this to only show something like:  >   I mean, I can just type pwd to show where I am at. ;)


Cannot release unused space in SQL Server mdf file

I have a huge mdf file (61 GB) and it is 95% empty I want to release unused space. I tried to Shrink the file but when I click OK the Shrink screen closes and nothing happens the file still 61 GB How to resolve this?


How do I roll back my iOS version? The 12.2 update has broken my WiFi

When I updated my iPhone 8 to 12.2 (16E227), it broke the WiFi and now apps like YouTube can't connect and often times I can't even load apple.com in Safari. When I restart the phone then it works for about a minute. When I turn airplane mode on and off, it works for about a minute.  However my iPad with iOS 9.3.5 works flawlessly. My Samsung laptop works flawlessly. Also when I turn WiFi off on my iPhone and use cell data, it also works.


I recently bought an external hdd(WD Elements), when I connected it to my pc, the drive shows up in Computer, but it showed, instead of the default icon for a drive, the logo of Western Digital. Then I partioned the drive to three partitions and none of them carries the logo. No, I do not want the logo back, but, I would like to show another image as the icon for the drives. How can I do this?


In both The Lord of the Rings and The Silmarillion, it is suggested that men can learn to use magic.  Quotes demonstrating this follow: (from The Lord of the Rings):  The Lieutenant of the Tower of Barad-dûr he was, and his name is remembered in no tale; for he himself had forgotten it, and he said: 'I am the Mouth of Sauron.' But it is told that he was a renegade, who came of the race of those that are named the Black Númenóreans; for they established their dwellings in Middle-earth during the years of Sauron's domination, and they worshipped him, being enamoured of evil knowledge. And he entered the service of the Dark Tower when it first rose again, and because of his cunning he grew ever higher in the Lord's favour; and he learned great sorcery, and knew much of the mind of Sauron; and he was more cruel than any orc.  (from The Silmarillion):  Those who used the Nine Rings became mighty in their day, kings, sorcerers, and warriors of old. They obtained glory and great wealth, yet it turned to their undoing  This makes me wonder...  are there any other instances of men who have the ability to learn magic?  Also, why don't all men learn magic?  It seems to me that Sauron would have had a much harder time dominating men if the men he sought to dominate were sorcerers, themselves. Additionally, if magic is something that can be learned, what, then, separates a maiar or an ainur from a mere man?


How did the English language come to this?       The play was awful.     Is the complete opposite of     The play was awesome.   But if you break it down to awe followed by ful or some, it doesn't make sense at all. Can someone shed a light on this?  Is there a rule to this, or is it one of those things you need to just memorize?


How do I prove this identity involving polar coordinates and $\nabla$?

Given that $$\begin{aligned} &x=r\cos(\theta),\\ &y=r\sin(\theta),\\ & \qquad \text{and}\\ &x^2+y^2=r^2 \end{aligned}$$ Use the chain rule to show that $\nabla=\mathbf{\hat{r}}\frac\partial{\partial r}+\mathbf{\hat{\theta}}\frac1r\frac\partial{\partial\theta}.$  I derived that $\,\mathbf{\hat{r}}=\cos(\theta)\mathbf{\hat{\text{i}}}+\sin(\theta)\mathbf{\hat{\text{j}}}\,$ and that  $\,\mathbf{\hat{\theta}}=-\sin(\theta)\mathbf{\hat{\text{i}}}+\cos(\theta)\mathbf{\hat{\text{j}}}.$ But I can't seem to gro from here.


Where are the necessary places to be appended with % to remove unwanted spaces?

I have  experience where empty spaces cause unwanted effects. It is not easy to trace the cause of these unwanted effects. In order to eliminate any doubt, I often overuse % as follows.   \usepackage% [% left=3cm, right=3cm% ]% {geometry}   or  \newcommand{\mycommand}% {% This is my command.% }   I got an extreme example that will break what Leo Liu said     In fact, only spaces which would be   output have to be removed by comment.   The following code does not produce output, but we cannot remove the % and leave a blank line between two elements of a list below.  \newpsstyle{gridstyle} { gridwidth=0.4pt, % griddots=0 }   Shortly speaking, where are the necessary places to be appended with % to remove unwanted spaces?


I have some weird output instead of “blank space ” it appears unknown symbol in LaTeX

I'm writing code c++ in LaTeX using listing...but I have some weird output instead of "blank space " it appears unknown symbol, here is the code of the list:  \defverbatim[colored]\lstI{ \begin{lstlisting}[language=C++,basicstyle=\ttfamily\scriptsize,keywordstyle=\color{blue}\ttfamily,stringstyle=\color{red}\ttfamily,commentstyle=\color{green}\ttfamily,breaklines=true] fprintf(gnuplot,"set term postscript\n");   fprintf(gnuplot,"set output \"kmeans_graphs.ps\" \n"); fprintf(gnuplot,"plot 'nomExt.txt' lt 3 linecolor rgb \"red\", 'init_center.dat' lt 7 linecolor rgb \"blue\"\n");  fprintf(gnuplot,"plot 'nomExt.txt' lt 3 linecolor rgb \"red\", 'center_progress.dat' lt 7 linecolor rgb \"yellow\"\n");      fprintf(gnuplot,"plot 'nomExt.txt' lt 3 linecolor rgb \"red\", 'final_center.dat' lt 7 linecolor rgb \"green\"\n"); fprintf(gnuplot,"set term x11\n set out\n"); fprintf(gnuplot,"plot 'nomExt.txt' lt 3 linecolor rgb \"red\", 'final_center.dat' lt 7 linecolor rgb \"green\"\n");     cout<<"\tsaving all plots in the file directory with kmeans_graphs.ps name..."<<endl;     cout<<"\tdisplaying final center for the data set..."<<endl; \end{lstlisting} } \begin{frame}{partie 3 du code}{Extrait main.cpp} \lstI \end{frame}   Here is the output :  fprintf ( gnuplot , " set ␣ term ␣ postscript \ n " ) ; fprintf ( gnuplot , " set ␣ output ␣ \" kmeans_graphs . ps \" ␣ \ n " ) ; fprintf ( gnuplot , " plot ␣ ’ nomExt . txt ’␣ lt ␣ 3 ␣ linecolor ␣ rgb ␣ \" red \" , ␣ ’ init_center . dat ’␣ lt ␣ 7 ␣ linecolor ␣ rgb ␣ \" blue \"\ n " ) ; fprintf ( gnuplot , " plot ␣ ’ nomExt . txt ’␣ lt ␣ 3 ␣ linecolor ␣ rgb ␣ \" red \" , ␣ ’ ce n te r_ pr o gr es s . dat ’␣ lt ␣ 7 ␣ linecolor ␣ rgb ␣ \" yellow \"\ n"); fprintf ( gnuplot , " plot ␣ ’ nomExt . txt ’␣ lt ␣ 3 ␣ linecolor ␣ rgb ␣ \" red \" , ␣ ’ final_center . dat ’␣ lt ␣ 7 ␣ linecolor ␣ rgb ␣ \" green \"\ n " ) ; fprintf ( gnuplot , " set ␣ term ␣ x11 \ n ␣ set ␣ out \ n " ) ; fprintf ( gnuplot , " plot ␣ ’ nomExt . txt ’␣ lt ␣ 3 ␣ linecolor ␣ rgb ␣ \" red \" , ␣ ’ final_center . dat ’␣ lt ␣ 7 ␣ linecolor ␣ rgb ␣ \" green \"\ n " ) ; cout < < " \ tsaving ␣ all ␣ plots ␣ in ␣ the ␣ file ␣ directory ␣ with ␣ kmeans_graphs . ps ␣ name ... " << endl ; cout < < " \ tdisplaying ␣ final ␣ center ␣ for ␣ the ␣ data ␣ set ... " << endl ;


Is there anything like USB adapter for RAM?

My laptop has only 1 RAM slot. Is there anything like RAM USB adapter so I can plug in another RAM piece for upgrade purpose?


Conditions for an element to be an unit element in a ring

Say $R$ is a ring with unit element $1$ and $\phi:R\to R'$ is a ring homomorphism. Prove that $\phi(1)$ is unit element of $R'$.   So I have shown the following with regard to $\phi(1)$  $$\phi(1)\cdot\phi(a)=\phi(a)\cdot\phi(1)=\phi(a)$$ $$ \phi(-1)=-\phi(1)$$  Is this sufficient, or there is something more I need to prove?


What is the sum $\sum_{n=1}^\infty \frac 1{2^n} \tan \frac 1{2^{n+1}}$?

The problem is to determine the sum $$\sum_{n=1}^\infty \frac 1{2^n} \tan \frac 1{2^{n+1}}$$  I have been trying everything that comes to my mind (trigonometrical functions' formulas, transforming to integration, Taylor expansion, etc.) to no avail, so a slightest hint to a successful approach would be much appreciated.


recently I had reset my ubuntu password using the information provided here   By this am changed successfully, but here my question is how can we get security with this. any one can able to reset our password without our knowledge


Does light hitting a mirror stop before being reflected. And if so does it have to accelerate back up to the speed of light. In other words, when light is emitted by any means is it instantly travelling at the speed of light or is there any, however brief, acceleration period?


What format for my external drive allows use with Mac and Windows?

How can I use my external hard drive on Mac OS so I can modify/edit files on both OS's: Mac and Windows? How should I format it?


How to prove an equivalent definition of injective?

Let $A,B$ be non-empty sets and $f:A\to B$ a function. Proof that $f$ is injective, iff $f\circ g=f\circ h$ implies that $g=h$ for all functions $g,h:Y\to A$, for every set $Y$?   I can see why this is. But how do I prove this? I get confused by the if and only if part.


Why does one need to use the Safety Remove Hardware tool when write caching is enabled on a disk drive, and what are the risks of not doing so?

I wonder why one needs to use the Safety Remove Hardware tool when write caching is enabled on a disk drive, what the risks are if not doing so aside from file corruption of the files being written at the time of the disk removal. In particular, can it make the  hard drive unusable?


How to copy a file along with directory structure/path using python?

First thing I have to mention here, I'm new to python.  Now I have a file located in:  a/long/long/path/to/file.py   I want to copy to my home directory with a new folder created:  /home/myhome/new_folder   My expected result is:  /home/myhome/new_folder/a/long/long/path/to/file.py   Is there any existing library to do that? If no, how can I achieve that?


How to compute $\lim_{n\to \infty} n\sin(2\pi n! e)$

I want to calculate      $$\lim_{n\to \infty} n\sin(2\pi n! e)$$   I have used the Stirling approximation and I think the answer is zero . But I think the limit maybe not exists.   Can some one help?  Thanks.


Opening binary data as a file with a specific file name

I have a situation where I'm having to take binary data (for PDFs, word docs, etc) via ajax and allow users to download the file by clicking on a link.  Currently I am doing this by opening a new browser window with the binary data.  window.open("data:application/pdf;base64,"+ binaryFileData);   This works for opening the file, but the file name generated is always the actual binary string and not anything human-readable.    Is there a way to give the opened file a specific name?


I ran a regression model with the Y variable (length of stay of patients in days) log10 transformed. I would like to compare the fit of the log10 transformed model with a similar regression where the Y variable is in the raw scale. As such, it would be ideal to compare residuals in the original scale (days). Some papers suggest the back-transformation using Duan's smearing estimate. How do I implement this in R? Thanks,


So the question asks: Let A be a $2\times 2$ matrix, and suppose that there exist scalars $λ_1,λ_2$ in$\mathbb{R}$ and nonzero vectors $v_1,v_2$ in $\mathbb{R}$ such that $Av_1=λ_1v_1, Av_2=λ_2v_2$, and $λ_1$ does not equal to $λ_2$.Prove that the vectors $v_1,v_2$ form a basis of $R^2$.   So so far I got:   As the eigenvector $v_1,v_2$ are corresponding to two different eigen values$λ_1,λ_2$ respectfully.   Therefore the eigenvectors $v_1,v_2$ are linearly independent.   And since $v_1,v_2$ spans A in $\mathbb{R}$.   Hence,  $v_1,v_2$ forms a basis of $\mathbb{R}$.   Does this proof look right? Do I need to write a linear combination of $v_1,v_2$ to show they span A?


Ok, I know I already asked this stuff but I thought that I should've organized it. So here it goes. By the way, quick shout out to people who answered my original question. I guess it was off-topic but I just wanted answers for something I've been wondering for a while. Also this is my first day on stack exchange. Sorry this is long: 1. Is saying "come on" and "let me" rude. And I mean let me in a way like "let me see that" and "let me have your phone".  2. If it is rude to say commands without please,then why do people do it so often. (And I mean certain commands. Like, ones where please could be added appropriately) 3. Am I the only person who does say let me and come on? Also I don't use imperatives that much. I usually rephrase them to be statements and questions. Is that weird?


A question about polynomial. Can we conclude that $h \in D\left[x\right]$ where $D$ is a commutative integral domain

Question:Suppose $E$ is a commutative ring, polymonials $f\left(x\right),g\left(x\right),h\left(x\right)\in E\left[x\right]$.$f$ is monic. $D$ is a subring of $E$ and $D$ is an integral domain. Now if we have $g\left(x\right)=f\left(x\right)h\left(x\right)$ in $E$,and $g\left(x\right),f\left(x\right) \in D\left[x\right]$, can we conclude that $h\left(x\right)\in D\left[x\right]$? My try: If $E$ is also an domain, since $f$ is monic, we can do division algorithm on $D$, say $g=fq+r,deg\left(r\right)\lt deg\left(f\right),q,r\in D\left[x\right]$.We then have $g=fq+r=fh$. As a result, we get $r=f\left(h-q\right)$.If $E$ is integral domain, we can conclude that $h=q$,that is $h\in D\left[x\right]$. However, I do not know whether $h \in D\left[x\right]$ or not when E may not be an integral domain.Can anyone help me? Thanks


Is my model any good, based on the diagnostic metric ($R^2$/ AUC/ accuracy/ RMSE etc.) value?

I've fitted my model and am trying to understand whether it's any good. I've calculated the recommended metrics to assess it ($R^2$/ AUC / accuracy / prediction error / etc) but do not know how to interpret them. In short, how do I tell if my model is any good based on the metric? Is an $R^2$ of 0.6 (for example) sufficient to let me proceed to draw inferences or base scientific/business decisions?     This question is intentionally broad, to cover a wide variety of situations that members frequently encounter; such questions could be closed as duplicates of this one. Edits to broaden the scope beyond the metrics mentioned here are welcome, as are additional answers - particularly those that offer insight about other classes of metrics.


Is there any reference to intergalactic relations in Star Trek’s future?

I recall in at least two episodes of Star Trek ( from the original series and  from The Next Generation) that there is reference to and contact with species from external galaxies.  By the 29th century, we see that timeships exist.  My question is, is there any reference to intergalactic relations in Star Trek in the future (say, by the 29th Century), or does the Star Trek Universe stay in the Milky Way Galaxy?


Short story about a planet of technology-blocked geniuses?

I remember reading a short story with the following synopsis:  An Earth exploratory expedition arrives at a planet thinly populated by friendly humanoid folk at a very primitive technological level - no wheel, no sails, etc. Perhaps they lack some key concept, I don't recall the exact reason for the technological block. However they turn out to be all of them extremely highly intelligent. From clues innocently and accidentally dropped by members of the expedition, and by observing their technological artifacts, in mere days they invent the wheel complete with ball bearings (made with round hard nuts), and other things which make expedition members afraid. The commander considers exterminating the village they made contact with, but it turns out that messengers have already gone to other villages and one guy  has invented the sail and went overseas to transmit the new knowledge. The expedition decides to leave before any more knowledge leaks out, and takes with them a girl child who desires to see more marvels. The story ends with the commander musing that the girl won't ever come back to tell her people about what she has seen: Earthmen will have to "dissolve", by assimilation and intermarriage, the people of this planet, who are yet very few, within the huge mass of humanity, to prevent them from dominating the galaxy.


How to create a wifi hotspot using wifi connection

I am very new to ubuntu . I am using ubuntu 14.04.01 and i am  using a wifi connection and i don't have a lan connection. I want to create a wifi hotspot using this connection. I searched on sites but i only get the methods to create it with lan.   I tried   thanks in advance.


How do I vertically align a box to the center using CSS?

I've been learning CSS and am now practicing by trying to replicate basic websites, but I've stumbled across a problem!  I'm trying to vertically align a box so that it is always in the middle, and will automatically scale if I make the browser vertically smaller. So far I've tried to replicate what I've done horizontally (normally margin: 0 auto;) but it isn't working.  My relevant HTML and CSS so far look like this:    *{   margin: 0;   padding: 0;   box-sizing: border-box; }  /* Global Values */  html{   font-family: "Arial";   font-size: 16px;   line-height: 1.2;   height: 100%; }  body{   background-color: #f9f9f9;   height: 100%; }  .container{   display: block;   min-width: 240px;   max-width: 768px;   width: 100%;      /*----------------------------------------------*/   /* This is to make sure that the container height is always the same size as the browser. */      min-height: 100px;    height: 100%;        /*----------------------------------------------*/   margin: 0 auto;   text-align: center;   border-style: solid; }   header{   border: solid;   min-height: 100px;   margin: auto 5%; }

Jon Phillips

User Interface Designer

Contact

         I'm showing the borders so I can see what's going on, and am sure that (like horizontal centering) my margins need to be automatic. When I've done this horizontally, it's worked fine...  Does anyone have a recommendation on what to do??  Thanks in advance!


Find of symbolic links point to the same target

How can I find all of the symbolic links in a directory, that point to the same target?  For example, here is a list files in a directory:  a.txt b.txt a -> target1 c -> target1 m -> target2 n -> target3 c.txt z -> target1   I want to get a list of what linked to target1. So the expected output will be:  a c z


determining path to sourced shell script

Is there a way for a sourced shell script to find out the path to itself? I'm mainly concerned with bash, though I have some coworkers who use tcsh.  I'm guessing I may not have a ton of luck here, since sourcing causes commands to be executed in the current shell, so $0 is still the current shell's invocation, not the sourced script. My best thought currently is to do source $script $script, so that the first positional parameter contains the necessary information. Anyone have a better way?  To be clear, I am sourcing the script, not running it:  source foo.bash


Are the connected components of $\mathbb{R}^n\setminus K$ in a finite number?

Let $K$ be a compact set and consider $\mathbb{R}^n\setminus K$. It is easy to show that, if $n\geq 2$, the set $\mathbb{R}^n\setminus K$ contains one (and only one) unbounded connected component. Could someone can help m to show that the remaining connected components of $\mathbb{R}^n\setminus K$ are in finite number? Alternatively, also some references will be well accepted.


Global shortcut to switch to instance of application without selecting window

Ubuntu 18.04 (and presumably other versions that use Gnome, such as 17.10 and 18.10) has global keyboard shortcuts for switching among applications based on their location in the dock with Super-0...9:    But if you have multiple windows a given application open, instead of switching to the application, it will display a menu of all the open windows. You have to select one of the windows (using Enter or the mouse) to switch to the application.    Is there a way of having these global shortcuts instead automatically switch to the window of the application that's closest to the foreground?


I can perform operations on polynomials. I can add, multiply, and find their roots. Despite this, I cannot define a polynomial. I wasn't in the advanced mathematics class in 8th grade, then in 9th grade I skipped the class and joined the more advanced class. This question isn't about something I don't understand; it's something I missed. My classes have not covered what really a polynomial is. I can generate one, but not define one. The internet has yielded incomplete definitions: "Consisting of multiple terms" or "A mathematical expression containing 2 or more terms and variables." Take the following expressions for example: $2x^2-x+12-2x^2+x-12$. Consists of multiple terms, but can also be expressed as $0$. Is zero a polynomial? What about $x^{-1}$? , but I don't understand why. Is $x^2+x+1-x^{-1}-x^{-2}-x^{-3}$? a polynomial? It contains both positive and negative exponents?  tl;dr: What actually is the mathematical definition of a polynomial? Is $0$ a polynomial, and why isn't $x^{-1}$ a polynomial under this definition?


How to beat the Kayran, with Xbox controller on PC? I cut off four arms and the Kayran is down to 1/4 health. I get swept on one tentacle, I am clicking as fast as possible (blue X), yet even when the yellow bar appears to be full I still get thrown off the tentacle.


How to fix blue screen of death (BSOD) error?

am very sure that my graphics card nvidia geforce 210 is causing BSOD, because when i remove the graphic card and use the on-board graphics there are no such errors.   I have got 3 BSODs up to date. the 3 dump files are   Please go through the dump files and help me fix the issue.   thank you in advance.


Find the norm of the operator $A: \ell^p \to \ell^p$, $A(x_{n})_{n\geq 1} = (\frac{1}{m}\sum_{n=1}^{m}\frac{x_{n}}{\sqrt{n}})_{m \geq 1}$

Note: this question has been asked before, here: , but it wasn't definitively answered, so I'd like to post my thoughts on the problem, and ask for a solution if anyone has any ideas.  So, the question is:     For which $p \geq 1$ is $A: \ell^p \to \ell^p$, $$ A(x_{n})_{n \geq 1} = \big( \frac{1}{m} \sum_{n=1}^{m}\frac{x_{n}}{\sqrt{n}} \big)_{m \geq 1} $$ a bounded linear operator? For those $p$ for which $A$ is bounded, find $||A||$, where $||\cdot||$ is the operator norm.   Now, I had two ideas: use convexity of $x \mapsto x^p$, or use Hölder's inequality. However, each approach is far less sophisticated than Norbert's answer in the linked question, because I didn't know about Hardy's inequality before reading the question. The convexity approach got me nowhere, while the Hölder approach got me the following upper bound: $$||A(x_{n})_{n \geq 1}||_{p} \leq \sqrt[p]{\sum_{m=1}^{\infty} \frac{S_{m}}{m^p}} \cdot ||(x_{n})_{n \geq 1}||_{p},$$  where $S_{m} = (\sum_{n=1}^{m} \frac{1}{n^{\frac{q}{2}}})^{\frac{p}{q}}$. The series converges because $\sum_{n=1}^{m} \frac{1}{n^{q/2}} \sim m^{1-q/2}$, and so the summands behave like $m^{-p+\frac{p}{q}-\frac{p}{2}}$, and $\frac{p}{q}-\frac{p}{2}-p = p-1-\frac{p}{2}-p = -1-\frac{p}{2} <-1$.


Possible Duplicate:          see this code    #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))     int array[] = {23,34,12,17,204,99,16};     int main()     {         int d;         for(d=-1;d <= TOTAL_ELEMENTS-2;d++)            printf("%d\n",array[d+1]);         return 0;    }    now this loop won't run. sizeof() would return an unsigned value so TOTAL_ELEMENTS has an unsigned value. now , coming to the for loop, please tell me if the unary operator '-' works on signed int 2 or an implicit conversion takes place into unsigned and then the '-' operator works.


Set timeout always 10 seconds for remoteFunction

When the onLoad function is called this code runs. The timeout is set to 2 minutes but the server always returns an error after 10 seconds despite the timeout field. How can I set the timeout to be longer?      sforce.connection.sessionId = "{!$Api.Session_ID}"; sforce.connection.remoteFunction({     url : '{!endpointUrl}',     requestHeaders: {         "Content-Type":"text/xml",     },     requestData: xmlBody ,     method: "POST",     onSuccess : function(response) {         var parser = new DOMParser();         var xmlDoc = parser.parseFromString(response,"text/xml");         var pdf = xmlDoc.getElementsByTagName("Contents")[0].childNodes[0].nodeValue;         document.getElementById("PdfObject").src = "data:application/pdf;base64," + pdf;     },     onFailure : function(response) {         alert("There was a problem. Please try refreshing the page or try again at another time. " + response);     },     async:true,     timeout:120000 });


Why does silver lose its magnetic moment?

By the Gerlach-Stern experiment, the silver atom has a net magnetic moment. But silver as a metal is not magnetic. Or more precisely, it does not show any permanent magnetic moment.   What is the reason behind? How about a cluster of silver atoms?


I have joined a few different Stack Exchange communities and I have noticed that when I join a new one, like this, my reputation points go to 1, even though I have more reputation on other Stack Exchange sub domains.  I am joining or logging into Stack Exchange via my Google account, and thought because I used the same Google account when logging in, my reputation points would transfer over.  I am not a reputation hog or overly concerned about fake internet points, but when browsing other Stack Exchanges and clicking other people's user names, I noticed (or thought I noticed) reputation from other sub domains seemed to transfer to the all sub domains. For instance, a guy in the DIY Stack Exchange has 2k reputation earned from the WordPress Stack Exchange (just an example).  So I guess my question is two parts:   Is reputation on Stack Exchange websites cross domain? If so, how does one link their Stack Exchange logins?


How do I combine standard deviations of two groups?

I have 2 groups of people. I'm working with the data about their age. I know the means, the standard deviations and the number of people. I don't know the data of each person in the groups.  Group 1 :  Mean = 35 years old; SD = 14; n = 137 people  Group 2 :  Mean = 31 years old; SD = 11; n = 112 people  I want to combine those 2 groups to obtain a new mean and SD. It's easy for the mean, but is it possible for the SD? I do not know the distribution of those samples, and I can't assume those are normal distributions. Is there a formula for distributions that aren't necessarily normal?


Intersection of all $p$-Sylow subgroups is normal

Let $G$ be a finite group, $p$ a prime number that divides $|G|$ and $O_p(G)=\bigcap_{P \in Syl_p(G)}P$. Prove that  1) $O_p(G) \lhd G$  2) $O_p(G)$ is maximal among the normal $p$-subgroups of $G$.  3) $O_p(G/O_p(G))=1$  I think I could do 2) using the following proposition which I will just enunciate:  Proposition  Let $P$ be a $p$-Sylow and $H \subset G$ a $p$-subgroup. Then there is $x \in G$ such that $xHx^{-1} \subset P$.  Solution to 2):  Suppose $O_p(G) \subset H$ for some $H \lhd G$ p-subgroup. By the proposition we have that for each $P$ p-Sylow group, there is $x: H=xHx^{-1} \subset P$. But then $H \in \bigcap_{P \in Syl_p(G)} P=O_p(G)$, so $O_p(G)=H$, it follows $O_p(G)$ is maximal.  I am pretty lost in 1) and 3), I would appreciate suggestions or hints rather than complete answers. Thanks in advance.


Prove that there exists a shortest distance between two skew lines

In every geometry textbook it states that the shortest distance between two skew lines (lines that are not co-planar) is given by the unique line that runs perpendicular to both skew lines. This is fairly simple to prove given a shortest line exists (see my comments below). However, how can we prove that between any two skew lines there exists a shortest straight path? I have tried using calculus to show that for lines $L_1 = \mathbf{p}+s\mathbf{u}$ and $L_2 = \mathbf{q} + t\mathbf{v}$ the equation: $$R(s,t) = \Vert \mathbf{p}+s\mathbf{u}-(\mathbf{q}+t\mathbf{v})\Vert^2$$  Has a local minimum  However I am not quite able to show that (without getting into page and pages of calculations) and what is more, even after I have shown this, it only proves a local minimum exists.


Matching character or end of string in regular expressions

I'll start with an example:  Assuming the following input (assume that \n is a line break):  MY STRING content1 \n content1; my string content2 \n \n content2; my string content3 content3 \n content3   As you can see, the first two parts end with a ';' character, but the last one doesn't. The following regex pattern match will fetch both first parts, but not the second part:  Matcher m = Pattern.compile("(MY STRING(.*?)\\;)|(my string(.*?)\\;)").matcher(str);   The result is:  MY STRING content1 \n content1; my string content2 \n \n content2;   But I didn't get:  my string content3 content3 \n content3   Is there a way to match a string that ends with either ";" or when the entire string ends (like the last part)?


I saw an american person (native) write this sentence.  Random stuf about him not not being able to make it in time and period. Then new sentence   "But, this time, George does arrive and they head to..."  I've read here that but after conjuction should not be used, does it mean it's wrong what this native person wrote? The main issue is that he starts a new sentence with but, something that was not discussed here. If it's possible to write comma after but I could make up sentences like this one:  "But, back then, while he waited, she was kissing Peter." Would it be correct?


Show that the family of sets is countable

$D=\{X\subseteq \mathbb{N}:|\mathbb{N}\setminus X| < |\mathbb{N}|\}$ I would like to show that $|D|=|\mathbb{N}|$. I know Cantor-Berenstein theorem. When it comes to lower bound: Let's consider following sets $(\mathbb{N}\setminus \{1\}), (\mathbb{N}\setminus \{2\}), (\mathbb{N}\setminus \{3\}),..$ It is obvious that $Y=|\{\mathbb{N}\setminus \{n\}: n\in\mathbb{N}\}|=\aleph_{0}$. $Y\subseteq D$ hence, $|D|\ge \aleph_{0}$.      I can't show that $|D|\le \aleph_{0} $.  Could you help me ?


There is a well-known proof of the fact that the prime gaps can be arbitrarily large. Namely, for any natural number $n$, the consecutive integers $(n+1)!+2,...,(n+1)!+(n+1)$ are never prime.   But clearly, this proof does not guarantee that $(n+1)!+1$ and $(n+1)!+(n+2)$ are prime. How can we show that the prime gap can be exactly $n$ for any even $n$?


Let $K$ be a field and $f(x)\in K[x]$. Prove that $K[x]/(f(x))$ is a field if and only if $f(x)$ is irreducible in $K[x]$.   How to prove? I really have no idea... Thank you a lot.


Endnotes do not be superscript and add a space

See my picture.    Also I want to add a space between the number and note. Besides writing \endnote{ hello}, are there any formal way?  This is my source code.   \documentclass{article} \usepackage{endnotes} \renewcommand{\notesname}{References} \renewcommand{\theendnote}{[\arabic{endnote}]}  \begin{document} \section{Introduction} As traffic in Macao is a problem\endnote{ hello}, we want to do the project to find out the relationship of traffic among different sites\endnote{world}.  \theendnotes other references...  \end{document}


Can we prevent some of the low-quality questions from entering our system?

Stack Overflow has been wildly successful. And maybe in some ways too successful. I am concerned that Stack Overflow is being inundated by a stream of low-quality questions from users who are accidentally poisoning our well -- by turning off and turning away the core answerers who do all the real work in the system. In theory there is "no such thing as a stupid question" but in practice, there are:  users who can't be bothered to form sentences users who don't do the most basic kinds of research themselves users who barely even explain what it is they are trying to do  I mean a pattern of the above. Not an isolated incident, but 5-10 questions (or dozens or hundreds!) all showing the exact same negative characteristics over a period of days or weeks. Now, a few of these questions is no problem for our community -- that's why we have voting, reputation, question closing, community moderators, flagging, etc. I am happy to intervene if there is a pattern of negligent, irresponsible, failure-to-learn-anything-at-all questions from a particular user. It's easily the #1 reason I mete out timed suspensions at this point. All of these systems work, and have worked to date! That's the good news. That's why we have a community worth participating in, and a community worth visiting. But. I'm starting to see cracks in Stack Overflow as its popularity grows. At some point you have to face up to the hard reality: there are an infinite number of bad questions that can be asked in willful ignorance. However smart our software, however smart our users -- we can't scale enough to defeat a million monkeys randomly typing. Not possible. I worry that we're not doing enough to automatically filter out obviously bad / malicious / inept questions from the system, before the burden of having to deal with these questions lands on our talented audience of answerers. It's an explicit goal to make moderation easy and effortless. I can't in good conscience say we're doing that, if users have to face down a neverending flood of truly horrible, careless questions.. and hope for an occasional gem to float along. What can we do -- what do you suggest -- to detect and prevent these kinds of bottom-of-the-barrel questions from even entering our system in the first place? I am willing to sacrifice a small percentage of new questions (up to 10%) as collateral damage if necessary. (hint as a starting point: think new user / IP address restrictions, around question asking, perhaps based on history..) Now completed! See  below...


Any way to automatically set my sound output to HDMI when the cable is plugged in and off when it's plugged out?

It'd be great if I had a software do this for me, but I guess a bash script is inevitable. However as someone that has never wrote a single line of bash code I'd prolly need a lot of help. Where to start?


How to infuse flavors into steamed vegetables?

Tried to put 5 smashed garlic cloves in boiling water in a hope to get the spanich flavoured but failed. Spanich was being steamed in that vessel.  I intend to steam cook mushrooms, spanich, green onions, and cauliflower.  What is the way to infuse strong garlic, ginger, and black pepper flavours in them?


deleted path variable in windows 10 and when I recreate it and come back after is not there

Hi first of all I'm very sorry for posting question that has been asked a lot before  but none of those couldn't solve my problem I had problems with creating JAVA_HOME variable and at the meanwhile I accidentally deleted path variable in user section I'll be grateful if you can help me restore it or do something about it


How to randomly select data from one array to another and avoiding duplicate

I am trying to randomly select array values on another array avoiding duplicate but am getting an output that is out of my scope.  please help.  Here is my code below   static Random rn = new Random();   static void RandomGenerator()  {      String[] greatingsStyles = { "Hello", "Hay", "Morning", "Good day", "Howzit", "Sure" };      String[] newGreatingsStyles = { };      for (int j = 0; greatingsStyles.Length >j; j++)      {          String ranGreatingsStyles = greatingsStyles[rn.Next(5)];          if (!greatingsStyles.Contains(ranGreatingsStyles))          {              newGreatingsStyles = newGreatingsStyles.Concat(new string[] { ranGreatingsStyles }).ToArray();          }      }      foreach (int i in newGreatingsStyles.ToString())      {          Console.WriteLine(i);      } }


Printing all possible combinations using recursion

I'm trying to write a Python program that outputs all possible strings formed by using the characters c, a, t, d, o and g exactly once using recursion only.  so far I've got this:  i = ['c', 'a', 't', 'd', 'o', 'g']  counter = 0 def func(i):      global counter      i[counter], i[counter+1] = i[counter+1], i[counter]     print(i)      if counter != 5:         counter += 1         return func(i)  func(i)   EDIT:  sorry for being "impolite", but I just copy-pasted the exercise from the book. This is just a pure text from the book.


What is the meaning of swagger and swag?

I hear this word more often nowadays.  Can someone native explain what is the meaning of swag.   The dictionary says "goods or money obtained illegally." But I don't think the following sentence implies that.  Example:      It's my swag.      You Ain't Got No Swag.


Restored/Wiped- Automatically enables Location Services like in LOST MODE?

iPhone 4s with iOS 7.  Like in LOST MODE where the Location Services is automatically turned on eventhough it was OFF before you lost your iPhone, it will give it's location once the device connects to the internet - (already clarified, thank you so much!). Now the question is, Is it also the same when you restore/wiped the iPhone? Will it automatically enable the Location Services after being restored (as long as they will connect it online)?


Proper way to create classes and Objects

Currently I  have a code like this The School array represents the School and each element in the array represents a classroom At the moment I want to store the Class teachers name in the array and if there is no class teacher assigned yet, that particular array element has "empty" import java.util.*; public class Main {     public static void main(String[] args) {         String[] school = new String[8];         initialise(school);     }          private static void initialise( String schoolRef[] ) {         for (int x = 0; x < schoolRef.length; x++ ) schoolRef[x] = "empty";         System.out.println(Arrays.toString(schoolRef));     } }   Output of this is [empty, empty, empty, empty, empty, empty, empty, empty]  However now I want to create a Class called School and a Class called Classroom I want to use an array of Classroom objects School.java import java.util.Arrays;  public class School {      private Room[] rooms;      public static void initialise(Room[] schoolRef) {         for (int x = 0; x < schoolRef.length; x++) {             schoolRef[x].setName("empty");             System.out.println(Arrays.toString(schoolRef));         }     } }  Room.java public class Room {      public String getName() {         return name;     }      public void setName(String name) {         this.name = name;     }      private String name;    }  Main.java public class Main {      public static void main(String[] args) {          Room[] rooms = new Room[8];         School.initialise(rooms);     } }  However when I run the Main method I get a NullPointerException. I want to create an array of Classroom objects instead of writing everything in one Class and I'm not sure what I am doing wrong in my approach. Appreciate any help.Thanks


Compact vs Mirrorless - why pick one over another?

What would be a reason for one to pick the compact (whatever it'd be P&S or something more advanced) over mirrorless compact system camera  ?  Right now market is quite confusing — we have huge market of tiny-sensor compacts, we have mirrorless that use sensors in a size of these from P&S cameras (Nikon 1 being notable example), we have compacts with sensors bigger than most popular mirrorless system (Canon G1X vs m4/3), we have lot of APS-C sensor mirrorless which are matched by some of the compacts (Fuji X100 being most notable example, but even Leica has its X2),  and to make it even more confusing — Sony released RX1 with full frame sensor, beating crap out of every mirrorless on a market.  So what are your arguments to pick compact over a mirrorless?  Why are they better, what's the reason behind logic of companies like Fujifilm which at the same time offers P&S and X-mount mirrorless using same sensor size?


I need to capture month and year for the string,  ,

For this task i have to capture not only month and year but also the entire string starting from i.e < a href using dummy sampler and regular expression extractor can u pls suggest me


How to remove annoying iCloud nagging in Catalina?

How do I remove this very annoying thing under System preferences without signing in to iCloud? I do want to be signed in to the app store.    I do not want to use iCloud.


How does the Death Star maintain an atmosphere?

In A New Hope it's clear that the Death Star has an atmosphere around it. Explosions near its surface result in fireballs indicating oxygen, and ships show clear signs of being affected by drag (air resistance). They need to keep their engines running to maintain speed and when hit immediately fall back.  The Death Star is too small to maintain an atmosphere through gravity, much like a similarly sized moon. So how is it possible that it has an atmosphere?  Note: I have read  and all  the answers explain why it couldn't have an atmosphere, yet it clearly does so this is a different question.


Where can I read the complete bleach thousand year blood war manga chapters?

I doubt that they are going to continue the anime for the final arc of bleach. So I want to go read the manga instead.  The thing is I have never read a manga before and I am not sure where to get it online. Also, which "chapter" would I need to start with exactly?  Any help/guidance is welcome!


Is there a name for the close, minimize and restore buttons?

It seems to me that there should be a generic name for the close, restore, and minimize buttons on the title bar in window managers.  It's been getting hard to search for answers associated with them.  I am also a developer, and I'll be working with low-level window manager stuff on Linux, so this would be a good thing to know.  Is there some kind of generic term for this?  Title Bar Buttons is the best term that I've come up with, but this is in no way official.  If it's different for each window manager, then that would also be good to know.  I couldn't find much searching around...  Note:  It would be nice to know the terms used by all platforms: Windows, Mac OS, GNOME, KDE, XFCE, etc.


How can I set numbers that equals days of month

First of all, I'm sorry if im explaining it too bad, but I'm at least trying...  I have a table with checkboxes,  code is like that:    <td> <?php      $date = date('Y-m-d');     $k = $date;     for($k=8; $k<=31; $k++){ ?> </td> <td> <?php          for($k=1; $k<=31; $k++){ ?> <td>   How can I get change these numbers to calendar numbers, because I want it to begin not with 1, but with the day that is today.  I hope i did ask a question right, if not, please, feel free to comment for more details


Animate a character by using a recorded video

I want to animate a character in a realistic but easy way. I was thinking that I could use videos of me performing the actions I want to have on my characters, however I can't find a way of placing the videos and make the character to follow my movements in an automated way, like motion tracking. How can I animate automatically using this technique? Are there any Plug-ins to work like this? Is this mehod actually more useful than standard animation techniques?


Word or idiom to describe someone who always tries to inflate his skills/properties/experiences when talking with others?

Is there a word or idiom to describe someone who is always trying to create a good impression when talking about himself? Someone who is always trying to show that he is better than others even if he is not.  For example, when you talk to someone about a trip to an amazing place and then the person you are chatting with says that he went on a better trip than yours, that you bought a great car but this person's is better... and so on.


Get citation relations from a given collection of papers

I have a pretty big collection of papers (as bibtex records) for which I'd like to add citation relations, i.e. a collection of cites(a,b) where a and b are two keys identifying the citing and cited paper respectively.  I want to avoid doing this annotation manually. Is there some web service to extract this information automatically?


Factor: $$x^{5}+a x^{3}+b x^{2}+cx+d$$ While: $$d^{2}+c b^{2}=abd$$ Please help me with this question.  I don't have any clue.  EDIT: I saw  but it was not explained what do we do after substitution. I still need help.


Every question on every Stack Exchange site being opened has a title, :        This title is clickable. What kind of benefits gives clickable title here?


Values of $\gcd(a-b,\frac{a^p-b^p}{a-b} )$

I don't know how to prove the following result.  Let $p$ be a prime number and let $a,b \in \mathbb Z$ such that $\gcd(a,b)=1$  Then  $\gcd (a-b,\frac{a^p-b^p}{a-b}) = 1 $ or $ p $  (gcd should be $1$)  I know that $\dfrac{a^p-b^p}{a-b} = a^{p-1}+a^{p-2}b+\cdots $  I don't know what to do next...  Thanks for your help.


Integrating Knowledge into an existing website

I'm looking into leveraging our existing presence on Salesforce to create a help resource for our customers. My problem is that I am completely unfamiliar with Salesforce and need to somehow integrate article/help into a website that has no Salesforce related content on it, with as little of a footprint as possible. How would I do this?   I've done a little browsing and saw that it looks like you can allow public access to articles via an API, would this be the ideal way to go about things? Can I do all the basic things I would need over the API? Is there something more plug and play I can utilize?


jQuery working in Console but not working in js file

I am using the following jQuery code in the search bar of my website. Since I am a beginner, I am unable to relate to other code examples, hence I need help in fixing the code. jQuery(document).ready(function ($) {     //Open Link in Search Results in New Window     jQuery('div.search_result_item_content').click(function () {         console.log("I am executed");         var menuLink = $('div.col.col-9.search_result_item_content').data('link');         window.open(menuLink, "_blank");     }); });  The code without .ready() seems to work on the console. But not on the index.js file of my website. The same file has many other jQuery functions, which are all working smoothly. Any idea, what is causing the issue?


How can you move the origin at the base of object?

How can you move the origin at the base of object and not set the origin to geometry ? (A follow-up question to this one: )


Why didn't Cooper exit the black hole thousands of years into the future after entering the event horizon?

In the scene where Cooper is sending a signal back to his daughter back on Earth, him and the robot are inside the event horizon for a few hours. However after they exit the black hole, it appears that they haven't been subject to time dilation and Cooper is still the same age as Brand.  Why wasn't Cooper affected by spending so much time inside the black hole?


PCA vs SVD - understanding difference and preference of SVD over PCA

I understand that PCA and SVD are similar - PCA removes the mean and SVD doesn't?  I think I have an understanding of PCA - you would use it to reduce dimensions of data and separate it out into linear combinations of variables that explain the largest variance of the SS.  But I can't grasp that same concept for SVD - and especially can't understand when you would use SVD over PCA if they are supposed to be very similar.    Can someone explain in very basic terms why I would pick SVD vs PCA, and how SVD works?  What is a real world application where SVD is better than PCA?


How to allow www-data to create a folder with read, write and execute permission

How do I create a directory with read, write and execute permission in ubuntu 14.04.  I have a web-app written in php and I am using  <?php mkdir('/items/folder', 0777, true); ?>   to create folders but the its not assigning the right permission to my folders, even using chomd on my php script fails.  The app is on a digitalocean vps.OS is ubuntu 14.04.  What can I do?


I have three html pages  home_frame.html
     <button  id="button1"          >Button 1</button>     <button id="button2"   >Button 2</button>

       first.html        <input type="text" id="text1" >  <input type="button" id="bt_One" value="Say hello Button One">       second.html                     <input type="text" id="text2" >      <input type="button" id="bt_two" value="Say hello Button Two">               I am placing first.html and second.html in home_frame.html when corresponding button clicks  using jquery and codeigniter  myscript.js    $(document).ready(function(event){   $("#button1").click(function(event){     loadFirstView();  });  $("#button2").click(function(event){    loadSecondView();  });  $(document).on('click', '#bt_One', function(){    var val = $("#text1").val();  });    $(document).on('click', '#bt_two', function(){    var val = $("#text2").val();  });  });    When try to get text from dynamically loaded text field i am getting error   Uncaught TypeError: "#text1".val is not a function


Will 2 600mAh batteries give me the same usage level as one 1200mAh?

I am considering obtaining a pair (2) 3.2V AA Lithium Phosphate batteries rated at 600mAh for a project that needs to operate at 3.7v/1.8ohm at peak times and next to nothing the rest. Obviously the mAh significantly impacts on the usage time but would running two 600mAh batteries give me a similar usage time as a single 1200mAh might?  In other words does twice as many cells give me twice the mAh?


I realize the answer to this question will vary, which is why I'm asking it. If you've suffered a DDoS attack before - how long did it last?  Just trying to get an idea of how long we'll have to continue to wage this battle (going on a couple weeks now).


Prove if an entire function f belongs to Aut(C), the set of all the Automorphisms of C if  and only if there is a,b belongs to C where a is non zero with f(z)=az+b. I have shown that if f is a proper entire function then must be a polynomial. But it didn't help me at all. So what should I do to solve this problem.


even out weird wrinkles close to the center

I am not sure how to describe it or how to search for it in other questions but modeling a glass, I have this kind of wrinkles close to the center point where the edges come together:  It seems to be cause by the subdivision modifiers, but I'm wondering how to even that part out. It sure is an easy thing for a pro, but I'm not that far yet. Thank you for answering!


Download App Store app on one Mac to install on another?

I am working with a client who lives in the country, and has absolutely poor Internet speeds. Even though the connection is "high-speed wireless" (I believe it's WiMAX based), he routinely receives about 20 KB/sec on a good day, and almost always less. In other words, think a dial-up modem with even higher latency. Normally, all this guy does is some basic Email and web browsing, and he's just the sort who's patient enough to deal with it. Not to mention, monopolies and ISP business dealings mean he's unable to get any better speed to begin with unless he went with a capped LTE link.  Anyway, this guy recently got a Mac, and is now beginning to enjoy the advantages. He just now discovered the App Store, and has been downloading some small apps. Apps that are say 3MB or so will download in 5-10 minutes for him, but as I said, he's pretty much fine with that.  Now, however, he made the "mistake" of buying a game that weighed in at 3.8GB. He's now looking down the barrel of a 8-day solid download, during which (due to latencies and such) he won't really be able to do anything else with his connection.  He asked me if there was any way I could possibly download the app (on my nice 100Mbit connection!) and give it to him on a burned DVD or USB drive. Of course, Windows vets will be used to this method for dial-up dwellers - the traditional "sneakernet". I explained the issues with the App store being intimately connected to the Apple ID, and he said he'd be glad to share his Apple ID password with me and then just change it afterwards.   I do have a spare Mac that could volunteer itself to be temporarily registered to his Apple ID to download the app. The only thing I am not sure of is if downloading the app on my machine, transferring the .app package to a flash drive and copying it to his machine will work.   I would just try it but since we're dealing with "live" data here (i.e. his account) I don't want to do too many "experiments", and also I would like to be reasonably sure before I schedule another trip out there, only to find out it won't work.  I do know Apple's crypto technologies are pretty deep and intense, and it's conceivable to me that each app download is somehow uniquely encrypted, to prevent obvious piracy.   Has anyone else tried something like this, and if so, can it be done?   Thanks!


I have a list of length n. I want to make a list of lists of specific dimensions

My_list = [Jack, 23, USA, Jill, 25, UK]  What I want: My_list = [[Jack,23,USA], [Jill,25,UK]]  Have done this using for loops but am looking for a more efficient way to do it.


I want to install Ubuntu on a computer but it currently is not able to access the internet because it operateed with Windows XP. Can I save the download to a flashdrive and download it to the computer like that?


At the moment I am writing a document which will include a lot of screenshots. When I save and use the Screenshots as jpeg you can clearly see a loss of image quality.   What is the best method for this?  Print the screenshot as PDF? But then I would have to trim the pdf for each picture to it's actual size.