When using the APA style to automate my citations, it prints out with a ", 2" or a ", 1" at the end, as if it's supposed to be a page or paragraph number. After reviewing my bib file, I strongly suspect biblatex is printing out the issue number.  My MWE LaTeX file is:  \documentclass[11pt, twoside]{article}  %document formatting \usepackage[margin = 2.5cm]{geometry}  %mathematical packages \usepackage{amsfonts,mathtools,amssymb, amsthm}  %Referencing package \usepackage[     backend = biber,     style = apa,     natbib = true     ]{biblatex} \addbibresource{citations.bib}  \begin{document}  \section{Introduction} Leibniz and Cauchy rejected imaginary numbers \citep{IForImagNumb}.  Originally used to solve specific inputs for the cubic formula roughly five centuries ago \citep{IForImagNumb,BriefHistOfeigamma,HistOfMaths}.  \citet{ImagXtrmNumb} has developed ``imaginary extreme numbers".  \citet{PhysNatureOfImagNumb} has claimed to find physical existence of imaginary, complex, and hypercomplex numbers.   My MWE bib file is:  @book{HistOfMaths,     author = {Boyer, Carl B. and Merzbch, Uta C.},     year = {1991},     title = {A history of mathematics},     edition = {2nd},     city = {New York},     publisher = {Wiley} }  @article{BriefHistOfeigamma,     author = {Debnath, Lokenath},     year = {2015},     title = {A brief history of the most remarkable numbers e, i, and {$\gamma$} in mathematical sciences with applications},     journaltitle = {Journal of Mathematical Education in Science and Technology},     volume = {46},     issue = {6},     pages = {853-878},     doi = {10.1080/0020739X.2015.1015266} }  @article{IForImagNumb,     author = {Curcio, Liliana},     year = {2017},     title = {I for Imaginary Numbers},     journaltitle = {Lettera Mathematica},     volume = {5},     issue = {2},     pages = {125-129},     doi = {10.1007/s40329-017-0172-6} }  @article{PhysNatureOfImagNumb,     author = {Antonov, Alexander Alexandrovich},     year = {2016},     title = {Physical Reality and Nature of Imaginary, Complex and Hypercomplex Numbers},     journaltitle = {General Mathematics Notes},     volume = {35},     issue = {2},     pages = {40-63},     url = {http://www.geman.in/yahoo_site_admin/assets/docs/4_GMN-10932-V35N2.31895146.pdf} }  @article{ImagXtrmNumb,     author = {Liu, Liping},     year = {2013},     title = {Imaginary numbers for combining linear equation models via Dempster's rule},     journaltitle = {International Journal of Approximate Reasoning},     volume = {55},     issue = {1},     pages = {294-310},     doi = {10.1016/j.ijar.2013.09.004} }   For some weird reason, biblatex prints out the following:   "(Curcio, 2017, 2)" for \citep{IForImagNumb}, "(Boyer & Merzbch, 1991; Curcio, 2017, 2; Debnath, 2015, 6)" for \citep{IForImagNumb,BriefHistOfeigamma,HistOfMaths}, "Liu (2013, 1)" for \citet{ImagXtrmNumb}, and "Antonov (2016, 2)" for \citet{PhysNatureOfImagNumb}.   Any ideas on how to fix this?

When my citation is from a special issue of a journal, the issue field of my citation contains letters (for example issue = {S1}).   The problem is that the issue code shows up in the in-text citation like this:    How can I make the special issue codes behave like normal issue numbers, only showing up in the bibliography?   Here is the MWE, with the same options I used in my thesis.  \documentclass[12pt, a4paper]{book}  \usepackage[backend=biber,refsegment=chapter,defernumbers=true,style=apa,url=false,isbn=false,maxbibnames=99]{biblatex} %   \DeclareLanguageMapping{american}{american-apa} %For utilizing apa style and avoid error in labelmonth and labelday \AtEveryBibitem{     \clearfield{labelmonth} } \AtEveryBibitem{     \clearfield{labelday} }  \usepackage{filecontents} \begin{filecontents}{ref.bib} @article{fogliano_vitro_2011,     langid = {english},     title = {In Vitro Bioaccessibility and Gut Biotransformation of Polyphenols Present in the Water-Insoluble Cocoa Fraction},     volume = {55},     issn = {1613-4133},     doi = {10.1002/mnfr.201000360},     issue = {S1},     journaltitle = {Molecular Nutrition \& Food Research},     shortjournal = {Mol. Nutr. Food Res.},     date = {2011-05-01},     pages = {S44--S55},     keywords = {Digestion,Flavanols,Phloroglucinolysis,Prebiotic,SCFA},     author = {Fogliano, Vincenzo and Corollaro, Maria Laura and Vitaglione, Paola and Napolitano, Aurora and Ferracane, Rosalia and Travaglia, Fabiano and Arlorio, Marco and Costabile, Adele and Klinder, Annett and Gibson, Glenn}, } \end{filecontents} \addbibresource{ref.bib}  \begin{document}      \parencite{fogliano_vitro_2011}      \printbibliography   \end{document}


I was wondering why the following code leads to a SIGSEGV? #include <stdio.h> #include <stdlib.h> #include <string.h>  void splitt(char string[255]){        string[1] = 'a';  }  int main (void){          splitt("cut");      }  I thought that if I passed a pointer to a function as a parameter, I could change the content of the pointer in this function and this would also have an effect in the calling function. That's why I'm confused why this doesn't work. Thank you in advance for any help!

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


Someone was asking:   Do we order things "off" a website or "on" a website?   I suggest it's from as it's a specific place (if virtual.)  What is correct here. Cannot for the life of me find an answer.

I bought this bike in|on|from|at an online store.  I bought this bike in|on|from|at November 13.  I bought this bike in|on|from|at a sale.  What is the appropriate situation where the words in, on, from, and at should be used?    I think something similar has been asked before, but I can't seem to find it in this SE site.


Observe the non-round shape of the parenthesis using the fourier package \usepackage{fourier} . In particular they are not round :     compare this to lmodern parenthesis which are round in shape    I'd like to replace the  parenthesis used by the fourier  font with a suitable compatible replacement which has a round shape.   It seems not trivial since I would have to replace every parenthesis shape and not just an individual symbol. I would like the fix to be compatible with usage of e.g. \bigl and so forth.

Is there a general way to change the font of a particular symbol without switching packages?  For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx.  How can I redefine it to appear in this way?


input_string = "Tomato 2 kg, three kg Onion, eleven pieces lemons"  output_string = "Tomato 2 kg, 3 kg Onion, 11 pieces lemons"

I need to convert one into 1, two into 2 and so on.  Is there a way to do this with a library or a class or anything?


In the Empire Strikes Back, just as Luke is leaving Degobah to rescue Han and Leia on Cloud City, Yoda and Ben attempt to convince him to stay and finish his training.  YODA: Luke, you must complete the training. LUKE: Ah, I can't get the vision out of my head. They're my friends I've got help them. YODA: You must not go. LUKE: But Han and Leia will die if I don't! BEN: You don't know that. Even Yoda cannot see their fate. LUKE: But I can help them! I feel the Force.. BEN: But you cannot control it. This is a dangerous time for you, when you will be tempted by the dark side of the Force. YODA: Yes, yes! To Obi-wan you listen. The cave.. remember your failure in the cave.   Why did Luke fail during his experience in the cave? Was it because he was the first to draw his sword upon encountering the image of Vader, with Yoda previously mentioning that Luke wouldn't need his weapons? Or, was it because Luke used anger/fear/hate to strike down Vader's image? Maybe a combination of both, and/or more?  After thought: If Luke didn't take his lightsaber with him, would he still have encountered Vader? If so, is it possible they would have just had a conversation? Maybe there are other Jedi who have also gone through similar trials, but had had a different, more successful experience, which could provide insight as to what would have happened with Luke should he have taken Yoda's advice and not brought his saber (and, implicitly, a different state of mind)?

At approximately 1:23:55 in Star Wars V: The Empire Strikes Back, Yoda is trying to convince Luke to stay and continue his training, and then implores Luke to     Remember your failure at the cave!   The exact script quote is . Which failure is he referring to?  From my understanding, Luke killed a "fake" Vader in the cave, and then sees his own face behind Vader's helmet.  The fact that he missed that this Vader was not the real one could be interpreted as a failure for a Jedi as he did not stay calm enough to detect the real danger.  Is this correct?


I hope this is a physics topic.  I thought it may be appropriate because of conservation of momentum.  I was under the impression that lift in an airplane wing ( an airfoil ) was due to difference in pressure. However a physics video on Youtube said that it was conservation of momentum that generates lift , which did not make sense to me, I am now wondering about the validity of the video. The video author is a physicist so maybe I thought the physics section of stackexchange may be appropriate to ask.  Is there some underlying physics I am not aware of? Thank you

What aerodynamic effects actually contribute to producing the lift on an airplane?  I know there's a common belief that lift comes from the Bernoulli effect, where air moving over the wings is at reduced pressure because it's forced to travel further than air flowing under the wings. But I also know that this is wrong, or at best a minor contribution to the actual lift. The thing is, none of the many sources I've seen that discredit the Bernoulli effect explain what's actually going on, so I'm left wondering. Why do airplanes actually fly? Is this something that can be explained or summarized at a level appropriate for someone who isn't trained in fluid dynamics?  (Links to further reading for more detail would also be much appreciated)


I'm having an issue and I don't know if it's related to the SSH tunnel but here's the deal.  I have a simple function to connect to the database from php and it works fine locally but it doesn't work to connect to a remote server.     connect.php   $dbhost = '172.1.2.3'; $dbuser = 'root'; $dbpass = 'testpass'; $db = 'testdb';  function dbconnect() { $conn = mysqli_connect($dbhost, $dbuser, $dbpass, $testdb); $conn->set_charset("utf8");  error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE ); if(!$conn)     {         die('We are unable to connect you to the site! --> '.mysqli_error());     } else     {            return $conn;     } }   Then, I include this file say on index.php and do the following.  <?php include 'connect.php'; $conn = dbconnect(); ?>  //html content below   the problem I'm having is that when I do the $conn = dbconnect(); the index.php page doesn't load, I just get a blank page. if I comment out $conn = dbconnect(); then the HTML content loads just fine.  I'm not getting error outputs on the console either so I'm a bit clueless as to what the problem might be and I don't know if it's related to the SSH tunneling which I don't know how to include it on the php connection function.  I do however, have to use the SSH credentials to connect to the database from any mysql manager so I want to believe I am missing something in the function.  if it helps, the server is running PHP 5.6 and mysql 5.7.22  Any help is appreciated.  Thanks,

