How to determine direct solution of determinant?

How to show that the determinant of the following $(2n+1)×(2n+1)$ matrix $A$?    \begin{equation}     \det A = \begin{array}{|cccccccccc|cc}       1       & -1 & 0 & \dots & 0 & 0 & 0 & \dots & 0 & 0 & & {\color{blue}{\text{row }1}}\\       -1       & 2 & -1 & \dots & 0 & 0 & 0 & \dots & 0 & 0& & {\color{blue}{\text{row }2}} \\       0       & -1 & 2 & \dots & 0 & 0 & 0 & \dots & 0 & 0& & {\color{blue}{\text{row }3}} \\       \vdots  & \vdots&  \vdots   & \ddots      & \vdots    & \vdots & \vdots & \ddots & \vdots& \vdots  & &{\color{blue}{\vdots}}\\       0 & 0 & 0 & \dots & 2 & -1 & 0 & \dots & 0 & 0  && {\color{blue}{\text{row }j-1}}\\       0 & 0 & 0 & \dots & -1 & 3 & -1 & \dots & 0 & 0 &{\color{blue}{\rightarrow}}&  {\color{blue}{\text{row }j}}\\       0 & 0 & 0 & \dots & 0 & -1 & 2 & \dots & 0 & 0 && {\color{blue}{\text{row }j+1}} \\       \vdots  & \vdots&  \vdots   & \ddots      & \vdots    & \vdots & \vdots & \ddots & \vdots& \vdots    & &{\color{blue}{\vdots}}    \\     0       & 0 & 0 & \dots & 0 & 0 & 0 & \dots & 2 & -1 && {\color{blue}{\text{row }2n}} \\         0       & 0 & 0 & \dots & 0 & 0 & 0 & \dots & -1 & 1 && {\color{blue}{\text{row }2n+1}}\\     \end{array}   \end{equation}  By a direct calculation of  determinant. here $3$ is at the $j$-th row for some $2\leq j\leq 2n$. Therefore, $\det (L_{A_{11}}) = (-1)^n 2^{n-1}.$  if $n+1\leq i\leq 3n+1$ we denote the resulting matrix by $A_{12}$ after deleting the $i$-th row and column of $L_A$. Then, by a similar computation, we have $\det (L_{A_{12}}) = (-1)^n 2^{n}.$  $ \det A = (-1)^n 2^{n-1}n + (-1)^n 2^{n}(2n+1)=(-1)^n 2^{n-1}(5n+2)$  equal  to $(-1)^n 2^{n-1}(5n+2)$ ?


Does the isEmpty() method check for null values?