I have my database on remote Linux machine, and I want to connect using SSH and PHP functions (I am currently using ssh2 library for that). I tried using mysql_connect, but it gives me can't access (although I have granted permission) when I tried using this function:  $connection = ssh2_connect('SERVER IP', 22);  ssh2_auth_password($connection, 'username', 'password');  $tunnel = ssh2_tunnel($connection, 'DESTINATION IP', 3307);  $db = mysqli_connect('127.0.0.1', 'DB_USERNAME', 'DB_PASSWORD',                           'dbname', 3307, $tunnel)     or die ('Fail: '.mysql_error());   I got error "mysqli_connect() expects parameter 6 to be string, resource given". How can I resolve this?


It would help everyone if we provided a mechanism that people could use to flag their post if English is language they are not comfortably fluent in. A lot of non-English speakers have to go to English forums for tech support and find it embarrassing to ask questions in broken Englis.   Worse, people reading a post often cannot tell if a badly-worded post results from a poor English or just laziness and sloppiness on the part of a native English speaker. Personally, I will take the time to puzzle out a poorly-worded post if I know the author is struggling with English, but if I think they're just lazy and careless I won't bother.   A simple check box could flag the author as a non-English speaker and allow everyone to adjust accordingly.   Edit01:  Some answers below have accused me of being 'elitist'. I'm not sure where they got the idea that I was sneering down at anyone because their abilities at either English or coding. That was not my intent.   When I said I would not bother with post that appeared to incoherent owing to laziness or carelessness, I am not being elitist. I'm giving priority in my time budget to people who are respectful enough of my time to spend the their time writing as clear a question as their grasp of English and coding allows. Why should I spend time answering a careless and slapdash post when I could spend that time helping posters who took more of their time writing their questions?   I am perfectly willing to burn a lot of time helping someone struggling to write code in their non-native language. I have a hard enough time coding myself in English that I can't even imagine what a dog's breakfast I would make of it if I had to code in, say, Korean.    I have seen many instances in which questions have been downvoted when a quick glance at the poster's profile gives a strong hint they are not native English speakers. I would like a system that would spare those posters from being downvoted or ignored by using an interface element that clearly communicates in a standardized way whether the poster natively speaks English or not.   I don't see what's elitist about that.    Edit02:   (original unedited) I'm talking about:     Hy, I have a childe view that put it   self over other brother views. The   problem is that when i touch it the   brother also reacts at the touch   event. How can I disable touch   propagation on the underlieng brother   views?   I'm not even exactly sure what he is describing. I can guess that he has a sibling view that extends over its siblings but I'm not sure. If I edited it, I might not end up asking the same question the poster intended.   To answer the question, I will either have to (1) first ask for more detail and then keep checking back until I get it or (2) try to answer what I think the question is and possibly mangle it then have to come back and edit my answer all the while risking a downvote because I answered the wrong question.   I will take the time and the risk of down vote if the poster is not a native English speaker (or is a child) and the confusing question represents their honest best effort. If they're just being lazy, I have other people to help.   I would like a mechanism that would help me decide how to allocate my time and would protect the non-English speaking posters from unjust downvotes.

Otherwise known as  必须用英语吗？(is English required?) ¿Necesito hablar en inglés? ?האם אני חייב לכתוב באנגלית Muss ich auf Englisch schreiben?  Do I have to use English when posting a question, an answer or a comment on a Stack Exchange site?


I am receiving a compiler error:   "Method xxx has parameter value of type "System.Decimal". "System.Decimal" is not a valid Windows Runtime must return only Windows Runtime types."   Is there anyway I can use a decimal? or should I just store the value as cents in an integer?

I wanted to see if folks were using decimal for financial applications instead of double.  I have seen lots of folks using double all over the place with unintended consequences . .  Do you see others making this mistake . . .


Whats another word to describe someone who can pick up on things quickly?

A word to describe someone's personality trait that think quick. For example he gets lost in the woods then comes up with a solution on the fly to find his way back home.


To prove that $(n!)^2>(n)^n$  That is to prove that  $(n!)^2-(n)^n>0$  Now, $(n!)(n!)-(n)^n=[n.(n-1)(n-2)...][n.(n-1)(n-2)...]-[n.n.n...]$  $[n^2.(n-1)^2 . (n-2)^2 ...]-[n.n.n...]$   Comparing the first terms we get, $n^2>n$  Now we prove that all the other individual terms of $(n!)^2$ are greater than $n$  The general term is $(n-r)^2$  To prove that $(n-r)^2>n$, we subtract $n$ from $(n-r)^2 $  $(n-r)^2-n=n^2-2nr+r^2-n=n^2-(2r+1)n+r^2 $, but cannot proceed further, pls help, or this approach totally wrong?

Show that if $n>2$, then $(n!)^2>n^n$.     My work: I tried to apply induction. So, at the induction step, I need to prove, $n^n>(n+1)^{n-1}$ Here, I tried to use induction again without any luck. I also took log of both sides, but I did not get anything. Please help!


Can I transfer windows retail licence to a new computer when the old computer having digital licence dies and i can not run slmgr puk command to deactivate licence on old computer which is dead. Edit I have purchased full package retail product key from amazon with installation media

I've been using Windows 10 for a couple of month now (joined the Insider Preview).  Now my hard drive started ticking so I've bought a new SSD and I want to move the windows installation to the new hard drive, which has been connected to the computer (unpartitioned). I don't mind and I even prefer reinstalling it over again.   Since I have the free version of Windows 10 pro, can I still reinstall it anew? Does the windows 10 installation offer disk management and partition like the older Windows installations used to? How should I reinstall Winodws 10 x64 the easiest but still remain on free mode?


I have my website which i can search in google and it comes up. But if i see flipkart search result on google, it is structured very well. Is there any module to do that in drupal?

I would like my site's categories to appear in the Google results. For example the , etc.  Is there any module for this? Has this to do with RDF, microformats, or rich snippnets?


drush @mysite cget system.maintenance shows:     message: '@mysite is currently under maintenance. We should be back shortly. Thank you for your patience.'       langcode: en   Drupal 8 uses state values to record transient state, so drush @mysite sget system.maintenance_mode gives me a 1 or a 0.  But, try as I may, I cannot see how to set the boolean. I've tried:  $ drush @mysite sset system.maintenance.mode "TRUE" --format=boolean $ drush @mysite sget system.maintenance_mode 0 $ drush @mysite sset system.maintenance.mode "TRUE" --format=auto $ drush @mysite sget system.maintenance_mode 0 $ drush @mysite sset system.maintenance.mode true --format=auto $ drush @mysite sget system.maintenance_mode 0 $ drush @mysite sset system.maintenance.mode true --format=boolean $ drush @mysite sget system.maintenance_mode  0     What's the secret?

How can I take a site offline using Drush?


Suppose I wanted to use a PNG file as a desktop background. I can right click on it and select "Set as desktop background".   Surprisingly, this does not actually set the image as the desktop background. Rather, it appears to generate a JPEG-converted version of the image (I have no idea where it is stored), and use that instead of the original PNG file.  How do I know this? The image that appears as background on the desktop is sprinkled with DCT quantization noise, and the colors are washed out. For example, consider the following 1920x1080 PNG image (right click to open as full-size):    This is what it looks like when I take a screenshot of the background (right-click and open in a new tab to see details):    As you will see when viewed at actual size, the high-spatial-frequency visual components are surrounded by the characteristic haze of quantization errors unique to JPG images, and the colors are significantly less vibrant, both of which prove that the original file is not being used. I saved the screenshot losslessly, so this is exactly as it appears on my screen.  Does Windows support the use of PNG images without on-the-fly lossy conversion to JPEG? Or does this feature not exist? Admittedly this is a minor gripe, but I was wondering if any Super User's knew of any workarounds.

This has been bugging me on Windows 7 as well, and much to my chagrin Microsoft didn't bother addressing that issue in Windows 8. Take this image for example:   (Click to open original unaltered image.)  It's made for retina Macbooks, so naturally it's being downscaled when setting it as wallpaper on my 1680x1050 screen. Windows 8 manages to make it look terrible, see this screenshot:    Is there any way of making Windows always use the original image, not some JPGized-to-hell version of it?


I have see code that pre-increment (or decrement) of variables without return value to be used.  ++i;     vs  i++;   Example here :   Is there any purpose of doing this (expect coding style) ? Does it result in different assembler code to be generated by the VM ?

Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?


The answer from   doesn't work, because I've already set the AllowCortanas Value Data to '0':    The answer from  doesn't work either:  PS C:\WINDOWS\system32> Remove-AppxPackage Microsoft.Windows.Cortana_1.9.6.16299_neutral_neutral_cw5n1h2txyewy Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor. (Exception from HRESULT: 0x80073CFA) error 0x80070032: AppX Deployment Remove operation on package Microsoft.Windows.Cortana_1.9.6.16299_neutral_neutral_cw5n1h2txyewy from: C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy failed. **This app is part of Windows and cannot be uninstalled on a per-user basis**. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app. NOTE: For additional information, look for [ActivityId] d9d3a5d3-e312-0001-fcc4-d3d912e3d301 in the Event Log or use the command line Get-AppxLog -ActivityID d9d3a5d3-e312-0001-fcc4-d3d912e3d301 At line:1 char:1 + Remove-AppxPackage Microsoft.Windows.Cortana_1.9.6.16299_neutral_neut ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : WriteError: (Microsoft.Windo...l_cw5n1h2txyewy:String) [Remove-AppxPackage], IOException     + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand   I've also seen a post that fiddle with group policies, I've done that as well. However it didn't work either.   So now, having rebooted my PC, I still see Cortana in my task:    UPDATE:  THIS IS NOT A DUPLICATE of the suggested.    the first method has a "Warning about Taskbar Breakage" the second method will apparently "stopped working at some point" the Original method, Remove Cortana via Powershell RemoveAppPackage, is the one that I tried and didn't work.

Windows 10 has Cortana, which I don't like. I disabled it as soon as I could. However, looking in Task Manager, the process for Cortana is still running, and can't be effectively terminated: ending the task simply results in the process respawning a few seconds later. Using the command  taskkill /IM Cortana.exe /F   has the same result: the process respawns.  Is there any way to disable Cortana so that the process doesn't keep running in the background, and doesn't respawn if terminated?


I was asked this question in a PhD interview. They didn't say whether $a_n$ is non-increasing or strictly decreasing. I tried various examples such as $a_n=\frac 1{n^p}$ where $p \gt 1$, $a_n=\frac 1{n^2 \ln n}$. Then $n a_n \to 0$.  I couldn't answer this question then.  But when I saw Robert Israel's answer to  question, motivated from it, I defined a sequence $a_n$ as below :  $ a_n = \begin{cases} \frac 1n,  & \text{if $n$ is a power of 2} \\ 0, & \text{otherwise.} \end{cases}$  Here, $\sum a_n=\frac 12+ \frac 14+ \frac 18+ \cdots =\frac {\frac 12}{1 -\frac 12}=1$ and $\{n a_n\}$ diverges, because there are infinitely many terms of $0$ and $1$ in it. i.e.  $n a_n = \begin{cases} 1,  & \text{if $n$ is a power of 2} \\ 0, & \text{otherwise.} \end{cases}$  So $\{na_n\}$ converges in some cases and diverges in some cases. Am I right?  Note : I have gone through these posts, ,,  too but they have some extra conditions or specific details.  Thanks.

Can it be proven that : If $a_n>0$ and $\sum a_n$ converges then $na_n \to 0$ (without assuming $a_n$ is decreasing)  Please note This question does not require $a_n$ to be decreasing as condition,  Is it possible to prove $na_n \to 0$ without requiring $a_n$ to be decreasing? I keep thinking that $a_n>0$ and $\sum a_n$ converging then that implies that $a_n$ must be decreasing anyway(not monotonically decreasing necessarily )  Is it possible that $a_n>0$ and $\sum a_n$ converges then $na_n \not \to 0$?  There are already answered questions that assume $a_n$ to be decreasing as a requirement: (this question does not assume $a_n$ is decreasing)       was the post that made me ask this question, a counter example of monotonoic decreasingness of $a_n$ was given in comments by the OP.


Okay so i decided earlier today to try out ubuntu, i didnt want to get rid of windows as i still have games i want to play so i decided to dual boot. I made a LiveCD from a thumb drive and instaleed ubuntu on my harddrive. I had shrunk the windows partition to make space for ubuntu. I finished installing ubuntu and it works beautifully and i really like it. When i tried a while ago to start up windows 7 through the GRUB, it says the following BOOTMCR image is corrupt. The system cannot boot. I honestly have no idea what to do, any help would be appreciated.

I have Ubuntu Precise beta 2 and Windows7 set up to dual boot.  The set up had been perfect, until today, with a black screen presented when trying to boot Windows with a BOOTMGR image is corrupt, cannot boot fault.  Is there any way to fix this from Ubuntu, or is a reinstall my only option?