I always see this in lots of code:  String s; if (s == null || s.isEmpty()) { //do something }   but isn't just enough  String s; if (s.isEmpty()) { //do something }   I am curious especially when I check JavaFX TextField emptiness.


Anime/show about elemental gems and knights?

I saw this around 7-8 years ago on Toonami/Cartoon Network and I'm still not quite sure it was an anime or an animated TV show. I watched this series completely in Spanish since that's my main language but sadly I was too young to remember anything else about the animation style or quotes from it. The opening is the thing I'm less sure of but it basically recapped the story, and it was something like...     a king having a belt (a belt? could be something else) that had elemental gems on it,   the antagonist tried to get the gems so the king hid the gems all around the world, now the villain's trying to get it back and the heroes are trying to get them so the villain doesn't get them.   I remember 3 episodes, to an extent,     The first was the heroes being trapped on quicksand, and they end up meeting with an old man and an old woman that save them, they spoke in gibberish and gave them food and a place to stay. Some of the protagonists were suspicious about this but were obviously told they were exaggerating. Eventually they found out the old people were speaking backwards and were trying to eat them, the old couple transform into monsters and they defeat them.   Another episode is the heroes looking for the water gem and finding themselves on a beach with a huge castle floating right in the middle of the water. They tried their best to reach it (not sure how they did?) only to have one of them reach the castle and find a huge blue dragon with the gem on it's forehead.   The next episode is just the rest of the characters getting to the castle and defeating the dragon.


How do I view 'git diff' output with my preferred diff tool/ viewer?

When I type git diff, I want to view the output with my visual diff tool of choice (SourceGear "diffmerge" on Windows). How do I configure git to do this?


Using apps on one device with different Apple ID's

I was wondering, if I login to the app store with a different Apple ID on a device, will I be able to still use the apps on the device not downloaded or purchased from the current Apple ID?  Example: My wife has an iPhone with many different apps she's downloaded. If I took her phone, logged out of her app store Apple ID, then logged in with my Apple ID, and downloaded other apps, would I be able to use the apps she already downloaded on the phone without having to log her back into the App Store?


Why do I need to do resize2fs after lvextend?

For resizing LVM2 partition, one needs to perform the following 2 commands:  # lvextend -L+1G /dev/myvg/homevol # resize2fs /dev/myvg/homevol   However, when I perform lvextend, I see that the changes are already applied to the partition (as shown in Gnome Disks).  So why do I still need to do resize2fs?


How could i use an iMac as secondary monitor for a Windows 7 laptop

Recently (less than one year ago) i bought an iMac 21,5". Now i would like to use it as secondary monitor for my laptop. (My laptop runs Windows 7).  Is it possible? (I found conflicting opinions on the web, even on the Apple forum).  What type of cable do I need? (I will appreciate also a link to the product on some online store: amazon, ebay etc.)  Thank you in advance.  UPDATE:  I tried air display... i'm not satisfied at all...  typical scenario: browser window on the main Windows laptop, dev tools/firebug on the secondary iMac screen. The mouse goes fast between the 2 screens (GOOD), but when i changed the selected tab nothing happens. I had to drag the dev tools window to the main screen to get an update of the selected tab.  My test is ended here.  I'm still waiting for other answers.   I will prefer an answer that suggest me what kind of cable i've to buy, and where i can find it on the web.


Why does latex stretch small sections across the whole page vertically?

I'm writing my bachelor-thesis and have a couple of small sub-sub-sections explaining conversions, like in the following  \subsubsection*{Assignment}  This document only explains non-compound assignments. The other kind, i.e \texttt{a += b}, is supported by the language too, but is not yet implemented.   \begin{itemize} \item If the first is an \texttt{auto} variable, no conversion takes place when assigning       the right hand side to the variable designated by the left hand side.  \item Otherwise, an assignment conversion takes place converting the given value to the type       of the designated variable.  \item Assignment requires an lvalue as the left hand side, and yields an lvalue result.  \end{itemize}  \subsubsection*{Multiplication} % ...   But latex renders it quite ugly with much space in between the items. I think it does so to fit the whole page. How can I tell it not to do so? Is what I'm doing right at all?


What is meant by saying as "up to ..." in mathematical contexts

When I was studying about minimal polynomials and polynomials I came across the following theorem. Theorem: Let $p(x) \in \mathbb{F}[x]$ be a non-constant monic polynomial. Then $p(x)$ is a unique (up to order) product of irreducible polynomials. Can someone please help me to understand why they say as "up to order"? In certain other places also I've come across such phrases like "up to isomorphism" etc. What is implied by saying "up to...something"? Thanks a lot in advance.


Removing the return spring of a rear derailleur

I am trying to turn my standard shifting bicycle into an automatic shifter using a motor to increase and decrease the tension in the shifter cable. The problem is that a lot of torque is required to do this, so I was considering cutting the return spring off.   I know this is permanent, so I want to make sure that I am doing the right thing before making the cut. I am planning on installing a spring with a much lower spring constant on the cable itself (see image).    This is another thread with a similar topic. Móż suggested cutting this spring.    I am really new to bicycle engineering, so please excuse my lack of knowledge on the topic.


Just found an older account of mine, can they be merged?

I joined stackoverflow the other day with the ID . Could these two accounts be merged, preferably the newer one being preserved and the questions from this one being migrated?


Why aren't people allowed to Apparate or Disapparate within Hogwarts?

It is mentioned many times that people cannot Apparate or Disappate within Hogwarts. That is all well and good. Except in Harry's 6th year, when all the 6th years are learning how to Apparate.   The Apparation Instructor says     Dumbledore has removed the restriction on Apparation within the Great Hall.    This means the Headmaster has the ability to remove the enchantment at will. So why the restriction?


How does non-shell application read input from keyboard

Shell reads the input from keyboard and mouse using the tty attached to it. The same applies for all the programs that I run via command line where the stdin, stdout and stderr are set to console input/output. But, if I start GUI applications like Chrome, notepad, intellij etc.. I know something like X11 comes into the picture which helps in graphical stuffs, but how does these gui applications read input from keyboard and mouse. Is tty related here? Please help me on the complete architecture in layman terms as this is not documented anywhere properly.


I have a Schengen visa from French embassy valid between 25-05 to 10-06-2019 for the stay of 15 days.  I want to travel on 6th June for 10 days. That is 6th June to 16th June, is it ok or do I have to travel between 25-05 to 10-06-2019. Please advise.


Is it important to include my supervisor name in research paper

I have done a research paper with someone in industry, while doing a Phd. Is it important to include my supervisor name also in research paper. Will three names be a good thing or should i go with 2 names.


Would China to Taiwan and back again count as another entry into China?

I have a double entry visa for China. I've used up the first one and will reenter China for the second one in the next few days.  Now I'd really like to go to Taiwan by ferry but was worried that it would use up my last entry into China and I'd then have to fly out of Taiwan.  But then I started thinking that since China doesn't recognize Taiwan that from their point of view I would not be leaving China, so it should not use up an entry, so I could return and continue travelling in China.  But since the China/Taiwan situation is pretty special and unique there could also be special rules about it.


So I'm getting this warning whenever I typeset a document which is using the subfiles package for modular documents. The warning occurs both when running the master file as well as the individual parts.   /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/auxhook.sty: Package auxhook Warning: Cannot patch \document,(auxhook)                using \AtBeginDocument instead.   It's just a warning, and it doesn't seem to change anything at all. Everything looks good. It's just that I prefer not to have warnings...  Any ideas?


angular : how can i clone an object in typescript?

i am tyrinig to clone an object, do you know if exist a better solution of this one?     this.objClone =   JSON.parse(JSON.stringify(this.obj));   I am using redux and i have this error:     ERROR TypeError: Cannot assign to read only property 'value' of object   '[object Object]'


When you do , it correctly displays as:     results found containing   mail   on the right.  However, if you were to do , it displays as:     results found not containing   and not containing   Can this be fixed?


Blender model gets extra bits when opened in unity

I have this weird issue when i try to move a model made in blender to unity my model will get extra bits in unity.  Viewed in blender:   Viewed in unity:   Anybody had this issue before? If so how did you fix this?


My wife is a Spanish national and I am a US citizen. We live in Spain but are visiting in the States right now. She needs  99 day extension for her visa, and we've been told that if we leave the country and return, they will stamp her passport another 90 days. Does a weekend trip to the Bahamas count as a legitimate departure from the US?


What is the point of throwing candy on the ground using the "Throw 10 candies on the ground"? All that seems to happen is that the text under it becomes more and more disappointed in me. ಠ_ಠ


How to prove the rank of the conjugate transpose equals the original matrix?

Given $A\in\Bbb C^{n \times n}$,I want to prove $\text{rank} A=\text{rank} A^H$ where $A^H$ is the conjugate transpose matrix of $A$. We only need to prove:     $\text{rank} A=\text{rank} \bar A$    where $\bar A$ is the conjugate matrix of $A$. I have tried but was not able to solve the problem.     I found a similar question here . I know rank-nullity theorem, but I have not learn any theorem about maps that preserve the dimension of nullity. How do we prove $A \to \bar A$ map preserves dimension of nullity?


I'm including \usepackage{hyperref} so that each instance of \ref (as well as each page number in the index and the table of contents) automatically links to that page.  When I'm viewing the document (in ) and I click a link, I jump to the linked page.  Is there any easy way to go "back" to where I was before I clicked the link?  (And is the answer any different when using Adobe Acrobat reader?)


Every time I come on StackOverflow and it's past 8:00 EST, it registers that I came on the next day.  For example, today I logged in and I shows that I viewed the site on Tuesday.  How can I fix this or is this a bug?


How to Enable TLS 1.0 encryption for API integration

Salesforce is going to disable SSL 3.0 encryption on 7th November for all the sandbox instances and later for production instances. In sandbox environment, my .Net client application using OAuth 2.0 Web Server flow and salesforce APIs to communicate with salesforce.  How could I verify that my API integration is using SSL 3.0 encryption and how could I change it to TLS 1.0?


Difference between directory tree and a filesystem?

The directory tree and filesystem concept seems to be close. Can we say that the directory tree is the external interface of a partition of a volume and that the filesystem job is providing it? In other words, the filesystem allows us to see a partition of a volume as a (convenient) directory tree.


I'm very new to Blender, and I've been watching the Blender Guru tutorials. I've gotten to the materials episode, and the person in the video has a dropdown menu to change the texture from Diffuse to Glossy or any number of others. I can't seem to find a way to change from Diffuse, and I'm very confused.   I'm in Blender 2.79 if that helps, thanks.


How do i solve unmet dependencies for a package?

I have a red stop sign in my toolbar; it reads as follows:          An error has occurred. Run package manager from the right click menu or apt-get in a terminal to see what is wrong. The error message was:     "error. brokencount > 0 this usually means you have unmet dependencies."      I tried to solve the problem with:   sudo apt-get install -f   I got this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: libmysqlclient18 The following packages will be upgraded: libmysqlclient18 1 upgraded, 0 newly installed, 0 to remove and 572 not upgraded. 3 not fully installed or removed. Need to get 0 B/2.892 B of archives. After this operation, 3.471 kB disk space will be freed. Do you want to continue? [Y/n] y dpkg: error processing archive /var/cache/apt/archives/libmysqlclient18_10.1.18+maria-1~trusty_amd64.deb (--unpack): libmysqlclient18:amd64 10.1.18+maria-1~trusty (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances E: Sub-process /usr/bin/dpkg returned an error code (1)


The usage in the question title seems , though it may be more common in Britain.  But I can't exactly see what "part of speech" the word friends is here, and I can't come up with any related forms. You'd never hear, for example, John is enemies with Jack. What is going on?


RecyclerView crashes when it gets to end of data

I have a RecyclerView that gets data from a Firebase database.  When the RecyclerView reaches the end of the data feed the app crashes with following:  Logcat file:   09-27 15:30:12.826 30184-30184/com.pctoolmanconsulting.trackmyweight E/AndroidRuntime: FATAL EXCEPTION: main                                                                                Process: com.pctoolmanconsulting.trackmyweight, PID: 30184                                                                                java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference                                                                                at com.pctoolmanconsulting.trackmyweight.ProgressViewHolder.bind(ProgressViewHolder.java:40)                                                                                at com.pctoolmanconsulting.trackmyweight.ProgressAdapter.onBindViewHolder(ProgressAdapter.java:41)                                                                                at com.pctoolmanconsulting.trackmyweight.ProgressAdapter.onBindViewHolder(ProgressAdapter.java:15)   I can not figure out where I am supposed to check for the null value.  In the bind method of my ViewHolder class or in the adapter class.   Can someone help point me in the right direction? Thanks.  My ViewHolder bind method:  public void bind (ImageProgress progress){   name.setText(progress.name);    if(progress.progressDetail.startsWith("https://firebasestorage.googleapis.com/") || progress.progressDetail.startsWith("content://")){     progressDetailMessage.setVisibility(View.INVISIBLE);     image.setVisibility(View.VISIBLE);     Glide.with(activity).load(progress.progressDetail).fitCenter().into(image);    } else {      progressDetailMessage.setVisibility(View.VISIBLE);      image.setVisibility(View.GONE);      progressDetailMessage.setText(progress.progressDetail);   } }   adapter class:  public class ProgressAdapter extends RecyclerView.Adapter<ProgressViewHolder> {    private static final String TAG ="ProgressAdapter";   private final Activity activity;   List<ImageProgress> progressDetails = new ArrayList<>();    public ProgressAdapter(Activity activity){     this.activity = activity;   }    public void addProgress(ImageProgress progress){     progressDetails.add(progress);     notifyItemInserted(progressDetails.size());   }    @Override   public ProgressViewHolder onCreateViewHolder(ViewGroup parent, int viewType){     return new ProgressViewHolder(activity, activity.getLayoutInflater().inflate(android.R.layout.two_line_list_item,             parent, false));   }    @Override   public void onBindViewHolder(ProgressViewHolder holder, int position){     holder.bind(progressDetails.get(position));   }    @Override   public int getItemCount() {     return progressDetails.size();   } }


How to make PDO adapter run SET NAMES utf8 each time I connect?

abstract class RepositoryBase {     protected $connection;//This is PDO Object!      public function __construct(PDO $connection = null)     {         $this->connection = $connection;         if ($this->connection === null) {             $this->connection = new PDO(                 'mysql:host=localhost:3307;dbname=project',                 'root',                 'usbw'             );             $this->connection->setAttribute(                 PDO::ATTR_ERRMODE,                 PDO::ERRMODE_EXCEPTION             );         }     }   pdo set names utf8 <-- how can i do it


Consider the equivalence relation $\sim$ on $\mathbb{Z} \times (\mathbb{Z} \setminus \{0\})$ defined by $(a,b) \sim (c,d)$ if $a \cdot d = b \cdot c$. Describe the equivalence classes in terms of familiar mathematical objects?  The above is a homework problem. I can see some patterns in the equivalence classes, however I'm not sure how to answer or approach the question given. Thanks!


Why don't DSLRs come equipped with "classic" focusing screens (split prism, etc)?

I have a hard time manual focusing my Canon EOS 350D. Compared to the few higher spec DSLRs that I played with, and that have a pentaprism, my Rebel's (pentamirror) viewfinder feels crammed and somewhat darker. I feel like I have to squint in order to figure out if the subject is in focus. It also has a simple matte focusing screen, so it doesn't help figuring out when critical focus is achieved either.  I remember having used my dad's all-manual Praktica film camera in my teen years, and at the time I felt no burden with manual focus (exposure, now, that's a different story...)  I think the focusing screen on that camera was a split image + microprism setup, something like this:  Full viewfinder view:   Up close:   All this being said, here's my question:  Why do (most of?) the DSLRs of today not use such focusing screens? Do the manufacturers work under the assumption that most focusing is AF (which is probably true)? But still, how would it hurt to have a split image as a focusing aid?  Is there an obvious downside to such focusing screens, that I am missing?  For the sake of completeness, I have found two places that sell replacement focusing screens for DSLRs. I'm sure there are others.   , I think based in Taiwan. They have a great  of different types of focusing screens (that's where the above image links go, too).  .  The installation procedure looks a lot less scary than I would have guessed. I think I'll get me one of those, maybe it will put an end to my manual focusing misery.


How to use CDF and PDF statistics for analysis

This may be too much of a general question but I hope I can find help here. I am starting a RA job in my university and my topic will be related to Internet Traffic Analysis. I am fairly new to the world of analysis but I guess in the world of research this is what I have to do a lot of.  I've been through a few papers and in a lot of them I find they use Probability Density (PDF), CDF, CCDF etc to explain the results they've obtained. For example, PDF of user session duration, CDF of bytes transferred each day etc. I have taken probability and statistics class so I understand what they are but I am still confused to the cases in which such representation would be chosen.  So, if there is anyone out there who does such graphs and analysis (in any other topic in general or this) could you tell me simply in what situation would I use one or the other of these representations


I guess that my mail server is unprotected and spammers are using my mail server to spam myself

Since I switch to my own mail server (I folowed this two tutorials:  and ) I have spammed all times 15 in 15 minutes... Why?  Maybe my mail server is insecure?  Today I received a mail which in from field is exactly my hostname (Ubuntu) that I have configured in postfix/dovecot: see:  From: Roberto@Ubuntu, Rojas@Ubuntu To: ******@******.com Subject: ***** SPAM 10.3 ***** your life will never be the same   How they discovered my hostname?  Is there a possibility of spammers have entered in my computer and see/delete/edit some of my files?  I have too a HTTP, FTP and telnet 7300 to proper software, Servers in same machine


Are there any specific official rules for playing 5e past lvl 20?

Upon reading the 5e Player's Handbook, I've noticed that the level cap seems to stop at a hard 20, which, too me, is too small. I've also read the Dungeon Master's Guide and found the Epic Boons system, but those all seem extremely under powered or over powered compared to one another. I've looked, to no avail, for an official system for playing past lvl 20, or at least an appealing homebrew one, but, as I said before, I have yet to find one.


Remove an object with multiple angles of its background?

I have this image:  My goal is to remove the pillars on the side of the edge of the image so that it looks something like this: (I did a terrible clone job)  I have the a photo taken at a different angle:  Are there tools in photoshop that can help me achieve my goal?


Can it be proven/disproven that every possible number combination is in Pi?

Pi is infinite, but not random. 1/3rd for example is certain not to contain a 4, but i found my full birthday in Pi. Is there proof that every conceivable combination of numbers, such as all Natural numbers in order? I'm having a hard time imagining how all natural numbers could have something before and after them though so can it be proven that every finite numbercombination is found in Pi, such as every birthday of every person in chronological order and everyones creditcard pin and then some. Or is it likely/unlikely/impossible(or impossible to tell)? I'm asking out of my own curiosity.


How can I make an NTFS partition writable?

When I try to access to an NTFS partition, I get this error message:  Error mounting system-managed device /dev/sda3:      Command-line `mount "/mnt/723DB8C4766C7701"' exited with      non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   So, as a temporary solution, i added the read-only option to the disk :    It's working, but I cannot write to disk (because of ro).  Is there any other possible solution for this issue ?  I have a dual boot system: Kali Linux 2 and Windows 10.


I don't have any intuition for this because it's just something I memorized. I only understand that $|a| = a$ if $a$ is already positive (or $0$), and $|a| = -a$ if $a$ is negative since we want to turn it positive ($-(-a)$). So does that mean we will have a piecewise inequality also?  But how do we get absolute value from $-b < a < b$?


How can I align text and an image horizontally?

I have a title, subtitle, and image. The subtitle should be directly below the title, with both left aligned and taking up 75% screen width. Then the image should take up the remaining 25%, and be on the same 'row'/horizontal plane as the titles.    I think the issue is around the title/subtitle being in a display:block; however when I change it to display:inline; the subtitle jumps to its own line with the image and the title is left above both. I do not want this. I want the subtitle to remain below the title, and for the title/subtitle together to be treated as one block that the image is placed to the right of. Ideally it would look like it does now with the image shifted up.  How do I change the CSS to get the result below?    Thanks in advance for any help!  (also why doesn't simply changing the titles' display from block to inline solve the issue? I understand block takes up a whole row, while inline removes line breaks before/after. I would expect inline to remove the line break that is there now while keeping the subtitle with the title, since they are in the same <div>, but that doesn't happen)


In my document I need quite often tiled arrangements of images. I could tile the images externally using e.g. Matlab or Gimp. However I dislike this unflexible approach.  I found another way of tiling images, which comes close to what I want:   However, the latter way is not handy in terms of flexible arrangements: I could not easily achieve something like this with only one caption below:  Also the borders in between those pictures cannot easily be achieved.  What is the best way of getting this done? Tables?


NSMutableAttributedString check nil value

I created a NSMutableAttributedString and I'm appending the value dynamically. I need to check if this string is nil or not. I manually assigned nil but still the condition below fails. Is there any way to check this?   attribStr = [[NSMutableAttributedString alloc] init];  attribStr = nil;  if([attribStr isEqualToAttributedString:nil]) { // doesn't execute}


Why can't you get awarded the bounty for answering your own question?

Consider this question on .  I put out a 200 bounty on the question, but did not get an answer from anyone other than myself that worked.    In fact, my answer is also the highest up-voted on it at this point.  I know that allowing OP's to retract a bounty can be a slippery slope; in fact I think that once the bounty is put up it should stay up.  But why not allow the OP to answer their own questions with a bounty and reward it to them if they receive the same up-votes as others?  Yes, I am fully aware that bounties are a risk.  People will use them for numerous reasons such as trying to draw extra attention to their issues.  However, in my specific question, the only valid answer is the one that I gave.  Had it been anyone else's question, I would have received the bounty, but since it was my own I did not.


Find files whose name is 4 characters long

I would like to find files whose name has only 4 characters.  Example, there are three files under /tmp:  $ ls /tmp txt file linux   Output should only show file because it only has 4 characters.


prove that $\{a_{n}\} $ converges as $, a_{n+1}=\frac{a_{n}}{sin(a_{n})},\ \forall n\geq2$ and $0<a_{1}<\frac{\pi}{2}$

let $\{a_{n}\}_{n=1}^{\infty} $ be a sequence defined as $$0<a_{1}<\frac{\pi}{2}$$ and          $$ a_{n+1}=\frac{a_{n}}{\sin(a_{n})},\ \forall n\geq2$$  prove that $\{a_{n}\} $ converges, and find the limit of $\{a_{n}\}$.


Why are my if statements in java always returning false?

I want to find out why the second if statement in this code always returns false, so every time I click the 'go' button in my program it shows incorrect password. Anyone have any ideas?  package Main;  import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.JButton;  public class CodexConsoleEngine extends CodexConsoleWindow implements ActionListener {        public void actionPerformed(ActionEvent e) {         boolean isPasswordEntered = false;         JButton clickedButton = (JButton) e.getSource();         String commandSent;         String passwordSet = "password";         char[] charPasswordEntered = password.getPassword();         String passwordEntered = charPasswordEntered.toString();          if(!isPasswordEntered){             if(passwordEntered.equals(passwordSet)){                 consoleOutput.append("Correct password\n");             }else{                 consoleOutput.append("Incorrect password\n");             }     }else{         consoleOutput.append("You have already entered your password");     } }  }   Sorry for any obvious mistakes, I've only started java recently. REALLY recently.  EDIT: I've edited the code to use the .equals() method, but it still doesn't work. Could it have anything to do with the toString() method or the fact that I'm using JPasswordField?


Is it possible to remove ubuntu from ubuntu?

I am trying to downgrade my ubuntu version, from 16.10 to 16.04... but from what i have read, that is not possible, which is why i decided to uninstall my ubuntu...  The other problem is, my laptop is a full ubuntu, a single boot... which is why i can't erase ubuntu from windows.. any suggestion?  Right now, i am trying to uninstall ubuntu using the bios, is it possible?  There are also suggestion, that i have to install windows first, then i uninstall the ubuntu from the windows... and download ubuntu back, which takes a lot of time, any other way?


When working with objects that implement IDisposable, the common pattern is;  using(ManagementObject mObj = new ManagementObject()) {     //Work with mObj }   However, in the instance of System.Management.ManagementObject, IDisposable has been declared on the ultimate parent class, in this instance, System.ComponentModel.Component  Dispose has been implemented as follows (extracted using ILSpy):  public void Dispose() {     this.Dispose(true);     GC.SuppressFinalize(this); }   Dispose on the ManagementObject however, has been implemented as follows:  // System.Management.ManagementObject /// <summary>Releases all resources used by the Component.</summary> public new void Dispose() {     if (this.wmiClass != null)     {         this.wmiClass.Dispose();         this.wmiClass = null;     }     base.Dispose();     GC.SuppressFinalize(this); }   It appears that on completion of the using block, Dispose is called from the class which directly implements the interface; that is System.Component, and so the wmiClass field is not cleaned up at this point as this implementation is not executed.  If I recreate this with a simple hierarchy:  public class Parent, IDisposable {      public void Dispose(){         System.WriteLine("Parent Disposing");     } }   public class Child : Parent {     public new void Dispose()     {         System.WriteLine("Child Disposing");         base.Dispose();     } }   and write a small test program;  using (Child child = new Child()) {     System.WriteLine("Do Stuff"); }   I get the output: Do Stuff, Parent Disposing  Generally, if we wanted the inheritance to work as expected wouldn't it have been safer to declare Dispose as virtual on Parent and override on Child? If I do that I get exactly the order of events expected vs what happens in the original example (which makes sense if Dispose is being called on the class that directly implemented the interface).  Is there a reason why you'd implement Dispose in this way rather than as a virtual call on the base class? This forces the use of a try {} finally {} pattern where you explicitly call the Dispose implementation to get the expected result.


Got a html page with a frequently changing part. That part is read by a script on the page: <script>   console.log('In HTML');   fetch('changes/changes.html')     .then(data => data.text())     .then(html => document.getElementById('changes').innerHTML = html); </script>  That works fine and makes publishing changes easy. However jQuery actions (in a separate script) on the read part don't work. The events are not triggered. How to fix that? $(function () {   console.log('In script');     $('.change-card > .change-btn-action').on('click', function () {      console.log('Click event');    }); )};  The click event is never triggered. The log order is: In HTML, In script. Thanks for any help! Gerard


I'd like to take some levels as a Wizard; in-game, the Wizard in my party teaches me some magic so that I can become a practicing Wizard. But, I haven't come up with a reason why I don't have exactly the same spells as my teacher.   In fact, I am not 100% sure how I get new spells as a Wizard. When I gain a level as Wizard I can add two new spells to my spellbook. For me, this brings up a lot of questions.  Do I have to find these spells first, for example on a scroll or in another spellbook? Would I need to pay 50 gp and spend 2 hours learning spells, per spell level? To me, that doesn't make any sense. So, I assume that I just pick two new spells with each level and additionally I can add the spells I find to the spellbook.  Do I “invent” the spells, e.g. “I would really like to be invisible, so I'll figure out a spell that makes me invisible”? I think that'd be an odd way to go about it. Perhaps it goes more like, “Oh, I remember that one afternoon when my mentor tried to explain how Fireballs work; now I finally understand it, so I can cast Fireball from now on.”  Summary Question: Where do the two new spells come from?


What is the Cancellation fee for UK visa application?

What are the charges of cancelling the UK visa application? I haven't done the biometrics yet in fact not even booked the appointment, just submitted the application on gov.uk website and done the payment. So -   Will I get a full refund or there is some cancellation fees if I cancel the visa application? Can I reapply immediately after cancellation?   This is for standard Visitor Visa.


Onedrive/Skydrive standalone app on Windows 8.1

I have the following setup:  Windows 8.1 on PC at Work. I use a local account.  My personal/private hotmail address, with all my personal data in Skydrive.  In Windows 8, I used to be able to have the Skydrive/Onedrive desktop app running, and connect it to my personal hotmail address. I could access, edit and sync my skydrive files at work: great!  Now upgraded to 8.1, it seems it is no longer possible? I installed the desktop app, but it cannot be opened?  As said here, it is all baked in:   Now, this is very annoying, obviously: I can no longer access my files!  Is there any solution to this?


'We are wearing a jacket' or 'we are wearing jackets'?

I’m having a hard time distinguishing the following sentences. Which one is correct?      We are wearing a jacket.   and     We are wearing jackets.


problem with solving one complex number problem

Is $1= -1$ ?    because,  $1=\sqrt{1}  =\sqrt{-1×-1}  =\sqrt{-1}×\sqrt{-1 }  = i×i   = i^2 = -1 $ this can be done with all natural numbers. how this can be? please help me


How data will be saved in database for JSON?

Could anyone please tell me about Javascript object notation data Structure? Brief idea also welcome


I'm a developer of self hosted web application. which creates the error log but others can access it rather than only admin of that application. is there any way to protect it from page other people like hackers?


Cut sub-string and rename files use shell command

How to rename file names?  I want to map names:  abc-hdpi.png ⟶ abc.png bcd-hdpi.png ⟶ bcd.png   ...  I have many files to do this, so mv abc-hdpi.png abc.png is not a good solution.


WIFI not working on hp15 ab522tx machine

I am using HP 15ab522tx ,after installing Ubuntu 16.04 ,I am not able to fix WIFI issue.Also I tried various answers to this problem.But nothing seem to work for me.Installing BROADCOM driver did not work for me..Please help.  lspci -knn | grep Net -A3; rfkill list   gives:  03:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     DeviceName: Broadcom BCM43142 802.11 b/g/n 1x1Wi-Fi + BT4.0 M.2 Combo Adapter     Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a]     Kernel modules: wl 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no   List of Wireless Drivers in windows 10 version:   Broadcom Wireless LAN Driver Intel Wireless LAN Drivers Realtek RTL8723BE/RTL8188EE 802.11b/g/n Wireless LAN Drivers


Ability to "lock" your profile on a site

Currently, when editing my profile, I have two options:   Save it for just the current site, or Save it for all sites.   However, this doesn't really fit my use case: I like to keep the same profile on every site except I have a couple of sites with site-specific profiles.  This makes it very difficult for me to update my "default" profile that I use on the majority of sites:   First I have to go to the one or two sites I have a custom profile on, and copy the profile text to a text editor or whatever (and save the avatars if I'm changing my avatar). Next I edit my profile and save it for all sites. Then I have to go back to each of the custom sites and paste the profile text back in (and change/upload the avatars if needed).   It's super unwieldy.  To that end I propose a checkbox in the profile tab of each site that reads something like "Lock this profile", that is unchecked by default. When it is checked, "save profile for all communities" will not apply to that site (unless, of course, the "save for all" button is pressed from that site, in which case it should be applied, of course, to that site in addition to all other non-locked sites).  I think this would be really helpful. This is for the same type of control that  asks for but, specifically, I'd like it to be implemented as a checkbox on each site rather than some dropdown selection list of sites to copy profiles to, I think it's easier to manage that way, since you can just check the box and forget about it.


I have an Asus UL30JT. It has Nvidia Optimus technology which I am not really interested in. I currently rarely use this laptop with it being connected to power. And I want to be able to play video at high res, play games and do some OpenCL coding.  In the BIOS I switched it to NVIDIA only (non windows 7). Previously, this worked just fine, using the nvidia driver.  After upgrading everything was broken. I have added nomodeset and blacklist.nouveau=1 as kernel options. The nvidia drivers install without error. However they are not found/used.  jockey-text -l kmod:nvidia_310_updates - nvidia_310_updates (Proprietary, Enabled, Not in use) kmod:nvidia_304_updates - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use) kmod:nvidia_313_updates - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use) kmod:nvidia_310 - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use) kmod:nvidia_304 - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use)   Trying to load the module manually fails as well.  sudo modprobe nvidia FATAL: Module nvidia not found.   Xorg.0.log show the following:  [    12.028] Loading extension GLX [    12.028] (II) LoadModule: "nvidia" [    12.037] (WW) Warning, couldn't open module nvidia [    12.037] (II) UnloadModule: "nvidia" [    12.037] (II) Unloading nvidia [    12.037] (EE) Failed to load module "nvidia" (module does not exist, 0) [    12.037] (==) Matched nvidia as autoconfigured driver 0 [    12.037] (==) Matched nouveau as autoconfigured driver 1 [    12.037] (==) Matched vesa as autoconfigured driver 2 [    12.037] (==) Matched modesetting as autoconfigured driver 3 [    12.038] (==) Matched fbdev as autoconfigured driver 4 [    12.038] (==) Assigned the driver to the xf86ConfigLayout [    12.038] (II) LoadModule: "nvidia" [    12.038] (WW) Warning, couldn't open module nvidia [    12.038] (II) UnloadModule: "nvidia" [    12.038] (II) Unloading nvidia [    12.038] (EE) Failed to load module "nvidia" (module does not exist, 0) [    12.038] (II) LoadModule: "nouveau" [    12.039] (WW) Warning, couldn't open module nouveau   I have installed the kernel headers, of the correct kernel. I verified that the kernel options are in the grub configuration. I have purged all nvidia packages and tried to reinstall (multiple times...)  Currently I am at a loss. I have checked the following question:  But nothing there worked for me.


How many passes are enough with memtest (6 years later)

Originally, this question was asked here:   The question is from 2013, and the answers are from 2013.  I am bringing it up again because it has been 6 years or more since it was asked, and that is an eternity in computer hardware years.  Fast forward to today. I am running memtest on my machine with 32gb ram.  Gone are the days of catching errors in the first few seconds, unless something is REALLY wrong. A single pass takes a very long time to get to 100%.  I let my system run overnight and it caught 2 errors.  It passed 6 times, failed 2.  Do you think these are true errors or, is it more like its an acceptable amount of failure?  Edit: I ran this test because I was getting bluescreen errors that may be driver related, but i'm testing each part independently.  Edit2: Placed bounty on the old question because I didn't know you could do that.


Group With an Endomorphism That is "Almost" Abelian is Abelian.

Suppose a finite group has the property that for every $x, y$, it follows that   \begin{equation*} (xy)^3 = x^3 y^3. \end{equation*}  How do you prove that it is abelian?    Edit: I recall that the correct exercise needed in addition that the order of the group is not divisible by 3.


Shaping negative pulses to positive ones

I have built a scintillation detector. The detector outputs 0,1 ms 50-200 mV negative pulses from a photomultiplier (DC). The pulse shape is shown in the picture below.     To detect the pulses I need to change their properties (still DC however). Their new shape has to be pretty much identical, but more than 500 mV positive voltage (their duration can be 0,1 ms to 0,5 ms, but preferably 0,3 ms to 0,4 ms). The shape is, again, illustrated in the picture above.  Does anyone with more experience than me have a small form-factor schematic that will work? If I need to, I have a 5 V rail that I can power something with.   Thanks!    Update: The op amp that I chose () has sufficient properties. However, I can't get my schematic to work. See the picture for my schematic.   The output I am getting is my Vcc+, which is odd. I am not getting the pulses that I was looking for. I think I did something wrong, does anybody have any ideas?    Thanks!


Why don't wizards always use multiple wands?

As far as I am aware, in Harry Potter, a wand is simply a means of channelling magic.  In Harry Potter and the Deathly Hallows, at Malfoy Manor, Harry grabs three wands from Draco and performs a triple-spell on his enemy. The force of the triple spell wasn't divided by three. Instead, the books mentions that it was multiplied by three.  Thinking about it, he increased his magical power by channelling it through not one but three wands simultaneously. If this can be done by wands, why didn't wizards think of congregating wands into one single powerful tool? Or maybe using some special Wand-like tools to increase channeling of magic through a Wand?  I'm not sure if what Harry did was a pure accident but had I seen this effect produced by three wands then I think I'd have bound multiple wands together with rubber tape.


"Naturally occurring" non-Hausdorff spaces?

It is not difficult for a beginning point-set topology student to cook up an example of a non-Hausdorff space; perhaps the simplest example is the line with two origins. It is impossible to separate the two origins with disjoint open sets. It is also easy for a beginning algebraic geometry student to give a less artificial example of a non-Hausdorff space: the Zariski topology on affine $n$-space over an infinite field $k$, $\mathbf{A}_{k}^{n}$, is not Hausdorff, due to the fact that polynomials are determined by their local behavior. Open sets here are in fact dense. I am interested in examples of the latter form. The Zariski topology on $\mathbf{A}_{k}^{n}$ exists as a tool in its own right, and happens to be non-Hausdorff. As far as I'm aware, the line with two origins doesn't serve this purpose. What are some non-Hausdorff topological spaces that aren't merely pathological curiosities?


Example of a lattice that isn't a chain?

I know that a chain is always a lattice (), where    A chain is a subset of a poset in which every two elements are comparable and A lattice is a poset in which every finite subset has a greatest lower bound and a lowest upper bound.   What would be an example of a lattice that isn't a chain?  Or are they equivalent?


If any number times zero is zero and any number time infinity is infinity, then what do you get when you multiply zero times infinity? Do they cancel one another out and equal any number since any number = 0 to infinity) and any number infinity to 0? "also can 0 and infinity be one an others inverse?


A huge discussion between my friends and I is Holdo's past with Leia, and what Planet Holdo is from. Holdo seems to indicate that her species learned a lot from the 'Rebels' and obviously has had a past of admiration with Princess Leia. What all is know about the purple haired species? Do they have a traditional male/female gender system?


$$\sqrt{1+\sqrt{2+\sqrt{3+\ldots}}}$$  My approach    1st approach:  Let $\sqrt{1+\sqrt{2+a}} = x$, where $a$ is a result of the lower portion of the continued nested radical and $1+\sqrt{2+a}$ is a perfect square, and $x$ is a number that doesn't contain a radical.   Solving for $a$ gives 7, and $x$ equals to 2.  2nd approach:  Using a software, $\sqrt{1+\sqrt{2+\sqrt{3+\ldots}}} \approx 1.75793...$  What is the best approach for the nested radicals?


I am a postdoc working in one university till 1. July. I am leaving for another university after that. During my stay at my current work, I wrote a paper as a first author for a conference that will kick off in September.  Which affiliation should I use? Taking into account that the conference travel will be covered by the new employer, however, the paper is written at my current university.  By reading , it looks like using the two affiliations is one approach. But I'm not quite sure if the new employer will be happy with this.


How to install Ubuntu on a Mac and keep OSX?

Could anyone provide a concise step by step instruction on how to install Ubuntu 12.04 on a Mac OS X Lion?  I have read that Ubuntu corrupts the EFI file so I would like to hear from those who have successfully done it.


Unable to add item in SharePoint lists (many lists) programmatically

I am unable to add item in any sharepoint list programmatically from a custom web part. list.AddItem() doesn't work.


Unknowingly ask an already asked question

yesterday on SO, as I was not able to get an answer using Google, and some time later a member posted a thread reference which had an answer to my question.  That thread contains question similar to mine with better answers, which brings me to my question that, if I cannot find my answer Googling or using the search facility of SO and post a question to ask it, only to realise later that it has already been asked and had a better-quality answer, what should I do with my question (shall I delete it or add the reference by myself to that question for future visitors)?  A mean sidenote: That question gave me 3 upvotes, so I was little hesitant to delete it too! :)


Fibonacci in python gives rounding errors

So I am trying to learn python and wrote a small program to give me the Fibonacci numbers. While I know that they can be defined recursively. I wanted to use the known mathematical formula for Efficiency. My code is very simple:  from math import sqrt def F(n): return ((1+sqrt(5))**n-(1-sqrt(5))**n)/(2**n*sqrt(5)) zahl = int(input("Welche Fibonacci Zahl möchten Sie: ")) print(F(zahl))   When I execute it, it gives me weird rounding Errors, for example for the Input 6 I get  8.000000000000002  instead of the expected 8.0. Does anyone know where this rounding error Comes from and how to avoid it. I was hoping that the Standard sqrt function in the math library was working precise enough! I am using Python 3.5 (32bbit) if that helps.


In ArcGIS 10.3 Desktop, how do you replace field values with Null using the Field Calculator without selecting the rows first?  I'm able to select the rows that I want and calculate using the Field Calculator, e.g. field_value = Null. However, if I try to use replace() I get errors.  field_value = replace([field_value],0,Null)   Error:      Invalid use of Null:'replace'


Colored vertices on a directed graph with sets of Euler cycles

Is there a way to make the vertices on the following directed graph with a set Euler cycles  colored? Provide the TeX code as well as explain how to color vertices!


Applying MVT and IVT (?) to show something about f'''? (edit: actually, Taylor's Theorem using Lagrange remainder)

I believe that the correct answer to this question will involve applying both the Mean Value Theorem and the Intermediate Value Theorem, perhaps several times.  However, I can't see how to proceed.  I went down what I thought were the typical paths and just reached dead ends.  Does someone maybe have a hint?  I think that with the appropriate nudge I should be able to solve this question.  If not, I'll edit and ask if someone knows how to solve the whole thing.  Here's the question:  Let $f: \mathbf R \to \mathbf R$ be such that $f$, $f'$, $f''$, and $f'''$ exist and are continuous on $\mathbf R$ and satisfying $f(-3)=-1$, $f(0)=0=f'(0)$, and $f(3)=8$.  Prove that there exists $\xi \in (-3, 3)$ such that $f'''(\xi) \ge 1$.


Consider Matrix $$ A = \begin{pmatrix} 1 & 1\\ 1 & 0 \end{pmatrix} $$  Investigate the sequence of powers of $A$ (i.e. $A^n$ for $n = 1, 2, 3, 4,\ldots$.  Verify that $$A^n = \begin{pmatrix}F_{n+1} &F_n \\ F_n & F_{n−1}\end{pmatrix}$$ for $n \geq 20$, where $F_n$ is the $n^{th}$ Fibonacci number.  I don't get it, please help. Thank you!


my camera do not work on my new device (nullpointerexcepetion)

after i changed my device my camera suddently stopped working and throwing out a     java.lang.NullPointerException: Attempt to invoke virtual method 'android.hardware.Camera$Parameters android.hardware.Camera.getParameters()' on a null object reference   i had tryed to change out my catch (RuntimeException ex) to finaly but that instead gaved me a      Fail to connect to camera service” exception   public void surfaceCreated(SurfaceHolder surfaceHolder) {     String PreviewFPS;     String Previewsize;     String Displayor;     PreviewFPS = setingPreferences.getString("previewfps", "");     Previewsize = setingPreferences.getString("screensize", "");     Displayor = setingPreferences.getString("orientation", "");     String[] size = Previewsize.split(",");     try {         camera = Camera.open();     } catch (RuntimeException ex) {     }     Camera.Parameters parameters;   parameters = camera.getParameters();      //modificer parameterene           parameters.setPreviewFrameRate(Integer.parseInt(PreviewFPS));         parameters.setPreviewSize(Integer.parseInt(size[0]),Integer.parseInt(size[1]));      camera.setParameters(parameters);     parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);    camera.setDisplayOrientation(Integer.parseInt(Displayor));     try {         camera.setPreviewDisplay(surfaceHolder);         camera.startPreview();     } catch (Exception ex) {     }  }   manifest   <uses-permission android:name="android.permission.CAMERA" />     <uses-feature android:name="android.hardware.camera" />     <uses-feature android:name="android.hardware.camera.autofocus" />   the manufactor of the device had investigated the code and told me that the reason was due to it couldn't run the scanner and camera at once     Hi Kewin       Would you please share the source code to me? as we haven't tested if it can run both the camera and scanner          We checked, the scanner and camera can not be opened in same time.       Best Regards,   so my fix for this was by having my camera and scanner activity running in 2 separate activites and layouts hopefully this would help someone else


What is causing this effect? Same thing is happening when I try looptools -> circle.


Considering the following Tikz example, how can one uncover nodes from bottom to top? I would like the node C appear on slide 1, then B on slide 2 along with the path from B to C and finally node A along with the path from A to B.  \documentclass{beamer}  \usepackage{tikz}  \usetikzlibrary{trees}  \begin{document} \begin{frame}   \begin{tikzpicture}[     level 1/.style={every child/.style={edge from parent/.style={->,solid,draw=blue}} },     level 2/.style={sibling distance=12mm,every child/.style={edge from parent/.style={->,solid,draw=blue}}},     level 3/.style={sibling distance=8mm,every child/.style={edge from parent/.style={->,solid,draw=blue}}},     semithick]      \node[draw=none] (root) {A}     child[] {node[draw=none] {B}       child[] {node[draw=none] {C}       }};   \end{tikzpicture} \end{frame} \end{document}


I looked for an explanation on my java book, but I dind't find it. I'm looking for an article on the internet, but I'm not finding anything clear.  Does Collection <? extends myObject> means that I can put in the Collection both myObject and objects that extend myObject? Does it means anything else?


should you be on a tablet when its charging?

is it OK for the battery if you keep using the tablet while it's charging? And should you stop charging when it's fully charged.


This is the context: "Seasoned travellers, especially the sort that jet around the globe clutching laptops, know that certain words are to be avoided like the plague. This is because those who choose these words are masters of disguise : the service offered is the exact opposite of that indicated by the name used to describe it. Thus many flights described as “direct” are actually indirect, since they involve a stop, and a lengthy wait, in, say, Dallas-Fort Worth en route between Boston and Vancouver. Similarly, habitués of railways learn to shun any train claiming to be an “express” or “rapid”, since such services seem invariably to be the slowest (by design, not just by accident). Which perhaps make it fitting that some of the most seasoned travellers of all, management consultants, appear to have been inspired by just this sort of untruth-in-advertising. The buzziest among them now claim not just to be consultants, or advisers, or even experts. They are “thought leaders”."


Installing Ubuntu packages for dummies: Gstreamer plugins to play m4a files in Clementine?

This is a very common question it appears, but as one who is not familiar with Linux I don't know exactly the syntax to do it.  When trying to play m4a files in Clementine, it tells me that I'm missing a Gstreamer plugin. I understand that I need to install some packages, namely gstreamer0.10-plugins-bad from some repository, but that's where my understanding stops. If somebody would be so kind as to show how it would be typed into the terminal (and maybe explain what's going on in each line), that would be wonderful.


Archimedes Principle in case of Two Fluids

Consider an arbitrarily shaped body immersed partly in one fluid and partly In another. Can an expression  be derived for two different forces applied by the the two fluids on the immersed volumes by using Archimedes principle separately for the displaced fluids?  If so how will an upward force be applied by the upper fluid layer


Find all solutions of the equation $n^m=x^2+py^2$ which satisfy the following properties

Prove or disprove that,     There always exists a solution of the equation, $$n^m=x^2+py^2$$ with odd $x$ and $y$ and for all $m\geq k$ for some positive integral $k$. Here $p$ is an odd prime and $n\in 2\mathbb{N}$. Is $k$ dependent on $n$? If so then find a way to calculate the value of $k$.   This is basically one of my conjecture which I am trying to prove for quite sometime. Unfortunately, I have progressed very little in this problem. So far I have been only able to prove that for all $m\geq3$ , $n=2$ and $p=7$ there is always a solution of the equation meeting the constraints.   Any idea how to tackle the problem?    Update  After D. Burde's answer of the original problem (see below) I am now interested in finding all $(n,m,p)$ triplets such that the equation holds. Any ideas regarding this problem?


Using $\epsilon-\delta$ to prove that a limit is not a specific number

I want to use $\epsilon-\delta$ formulation to prove that $\lim_{x\to 1 } 2x+3 \neq 6$.  I know that I need to show that there exists an $\epsilon>0$ such that for every $\delta>0$ there exists $x\in \mathbb{R}$ such that $0<\left| x-1 \right| <\delta$ but $|2x-3|\geq \varepsilon$.  Will someone please guide me through the process?  Thanks a lot in advance


How do I check if a player is at specific coordinates?

I need to check if a player is at these exact coordinates: -682, 4, -188  How do I do this?


Prove the inequality $$\frac{1}{\sqrt{1}+ \sqrt{3}}  +\frac{1}{\sqrt{5}+ \sqrt{7} }+......... +\frac{1}{\sqrt{9997}+\sqrt{9999}} > 24$$   My work:   Rationalizing the denominator gives   $$\frac{\sqrt{3}-1}{2}  +\frac{\sqrt{7}-\sqrt{5}}{2}+......+\frac{\sqrt{9999}-\sqrt{9997}}{2} .$$  Now by taking two as common and separating the positive and negative terms gives  $$\frac{1}{2} [ \{\sqrt{3} +\sqrt{7}+\dots +\sqrt{9999}\} - \{1+\sqrt{5} +\dots+\sqrt{9997}\}].$$  Can we do like this please suggest. Thanks.


Let $T$ be a linear operator on a finite-dimensional inner product space $V$. Suppose that $T$ is a projection such that $\|T(x)\| \le \|x\|$ for $x \in V$. Prove that $T$ is an orthogonal projection.    I can't understand well. The definition of orthogonal operator is $\|T(x)\| = \|x\|$. But why that $\|T(x)\| \le \|x\|$ for $x \in V$ means orthogonal projection?


I am a professional web developer and therefore I'm used to using very high-level scripting languages and testing tools. I've recently been working, personally, more with C and writing many C programs for unix-based systems to do various tasks.  However, I still haven't gotten into a good groove for unit testing this code and I was wondering what tools C programmers use to create automated tests to verify code.


Login problems (crash) when kernel updated to 3.13.0-65-generic

The latest Ubuntu 14.04 update (kernel to 3.13.0-65-generic), once installed crashes the system during the login stage. It seems to be non-deterministic in that I did manage to get it to successfully login by removing a number of daemon processes from the startup. These are not new processes. I have been using then for some time. I did notice that I could not log into to both my accounts but could login as guest.    In the crashed state I did manage to log into the console terminal. I did notice a UFW (uncomplicated firewall) Block report was being transmitted occasionally. (7071 & 13900)  Thoughts?


Average arc length of a uniformly distributed points

Suppose I have $N$ points on a unit circle. I am aware that for a uniform distribution the average angle of one point is not defined, but I want to calculate the average arc length between nearest-neighbors. I disregard arc lengths larger than $\pi$.  For $N = 2$ I am formulating the problem as: \begin{equation} \langle \Delta x \rangle = \frac 1 {\pi^2}\int\limits_0^\pi \int\limits_0^\pi  dx_1 dx_2 \, |x_1-x_2| = \frac \pi 3. \end{equation}  This answer does not make sense to me. Did I make a mistake constructing this integral?  What would happen to $N = 3$, etc?


Does there exist a cont function $f$ : $\mathbb{R}$ $\rightarrow$$\mathbb{R}$  which takes irrational values at rational points and rational values at irrational points?


Can't find RPG Session, were can i look for one?

I can't find an RPG or table top session were I am, Are there any good resources to find one?


I saw a lot of strange behaviours handling float numbers, but I don't know why that one occurs and how to avoid it...  With PHP on Windows, dividing 1136 by 100 returns 11.359999999999999:  echo (1136 / 100); //11.359999999999999   Why is that?


Confusion about what the pronoun refers to

What does "it" refer to in the following sentence?  Humans instinctively seek structures that will shelter and enhance their way of life.  It is the work of architects to create buildings that are not simply constructions but also offer inspiration and delight.


Prove $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge ab + bc + ca$

Let $a,b,c$ are non-negative numbers, such that $a+b+c = 3$.  Prove that $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge ab + bc + ca$    Here's my idea:  $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge ab + bc + ca$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(ab + bc + ca)$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) - 2(ab + bc + ca) \ge 0$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) - ((a+b+c)^2 - (a^2 + b^2 + c^2) \ge 0$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) - (a+b+c)^2 \ge 0$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge (a+b+c)^2$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3^2 = 9$  And I'm stuck here.  I need to prove that:   $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge (a+b+c)^2$ or  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3(a+b+c)$, because $a+b+c = 3$  In the first case using Cauchy-Schwarz Inequality I prove that:  $(a^2 + b^2 + c^2)(1+1+1) \ge (a+b+c)^2$  $3(a^2 + b^2 + c^2) \ge (a+b+c)^2$  Now I need to prove that:   $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3(a^2 + b^2 + c^2)$   $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(a^2 + b^2 + c^2)$   $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge a^2 + b^2 + c^2$   I need I don't know how to continue.  In the second case I tried proving:  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(a+b+c)$ and  $a^2 + b^2 + c^2 \ge a+b+c$  Using Cauchy-Schwarz Inequality I proved:  $(a^2 + b^2 + c^2)(1+1+1) \ge (a+b+c)^2$  $(a^2 + b^2 + c^2)(a+b+c) \ge (a+b+c)^2$  $a^2 + b^2 + c^2 \ge a+b+c$  But I can't find a way to prove that $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(a+b+c)$  So please help me with this problem.  P.S   My initial idea, which is proving:  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3^2 = 9$  maybe isn't the right way to prove this inequality.


$ \sqrt{(-1)^2} \overset{?}{\ne} (\sqrt{-1})^2.\; $ Which of the following steps is wrong:


NT SERVICE accounts should be sysadmins?

I have the following query to get me a list of sysadmins in the current server:  select 'ServerRole' = SUSER_NAME(rm.role_principal_id),         'MemberName' = lgn.name ,        'Status'= Case when lgn.is_disabled=0 then 'Enabled'                                               else 'Disabled'                   end  from sys.server_role_members rm  INNER JOIN  sys.server_principals lgn          ON rm.member_principal_id = lgn.principal_id  where rm.role_principal_id = SUSER_ID('sysadmin')      Should it be a concern that the accounts starting with NT SERVICE are sysadmin?  the sql server agent service is running under the account shown above in the item number 10, so maybe the number 7 is even redundant, how can I find it out?  There is a similar question:


Are there real numbers that are neither rational nor irrational?

I wouldn't have asked this question if I hadn't seen this image:    From this image it seems like there are reals that are neither rational nor irrational (dark blue), but is it so or is that illustration incorrect?


So I'm playing on my Nintendo switch, and I'll be blunter this time around How do I shuffle the order of items inside a shulker box, or an ender chest? (Basically for a deck)


In my code i am getting values like this keys = request.POST.get('keys') KeysList = json.loads(keys)          values = request.POST.get('values') valuesList = json.loads(values)    After print statement i am getting values in list  like : keys = ['A', 'B', 'C', 'D']  Values = ['true', 'false', 'true', 'true']  but what i exactly want is like i want a dictionary in this way : updateObj = { 'A' : 'true', 'B' : 'false', 'C' : 'true', 'D' : 'true', } how can i achieve this can any one please suggest me for this ?? i am stuck here thanks in advance


How to invoke an executable in the path /usr/bin using a C++ program?

I have an GUI based executable in the path /usr/bin in the linux machine This executable takes three arguments - two integer values and one char Can you let me know how to invoke and run this executable from a user space C++ program


I try to write test then it use static class.   I have class Person:  public class Person {   private int id;   public Person(String name) {     id = Id.generate(name);   }   public int getId() {     return id;   } }   And class Id:  public class Id {   public static int generate(String name) {     if (name.equals("I")) {       return 42;     }     return 100;   } }   This is my test:  import org.easymock.EasyMock; import org.junit.runner.RunWith; import org.powermock.api.easymock.PowerMock;  import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.testng.Assert; import org.testng.annotations.Test;  @RunWith(PowerMockRunner.class) @PrepareForTest( { Id.class } ) public class MockStaticTest {    @Test   public void test() throws Exception {     PowerMock.mockStatic(Id.class);     EasyMock.expect(Id.generate(null)).andReturn(55);      PowerMock.replayAll();     Person person = new Person(null);     Assert.assertEquals(person.getId(), 55);     PowerMock.verifyAll();   } }   When I run test, it throws NPE:  java.lang.NullPointerException     at Id.generate(Id.java:3)     at MockStaticTest.test(MockStaticTest.java:17)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...   On line 17 it calls code of static method Id.generate. In my opinion, it is wrong behavior.


In python 2 i have this simple loop   while True:     for i in ["/", "-", "|", "\\", "|"]:         print "%s\r" % i,   It produces a loop of those symbols, on the same line, replacing each character in place (so you never see more than 1 symbol)  However, in python3  while True:     for i in ["/", "-", "|", "\\", "|"]:         print("%s\r" % i,)   The same code, when fixed for syntax, prints each symbol on a new line  Not sure what I am missing, would appreciate the help


Rendering a PDF from Lightning Web Component

I am wondering if anyone has a suggestion on the best practice for rendering a pdf from an LWC.  I have a visualforce page that does the rendering now, I pass some values from another visualforce page to render the PDF.  The first Visualforce page is getting replaced with an LWC but now I'm unsure of how to handle producing a PDF from that lightning web component.  Thanks!!!


Where is the Default Program associations stored in the registry?

If I run the assoc command-line utility for an extension, it shows the file type/description for the extension I set in the registry. But if I go to Control Panel -> Default Programs - Set Associations then I see a different description and default program.  It used to be that setting the two keys:   HKCR\.ext (default) = Identifier Identifier (default) = "File Description"   \DefaultIcon (default) = Some icon \Shell\Open\Command (default) = Some editor    But now it appears there is an override elsewhere, which is what gets displayed in the Default Programs listing.  My question is, where i this overridden association information stored? I'm assuming it is in the registry, but I don't see it in the keys I expect it to be. I believe this was changed in the Vista time frame, but it may have been in XP too.  Update: Since there is some confusion, do the following test. Rename a file to some new extension. Create an association in the registry keys mentioned above. Then right click on the file, Open With and select a different program (checking to make it the default). Now check the registry. It is unchanged, but now the file is associated with a different description, icon and default program.


I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


What is meant by Principal Component Analysis. including in the explanation the terms given below

My question in full is as follows - "What is meant by Principal Component Analysis. including in the explanation the terms: geometric information; covariance matrix; orthogonal transformation; Spectral Theorem My understanding of Principal Component Analysis is that it reduces a number of variables x1, x2... to a smaller set of principal components that store as much of the original information from the original variables in these newly created principal components. However I don't fully understand all of these other terms or how they relate to PCA.


include object inside a class or better derive from that class?

I'm quite new in C++ and I would like to learn good practices from the beginning, so my question explained with an example is:  Having:  class A {     int mNumber; };   If I need to use class A inside class B, what is better?to include an object?  class B {     A * mpA;     int mColor; };   Or inherit from Class A?  class B : public A {     int mColor; };   Is there any good habit talking in a generally way to do this?


how to write "bold typeface" and "italics" in latex?

Note: I am using jupyter notebook (MathJax) rather than tex.   use italics typeface to denote Scalars, pointed out by red arrow in the following figure    bold typeface to denote Vectors, pointed out by blue arrow in the following figure    how to write these 2 types of linear algebra notations in latex?  I searched "bold" on the author's  and got this    which is not helpful.  I tried this command  $x$ $\boldsymbol x$   which is even worse.  this command does better  $x \mathbf{x}$   although this is obviously using different font in the Deep Learning Book


Sign of Laplacian at critical points of $\mathbb R^n$

Suppose we are in $\mathbb R^n$. What can we say about the sign of $\Delta u(\vec x)$ if u($\vec x$) has a local max/min at $\vec x$? I've tried looking at the reverse of the second partial derivative test and it seems to suggest that $\Delta u(\vec x) \leq 0$ if $\vec x$ is a min and $\Delta u(\vec x) \geq 0$ if $\vec x$ is a max. However, I'm not convinced of this result. Can somebody point me towards a statement (theorem, etc.) involving the above. I appreciate the help.


Let $f(x_1,x_2)=\frac{1}{(x_1+ix_2)^2} \times \chi_{(-1,1) \times (-1,1)}(x_1,x_2)$. Evaluate the $L^p(R^2)$ norm of $f(x_1,x_2) \times \chi_{ \{(x_1,x_2):x_1^2+x_2^2 \leq 1\} }$ for every $1 \leq p \leq \infty$. This last function is =f inside the disk of radius 1 and is =0 outside the disk.  $||f||_{L^p(R^2)}=(\int_{ \{(x_1,x_2):x_1^2+x_2^2 \leq 1 \} } |f(x_1,x_2)|^p dx_1dx_2)^{1/p} =(\int_{ \{(x_1,x_2):x_1^2+x_2^2 \leq 1 \} } \frac{dx_1dx_2}{(x_1+ix_2)^{2p}})^{1/p} =(\int_0^{2 \pi} \int_0^1 \frac{rdrd \theta}{(rcos \theta+irsin \theta)^{2p}})^{1/p} =(\int_0^{2 \pi} \int_0^1 \frac{rdrd \theta}{(rcos \theta+irsin \theta)^{2p}})^{1/p} =(\int_0^{2 \pi} \int_0^1 \frac{drd \theta}{r^{2p-1}e^{i \theta 2p}})^{1/p} =(\int_0^{2 \pi} e^{-i \theta 2p} d \theta \times \int_0^1 r^{1-2p}dr)^{1/p} =(\frac{e^{-i \theta 2p}}{-i2p}]_0^{2 \pi} \times r^{-2p}]_0^1)^{1/p} =[(\frac{e^{-i4 \pi p}}{-i2p}+\frac{1}{i2p} \times (1-?)]^{1/p}$  Where I have the question mark is my problem can anyone help me finish solving the problem?


Add a "recently viewed" tab in the user account page

I'd like to see a list of questions that I've recently viewed. This might go on the user page (but only for the user - not for all to see).   This would be different from favorites, as it would only be recently viewed. This would not be redundant with browser history, as it would persist across computers (so I can see at home what I was looking at from work). This would not be redundant with recent activity, since I may not have had any activity on a question I recently viewed.   Any takers?  Perhaps show recently viewed questions where the Related links currently are, and slide everything else down?


Create Quick Actions with Lightning Web Components

I receive a problem in the targetConfig, when I enter the actionType it gives me an error that says it is an invalid element name. Do you know why that happens?


I have custom attachment.php, I want to give link for images in single.php so if user click that images, will redirect to attachment.php is that possible?  Here is the example of code.     Thank you before


Boeing 787. Creating the windshield. How would you approach it? Help

So I'm modeling a Boeing 787-8 commercial jet and I've gotten to the very sleek and flush windshield section. I've cut a beautiful set of window frames but now Im stuck with this situation of creating the windows into the frame, while maintaining the natural curve of the nose. I know it's a bit of a complex curve especially  Joining the vertices closes the gap, but it looks absolutely terrible and neglects that curvature that needs to be there. How would you go about creating this or approaching this? Thanks in advance. I've included pictures of the situation, a reference and what the rest of the model looks like so far.


On Windows 7, how do I find all my files whose filenames are too long

Dropbox tells me many of my files are not syncing because their name exceeds the max character length       Max character length      Windows only allows file and folder names of 260 characters or less.   Note that Windows counts the file path as part of the name, so a file   like C:\Users\Panda\My Documents\Dropbox\Creative Nonfiction\My   Autobiography\Favorite Things\Favorite Foods\Bamboo\Family   Recipes\Fresh Leaves.doc would be 142 characters, not 16. If the   entire file path and name exceed 260 characters, shorten the name or   move the file or folder to a higher-level folder within your Dropbox.   How do I find all the files under a directory whose file and folder names are greater than 250 characters?  (Note: the "Check bad files" tool on that page doesn't find them either.)  Update: there are two suggestions so far, one using powershell that ironically, died when a filename grew too large, the other using cygwin's find and xargs, which may work, but is still running (several minutes later.)  I did solve my immediate problem.  In an emacs shell window, I ran a very simple find  $ find . -type f -print >> ../files.log  Then I opened that in emacs and typed m-x list-matching-lines ^ ESC 230 . RETURN  Which displays lines that match a regular expression, and the regular expression here is that the line contain at least 230 characters, where 230 was just a rough guess for lines that might be problematical. And that showed me two files that were too long.  For about 20,000 files that regular expression filter turned out to be almost instantaneous.


What's the quickest and cheapest way to duplicate a spellbook?

I currently have a copy of Boccob's Blessed Book, which is fantastic, but I fear that if I lose it somehow (it gets stolen, sucked into the Astral Plane, etc.) I won't be useful as a wizard. I'd like to keep a backup somewhere, but manually copying out the current spellbook is expensive and time consuming.  Is there a spell that can quickly (and hopefully relatively cheaply) create a back-up copy of my spellbook in case things in my party go TPK?


does the sequence ${a_n}$ converges implies it is bounded? i think the answer is no, but i've seen a proof used this fact and our TA used this fact in class as the following question:


How can I ensure testNG test method does not abort if any assert fails

I know there is a difference between assert and verify in Junit; the assert results in a runtime exception, causing test method execution to abort. To overcome this problem, we can have verify which will make test case fail, but allowing test execution to proceed rather than getting aborted.  I doubt there is any such built in approach in testNG. I do understand that best practices say, there should not be multiple asserts in same test case.  But, in practical world, we do come across scenarios where we need to have multiple checkpoints in one test case and we don't want our test method to abort because of one check point failure (test execution should proceed despite failure).  How can we use a soft assert mechanism, similar to verify, which will not abort test method when there is a checkpoint failure.  Example:  @Test(dataProvider = "getMailUrl") public void testMail(email,subject); Assert.assertFalse(subject.isEmpty);//1st checkpoint Assert.assertNotNull(email); //2nd checkpoint Assert.assertEquals(email, "feedback@yoursite.com"); //3rd checkpoint   Now, I want test execution to proceed, even if the 1st checkpoint (validation of subject being not empty) fails. Definitely we will be not be using assert (hard assert). We will need concept of soft assert similar to verify (facilitated by Junit).   I understand, we have to build a customListener implementing TestNG interfaces or extending existing listeners such as TestListenerAdapter. I am still struggling - how can we do this?


After the prologue in boring springs, you can take one of 4 pardners with you to the main game. I've unlocked Crazy Pete by giving him mining things and Susie by returning her rifle, but who are the other two pardners and how do I unlock them?


Generate "reliable" random numbers in Javascript. (No collisions)

Would like to generate some random strings to be used as database keys.   Essentially these will be UUIDs, however they do not need to conform to any particular spec aside from the necessary 122-128 bits of randomness.  Most of the code will run in a browser. As I understand it, Javascript running with a browser cannot be trusted to properly seed its random number generator. Instead I was hoping to seed the random number generator with some random data from the server, then generate multiple "UUIDs" starting from that seed.  Is there a good random number generator that can be used for this purpose?


How do I minimise any window using terminal commands?

I'm trying to make my discord bot console (running in terminal) minimize itself, but I do not know a command for minimizing. I tried looking around but I found nothing.


Where can I find the historic stock prices of delisted stocks?

I need to find a chart of historic prices for Exide Technologies' old stock symbol: XIDE. This was the symbol of the company until its bankruptcy, after which its symbol changed to EXIDEQ.  Where can I find the stock prices of XIDE, and other delisted stocks, for free on the internet?


Stack Overflow Error using Array List in Java

I am trying to draw multiple circles using Array list without over lapping so I am using the CheckDistance function to check the x an y of the next shape that is gonna be drawn but it shows me an error of stackoverflow   I have to save them in array to be able to retrieve each shape to do some other functionality on it.   here is my code:  public class Algo  {     public static void main(String[] args)      {         new Algo();     }      public Algo()      {         EventQueue.invokeLater(new Runnable()          {             @Override              public void run()             {                 try                  {                     UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());                 }                  catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex)                   {                     ex.printStackTrace();                 }                  JFrame frame = new JFrame("Airport");                  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);                  frame.add(new CountriesPane());                  frame.pack();                  frame.setSize(700, 700);                  frame.setLocationRelativeTo(null);                  frame.setVisible(true);             }         });     }      public class CountriesPane extends JPanel     {         private List<Country> Countries = new ArrayList<>(100);          public CountriesPane()         {             for (int index = 0; index < 50; index++)              {                 Countries.add(new Country());             }         }          protected void paintComponent(Graphics g)          {             super.paintComponent(g);              for (Country Country : Countries)             {                 Graphics2D g2d = (Graphics2D) g.create();                  Country.paint(g2d);                  g2d.dispose();             }         }     }      protected static final Random random = new Random();      public double x1;      public double y1;      public class Country     {         private int height = 20;          private int width = 20;          private double x2;          private double y2;          private double space = 10;          private Ellipse2D shape;          private String Name;          public Country()         {             CheckDistance(this);              shape = new Ellipse2D.Double(x2, y2, width, height);         }          public void paint(Graphics2D g2d)         {             g2d.setColor(Color.BLUE);              g2d.fill(shape);         }     }      public void CheckDistance (Country Co)      {         Co.x2 = random.nextInt() + Co.space;          Co.y2 = random.nextInt() + Co.space;          double distancex = Co.x2 - x1;          double distancey = Co.y2 - y1;          if (distancex <= Co.width || distancey <= Co.height)         {             CheckDistance(Co);         }         else         {             x1 = Co.x2;              y1 = Co.y2;         }     } }


How can I convert a relative path to an absolute path in C on Unix? Is there a convenient system function for this?  On Windows there is a GetFullPathName function that does the job, but I didn't find something similar on Unix...


How do I keep questions from splitting between pages in exam? For example in the MWE below, I'd like to have a page break after Question 2 so that Question 3 can start on a new page. I don't particularly care how this is done but I imagine a vertical fill would work. Is there a command within exam that does this? I only see the commands that specify what to do with the header/footer if there is continuation but nothing about disabling continuation.  EDIT: Is there a way to make exam do this automatically instead of having me specify where to have a page break?  \documentclass[addpoints]{exam} \usepackage{blindtext}  \begin{document}  \begin{questions}  \question \blindtext[3] \begin{choices} \choice  \choice  \choice  \choice  \choice  \end{choices}  %  \question \blindtext \begin{choices} \choice  \choice  \choice  \choice  \choice  \end{choices}  %  \question \blindtext \begin{choices} \choice  \choice  \choice  \choice  \choice  \end{choices}  %  \end{questions} \end{document}


In Ubuntu 13.04 backspace button in nautilus not working?

PC: Acer Aspire E1-571 OS: Ubuntu 13.04 amd64  I want to downgrade my nautilus file browser in ubuntu 13.04 and i have tried the SoluOS patch but not satisfied. I just want to install nautilus 3.4 . Any Help     Thanks in Advace.


How to prove the graph of a continuous on a closed interval is measurable?

Let $f:[a,b]\rightarrow\mathbb{R}$ be a continuous function on the closed interval $[a,b]$. Let $\mathcal{C}=\{(x,f(x))\in\mathbb{R}^2|x\in[a,b]\}$ be its graph. Prove that $\mathcal{C}$ is measurable and $m(\mathcal{C}))=0$.  I have no idea how to start, I don't know how to relate the measurable function and its graph. Can you give me some hints?  Thanks!


I was reading some parts of Ant-Man and the Wasp movie transcript from  I saw this sentence in it:  but what's this have to do with where Scott Lang is?  Can we abbreviate does to s like when we do the same to is?


What happens to the image of an object kept before a lens if the upper half of lens is covered by an opaque coating?  I understand that the full image will be formed and only the intensity of the image is reduced. But is the intensity uniformly reduced? That is, will the upper and lower half of image have same intensity?  (The object is kept at a distance $1.25f$ before the lens. Half the object is above the principle axis. $f$ is the focal length of lens).


I am using the following jquery tooltip script on a page with an series of hyperlinks within an update panel:  this.tooltip = function(){           xOffset = 50;     yOffset = 20;         $("#tools a").hover(function(e){                                                   this.t = this.title;     this.title = "";                                           $("body").append("
"+ this.t +"
");     $("#tooltip")         .css("top",(e.pageY - xOffset) + "px")         .css("left",(e.pageX + yOffset) + "px")         .fadeIn("fast");         }, function(){     this.title = this.t;             $("#tooltip").remove(); });  $("#tools a").mousemove(function(e){     $("#tooltip")         .css("top",(e.pageY - xOffset) + "px")         .css("left",(e.pageX + yOffset) + "px"); });          };   $(document).ready(function(){tooltip();});   It works fine on initial load but not when an ajax call has been made. I believe I should be using .on instead of .ready but I'm unsure how to apply as the following is not working:  $(document).on(function(){tooltip();});


Novel in which the protagonist fades out is forgotten by, and can't interact with, the rest of the world

Trying to identify a novel I read years ago (probably in the '80s) in which the protagonist (late teens, early 20s?) is gradually forgotten by and ceases to be able to interact with the rest of the world (all of which gradually fades to gray).  In the beginning, as he is slowly fading out (not realizing it) he goes down to breakfast with his parents, and his mother has only set out two plates (one for his father and one for herself) — she'd forgotten to set one out for him.   He reminds her.  Foreshadowing, eh?   But gradually everyone forgets about him and ceases to be able to hear or see him, and fade to gray.  Some other things apparently similarly get "forgotten" however — e.g., occasionally he finds colored, not gray, cans of food in grocery stores, which he can interact with and eat — so he survives.  He then meets a girl who has similarly been forgotten by the world, and they spend time together and fall in love.  At the end,       he is gradually starting to fade back into the world (she isn't) and she puts writes a note about them and puts it in his pocket, in the hope it will fade back into the world with him.  It does, and he sees it one day — but has no idea what it is or any memory of her.  Sad.


What should I do when the GETDEB repository is down?

I'm trying to install programs/files from the getdeb repo but get a "check your internet connection" error.  Programs than I've tried include Qbittorrent and Mozilla-Plugin-VLC.    Through the terminal I get the following errors:  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps qbittorrent amd64 2.8.2-1~getdeb2   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/q/qbittorrent/qbittorrent_2.8.2-1~getdeb2_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   &  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps mozilla-plugin-vlc amd64 1.1.10-1~getdeb1   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/v/vlc/mozilla-plugin-vlc_1.1.10-1~getdeb1_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   I'm not having any problems adding/removing other programs/files from my machine.  Is there a problem with GETDEB repo (and if so, is there any way to fix it on my end) or is there something wrong with my computer's configuration?


Cannot start the apache2 server on my ubuntu 20.04

I have installed apache2 web server on my PC, after installation I started the server and used it for couple of days. But now when I need to work with it I was not being able to start the server. I didn't add anything on my .conf files. I used this command: sudo /etc/init.d/apache2 start  # or  sudo systemctl start apache2  But nothing works. After executing sudo systemctl status apache2.conf  it shows the following error: Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: Starting The Apache HTTP Server... Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21219]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21219]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /> Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21219]: AH00014: Configuration check failed Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21202]: Action 'start' failed. Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21202]: The Apache error log may have more information. Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: apache2.service: Failed with result 'exit-code'. Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: Failed to start The Apache HTTP Server.  Mainly it shows that configuration failed But how to do it? I have updated the apache2.conf file on /etc/apache2/apache2.conf directory added ServerName localhost  ServerRoot "/etc/apache2"  Under the Global Configuration, but nothing can prevent the error. After doing the apache2ctl configtest on apache2 directory this shows (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:2 AH00014: Configuration check failed Action 'configtest' failed. The Apache error log may have more information.  How to solve this error?


It's early days yet but in the spirit of open world one of the first things I've done in GTA V is hijack a security van. For the life of me I can't work out how to get the cash out of it.  I've tried a shotgun on the doors (the free bullshot one from the Special Edition), kicking, punching and machine gunning. I've also tried pretty much every button on the controller just in case it's something simple but so far my truck is impenetrable.  I'm currently left wondering if I'm just too early in the game to be able to open the security trucks although it was highlighted by the game as a "world event" (?) which would suggest not.  I would just save it for later but you can't store these vehicles in garages and I'd hate to just leave a truck full of money on the side of the road.  Can anyone shed light on how to get into these things?  Edit: Other things I've now tried:   Reversing into buildings at high(ish) speed. Driving off the big hill behind the Vinewood sign. Killed me but didn't appear to open the truck. Driving into the shallow lake at the north end of the storm drain. The truck was fully submerged and again didn't open.   For reference my most recent story mission is no.3 "Repossession".


Doesn't Set collection implement Iterable interface?

I am trying to join String elements of Set with semicolon.  Set<String> elements = new Set<String>{     'foo',     'bar'     }; System.debug(String.join(elements, ';'));   getting the following exception     Argument must implement Iterable   Is it weird, as we can easily iterate Set with foreach loop  for(String element :elements){     System.debug(element); }   It means, that Set<T> implements Iterable<T>, doesn't it? From  about String.join method:     Joins the elements of the specified iterable object, such as a List,   into a single String separated by the specified separator. Signature   However, String.join with List collection works good.  System.debug(String.join(new List<String>(elements), ';'));      DEBUG|foo;bar   So do you have idea, why is it happening?


Find all $n$ with $\!\bmod n\!:\, a\,$ invertible $\Rightarrow a^{-1} \equiv a,\,$ i.e. $a^2\equiv 1$

Find all positive integers $n$ such that $a \equiv a^{-1} \pmod{n}$ for all invertible $a$ modulo $n$.   I found that $n = 1,2,4,6,8,12,24$ satisfy this. How can we prove that these are all of them?


How to derive the formula for $\arctan(x) + \arctan(y)$ depending on $x,y$?

I was trying to derive the following formula $$\arctan(x)+\arctan(y) = \begin{cases}\arctan\left(\dfrac{x+y}{1-xy}\right), &xy < 1 \\[1.5ex]  \pi + \arctan\left(\dfrac{x+y}{1-xy}\right), &x>0,\; y>0,\; xy>1 \\[1.5ex]  -\pi + \arctan\left(\dfrac{x+y}{1-xy}\right), &x<0,\; y<0,\; xy > 1\end{cases}$$  I proceeded this way  $$\tan{(A+B)}= \frac{\tan{A}+\tan{B}}{1-\tan{A}\tan{B}}$$ $$\arctan(\tan{(A+B)})=\arctan\bigg(\frac{\tan{A}+\tan{B}}{1-\tan{A}\tan{B}}\bigg)$$ $$A+B=\arctan\bigg(\frac{\tan{A}+\tan{B}}{1-\tan{A}\tan{B}}\bigg)$$ $$\tag*{$\frac{-\pi}{2}<A+B<\frac{\pi}{2}$}$$ $$A=\arctan(\tan A)$$ $$\tag*{$\frac{-\pi}{2}<A<\frac{\pi}{2}$}$$ $$B=\arctan(\tan B)$$ $$\tag*{$\frac{-\pi}{2}<B<\frac{\pi}{2}$}$$ $$\arctan(\tan A) + \arctan(\tan B)=\arctan\bigg(\frac{\tan{A}+\tan{B}}{1-\tan{A}\tan{B}}\bigg)$$ $$\tan A=x$$ $$\tan B=y$$ $$\arctan(x) + \arctan(y)=\arctan\bigg(\frac{x+y}{1-xy}\bigg)$$  Now from here ownwards I don’t know how It gets converted to 3 different definitions. You’re help will be highly appreciated.


Term for phenomenon of going to another room and forgetting the task

This phenomenon can be summarized as thus:   You are in one area of your house.  You are in the midst of a task Something is required from another area of the house.  You leave to get it When you arrive there, you see a non-related task.  It is a quick task.  You do this quick task, and remember you were in the first room doing the primary task.  You return there Upon returning you immediately remember that you couldn't continue until you obtained the item from the second room, where you did the quick, unrelated task   What is the term or phrase that describes this phenomenon?


Do Lightning components support iframes? I tried putting an iframe tag on a component and nothing displayed. I am aware that you can host a visualforce page from Lightning and have an iframe in that although not recommended by Salesforce. My scenario is to display iframe content in a customer community using the Napili template and I was thinking of using a custom Lightning component as a means of doing so. Trying to put an iframe directly into the 'Rich Content Editor' component does not work. Possibly the 'force:canvasApp' Lightning component could be an alternative. Any advice on the feasiblity/right direction on this appreciated


Different statements of the Heisenberg's uncertainty principle

In different books, but also websites, there are different expressions for the Heisenberg's uncertainty principle. For example,   $\Delta x \Delta p \ge h$ (from The Physics of Atoms and Quanta) $\Delta x \Delta p \ge \hbar/2$ or $\Delta x \Delta p \ge \hbar$ (Demtroder)   etc.  Which one of these notations is the correct one? Or, if they're all correct, could someone provide me with some examples or context where each of them is used?


"apache2 : Depends: apache2-bin" on Ubuntu 18.04

I am getting following error while running the command to update apache. $ apt-get install -f apache2  The following packages have unmet dependencies:  apache2 : Depends: apache2-bin (= 2.4.41-1+ubuntu18.04.1+deb.sury.org+5) but it is not going to be installed E: Unable to correct problems, you have held broken packages.  I checked almost all the answers here but none of them resolved the issue. I also tried all the commands to list the broken packages but none of them shows the list. I upgraded the Ubuntu today and now getting this error. Can someone help on this?