I am using process builder to execute multiple shell commands (not external shell script) from Java. I can pass system environment variables to the shell command; However, if I want to pass on a variable defined in java (for example a string) as a argument to the shell command, how can I do that? My code looks something like this. I want two files to be created (touched) by name 123 & 234.  public class ExecShellCmds {  public static void beginWrite() {     String var1 = "123";     String var2 = "234";      String s = null;     try {         String[] cmd = {"/bin/bash", "-c",             "touch var1;"             + "touch var2;"         };          Process p = Runtime.getRuntime().exec(cmd); }}

It is quite simple to run a Unix command from Java.   Runtime.getRuntime().exec(myCommand);   But is it possible to run a Unix shell script from Java code? If yes, would it be a good practice to run a shell script from within Java code?


I have Ubuntu 15.04 installed, but I can't find Skype in it. Can someone tell me how to download and install it, please! Because on Skype site there's only Skype for Ubuntu 12.04, and in the Software Center there's not Skype at all.

I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?


I need a validate a textbox for numbers only alongwith a few special conditions. The allowed values are:   decimal numbers >= 0 [E.g. 25] floating point numbers [E.g. 25.83] decimal numbers with comma [E.g. 1,800]     I tried this regex method. but it is obviously not the correct regex for all the conditions. Please help in getting this fixed.  function validateText(text) {          var regex = new RegExp('^[0-9]+$');         return regex.test(text);     }

What's the cleanest, most effective way to validate decimal numbers in JavaScript?  Bonus points for:   Clarity. Solution should be clean and simple. Cross-platform.   Test cases:  01. IsNumeric('-1')      => true 02. IsNumeric('-1.5')    => true 03. IsNumeric('0')       => true 04. IsNumeric('0.42')    => true 05. IsNumeric('.42')     => true 06. IsNumeric('99,999')  => false 07. IsNumeric('0x89f')   => false 08. IsNumeric('#abcdef') => false 09. IsNumeric('1.2.3')   => false 10. IsNumeric('')        => false 11. IsNumeric('blah')    => false


The symbol \in doesn't seem to fit quite right in the subscript of the sum \sum_{i \in I} \Pr(A_i)  For some reason the set-membership symbol seems to be going below the I and it looks weird:  Is there any way I can get the \in symbol to look better here? Or is there something I can do to the I to make it align properly?

I have the following Latexcode:  \begin{equation} \mathscr{G} = A_{polygon} - \sum \limits_{C \in \Xi} A(C) \end{equation}   However, the sum index looks bad in my eyes, as the "is element of" sign is a little lower than the other two letters. It looks badly aligned.  Is there a way to fix this? I don't want to change to to smaller case letters as I have a convention for letter cases in my document.  edit: I've added a picture    I'd like the element sign to be above the red line i.e. vertically centered with C and Ξ.


Question:  Let $f:[a,b] \to \Bbb R$ be a continuously differentiable function s.t $f(a)=f(b)=0$ Prove that exists a point $c \in (a,b)$ such that $$ |f'(c)| \ge \frac 4{(b-a)^2} \int ^b_a f(x) dx $$ What we did: We tried using the integral mean value theorem and then using LaGrange theorem, but ended with a sum of 2 points $(f'(y_1) + f'(y_2))$ in $[a,b]$ that we didn't know how to connect to $|f'(c)|$.  2nd try (using Newton Leibnitz, and then LaGrange theorem twice): $|\frac 4{(b-a)^2}\int_a^b f(x)dx| = |\frac 4{(b-a)^2}(F(a)-F(b))|=  |\frac 4{(b-a)} \frac{(F(a)-F(b))}{b-a}| = |\frac 4{(b-a)} f(c_1)|= |\frac 4{(b-a)} \frac {(f(c_1)-f(a)) (c_1-a)}{c_1-a}|= |\frac {4(c_1-a)}{(b-a)} \frac {(f(c_1)-f(a))}{c_1-a}|= |\frac {4(c_1-a)}{(b-a)} f'(c)|$  our problem with this try is that we don't know how we can bound the last expression with f'(c)

Let ${\rm f}:\left[a, b\right]\to\mathbb{R}$ be twice differentiable, and suppose   $$\lim_{x\to a^{+}} \frac{{\rm f}\left(x\right) - {\rm f}\left(a\right)}{x - a} = \lim_{x\to b^{-}}\frac{{\rm f}\left(x\right) - {\rm f}\left(b\right)}{x - b} =0 $$  Show that there exists $\xi \in \left(a, b\right)$ such that $\displaystyle{% \left\vert\vphantom{\Large A}\,{\rm f}''\left(\xi\right)\right\vert \geq \frac{4\left\vert\vphantom{\Large A}% \,{\rm f}\left(a\right) - {\rm f}\left(b\right)\right\vert} {\left(b - a\right)^{2}}}$.  I don't know how to start. Any hints ?.


Just followed a machine learning example and programmed a gradient decent maximizaation to read in a 64X64X3 image vector to predict whether it was a cat or not.  The model had a parameter for every pixel*color so 12288 parameters were optimized.  It worked, a vector of parameter estimates were obtained and predictions were obtained and worked pretty well (prediction accuracy good).  How did this work, when I only had 200 samples, so p >>n. I thought we could not estimate parameters in regression when p

Regularization using methods such as Ridge, Lasso, ElasticNet is quite common for linear regression. I wanted to know the following: Are these methods applicable for logistic regression? If so, are there any differences in the way they need to be used for logistic regression? If these methods are not applicable, how does one regularize a logistic regression?


Right now, the latest version of iOS is 9.1. Mine is 8.1.2. Can I use the restore option in iTunes to install version 9.0.2 or do I have to update to 9.1 and then downgrade to 9.0.2?

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I am using a rooted fire tablet and have some apps installed on a 4GB sd card.  How can I migrate to a larger sd card? Will cloning and expanding the partition with gparted work?   I'm familiar with Linux and external storage is mounted via UUID. So I was afraid of just copy and paste, because that doesn't copy the UUID.   Duplicate, but no satisfying answer:

I just got a new 32GB SD card for my Nexus One. On the old one I have a bunch of apps installed and store the data there because the internal memory doesn't handle it.  So now I want to switch SD cards, but how do I go about doing that without causing any issues?  Do I just simply copy-paste everything, or is there another way to do it?  I'm on stock firmware on the Android and using Mac OS X Lion.


I want to do something simple, a page that has 0 buttons when loaded, then every click I add a button in a line. when I click any of these buttons it removes it.  I tried to   $(":button").click(function(){ })   but it cant seem to get the button that have been clicked, if I start the page with these buttons already in it , it works. am i missing anything ?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


$$\mathbb Z[i]/(1+2i)\simeq\mathbb Z_5$$  Help me with this.

The reasoning my book uses is as follows:   Since $(3+i)(3-i) = 10$, $10 + \langle 3+i\rangle = 0 + \langle 3+i\rangle $. Also, $i + \langle 3+i\rangle = -3 + \langle 3+i\rangle = 7 + \langle 3+i\rangle$. So, $\mathbb{Z}[i]/\langle 3+i\rangle = \{k + \langle 3+i\rangle \mid k = 0,1,\ldots ,9\}$, since $1 + \langle3+i\rangle$ has additive order $10$.   I do not understand why the additive order of $1 + \langle 3+i\rangle$ is $10$, or why the fact that $(3+i)(3-i) = 10$, shows the additive order or $1 + \langle 3+i\rangle$  is $10$. If someone could please explain this I would greatly appreciate it.   Note: I apologize for not using MathJax to write this post. I intend to learn it over the coming weekend.


I once saw a tutorial on YouTube that gave me a simple keystroke to rotate the end face of a cylinder without deforming the sides. I used it many times, but then didn't require it for a year, until now, when it would be really useful. Most answers in public forums relate to using the bisect tool instead of rotate, but that was not the solution I came across on YouTube and interrupts workflow. Does anybody know how to do this? It is extremely useful and precise, as you can simply enter [something] then [r] and then the degree, and it forms a perfect turn in the cylinder without crushing the sides.

I am trying to recreate a penne pasta. I am creating a cylinder removing the two end faces and then I solidify the mesh.  However I do not know how to extrude (or cut away) the two ends to make them pointy like in the picture of the penne below. I have tried to use bisect and mirror, but without successful results.  Any idea?


I just notice a weird behavior in the reputations:    Why did I get -2 after deleting ?

My reputation rating on SO took this hit an hour ago, and it is due to what appears to be the simultaneous deletion of multiple questions.  I am uncertain why it happened, am concerned, and would appreciate an explanation.  Going to  shows that it was removed due to moderation.  Was a script run deliberately, or were we hit with a question deletion attack; what happened?  -12     today -2  1 hour ago  removed     How to send a 2d Vector over UDP in c++ -2  1 hour ago  removed     How do I use the Eclipse debugger to debug a Java application? -2  1 hour ago  removed     PHP string error; inconsistency with local and server -2  1 hour ago  removed     Unable to start the MySQL service after a server migration -2  1 hour ago  removed     How to use Java to print a text file on a ticket printer? -2  1 hour ago  removed     How can all of the ZBrush Obj files be imported to make a complete model?


If I understand correctly MAC makes sure that the encrypted message isn't altered, so I presume signing the message with for example ed25519 would do the job too. Am I right?

Studying for CISSP these choices seemed limited:     What is the advantage of digital signatures over message authentication codes?         Digital Signature provides integrity verification while message authentication code does not   Digital Signature provides confidentiality while message authentication code does not   Digital Signatures provide authenticity while message authentication code does not   Digital Signatures works faster than message authentication codes      Using the following chart as a reference, I'm leaning towards #2, but none of the choices really fit properly…  Cryptographic primitive | Hash |    MAC    | Digital Security Goal           |      |           | signature ------------------------+------+-----------+------------- Integrity               |  Yes |    Yes    |   Yes Authentication          |  No  |    Yes    |   Yes Non-repudiation         |  No  |    No     |   Yes ------------------------+------+-----------+------------- Kind of keys            | none | symmetric | asymmetric                         |      |    keys   |    keys   Hopefully an expert here can clarify.


When Sauron is finally defeated near the end of Return of the King, why does his tower collapse? Is the collapse of the tower what triggers the ground collapse that (conveniently) consumes only his army, or is it the collapsing ground that levels the tower?

In the Peter Jackson movie, once the One Ring is thrown into the volcano in Mount Doom, why does the mountain and tower collapse, and the ground disappears everywhere where the orcs are standing but not where the humans are? Where are all the orcs running to, what do they do next?


Is squared Euclidean distance a metric? In particular does it obey triangle inequality? I think no, but cannot find a counterexample.  Edit: Does this (not obeying the triangle rule) happen only when one of the points resides on the line segment made by the two other points?

So I understand that Euclidean distance is valid for all of properties for a metric. But why doesn't the square hold the same way?


I am new started machine learning program. I find it difficult to understand gradient descent algorithm. I am going through machine learning from coursera by Andrew Ng.All of his lecturer in second week course is around gradient descent algorithm. Since I don't understand this formula , I am unable to move further on this course. Kindly help.   Linear regression to minimize the Cost Function: $$J(\theta_0, \theta_1) = \frac{1}{2m} \sum_{i=1}^m \left(h_\theta(x_i) - y_i \right)^2 $$                Hypothesis of linear model is  $$h_\theta(x) = \theta \cdot x = \theta_0 + \theta_1 x_1$$  How to read this formula? What are $h_\theta$, $x_i$ and $y_i$?  How to make a decision which data has to go with this parameter?  Why 1/2m?

I'm a bit confused with a lecture on linear regression given by Andrew Ng on Coursera about machine learning. There, he gave a cost function that minimises the sum-of-squares as:  $$ \frac{1}{2m} \sum _{i=1}^m \left(h_\theta(X^{(i)})-Y^{(i)}\right)^2 $$  I understand where the $\frac{1}{2}$ comes from. I think he did it so that when he performed derivative on the square term, the 2 in the square term would cancel with the half. But I don't understand where the $\frac{1}{m}$ come from.  Why do we need to do $\frac{1}{m}$? In the standard linear regression, we don't have it, we simply minimise the residuals. Why do we need it here?


Consider the line $a+bt$ where $a,b>0$. Let $B(t)$ be Brownian motion and let $\tau=\inf\{t>0:B(t)=a+bt\}$ be the first hitting time of that line, with the understanding that $\tau=\infty$ if the line is never hit. I want to compute the probability that Brownian motion hits that line, i.e. $P(\tau<\infty)$.  There are two steps in my work that I am not confident in.  Define the process $X(t)=B(t)-bt$ and let $T_a=\inf\{t>0:X(t)=a\}$, again with $T_a=\infty$ if $X(t)$ does not hit $a$. Then $\tau$ and $T_a$ have the same distribution (unsure about this) so we may instead calculate $P(T_a<\infty)$.  Let $\tilde{a}>0$ and define $T_{a,-\tilde{a}}=\inf\{t>0:X(t)=a \text{ or } X(t)=-\tilde{a}\}$ with $T_{a,-\tilde{a}}=\infty$ if $\{a,-\tilde{a}\}$ is never hit. The process $e^{2bX(t)}$ is a martingale and Doob's Optional Stopping theorem gives  $ \begin{align*} E(e^{2bX(T_{a,-\tilde{a}})})&=1, \\ e^{2ba}P(X(T_{a,-\tilde{a}})=a)+e^{-2b\tilde{a}}P(X(T_{a,b})=-\tilde{a})&=1. \end{align*} $  Letting $\tilde{a}\to\infty$,  $\begin{align*} e^{2ba}\lim_{\tilde{a}\to\infty}P(X(T_{a,-\tilde{a}})=a)&=1, \\ \lim_{\tilde{a}\to\infty}P(X(T_{a,-\tilde{a}})=a)&=e^{-2ba}, \\ P(T_a<\infty)&=e^{-2ba}. \end{align*} $  The last step where I say $\lim_{\tilde{a}\to\infty}P(X(T_{a,-\tilde{a}})=a)=P(T_a<\infty)$ I am also unsure about.

I came across the following question:     Let $T_{a,b}$ denote the first hitting time of the line $a + bs$ by a standard Brownian   motion, where $a > 0$ and $−\infty &lt b &lt \infty$ and let $T_a = T_{a,0}$ represent the first hitting time of the level $a$.      1) For $\theta > 0$, by using the fact that $\mathbb{E}e^{-\theta T_a}=e^{-a\sqrt{2\theta}}$, or otherwise, derive an expression for $Ee^{-\theta T_{a,b}}$, for each $b$, $−\infty &lt b &lt \infty$.       2) Hence, or otherwise, show that, for $t > 0$,    $$\mathbb{P}[T_{a,b}\leq t] = e^{-2ab}\phi\left(\frac{bt-a}{\sqrt{t}}\right)+1-\phi\left(\frac{a+bt}{\sqrt{t}}\right).$$   For the first part, I ended up, by changing measure, with the (unverified) expression  $$\mathbb{E}e^{-\theta T_{a,b}}=\exp\left(-a\left[b+\sqrt{2\left(\theta+\frac{b^2}{2}\right)}\right]\right).$$  What's the cleanest way to do the second part? It seems I could either do some kind of inverse transform on the moment generating function, or calculate the moment generating function of the given distribution. Both of these seem difficult. Am I missing something, or do I just need to persevere?  Thank you.


How do I delete all the unnecessary white shapes, only keep the ones on the logo itself.

I'm trying to create a lettering with chalkboard effect in order to print it on a chalkboard mug. However, most tutorials I found for Adobe Illustrator recommend applying a textured stroke to the text. (One of the charcoal effect brushes)  Now I would like to exclude the stroke (with texture) from the text itself. However, I can't really figure out how to do that without throwing away the charcoal texture as well.  Here's an example: The red part should be excluded from the text. Using a certain color is not an option since we don't know the exact background color and we're only allowed to use 2 colors.    Thank you!


I am using a formula where I have to use $\boldsumbol l$. However on the slide, it looks like the letter capital I. How can I have a nice curvy version to denote vector l?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


The sentences seems a bit wrong but when you replace cat with something else it sounds right:  I like A (Do you like A or B?). I like apples (Do you like apples or oranges?).  but...  I like cat. (Do you like cat or dog?)  What rule applies to these sentences?

Why do we say 'I like dogs'? Why can't we say 'I like dog' if we are referring to a particular dog? Most people use 'I like dogs'. Which is correct and why?


The character is the R in this picture:    I was thinking mathcal or fraktur, but it doesn't seem to be either of them. I tried the Detexify tool and What The Font, but couldn't find anything suitable.


(//.[com]{3,3})  After trying the code it see both :. com & moc Please is there way to make it see only com

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Whenever I try to mount flash drives or hardrives I get the following message:     Error mounting /dev/sdb1 at /media/tony/0457-C92C: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdb1" "/media/tony/0457-C92C"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'   Screenshot:   What can I do to solve this?

When trying to mount an exfat filesystem, I get the following error:  Error mounting /dev/sda6 at /media/gkp/Backup: Command-line  `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda6" "/media/gkp/Backup"'  exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'   Exfat is used on some USB sticks and camera sd cards. What can I do to mount this type of filesystem?


I'm trying to configure MySQL 5.1 on CentOS 6.6 in such a way that users will not be able to see databases to which they do not have any privileges. If they execute the command [SHOW DATABASES] it should only return a list of databases to which they have access privileges (as per the [db] table in the [mysql] privileges database). Any other database should not appear in the list.  I have tried the grant/revoke privileges commands in MySQL, but with no luck. I also tried using [skip-show-database] in my.cnf, but it causes an error (no list at all is displayed) unless [Show_db_priv] is enabled for the user.


The comment with the Flagged Posts that seems to be new as of today states there are posts with flags awaiting my attention but the counter shows zero and when I go into flagged posts there is nothing waiting for me.

It looks as if the 10k-tools flagged post list is b0rken.  Next to the review link in the toolbar there is a flag counter showing there are 10 flags to be reviewed:    Clicking on that flag counter leads to an empty page:        The moment I visit that page (through clicking on the flags counter, or by going to the review queue first then clicking on Tools, selecting the flags tab if not already selected), the flags counter disappears from the toolbar:    but after a while (half an hour, an hour?) the flag count re-appears in the toolbar.  Either the counter is wrong (presumably taken from a Redis cache somewhere) or the 10k flag review page is falling over every time someone tries to load it.  This at first appeared to happen only on Meta, on Stack Overflow the flags page has plenty to review. However, there are now  on Stack Overflow.


Is there a good way to check if a file locked other than attempting to open in as a text reader and looking for an exception?  I guess I could do this:  try {     stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.None); } catch (IOException) {     .... }   Is there a better way?

Is there any way to check whether a file is locked without using a try/catch block?    Right now, the only way I know of is to just open the file and catch any System.IO.IOException.


There are some Windows C functions that do not work on Mac — e.g. getch().  If I run them in a Windows VM will they work? Or is there a way to get them to work on OS X?

I am using getch() and my app crashes instantly. Including when doing:  int main() {     getch(); }   I can't find the link but supposedly the problem is that it needs to turn off buffering or something strange along those lines, and I still want cout to work along with cross platform code.  I was told to use std::cin.get(), but I'd like the app to quit when a key is pressed, not when the user typed in a letter or number then press enter to quit.  Is there any function for this? The code must work under Mac (my os) and Windows.    Linking/compiling is not an ; I include <curses.h> and link with -lcurses in XCode, while Windows uses <conio.h>.


for a homework assignment I need to create two equivalent vectors, x1 and x2, using two different methods in Matlab. This should be pretty straight forward however I am getting an error I do not understand.  x1 = linspace(2,14,61); x2 = 2:.2:14;   These should create equivalent vectors correct? However, the 8th element of each is supposedly "different".  x1(8)     ans =      3.4000 x2(8)     ans =       3.4000  x1(8) == x2(8)     ans =          0   Can someone explain to me why this is? All indexes not a multiple of 8 do not exhibit this behavior. Only the 8th, 16th, etc.

I am writing a program where I need to delete duplicate points stored in a matrix. The problem is that when it comes to check whether those points are in the matrix, MATLAB can't recognize them in the matrix although they exist.  In the following code, intersections function gets the intersection points:  [points(:,1), points(:,2)] = intersections(...     obj.modifiedVGVertices(1,:), obj.modifiedVGVertices(2,:), ...     [vertex1(1) vertex2(1)], [vertex1(2) vertex2(2)]);   The result:  >> points points =    12.0000   15.0000    33.0000   24.0000    33.0000   24.0000  >> vertex1 vertex1 =     12     15  >> vertex2     vertex2 =     33     24   Two points (vertex1 and vertex2) should be eliminated from the result. It should be done by the below commands:  points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :);   After doing that, we have this unexpected outcome:  >> points points =    33.0000   24.0000   The outcome should be an empty matrix. As you can see, the first (or second?) pair of [33.0000 24.0000] has been eliminated, but not the second one.  Then I checked these two expressions:  >> points(1) ~= vertex2(1) ans =      0 >> points(2) ~= vertex2(2) ans =      1   % <-- It means 24.0000 is not equal to 24.0000?   What is the problem?    More surprisingly, I made a new script that has only these commands:  points = [12.0000   15.0000           33.0000   24.0000           33.0000   24.0000];  vertex1 = [12 ;  15]; vertex2 = [33 ;  24];  points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :);   The result as expected:  >> points points =      Empty matrix: 0-by-2


I earned 6 upvotes for  question's answer, but, 3 * 10 was added to my reputation. I'm attaching the reputation tab screenshot, you can check in the question votes and reputation given. Under the answer tab, it show 6 votes given for the answer, and, under the reputation tab, only 30 was given. What's the issue?

I've found some questions and those two badges "Epic" and "Legendary" regarding the "daily reputation cap". What is it and how can I hit it?


I am desperately trying to solve the following problem, and would really appreciate help!  Suppose $R$ and $Q$ are two quantum systems with the same Hilbert space $\mathcal{H}$ with $\dim(\mathcal{H})=N$. Let $|i_R\rangle$ and $|i_Q\rangle$ be orthonormal basis sets for $R$ and $Q$. Let $A$ be an operator on $R$ and $B$ an operator on $Q$. Define $|m\rangle := \sum_{i=1}^N |i_R\rangle\otimes |i_Q\rangle$. Show that $$ tr(A^\dagger B)=\langle m|A\otimes B| m\rangle $$  where the multiplication on the left hand side is of matrices, and it is understood that the matrix elements of $A$ are taken with respect to the basis $|i_R\rangle$ and those for $B$ with respect to the basis $|i_Q\rangle$.  What I have is the following:  LHS: $$ tr(A^\dagger B)=\sum_{n=1}^N \langle n_Q|\left( \sum_{i,j,k=1}^N a^*_{ji}b_{jk} |i_Q\rangle \langle k_R| \right)|n_R\rangle $$  Since $Q$ and $R$ are over the same Hilbert space, we can disregard the fact that one set of basis vectors is in system $Q$ and the other one in system $R$.  This yields $$ tr(A^\dagger B)=\sum_{i,j=1}^N a^*_{ji} b_{ji} $$  RHS: $$ \begin{align*} \langle m'|(A\otimes B)|m\rangle &= \sum_{e,f=1}^N \Bigg( \langle e_R| \left( \sum_{k,l=1}^N a_{kl} |k_R\rangle \langle l_R\right) |f_R\rangle \cdot \langle e_Q|\left(\sum_{i,j=1}^N b_{ij}|i_Q\rangle\langle j_Q| \right)|f_Q\rangle\Bigg)\\ &=\sum_{e,f,k,l,i,j=1}^N a_{kl} b_{ij}\langle e_R |k_R \rangle \langle l_R|f_R \rangle \langle e_Q|i_Q \rangle\langle j_Q|f_Q \rangle\\ &=\sum_{i,j=1}^N a_{ij} b_{ij} \end{align*} $$  As you can see, the two expressions are almost the same. Only the first number on the LHS evaluation is a complex conjugate and on the RHS it's not.   Any ideas where I went wrong?  Thanks!  P.S: Full disclosure: I posted this question on PhysicsForum.com as well.

In p228, Chapter 9 of Mark Wilde's text , in the course of proving Uhlmann's theorem for quantum fidelity, it claims $$\sum_{i,j} \langle i|^R \langle i|^A (U^R \otimes (\sqrt{\rho}\sqrt{\sigma})^A) |j\rangle^R |j\rangle^A  $$ $$=\sum_{i,j} \langle i|^R \langle i|^A (I^R \otimes (\sqrt{\rho}\sqrt{\sigma}U^T)^A) |j\rangle^R |j\rangle^A $$ which are equations (9.97) and (9.98) in the aforementioned text.  Meanwhile, in Nielsen & Chuang's text, exercise 9.16 requires to prove that $$\text{tr}(A^{\dagger} B) = \langle m | A \otimes B |m\rangle $$ for $|m\rangle = \sum_{i} |i\rangle|i\rangle $ where $\{ |i\rangle \}$ is an orthonormal basis on some Hilbert space and A and B are operators on that space.   Each thing above is crucial in proof of Uhlmann theorem in respective textbook but I have no idea why they hold. $\text{tr}(A^{\dagger} B) = \sum_{i,j} {a_{ij}}^{*}b_{ij}$ whereas   $ \langle m | A \otimes B |m\rangle = \sum_{i,j} {a_{ij}} b_{ij } $ so why they equal? Could anybody give me any hint?


Supposing I have 2 multiple-choice questions concerning:   Country students are from: ..... (choices include USA, UK, China ....) States where they are from: then if they selected USA in the first question, the options shown will be LA, Cali or somewhere in the US but not somewhere in UK  or Russia   Can we do this in Google forms?

I want to make form with different length dependent on some previous responses.   For example:   Q1: Do you like cats? Yes/No Q2 (Q1=Yes): Which kind of cat do you like most? Q2 (Q1=No): Why do you dislike cats?   Or make some questions visible only in some conditions (Yes to some previous question).  How can this be done (if it is possible) in Google Forms?


(a / b) % c = ((a % c) * (b^{-1} % c)) % c   How to calculate b^{-1}? I know it is not 1/b. Is there more than one way to calculate this?

For example: $$7x \equiv 1 \pmod{31} $$ In this example, the modular inverse of $7$ with respect to $31$ is $9$. How can we find out that $9$? What are the steps that I need to do? Update If I have a general modulo equation: $$5x + 1 \equiv 2 \pmod{6}$$ What is the fastest way to solve it? My initial thought was: $$5x + 1 \equiv 2 \pmod{6}$$ $$\Leftrightarrow 5x + 1 - 1\equiv 2 - 1 \pmod{6}$$ $$\Leftrightarrow 5x \equiv 1 \pmod{6}$$ Then solve for the inverse of $5$ modulo 6. Is it a right approach? Thanks.


Can I use this script in an alias? MOV="$*" FILENAME=$(basename "${MOV// /_}" | sed 's/\(.*\)-.*/\1/').mp3 ffmpeg -i "${MOV}" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 "${FILENAME}"

I made an alias for youtube-dl  with some options  like that  yd="youtube-dl -cit -f 18"   so I can download it like   yd URL   I want to modify it to show only the two lines from the output using   grep -e "Downloading video #" -e ETA  I can make it in two aliases using the |   but is there a way to make it one alias


Im in need of help. New learner to linux, and for school, they want me to create a log file of all the commands I executed for a project. I can't figure it out at all. Please help!

How do I keep logs of all the work done via terminal? For example, I want a record of all the work done on database via terminal.


In the American drama, Suits, is it necessary for Mike to get a law degree to practise law? Isn't passing the Bar exam enough?  If he has to get a law degree to practise law, could he actually apply for (and even pass) the Bar exam without a degree?  Are American law schools graduate schools? What do people have to study for their bachelor degrees in universities in order to apply for law schools in the future?

The USA television series Suits revolves around Mike Ross practicing law without a degree and about trying to keep that secret.  Mike Ross is clearly capable of being a lawyer.  He passed the bar exam (albeit probably not under his own name).  Is there an in-universe explanation for why he doesn't just quietly get a law degree from somewhere (possibly far away from the show's setting of New York)? (And some states don't even require a law degree; passing the bar is sufficient.) He'd still have to carry around a secret that he didn't actually graduate from Harvard Law, but that's far better than practicing law illegally.  And even though he's already been practicing law without a license, if he became a real lawyer, then only his past cases would be tainted (and possibly need to be revisited) and not all of his future ones.  (And obviously the out-of-universe explanation is that it's the entire premise to the show, but I'm curious if the writers ever tried to explain this.)


I am trying to add a background image to a Jpanel. Below is the code I'm using      private void createUIComponents() {         JPanel panel1 = new BgPanel();     }      class BgPanel extends JPanel {         Image bg = new ImageIcon("image.png").getImage();         @Override         public void paintComponent(Graphics g) {             g.drawImage(bg, 0, 0, getWidth(), getHeight(), this);         } }   I am using IntelliJ so most of the GUI code is hidden. Shouldn't the custom created JPanel be a BgPanel and therefore display the image? Where have I gone wrong?  I am getting the following when trying to compile:  Exception in thread "main" java.lang.NullPointerException     at testGUI.$$$setupUI$$$(testGUI.java)     at testGUI.<init>(testGUI.java:4)     at testGUI.main(testGUI.java:11)   Full Code:  import javax.swing.*; import java.awt.*;  public class testGUI {     private JButton button1;     private JPanel panel1;      public static void main(String[] args) {         JFrame frame = new JFrame("testGUI");         frame.setContentPane(new testGUI().panel1);         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         frame.pack();         frame.setVisible(true);     }      private void createUIComponents() {         JPanel panel1 = new BgPanel();     }      class BgPanel extends JPanel {         Image bg = new ImageIcon("imagelink.png").getImage();          @Override         public void paintComponent(Graphics g) {             g.drawImage(bg, 0, 0, getWidth(), getHeight(), this);         }     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I know strength is a noun. So in some sentences article is used and in some sentences, an article is not used before Strength. Example I was impressed by his strength. She's doing exercises to build up the strength in her legs.    I would appreciate if anybody can she some light on it?  Parry

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


I currently have an if statement like this:  if (x==a||x==b||x==c||x==d||x==e) {    alert('Hello World!') };   How can I instead test if x equals any value in an array such as [a,b,c,d,e]?  Thank you!

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


everybody.  I need to pass from this   to this   using this picture   This is my WME  \documentclass{book} \usepackage[spanish,english]{babel} \usepackage[toc,page]{appendix} \usepackage{tocloft} \usepackage{fontspec}    \setmainfont{georgia.TTF}[%Fuente para el cuerpo Path=/usr/share/fonts/Win10/, BoldItalicFont=georgiaz.TTF, BoldFont      =georgiab.TTF, ItalicFont    =georgiai.TTF]  \newfontfamily\myfont{calibri.TTF}[%Fuente para secciones Path=/usr/share/fonts/Win10/, BoldItalicFont=calibriz.TTF, BoldFont      =calibrib.TTF, ItalicFont    =calibrii.TTF]   \addto{\captionsspanish}{\renewcommand{\contentsname}{\color{myGris3} Contenido}} \renewcommand{\cfttoctitlefont}{\Huge\bfseries\myfont}%Fuente para el título de la ToC \renewcommand{\cftchapfont}{\Large\myfont}%Fuente para los capítulos \renewcommand{\cftsecfont}{\myfont}%Fuente para las secciones \renewcommand{\cftsubsecfont}{\myfont}%Fuente para las subsecciones  \begin{document} \tableofcontents  \chapter{First Chapter} \chapter{Second Chapter} \appendix \chapter{Appendix}  \end{document}   How could I do it?  Thanks for your help.  EDIT:  This is my MWE without TTF fonts.  \documentclass{book} \usepackage[spanish,english]{babel} \usepackage[toc,page]{appendix} \usepackage{tocloft}  \addto{\captionsspanish}{\renewcommand{\contentsname}{\color{myGris3} Contenido}} \renewcommand{\cfttoctitlefont}{\Huge\bfseries\myfont}%Fuente para el título de la ToC \renewcommand{\cftchapfont}{\Large\myfont}%Fuente para los capítulos \renewcommand{\cftsecfont}{\myfont}%Fuente para las secciones \renewcommand{\cftsubsecfont}{\myfont}%Fuente para las subsecciones  \begin{document} \tableofcontents  \chapter{First Chapter} \chapter{Second Chapter} \appendix \chapter{Appendix}  \end{document}

everybody.  I'm finishing my book and I have to solve one las problem: I need to custom the titles of Table of Contents, Introduction (is a \chapter* file), Bibliography and Index in order that they look like the rest of the chapters.  This is a MWE of how I could custom the titles (headers) of the chapters but it doesn't work with the ToC, bibliography, index and chapters marked with asterisk.  \documentclass[reqno]{book} \usepackage[spanish]{babel} \usepackage{fontspec} \usepackage[paperheight=254.81mm,paperwidth=184.81mm,text= {130mm,186mm},centering]{geometry} \usepackage[explicit]{titlesec} \usepackage[svgnames]{xcolor} \usepackage[titletoc]{appendix} \usepackage{titletoc} \usepackage{tocloft}  \newcommand*{\chapnumfont}{% \fontsize{3.2cm}{5cm}% \selectfont% } \newcommand*{\chaptitlefont}{% \fontsize{22}{26}% \selectfont% }  \titleformat{\chapter}[block] {\normalfont\huge\bfseries} {\hspace{-2cm}\parbox{0ex}{\includegraphics[width=1.2\textwidth,height=2 \baselineskip]{RecuadroChap_Original.pdf}}}  {0pt} {\begin{minipage}{11cm}\hspace{2cm}\filleft\chaptitlefont #1\end{minipage} \begin{minipage}{4cm} \filleft\chapnumfont\thechapter}[\end{minipage}]  \renewcommand{\cftchappresnum}{\bfseries Capítulo } \renewcommand{\cftchapaftersnum}{} \renewcommand{\cftchapaftersnumb}{\vskip0.5ex} \renewcommand{\cftchapnumwidth}{0mm}  \begin{document} \tableofcontents \chapter*{Introducción} \chapter{Álgebra de matrices} \begin{appendices} \chapter{Uso de los comandos en MATLAB y MuPAD} \end{appendices} \bibliography{Referencias} \begin{thebibliography}{0} \end{thebibliography} \end{document}   A few notes for providing more and important information: 1.  If I set the Introduction as a \chapter chapter, it shows its title like I need, but it doesn't when I set it as a \chapter* chapter. 2.  If I set the Introduction as a \chapter chapter but I position it into the \frontmatter part (if I use front, main and back matter parts), the title is not shown like I need, again! 3.  I guess that the problem rises because the \titleformat command is not defined for types of chapters like the ToC, bibliography, index and the "*" sections, parts,...  So, I was thinking of a way to set those parts like normal chapters (as \chapter) but I dont know if it is possible.  If it's not, how could I custom those title parts like I need?  This image is a sample (resume) of what I get with the code shown in my MWE   And this is the image of the gray frame for titles:   I need to get the titles of the Toc, Bibliogrphy, Introduction and Index in the same way that I got the titles of Chapter 1 and the Appendix A. How can I do it? By the way: why the bibliography counter is set on 1?  Thanks for your help.


Let $X$ be a continuous random variable defined on the interval $[0,1]$ with density function $f_X(u)=c(1−u^2)$ for some suitable constant $c$.   Find: (a) the value of $c$, (b) (i) the expectation and (ii) the variance of $X$. Also find (c) the density function of the random variable $Y = X^{2}$.   Found $c=\frac{3}{2}$,  $E(X)=\frac{1}{4}$ &   $E(X^2)=\frac{1}{8}$, so:   $Var(X)=\frac{1}{8}-(\frac{1}{4})^2=\frac{1}{16}$  Have I done parts (a) & (b) correctly? If so how do I go about finding the PDF for Y and if not same question but also where did I go wrong?  Thank you.

Let $X$ be a continuous random variable defined on the interval $[0,1]$ with density function $f_X(u)=c(1−u^2)$ for some suitable constant $c$.   Find: (a) the value of $c$, (b) (i) the expectation and (ii) the variance of $X$. Also find (c) the density function of the random variable $Y = X^{2}$.   Now I've already attempted (a) by integrating $(1-u^{2})$ between $0$ and $1$ (like $\pi$ in the Cauchy density function) and got $c=\frac{2}{3}$ and also for (b) (i) I integrated $uc(1-u^{2})$ between $0$ and $1$ which came out to be $c/4 = 1/6$.  Have I done these first $2$ parts correctly? If so how do I go about doing the rest and if not same question but also where did I go wrong?


I’m wondering what the most efficient mine setup in 1.14.4? By this, I do not mean strip mining techniques and so forth, but actually how long you should make a strip mine before you move on to the next one, how big you should make the mining area, etc. More of a structure setup recommendation rather than the overall mining technique.

When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approach to mining.  What is the optimal mining strategy that yields the most rare minerals while minimizing blocks removed and time spent digging and traveling?  Edit: The existing answers are great for mining, but no one has addressed travel time to and from the mine which is usually ~60 blocks downward and incredibly tedious. Solutions?


A friend of mine tried to download a file, but it was cut off mid-download and she got stuck with a .rar file that has 0 bytes, but in the details it says 8MB. Pressing Delete doesn't do anything. Cmd can't find the file.      It says 8MB in the Details, but this won't let me post more than 2 images.

When I try to delete the file, using the GUI it says      The action cannot be completed because the file is open in another   program   And using the del /f /q command line it says     Access is denied   I have tried unlocking the file with Unlocker, as well as trying to locate which process is using the file with the Resource Monitor or the Process Explorer, but no locking handle was found in either case.  I am able to rename or move the file, but not to delete it or change its content.


After a problem on my MacBook Pro (15' 2016), Apple replaced the motherboard with Sierra installed and I can't upgrade back to BigSur. In the App Store, no system upgrade is suggested. If I click on "macOS Big Sur" link from apps.apple.com, the App Store opens with this message:  Can't connect to the App Store  The computer is connected to the internet and the time is correctly set. How can I fix this issue ? Is there any command line to download macOS Big Sur ?

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


What is the possessive form of "Ralph's", "Ralph's" being an American store chain?

If the cricket ground Lord's is a possessive, what if you want to describe something belonging to Lord's? Would you say:     I was very impressed by Lord's's customer services.   It doesn't look right, so what is the correct way of writing it?


I am not native so i dont understand if this sentence means i should have send some documents  for somebody or somebody wants to send me some documents?!  (would you like for me to send the lists of  documents for a student and visitors).

Is there any difference between "To like for somebody/something to be something" vs. "to like somebody/something to be something"?   In the following case there seems to be a difference, because the former seems to suggest that one would like so for the sake of the other, and latter for ones own.          "I would like for you to be happy" vs. "I would like you to be happy"  Here, the above distinction makes no sense, since the weather is inanimate. Is the former a valid thing to say at all?     "I would like for the weather to be nice" vs. "I would like the weather to be nice"


I'm working with QGIS an I have a polygon and a line layer. The polygon layer defines a certain area and each polygon has its own specific ID (something like "ARC1" oder "GZT2"). I was wondering if its possible to join this ID to the line layer while creating new features within a polygon. But it doesn't stop here. While creating a line, the type of the line is chosen via dropdown menu (something like "OG" or "HSBV"). My final goal is to connect this information with the ID from the polygon layer. A final addition is a sequential number. In the end the ID for a line should look like this: "ARC1_OG_001". I think I could work my way around once the information from the polygon layer is contained in the line layer. My idea is using something like "concat" but I have no idea how to do this spatial join automatically. It would be nice to have a user friendly ID generation for those lines.

I am digitising line-features based on WGS-84 point-coordinates from a PDF which cannot be copied from.  The final line layer should contain lines which each connect two points and have the following attributes:   Name of start point - name of end point value in [ft] value in [m] remark (same for all features) date of creation   Currently I have a csv-based point layer which simply contains the name and coordinates of each point.    Creating the point layer is no problem, but creating the lines is a bit of a hassle. Either I manually create a .csv containing all existing connections between points like the following table and run connect by lines:    Or I digitise the lines manually but fill in the values (except for the value in [ft]) automatically.    Personally I would prefer option 2, since option 1 involves more manual work and the process has to be repeated regularly (and I figure I could transfer the solution to other tasks), but I can't get the expression right which should fill in the name of the line. All other values are created flawlessly (though they are not taken from another layer based on geometry).  I added the WKT of each point to the point-layer. Currently I am running the following, which returns NULL, despite it seems to be correct to me:  attribute(get_feature('point-layer','geom',geom_to_wkt(start_point($geometry))),'Waypoint')||' - '||attribute(get_feature('point-layer','geom',geom_to_wkt(end_point($geometry))),'Waypoint')   Any ideas where I went wrong?


I am building an IOS and Android version and in my IOS, the date is formatted this way "June 23, 2017 at 8:58 AM".  In Android I am getting the date in numbers and then I assign them like this:   public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {   date_time = dayOfMonth + "-" + (monthOfYear + 1) + "-" + year;  timePicker(); }   and here is the timePicker() method:  private void timePicker(){         // Get Current Time         final Calendar c = Calendar.getInstance();         mHour = c.get(Calendar.HOUR_OF_DAY);         mMinute = c.get(Calendar.MINUTE);          // Launch Time Picker Dialog         TimePickerDialog timePickerDialog = new TimePickerDialog(this,                 new TimePickerDialog.OnTimeSetListener() {                      @Override                     public void onTimeSet(TimePicker view, int hourOfDay, int minute) {                          mHour = hourOfDay;                         mMinute = minute;                          et_show_date_time.setText(date_time+" "+hourOfDay + ":" + minute);                     }                 }, mHour, mMinute, false);         timePickerDialog.show();     }   which result to something like this "27-6-2017 16:55"  How can I formatted similar to the IOS version?

How to format correctly according to the device configuration date and time when having a year, month, day, hour and minute?


I had a question regarding building credit. I have no past credit history, and just opened a secured card with a $200 credit to help me build mine (yes, it reports to all 3 bureaus). I currently have no use for credit, but would like to build it in case I want to buy a house somewhere down the road.   I've read that I should be keeping my debt below 25-30% of my credit, which is no problem. I am curious, however, if it makes a difference how much debt I keep, below that threshold (as long as I'm paying on time obviously). Is there any difference between my spending $0.10 a month vs closer to that $50-60? Should I spend nothing, to keep my balance at a constant 0? I'm curious what the absolute best practice I can use on this card to build credit quickly is, as well as how quickly at that rate I should expect my credit to rise from no history.  Advice appreciated!

So everyone is aware of the general rule that you should keep credit card utilization below 30% of your credit limit. It's also a good idea to keep this utilization above 0%.   It's very easy to stay below 30% if you just always keep your balance below 30%. Whenever you get close to that 30% ceiling, you pay it down, or pay it in full.  What isn't so easy is making sure you stay above 0% without carrying a balance. A lot of websites say "You don't have to carry a balance. You should pay it in full before the due date every month. Just using your card is enough to show activity". That sounds great and all, but it doesn't specifically address how that ensures you don't have 0% utilization if you zero out your balance every month.  For example, I have had a Wells Fargo credit card for about a year now. I have used the max available credit every single month, and then paid it off in full at the end of the month. I just signed up on Mint.com and with that I got a free credit report. My credit card utilization on the report was 0% even though I maxed out my limit every month.  Ideally, I'd like my utilization to be 20-25%. Is it even possible to attempt to achieve this, or at least get it above 0%?   It seems like you need to know when your specific issuer reports your information to each of the 3 credit bureaus, or more importantly, at what point during the month they are taking this "snapshot" of your balance that gets reported to each bureau.  If anyone could have an answer to this, specifically for Capital One, that would be great. I'm switching to their quicksilver card.  Basically, I want to ensure that I maintain a utilization rate greater than 0%, while paying my balance in full every month.


I get a (hex) value from an API, which is combined with some OR operations:     The ReferenceStatus is used to report the references stored for one   person in the ID Module archive. If more than one reference is   available, the approbriate values are combined with an OR operation.   This is the table with the different (non-combined) values:  Value  Remark 0x0001 Left little finger 0x0002 Left ring finger 0x0004 Left middle finger 0x0008 Left index finger 0x0010 Left thumb 0x0020 Right thumb 0x0040 Right index finger 0x0080 Right middle finger 0x0100 Right ring finger 0x0200 Right little finger 0x03FF All fingers   How can I split up the value from the API (let's say it's 0x01C8) into it the different codes (0x0008, 0x0040, 0x0080, 0x0100)? (I never worked with bitwise operations before)

How do you set, clear, and toggle a bit?


Recently I answered a  on Stack Overflow regarding a problem with a MySQL connection.     Initially it was very obvious that the question was about a problem with a connection, but after some helpful comments and my answer, the user edited the question according to our suggestion and presented a whole new problem regarding a MySQL query in the same code.     At this point my answer appeared to be completely off-topic, so I have flagged the question for moderators intervention. What else can I do in such scenarios?  Note: A similar question has been answered  but it didn't suggested actions against such questions.

I'm not sure if there's already an existing term for this, so I'm inventing my own. (tl;dr: I call them "chameleon questions" because they change every time you submit or edit an answer.  If you're already intimately familiar with the phenomenon, please skip past the first set of bullet points to where I ask for recommendations.)  I think many of us have experienced this on occasion:  You open up a narrow-looking question, usually dealing with some specific error message.  The question probably contains a snippet of sloppy but not quite awful code; code indicating that the author, typically a new/low-rep user, possibly a , doesn't really know what they're doing.  I'm not trying to be condescending here, they're probably very intelligent and hardworking, but in this specific case, they're clearly in way over their head.  However, as a question, it's not really too bad.  The goal and problem are both clearly stated.  The code is formatted (sort of).  Mort was polite and checked their spelling.  The question looks answerable, although from a rep perspective* it's an obvious dead-end, it's had maybe 3 views in the past 30 minutes.  So you decide, you know what, this person took the time to write up the question properly, they deserve an answer, put on your good citizen hat and throw them a bone.  You slog through the ugly code, find the offending line, direct their attention to it and explain why it's wrong and how it needs to be fixed.  Later, they leave a comment saying that yes, that was indeed the problem and your answer helped them fix it (great!).  Oh, but, now there's another problem (uh-oh...). Something else is broken.  After letting out a long sigh, you read the comment and/or edited question, roll up your sleeves, and write up Take 2, hoping that's the end of it.  And of course it's not the end.  Now maybe the error is gone, but it's not doing what it's supposed to.  If you're anything like me, your patience is now starting to wear thin. It's lousy code and you didn't volunteer to help them rewrite their whole app.  And of course, the question still only has 12 views, and nobody has upvoted either the question or your answer, including the person you're helping, so this is turning out to be a genuinely thankless task in all respects.  Welcome to "Family Tech Support", Web 2.0 Edition.   * Which is of course just an arbitrary number that none of us care about. Not really, anyway. Not very much, at least.  So, here's where I get to my question.  At this point, do you:  Leave a comment, stating as politely as possible that you've done your best to help them answer the original question they asked, and if they have a new problem then they should start a new question?  (I did this once, and actually ended up with an accept, but I felt kind of guilty afterwards, I don't think anybody answered their 2nd question).  Bite the bullet and edit your answer a 3rd, 4th, 5th time, however many times it takes to resolve their issue, knowing full well that they may not even remember to accept the answer once you're done? (I may work for free on SO, but that doesn't mean my time is worthless.)  Just abandon the question, hoping that it will force Mort to start thinking for himself?  Something else?   I've tried all three of the above and none of them ever quite feel right. I do want to help, but at the same time there are a lot more "lucrative" questions I could be answering. And I don't mind spending a lot of time on an answer either, if the question is interesting or important to me, but debugging is dull work. I'd prefer not to reference specific questions here; I'm pretty sure that this is a shared experience, and my objective isn't to point fingers at "misbehaving" members.  I'm more looking for some practical advice on how to dig myself out of these pits of despair. Anybody have any other ideas?


Prove that $2222^{5555} + 5555^{2222}=0 \pmod{7}$.   I'm not getting how to start away with this problem. I know that modular arithmetic should be used. Please give me some hints on how to solve this question. I don't expect complete answers as I would like to try it out myself.

What will be the ones digit of the remainder in: $$\frac{\left|5555^{2222} + 2222^{5555}\right|} {7}$$


My partner has an Indian passport with a Tier 2 general visa and a multi-entry Schengen visa. All websites I've looked at state he doesn't require a visa. We've had verbal confirmation from the Mexican consulate in India and written confirmation from a US consulate that he does not require one. However, the London consulate said they advise one.   We don't have time to get one, is there anything we should take to support entry to the country? Or will he not even be allowed on the flight?

I'm an Indian passport holder currently resident in the UK under a Tier 2 (General) visa and planning on going to Mexico on a holiday. So I was looking into the rules on the Mexican embassy in the UK and :     According to the new regulations who entered into effect on 18th, May   2016 (article 26 of the Guidelines and Requirements for Migratory   Services) regarding foreign nationals visiting Mexico, holders of a   valid UK visa, regardless their nationality, are not required to apply   for a Mexican visa as a tourist, business (Non-Lucrative Activities)   or transit visitors for a stay of up to 6 months. This regulation does   not apply to British Travel Document holders.   However, :     PERMANENT RESIDENT IN THE UK (ILR / ILE / PERMANENT RESIDENTS)        According to Mexican regulations which came into force in June 2009,   Permanent residents in the United Kingdom wishing to travel to Mexico   do not require a visa to enter the country as tourists or business   visitors for up to 180 days and as visitors in transit for up to 30   days, regardless their nationality.   So which one is correct? Are Tier 2 holders with an Indian passport allowed visa-free / visa on-arrival entry to Mexico?


If I have the timeline right from A New Hope:   Leia's father sends her on a mission to travel to Tatooine to enlist the help of an old Jedi Knight, General Kenobi. The Rebellion needs his help! She is to bring Kenobi back to Alderaan, where her father awaits. On the way to Tatooine, Leia unexpectedly gets her hands on the detailed data plans of the Empire's new super-weapon, the Death Star. Wow! This could really help out the Rebellion, and may even be an essential piece of information for the survival of the entire Alliance! She CONTINUES to Tatooine to go enlist the help of General Kenobi, but just before she's able to land there, her ship is attacked by Imperial forces, led by Darth Vader. In a frantic, last-ditch effort, she puts the stolen data into a droid and records a message for Kenobi, telling him to get his butt to Alderaan and to make sure this R2 unit gets there with him. "My father will know how to retreive [the plans]."   ...then that was an awfully risky (and unlikely) choice Leia made, to continue on to Tatooine to find an old army budy of her father's, who she may or may not even be able to find.  Why didn't Leia immediately return to her father on Alderaan to deliver those precious plans? Why risk so much to continue on her original mission to recruit Kenobi?

At the beginning of A New Hope, Princess Leia has just received the stolen plans for the Death Star. Yet rather than take these plans directly to the Rebel base on Yavin IV, she first stops off to pick up Obi-Wan Kenobi. From dialogue in the movie we also learn that, after picking-up Kenobi, she is supposed to go to Alderaan to meet-up with her adoptive father Bail Organa. Presumably then everybody would proceed to Yavin IV from there.  If we take into account the events of Rogue One, Bail Organa told Leia (offscreen) to go to Tatooine to get Kenobi, however this was done before Leia ended-up with the Death Star plans. You would have thought, given the change in circumstances, she would determine that it's more important to get the plans to Rebel command than stop off at Tatooine first. Especially as, at this point, she would have known about the Death Star's destruction of Jedha.  Have I missed any movie dialogue that describes or implies why Leia thought it more important to go to Tatooine, then on to Alderaan, before taking the Death Star plans to Yavin IV? Or is there anything in any of the books or supplementary material to explain it?  Of course if she had gone straight to Yavin IV with the plans then the original movie would have been very different!


I'm trying to use a host-only connection with my VirtualBox VM. My VM is set up and can ping the host (192.168.56.1) on vboxnet0.   If I disconnect the host from my local network (internet access) I can ping the VM no problem. However I would like to be able to access both the internet and the VM. This is what my ifconfig looks like:  enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 10.0.7.30  netmask 255.255.255.0  broadcast 10.0.7.255         inet6 fe80::3e97:eff:fe2b:5d3e  prefixlen 64  scopeid 0x20<link>         ether 3c:97:0e:2b:5d:3e  txqueuelen 1000  (Ethernet)         RX packets 1468619  bytes 1793380003 (1.6 GiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 877021  bytes 94509833 (90.1 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         device interrupt 20  memory 0xf2900000-f2920000    vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.56.1  netmask 255.255.255.0  broadcast 192.168.56.255         inet6 fe80::800:27ff:fe00:0  prefixlen 64  scopeid 0x20<link>         ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 6212  bytes 278937 (272.3 KiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   Here's the output of route:  [user@localhost] : ~ $ route Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface default         gateway         0.0.0.0         UG    100    0        0 enp0s25 default         gateway         0.0.0.0         UG    101    0        0 vboxnet0 10.0.7.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s25 10.0.7.0        0.0.0.0         255.255.255.0   U     100    0        0 enp0s25 192.168.56.0    0.0.0.0         255.255.255.0   U     100    0        0 vboxnet0   It appears to me I'm correctly configured to use both interfaces but, like I said, I can't ping the VM (192.168.56.66) while I'm connected on enp0s25.

I'm trying to use a host-only connection with my VirtualBox VM. My VM is set up and can ping the host (192.168.56.101) on vboxnet0.   If I disconnect the host from my local network (internet access) I can ping the VM no problem. However I would like to be able to access both the internet and the VM. This is what my ifconfig looks like:  enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 10.0.7.30  netmask 255.255.255.0  broadcast 10.0.7.255         inet6 fe80::3e97:eff:fe2b:5d3e  prefixlen 64  scopeid 0x20<link>         ether 3c:97:0e:2b:5d:3e  txqueuelen 1000  (Ethernet)         RX packets 1468619  bytes 1793380003 (1.6 GiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 877021  bytes 94509833 (90.1 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         device interrupt 20  memory 0xf2900000-f2920000    vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.56.101  netmask 255.255.255.0  broadcast 192.168.56.255         inet6 fe80::800:27ff:fe00:0  prefixlen 64  scopeid 0x20<link>         ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 6212  bytes 278937 (272.3 KiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   Here's the output of route:  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface default         gateway         0.0.0.0         UG    100    0        0 enp0s25 default         gateway         0.0.0.0         UG    101    0        0 vboxnet0 10.0.7.0        0.0.0.0         255.255.255.0   U     100    0        0 enp0s25 192.168.56.0    0.0.0.0         255.255.255.0   U     100    0        0 vboxnet0   It appears to me I'm correctly configured to use both interfaces but, like I said, I can't ping the VM (192.168.56.66) while I'm connected on enp0s25.


I am quite confused. I have just been refused a visit UK visa for not showing ties to my home country.  Please see attached. I just want to add that: - I have lived in the UK since January 2012, and I have exited and re-entered the UK several times while being a student. I got my bachelor's degree there and started my master.  However due to medical reasons I have stopped my master's and my Tier 4 visa has been curtailed.   I should have included my previous passport as it has the majority of my stamps in and out of the country (UK) with my first ever student visa before my resident permit was issued. I also submitted a return ticket from the UK to morocco on the date of end of my visit. The visa was curtailed I arrived in the UK this Thursday and submitted my application on Friday. I literally got back from the UK to apply for a visit visa to visit my fiancée for a while.   Thank you very much.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


Relevant question, but does not answer my question:  - This is too specific about Google Analytics   I have started getting quite active on StackOverflow recently, so I've been opening fairly many links to , but since I'd need to resize the panels regularly to see the specific code posted in the way the code was intended, I usually end up with some pretty weird configurations for the panels. Because I would prefer not having to resize the windows to a more normal setting every time, I would like to block the window_sizes cookie from jsfiddle, but when I tried googling for how to block a single cookie from a specific site, I could find nothing.  I've also tried checking the settings for both Chrome and Firefox, but neither have the option to block a specific cookie, only to block certain domains.  I'm mostly wondering on how to block this specific cookie in Chrome (which is my default browser), but I think it might also be useful for anybody else having the same problem to also include the methods for other browsers too, if that's possible.

Is it possible to block one cookie on a domain, without blocking all cookies on that domain? (I want to block the tracking cookies, without blocking the cookies that are required for functionality.) I'm using Chrome on Windows.  I'm aware of  but the answers given don't directly address the question.


i'm surprised there is so little documentation on this issue. But i'm trying to duck the audio on all the mix buses in Unity so that you can clearly hear the VO of the game.  Now it works great except that I have some reverb zones in the game and any sound that plays in these reverb zones, the actual reverb itself is NOT DUCKED.   So the VO is accompanied with a huge wall of wishy washy muddy noise.   Anyone deal with this before? How can we deal with this?


I have a very annoying problem with alignments in Adobe Illustrator: my paths can move only on pixel grid and, so, it's very hard to align them to each others:     I've read all recommendations how to fix it and everywhere I found the solution - to disable "Align to Pixel Grid" option in Transform Options or View panel, it was told in different sources.  The problem is that I cannot find that option anywhere in Illustrator at all!!!    By the recommendations, that option should be right below "Scale Strokes & Effects". But I cannot see it.  Also, I've tried to disable Snap to Point option (Edit - Preferences - Selection & Anchor Display - Snap to Point), with no effect.  I use Illustrator approximately one month, there was no such problems before - was no aligments to pixel grid.  May be somebody can tell what the problem with the pixel grid alignment and how I can resolve it?

I have inadvertently created an illustration with the align new objects to pixel grid turned on (not sure why it was on, I did not know or ever turn it on) and want to now scale the image. When I turned it off, I scale and it is still affecting the illustration.  So I copy and pasted it into a new document (Making sure that the option was turned of when I created the new document), and it is still affecting the illustration.  How can I scale this object without it being affected by this option?