I am generating pgfplot files (PGF) with Python and matplotlib.pyplot as well as the following configuration for pgf export to be used with pdfLatex compiler:  import matplotlib as mpl mpl.use("pgf") pgf_with_pdflatex = {     "pgf.texsystem": "pdflatex",     "pgf.preamble": [          r"\usepackage[utf8x]{inputenc}",          r"\usepackage[T1]{fontenc}",          #r"\usepackage{cmbright}",          ] }   Using the comon plt.plot() commands and so on into Python, I manage to generate a 20cm wide plot and then export it into a pgf file using the plt.savefig('Graphes/pompage_pCav.pgf', format = 'pgf') Pyplot command.  That pgf file seems pretty proper. I then include it into a tex file as a figure:  \begin{figure}     \begin{center}         \input{Figures/pompage_pCav.pgf}     \end{center}     \caption{test}     \label{test} \end{figure}   The page size is A4 (so 21cm wide) and here is the result:   As you can see, the figure isn't centered whether I use the center latex environment or the \centering command. How to solve this issue? Thanks.

This is  my code, but my picture is on the left!!! Can anyone share a better code? thanks a lot  \begin{figure}[H] \centering \includegraphics[width=25cm,height=25cm,keepaspectratio]{1.eps} \caption{Aerial view}\label{fig:1} \end{figure}


I've set the Supervisor Password on this Acer E3-112M notebook in order to install Fedora in UEFI Mode. Long story short, the prompt seems to accept certain symbols when setting the password but not when prompting for it, and now I'm stuck without being able to access the BIOS. I'm wondering if it's possible to dump the BIOS of one chip and then dump it into mine. I've got a friend with the exact same model of the notebook but his doesn't have the supervisor password set. Is it possible to dump the firmware ROM to a file from his laptop then dump it to mine to restore its "factory status"?  Also, I haven't found any information about how to "short-reset" this BIOS or clearing the CMOS (most Acer methods don't work in this one, the password stays) and I also haven't found much info on this model.  All help is appreciated, thanks.

I recently got an Acer Aspire E11 (E3-112m) and in order to install another OS I had to set a Supervisor password, so I used a well known password to me, the problem is that such password contains a special character ! which the password prompt won't let me input, though it let me when I had to set the password (buggy prompt I believe). Now everytime I need to change something in the BIOS I have to fail 3 times and go to  to generate a master key.  I have already tried several different methods to clear it:   Removing the CMOS battery Looking for the reset jumper (which doesn't even exist).   I also noticed there were 2 weird buttons on the front and back sides of the motherboard, I don't know what they are for but I also pressed them (while both the CMOS and the regular battery were disconnected). All of this without luck, the password just won't reset (though the RTC did).  Are there other ways to reset the Supervisor/Admin password on this model?


I am faced with this question. I tried u-substitution and integration by parts but was not successful. A hint may also suffice.  Thanks   $\int_{0}^{1} \frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}}dx$  I took out x-1 common from both the numerator and denominator only to find myself stuck further than I anticipated.   Substituting the radical as u , that is  $u=\sqrt{x^2-3x+2}$  doesn't help either as then i cannot express the numerator in terms of u

I've been given the following integral to evaluate  $$\int_0^1(3x^3 - x^2 + 2x - 4)\frac{1}{\sqrt{x^2 - 3x + 2}} dx.$$  Can I expand fractional powers?


Fairly simple question, do USB 2.0 devices charge quicker if they are plugged into a USB 3.0 port rather than a USB 2.0 one. I’m not asking about a specific device I have, I just mean in general.  I know USB 2.0 can provide 500mA and USB 3.0 up to 900mA, but is the device able to draw the extra power the USB 3.0 port can provide and charge at 900mA, or will it draw up to 500mA and then not be able to draw any more?

Will a phone(or any device for that matter) charge faster if it is plugged into a USB 3.0 port compared to a USB 2.0 port?  I know to assist charging you can turn features off(with flight mode) or even turn the phone off but if you need the USB 3.0 port for a device like a hard drive that will actually benefit from a faster connection then will the phone be slower on the USB 2 port?


$$R(t)=\int_{-\infty}^\infty\dfrac{\omega e^{i\omega t}}{(3-\omega^2)^{2}+4\omega^2}\,d\omega$$  where t is a integer and $t>0$  I used to calculate this integral by numerical integral,but it seems that using ifft in matlab is more effcient.  The ifft equation in Matlab is $$x(n)=\frac{1}{N}\sum_{k=1}^N X(k)e^{i2\pi\frac{k-1}{N}n-1}$$  where n=$1,2...,N$  I have no idea how to link the above Eq with the above-mentioned integral. Do someone have an idea?

How to calculate the following integral? $$\int_{-\infty}^\infty\dfrac{\omega^\alpha e^{i\omega t}}{(\omega_0^2-\omega^2)^{2}+4(\zeta\omega_0\omega)^2}\,d\omega$$  where $\alpha>0,t>0,\zeta>0,\omega_0>0$.  When $\alpha=0$, I can figure it out by Residue theorem. However, I do not have any idea how to calculate this integral when $\alpha>0$. Does this integral have an analytic solution?


i get "Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference" whenever i click on the button. help please  protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          edt = (EditText) findViewById(R.id.edit);         b1 = (Button) findViewById(R.id.button);          b1.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent i = new Intent(MainActivity.this, Main2Activity.class);                 startActivity(i);             }         })     }      String tt(){         return (edt.getText()+"");     }   public class Main2Activity extends AppCompatActivity {     MainActivity ob = new MainActivity();     private WebView mywebview;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main2);         mywebview=(WebView)findViewById(R.id.abc);         WebSettings webSettings=mywebview.getSettings();         webSettings.setJavaScriptEnabled(true);         mywebview.loadUrl(ob.tt());         mywebview.setWebViewClient(new WebViewClient());     } }

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?


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x344916fc     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048  1945391103   972694528   83  Linux /dev/sda2      1945393150  1953523711     4065281    5  Extended Partition 2 does not start on physical sector boundary. /dev/sda5      1945393152  1953523711     4065280   82  Linux swap / Solaris shivam@shivam-Inspiron-5521:~$

Till now I was windows user. From now on I want to use only Linux.   I have 500Gb HDD. How do I partition it properly? I read that there is no right or wrong way, but still, I am confused. I did something and I have primary partition mounted on / (160Gb) which I believe is a OS and 350Gb extended partition of which I have 4Gb of swap and 346Gb mounted on /home.  I got used to C:\ and D:\ partitioning, but I don't see file system in that way. I am lost. Where is what? How can I make C:\ partition for OS and D:\ for apps, movies, music, photos. Or what I want is Windows way and I have to get used to Linux way?


I'm lost on whether I should use "a" or "an" in the part of the sentence: "an (among other things) schizophrenic". How does the part in the brackets affect the rest here?

When a/an precedes a parenthetical aside (sometimes seen in informal/conversational writing), should the vowel rule depend on the first word in parentheses, or the next word in the "regular" flow of the sentence?     I need a (memorable) idiom (preceding an m word; use a)   or     I need an (memorable) idiom (preceding an i word; use an)


I am SalesForce beginner and trying to make an web application to manage projects.  I don't know where to start, what materials to make it.

Where should I start learning? There are various topics to learn like Objects, Classes, Apex, Visualforce, SOSL, SOQL, Triggers, etc. There are so many options out there to start learning. I couldn't decide what topic to learn first, and then step by step get proficiency in all aspects of Saleforce.


Let $A, B$ and $C$ be the angles of an acute triangle. Show that: $\sin A+\sin B +\sin C > 2$. I started from considering $$\begin{align}\sin A+\sin B+\sin (180^o-A-B) &= \sin A+\sin B+\sin(A+B)  \\&=\sin A+\sin B+\sin A\cos B + \cos A\sin B  \\&=\sin A(1+\cos B)+\sin B(1+\cos A).\end{align}$$ How to proceed?

Let $\triangle ABC$ be a triangle such that each angle is less than $ 90^\circ $.   I want to prove that $\sin A + \sin B + \sin C > 2$.   Here is what I have done:  Since $A+B+C=180^{\circ}$ and $0 < A,B,C < 90^\circ$, at least two of $A,B,C$ are in the range 45 < x < 90, without loss of generality, let these angles be $A$ and $B$.  $\sin A + \sin B + \sin C = \sin A + \sin B + \sin(180^\circ-A-B) = \sin A + \sin B + \sin(A+B)$  Since $45^\circ < A,B < 90^\circ$ it follows that $2^{0.5} < \sin A + \sin B < 2.$ Am I near the answer?


We have an Availability Group configured. Total number of nodes in the cluster is 3 (odd). All are in same subnet. Also we do have file share witness. Everything is working fine for now.  My question is: do we really need file share witness? And what should the ideal quorum configuration be?  As per my knowledge, it is not needed as we already have an odd number of nodes, so node majority quorum configuration should be fine and is recommended.  SQL Version: Microsoft SQL Server 2016 (SP2) Enterprise Edition OS Version: Windows Server 2016 Standard

If I am going to set an Alwayson Availability group with 3 nodes, with read-only routing. Do I need to configure a Quorum ?


I have MenuButton, which extends AbstractButton. When I do setEnabled(true) within the class, there is no compiler error, but a runtime error of NullPointerException. (Note that the exact same code worked fine when it extended JButton). Relevant portions are below.  public class MenuItem extends AbstractButton{     private String type = "";     private String text = "";     private int level; public MenuItem(String place, String name, int height) {         type = place;         text = name;         level = height;         setEnabled(true); //This is where the error occurs.     } }   And the error:  Exception in thread "main" java.lang.NullPointerException     at javax.swing.AbstractButton.setEnabled(Unknown Source)     at states.MenuItem.<init>(MenuItem.java:54)     at states.MainMenu.<init>(MainMenu.java:26)     at main.TheDarkSeaIslesPlatformer.main(TheDarkSeaIslesPlatformer.java:80)   This is not a duplicate because it has been initialized correctly. It also works when it extends JButton, so it is an issue with AbstractButton.


I had Windows 8.1 installed in my system and I had 3 partitions in it.  I installed Ubuntu 14.4 with the Replace Windows 8.1 option.  After installing Ubuntu I had only one partition.  Have all my partitions been erased? If so how can I recover my data?

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


It is a translation question and the right answer is      The women gives cookies to the kid.    I put an extra "the" before cookies and it is marked as a wrong answer. Would anyone care to give a detailed reason as to when to put article?    Unrelated side note: I can't believe after so many years studying English, I am still struggling with these basic questions..

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.


Alice wants to share a symmetric key with Bob. She encrypts the small (64-bit) secret key $K$ with Bob’s public RSA key $(n,e)$ by padding it with zeroes to 2048 bits (the length of n) and computing $$C\gets(\text{0..0}\|K)^e\bmod n$$ Thereupon, she sends $C$ to Bob. Discuss either why this key exchange is secure or describe an efficient attack that can recover $K$ with far less than $2^{64}$ operations.

The  defines multiple padding schemes for signature generation/verification ( and ),  and encryption/decryption ( and the less safe ).   Which attacks are possible on signature generation/verification and encryption/decryption if no padding mechanisms are applied, i.e. if raw RSA is used over the plaintext or hash?


I have defined an environment called answer that displays the answer of a question of a test I'm supposed to prepare.  The idea is to compile a version where the answers are displays and one were they are not (in order to test the students).  Is there an elegant way to disable environments?  One can of course define a command \ifanswer and then write \ifanswer{\begin{answer}foo\end{answer}}. For each environment. The problem with this approach however is that one needs to remember and insert this command each time, and of course forgetting this one time would be embarrassing.    MWE:  \documentclass{article} \newenvironment{answer}{\textit{Answer} }{\textit{the end.}} \begin{document} Question: Bla \begin{answer} Foo \end{answer} \end{document}

I noted that if I use comment.sty and a there is a block of text containing UTF8 characters inside a comment environment, the compilation aborts!  Minimal Example  \documentclass{article} \usepackage[T1]{fontenc} \RequirePackage[utf8]{inputenc}%this file is stored as UTF8 file! \RequirePackage{comment} \specialcomment{privateSolution}     {\begingroup\itshape\noindent\textbf{Solution}\\}     {\endgroup} %\excludecomment{privateSolution}%Use it to remove solutions!  \begin{document} \title{Comment.sty and UTF8 test file} \maketitle \section{UTF8 character test} In which alphabet characters àìùòè are common? \begin{privateSolution}     The Italian alphabet contains àìùòè. \end{privateSolution}  \begin{comment}     The Italian one! It contains àìùòè. \end{comment} \end{document}   Has anyone the same problem? Any workaround?  Thanks in advance.


I'm trying to see why the below is true.  $$ x^{\log(a)} = a^{\log(x)} $$  Anyone here know why this is? Thank you.

I have been hit with a homework problem that I just have no idea how to approach. Any help from you all is very much appreciated. Here is the problem  Prove the equation: $a^{\log_b c} = c^{\log_b a}$  Any ideas?


my sites dont need use ID at all, then I am trying to manage user by username.  Assume my sites is abc.com, then access to user profile by URL: abc.com/user1  So if you want to view all info of that user, you can get by Model User ( Laravel Framework):  $user = User::find(user1); $email = $user->email; $sex = user1->sex;   Second method, if use ID as primary key, but my project no need to use id at all.  $id=User::where(username=user1)->id; $user = $User::find($id);  $email = $user->email;  $sex = user1->sex;   As you can see, First method is faster than second, because "Username" field has indexed. Should i use username for primary key in this situation? I use MySQL.

I want to know why I should use an int as a lookup table's primary key instead of just using the lookup value as the primary key (which in most cases would be a string).  I understand that using a nvarchar(50) rather than an int would use way more space if it is linked to a table with many records.  On the other hand, using the lookup value directly would basically save us doing a join. I can imagine this would be a big saving if the join is always required (We're working on a web app so this counts quite a bit).  What are the advantages of using a int primary key (specifically for a lookup table) other than it being "the standard thing to do"?


I think the title says it all... My dream has come true, now what? EC2 was something 2 cores maybe 4 gbs of ram... I use S3 bucket as the storage, compressed the images in Photoshop prior to the upload. I have around 400 000 images and around 250 000 posts. now what? My wordpress was installed in the rood directory as a multisite version of wordpress and blog was created as a separate website. so 1 multisite root wordpress instalation> 2 websites created (the main website) and the blog website with a slug /articles (it is not really in a subdirectory)

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


You hang a rapidly spinning top on one end from a string and let it go.  It doesn't fall.  It rotates around the point where it is hung from the string.  Mathematically, I understand it.  Angular momentum is changed by torque, which is moment arm cross force.  So vertical gravity produces a horizontal change in angular momentum, etc.  I know the math and I can do it in my sleep!  I learned this years ago.  But still, after all this time, this system from the point of view of forces and acceleration, as opposed to angular momentum and torque, still makes no sense to me.  I still cannot "intuit" why the various forces involved somehow "conspire" to send the top in horizontal motion rather than pulling it down.  Anyone have an explanation?

I'm having a hard time trying to figure out the inner mechanisms behind a gyroscope's precession and nutation. To be very specific, I want to consider gyroscopes like this one:  (source: ) My point is: all gravity wants to do is to take the gyroscope down but, because of the support, the free end goes down while the fixed one doesn't. If the gyroscope is initially spinning, prediction of precession and nutation follows by analysis of the angular momentum of the system. What I would like to understand is what forces create these motions. I've been trying to identify internal forces leading to internal torques that would do the job, since the external ones (weight and normal) are related only to the gyroscope's vertical motion, but I had no success so far.


I am not a mathematician, and just started programming in javascript and wonders how 2.8 % 2 = 0.7999999999999998.  Note: I know it is remainder operation.  May be I forgot my school mathematics concepts. Can anyone please explain this? Thanks.

I have tried this on my Windows 7 calculator with $\sqrt9 -3 $ it too gives some weird answer- ie$1.1546388020691628168216106791278e-37$. And so for any $n$(positive) $\sqrt n^2-n= wierd_ .answer$ Why does this happen?


I am using Ubuntu-14.04 LTS with latest 4.0 kernel. But still it's not working with my touchpad driver. I haven't left no stone unturned to make it supportable for my Ubuntu. Now I am really disgusted at this issue. Have you any working fix?  Be noted, it's not only my issue. Search on google and you will find many people getting same issues.

I resently installed ubuntu 14.04 on my ASUS X450L. It runs quite statisfactory, only the touchpad of the laptop does not function. Is there any solution for this?  The bios setting is 'enabled'


I want to make a box in second row. That is on 1 & 3 & 24 & 42 & 43. Also on part of forth row 5 & 16 & 26 & 34.    \begin{tabular}{| c | c  c  c  c | }        \hline       Location & \multicolumn{4}{c|}{Rounds}\\         \hline         0 &  2 &  23 &  41 &  42\\     1 &  3 &  24 &  42 &  43\\     2 &  4 &  25 &  43 &  44\\     3 &  5 &  16 &  26 &  34\\     4 &  6 &  17 &  27 &  35\\     \hline    \end{tabular}

I have a matrix and need to highlight some elements in the matrix. I have found how to highlight a single element (I want to put the cell in the square):  $$ A = \begin{bmatrix} \fbox{0} & \fbox{0} & 0 \\  \fbox{0} & \fbox{0} & 0 \\ 1 & 1 & 1 \\  \end{bmatrix}$$   But how can I outline elements of the submatrix like in the picture below? I need just a frame where some elements are located.


Hey so i'm getting text with latin characters like "ó" from a mysql database. This is the connection along with the query i'm using to get the data, placing it in an array:  <?php     header('Content-Type: text/html; charset=UTF-8');     $con=new mysqli ("localhost","root","","chroniclemark");      $sqlget = "SELECT descricao FROM items;";     $sqldata = mysqli_query($con,$sqlget) or die ('error getting database');     while ($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) {         $lol5[] = $row['descricao'] ;      }?>   I'm then trying to display the the text outside of the <?php ?> statement like so:
<?php echo $lol5[0]; ?>
   All of the text is fine except for the "ç", "ó", "ã" and so on. I also have a meta tag <meta charset="UTF-8"> in my header but it doen't help. In the database, the data is set to "utf8mb4_unicode_ci". What can i do to fix this? Any idea?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I am using Ubuntu 14.04. Unfortunately I deleted my /etc/shadow and /etc/passwd files and am not able to log in again.  How can I fix this?

I was trying to change my username and also my home directory (/home/username) and my system started to crash. I deleted the passwd file but I had a backup named passwd_bkp. I tried to rename this passwd_bkp as passwd and it did not work. No commands were being executed... I was in a terminal window.   I restarted my system and now I cannot log in. GRUB gives two options: Linux and recovery mode.   I tried to open a sessions as root but it says the filesystem is corrupted. I cannot access my files.  Did I lose all my files?


When I change ownership of /sys/class/backlight/intel_backlight/brightness with chown its ownership changes again to root after system startup.

I'm learning Ubuntu and experimenting with things.  I noticed I couldnt create a directory within /sys  Is this a special directory or something? Are there other types of directories?  (I did a sudo -i and a chmod a+w /sys)


Please look at the following code snippet, and the question is presented in the inner foreach loop, which is to ask will the final grouped result keep the original orderby result?  //List<Foo> aFooList = ... aFooList = aFooList.OrderBy(x=>x.A).toList(); //order the list by property A var groupedResult = aFooList.GroupBy(x=>x.B)  //group the list by property B                             .OrderBy(x=>x.Count(y=>y!=null)) //Order the group by the group size.                             .ToList(); foreach(var group in groupedResult) {     Debug.WriteLine(group.key);     foreach(var foo in group)     {          //QUESTION: will the foo list here keep the original order which is ordered by property A???     } }

I use LINQ to Objects instructions on an ordered array.  Which operations shouldn't I do to be sure the order of the array is not changed?


Original Question Source:  Here's the phase diagram for water:  The diagram shows us that at pressures around 1 terapascal (about 10 million atmospheres) ice is solid, at least up to 400 C. It has been predicted (, ) that at higher pressures, somewhere between 1.5 and 6 terapascals, solid ice will undergo an insulator to metal transition and display properties typically associated with metals (band structure, electrical conduction, etc.). That's around 15-60 million atmospheres. But, if the pressure was to increase towards infinity, the behaviour of water (without water being able to escape its confinement, say a ball of water at the core of a galactic mass) would be very different... Suffice to say, it doesn't stay water after a certain point. The intense temperatures created by the compression will cause the water to break apart, eventually no longer even having oxygen atoms due to nuclear reactions. Because we're talking about an externally applied pressure, the Chandrasekhar limit doesn't apply, so there is a point at which electrons and protons combine (when the  is overcome) and a mass of neutrons remains. Neutrons themselves also have a degeneracy pressure (though we don't have good models to predict the exact pressure that has to be overcome). From here, we don't know what happens with as much certainty, but the formation of quark matter has been predicted. Eventually, we reach a singularity. We can think of this as all the matter we had before being compressed into an infinitesimal volume with infinite density and our applied pressure ceases to mean anything. If we started with enough water, this would behave much like any other black hole, though  are hypothesized to have some special properties. Could someone share their views on this, maybe explain this solution to the hypothetical situation of infinite pressure with some scientific theories?

I've asked a similar question  but the answer given shows the behaviour of water under general conditions.  I'd like to know what the behaviour of water is like as pressures increase towards infinity without being able to escape it's confinement.. i.e. a ball of water at the core of a galactic mass.. maybe this question is more for theoretical physics since we can't really measure or experiment?


I want to use rsync to upload files to a server. I'll default to exclude all.  Then I'll include the ones I need.   While doing so I realised sometimes I need to exclude a file within a folder but include the other folders.  I want to use a pattern to do so but I'm not sure what the pattern format should be in order to say "I want to include all subfolders except the one named demo"  --include="models/" --include="models/!demo" --exclude="*"   I definetely don't want to be typing every single folder to include within a folder or every folder to exclude from my project.  I would like to exclude all by default. Then include based on pattern so I won't have to be forced to include the whole folder.  Any idea?

I am trying to create a directory that will house all and only my PDFs compiled from LaTeX. I like keeping each project in a separate folder, all housed in a big folder called LaTeX. So I tried running:  rsync -avn *.pdf ~/LaTeX/ ~/Output/   which should find all the pdfs in ~/LaTeX/ and transfer them to the output folder. This doesn't work. It tells me it's found no matches for "*.pdf". If I leave out this filter, the command lists all the files in all the project folders under LaTeX. So it's a problem with the *.pdf filter. I tried replacing ~/ with the full path to my home directory, but that didn't have an effect.  I'm, using zsh. I tried doing the same thing in bash and even with the filter that listed every single file in every subdirectory... What's going on here?  Why isn't rsync understanding my pdf only filter?    OK. So update: No I'm trying  rsync -avn --include="*/" --include="*.pdf" LaTeX/ Output/   And this gives me the whole file list. I guess because everything matches the first pattern...


How do I create a div element in jQuery?

I'm refactoring some old JavaScript code and there's a lot of DOM manipulation going on.  var d = document; var odv = d.createElement("div"); odv.style.display = "none"; this.OuterDiv = odv;  var t = d.createElement("table"); t.cellSpacing = 0; t.className = "text"; odv.appendChild(t);   I would like to know if there is a better way to do this using jQuery. I've been experimenting with:  var odv = $.create("div"); $.append(odv); // And many more   But I'm not sure if this is any better.


So I understand PDO Prepared Statements should protect from SQL injection and ' escapes. But when I attempted the following...  if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["id"])) {        $id = $_POST["id"];      //$id = "2' AND name='Entry2";     $someinfo = "updated";      ...DB Stuff...      $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $dbpassword);      $stmt = $conn->prepare("UPDATE testdb SET info=:someinfo WHERE id=:id");      $stmt->bindParam(':id', $id);     $stmt->bindParam(':someinfo', $someinfo);     $stmt->execute();      $conn = null;      exit(); }   Then the row with id=2 and name=entry2 would be updated. Now it doesn't seem like this can be used to escape into other SQL queries, and I assume I can take precautions to ensure this kind of escape can't really do damage. But I wanted to be sure that there wasn't some other way to prevent ' escapes making unexpected changes to SQL query parameters. (Worth noting, I tried something similar in SQLi and got pretty much the same result.)  Is there something I'm missing? Or is this just the way Prepared Statements work.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


All of the questions I've looked at in respect of this issue relate to moving an existing home to another partition and I don't want to do that.  I had to reload Ubuntu 18.04.1 on my machine and thankfully it loaded Ubuntu into sda/dev8, whilst leaving all my data where it was on dev/sda10.  The sda10 data was produced whilst running 16.4.04 (and previous versions).   What I now want to do is configure my system so that it uses and mounts dev/sda10 as home.  I want to delete the home directories on dev/sda8.  I do have backup copies of my data, but don't want to have to restore and setup the different programs I run, unless absolutely necessary.  Can someone please help explain how to do this?

When I installed Ubuntu 10.04, I installed it on a single 16GB partition which includes /, /boot, /home etc.  I have another partition on the system (ext3). It is easily accessible from the GNOME desktop Places menu: I just click that Filesystem HDD icon on the Places menu and it is automatically mount as '/media/1326f40a-45df-4ec'.  How do I make that partition re-mount as /home instead? (permanently, that is)


If a question is unclear to a person on this site, but is actually a well formed, concise question to someone with the correct background knowledge - would the person who doesn't understand still be in the right to downvote the question based on SE's policies/rules for voting on questions?  I am getting too much extended discussion in the comments (on me) - but where this is leading me is whether or not the goal of SE is to have purely objective moderation or if the real trust lies in the reputation system which allows any and all votes under the assumption that more 'good voters' than 'bad voters'* will be participating and an objectively good moderation will be reached through that process despite the inevitable 'bad voters'*.  *Good voters and bad voters are not up/down votes, but voting cognizantly and carefully to improve the site (good) versus carelessly and ignorantly for whatever reason possesses such people (bad).

It is observed that the stackexcange permits to downvote/upvote by just having minimum cumulative reputation of all tags even though the member doesn't possess enough reputations in them.  "Subject matter" should be given appropriate higher weightage over clarity, spelling, readability, etc!  I propose, subject to the approval of board of stackexchange, only members whoever possesses minimum appropriate reputations in all tags of the question/answer to permit to upvote/downvote.


Can I join the railroad, brotherhood and minutemen and still have good relations with each one? If not what should I choose (bear in mind I am already a good bit into minutemen quests) ?

Are there any limitations to the faction memberships you can have in Fallout 4?  I'm brand-new to the Fallout universe, and just got to the point of being invited to the Brotherhood of Steel. However, I'm a bit concerned about their politics and how it may affect my standing with other factions I may encounter.  If I join the Brotherhood, will there be other factions that I can't join? Are there any other factions that have such limitations?  Note: I'm still not very far into the game, and not very familiar with the Fallout 4 universe in general, so please make liberal use of spoiler markdown in your answers. Essentially, the only things that need to be un-spoilered are Yes/No answers for the questions asked above.


I posted this in stackoverflow but no one can give me an answer.  ...  I'm using Amazon EC2. I'm on Ubuntu 16.04. I'm also using Apache 2. I have WordPress installed on my server.  I do:  chown -R ubuntu /var/www/html   so I can edit my files as ubuntu via FTP. But the problem is now WordPress cannot edit files, update, or upload any files via WordPress. But if I do:  chown -R www-data /var/www/html   then it works.  Any way I can make it work for both ubuntu and www-data at the same time, without always switching it?  Thanks!

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


Newton's Law of cooling states that the rate of loss of heat in proportional to the temperature difference. or $-dQ/dt = k(T' - T)$  Q → heat transferred, t → time, k → constant, T' - T → temperature difference.  Anyone not knowing about Mpemba effect here's

There is this puzzling thing that is called : paradoxically, warm (35°C) water freezes faster than cold (5°C) water.  As a physisist, I've been asked about it several times already. And I have no definite answer to that, apart from the standard: "there are many things that can influence it".  So, does anyone knows about the status or progress on that effect? Any recent reviews, publications or other references?


I have this xml file:   <?xml version="1.0" encoding="utf-8" standalone="no"?> <!--This file represents the results of running a test suite--> <test-results name="<path>" total="1" errors="0" failures="0" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2014-08-12" time="16:05:41">   <environment nunit-version="2.6.3.13283" (...) (...) </test-results>   I want to get value of total, errors to integers in program "total", "errors" and so on. How can I get this values?

Is there a simple method of parsing XML files in C#? If so, what?


I am having problem identifying what and how is some property of "local" scope in JS. How is the property _secretNum "private" when it is clearly available outside the scope of the constructor as per below line.  document.write("Value of secretNum in secret: " + secret._secretNum             + "
");   The full code is as below,

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Maximum value of  $$\frac{\alpha\overline\beta+\overline\alpha\beta}{|\alpha\beta|}$$ is  1) 2  2) 1  3) none of the above.  Considering $\alpha=x+iy$ and $\beta=m+in$ , on evaluating the expression I got $\frac{2.(xm+ny)}{\sqrt{(x^{2}+y^{2})(m^{2}+n^{2})}}$ which is $\leq \frac{2.(xm+ny)}{\sqrt{4xymn}}$. Least value of this is 2. So can we call it as maximum value ?

Show that $z\bar{a}+\bar{z}a \leq 2|a||z|$  I was able to check this using some examples which is not ideal for a mathematician way of proving a problem/case/theorem. I couldn't generalize it (prove it). I will be glad if I can be given the hint/proof for this problem. Thank you.


I have noticed that pdflatex is very uneager to break pages within an alignat row of equations. It prefers rather to leave large pieces of pages blank than to break up the row of equations.  The figure attached below illustrates the issue pretty well, I hope:    Is there any way, I can make pdflatex more eager to create evenly filled pages?  Thank you in advance,  Best Regards, Lars

I have a very long derivation, that needs to look like:     A = B \\ = C \\ = D \\   etc. The derivation spans across many lines. I'm looking for a way to typeset it so that when it reaches the end of the page it can continue naturally on the next page, without trying to fit the entire equation into a single page. I'm currently using eqnarray and it insists that all its contents sit on a single page.  Can anyone suggest another environment that supports multi-page equations?


I want to search a specific word in all tables content. I mean in all column contents of all tables.   I don't mean in all tables names or all column names.   Thanks.

Is it possible to search every field of every table for a particular value in Oracle?  There are hundreds of tables with thousands of rows in some tables so I know this could take a very long time to query. But the only thing I know is that a value for the field I would like to query against is 1/22/2008P09RR8. <  I've tried using this statement below to find an appropriate column based on what I think it should be named but it returned no results.  SELECT * from dba_objects  WHERE object_name like '%DTN%'   There is absolutely no documentation on this database and I have no idea where this field is being pulled from.  Any thoughts?


I'm sorry if this is a duplicate before I begin.  As everybody knows, there has been major growth on tablets and mobiles within the last few years. I am aware of Stack Overflow's mobile site but wouldn't it be more useful for the site to have a responsive design layout so that users of every screen size would be able to see all the content without having to sniff the user agent to show the mobile site?  I have worked with responsive design in my current project and it works very well for all devices that I have tested it on.  What do you think? Should Stack Overflow be remodeled with a responsive design?

When will SO stop wasting real estate of my screen by having static width layout?  EDIT  It would be very interesting to hear how does Joel, being UI specialist, feel about this. JoelOnSoftware site has fluid layout...


I just switched to ubuntu and I have encountered an error where if I reboot my system the second time I do that my unity will just keep flickering like it is reloading. I do want to point out that I was using windows before doing this installation but I have used ubuntu before on this computer and I didn't have this problem and neither a clean installation solved the problem.Any help would be greatly appreciated. Graphics: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller

Yesterday (Jan. 3, 2018), I installed an OS update (Ubuntu 16.04), using the Software Center. My system isn't working correctly now. When my mouse rolls over the Launch bar, it disappears, then any open window disappears, leaving me with only the desktop screensaver showing. I can't even shut the computer off using the settings button on the top.  I went into the Terminal and attempted to fix it using the following commands:  sudo apt-get dist-upgrade sudo apt-get autoremove   But I'm still having the same problem.  I have reinstalled Ubuntu 16.04 and when I accepted the update on install had the same problem.  I have reinstalled it a second time but have not done an OS update and everything seems to be working fine.    Found another user with the same problem:    Is it possible that the Meltdown security update is at fault?  I've read the update has been issued for 64-bit x86 architecture ();  I'm running a 32 bit i386 architecture.  Could that be an issue and is there a way to correct it?


I am an user with no superuser rights. I normally build and install the tools I need within my /home/<user> directory, and then create aliases to be able to run my programs. However, this is creating a bit of a mess.  What would be a saner way of creating a filesystem hierarchy within /home/<user> so that I can have something resembling better a Linux Filesystem Hierarchy? Something similar to a Python virtualenv, so I can install libraries I need without needing superuser support?

Assume I have ssh access to some Ubuntu server as user and I need some not system tools to be installed for convenience (mc, rtorrent, mcedit). I do not want to bother admins for these small programs.   Is there a way to install them (make them run) without using something like sudo apt-get install?


After watching Alien Covenant, it was not clear as to why David would kill Elizabeth?  David was obviously a nutter, yes, but in my interpretation of the film he really cared for Elizabeth.

In Alien: Covenant (2017), David showed Elizabeth's grave to Walter, saying he loved her very much. In reality, he experimented on her and killed her. If David loved Elizabeth so much, why did he kill her?


Whenever I plug in my earphones or HDMI cord, the speaker settings don't automatically change to output from them. I have to go into the sound settings and manually choose them and then do a speaker test before the will work. I just want it to automatically switch to them if I plug them in. I am using 14.04.

I have a dual screen setup on my laptop (using 12.04 LTS) using a HDMI connected display. Everything works fine, but everytime I connect/disconnect the cable I have to go to Sound preferences and change the sound output device manually.  Is there any way to change the sound output device on connect/disconnection of cable, so when I connect my display the sound output is set to HDMI and when I disconnect it the sound goes back to laptop speakers?


Hi I want to remove duplicate entries in single column in my datasheet. Is there a short way to do that when writing my output file? It is python3 script.  with open(input) as infile, open (output, 'w') as outfile:     reader = csv.reader(infile, delimiter='\t')     writer = csv.writer(outfile, delimiter='\t')     for gg, poss, codee, ref, alt, *rest in reader:         gg = int(gg)         poss = int(poss)         writer.writerow([gg, poss, codee, d[group][poss-1], ref + ',' +alt] + rest)   In the last line, I want the column "ref + ',' + alt" to not have any duplicate values. With the above command, I have outputs like:  A,B,B,C G,G,A,T G,A,A T,T   I want this to be:  A,B,C G,A,T G,A T   Is there a short command that I can incorporate on the last line? or should I start a new set of command to do this? Please help me! Thank you.  EDIT with OrderedDict  from collections import OrderedDict with open(notmatch) as infile, open (two, 'w') as outfile:     reader = csv.reader(infile, delimiter='\t')     writer = csv.writer(outfile, delimiter='\t')     for gg, poss, codee, ref, alt, *rest in reader:         gg = int (gg)         poss = int(poss)         cls = ref + alt         clss = list(OrderedDict.fromkeys(cls))         writer.writerow([gg, poss, codee, d[gg][poss-1], clss] + rest)   So I used OrderedDict and it seems to give me output like the following for column "clss":  ['A','B','C'] ['G','A','T'] ['G','A'] ['T']   The 5th column which is concat of "ref" and "alt" is the only column where I want to apply this deduplication so I wrote my script in such manner. Everything looks good but there are brackets "[" "] and apostrophe "'" in each cell. How should i modify my code so they are not there?

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


I tried loading Ubuntu 14.04.3 onto an older Dell Inspiron Laptop and I get the following message: WARNING: PAE disabled. Use parameter 'forcepae' to enable at your own risk! This kernel requires the following features not present on the CPU: pae unable to boot-please use a kernel appropriate for your CPU.  My question is what is a pae kernel, how do I find an "appropriate" kernel?

After burning Ubuntu 12.04 to a CD, I tried booting and got the message:  This kernel requires the following features not present on the CPU: pae  Unable to boot - please use a kernel appropriate for your CPU.   What does this mean?


I'm trying to build an ArrayList of Earthquake objects but Java is complaining about not being visible.   My Code:  import java.io.*; import java.util.Arrays.*;  public class ObservatoryTest {     private ArrayList <Earthquakes> listOfEarthquakes; //This list is not visible     Earthquakes Quake1 = new Earthquakes(4.5,"cheese",1995);     Earthquakes Quake2 = new Earthquakes(6.5,"fish",1945);     Earthquakes Quake3 = new Earthquakes(10.5,"Chorizo",2015);      public void buildList(Earthquakes... args){         for(Earthquakes myEarthquake : args){             listOfEarthquakes.add(myEarthquake);         }      } }   My aim is to build a list of Earthquake objects. Could somebody tell me why and how to fix my code? Thanks  --------------edit--------------------  The error message is the type ArrayList is not visible however changing visibility modifier to public doesn't have any effect.

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


How can I compare if two objects are equal in jQuery.   var a = { id:"1", name:"name"}; var b = { id:"1"}; b.name = "name";   How can I check for equality between a and b ? Is there a method similiar to .equals() in JAVA which can be overridden ?

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


Ok, so I am a relatively new programmer. I have read over and over about passing variables. From what I have read here is what I've come to understand: In Java, when you pass a variable to a method (be it primitive or Object) you are ALWAYS passing by value. But what you are REALLY doing is passing a copy of the reference to an object or variable in memory.   So why do they call it pass by value? It seems to me you are passing by reference. Also, in C when you pass a pointer to a function, aren't you passing the address of a variable in memory? Yet it is called pass by value. What am I overlooking? Can someone please explain and clarify why I this? I know how to pass variables and such and I have read several SO posts on this but I am not fully satisfied yet. Consider an example:    static void setNameStatic(Dog d, String name) {          d.name = name;    }     public static void main (String args[]) {             Dog d = new Dog("dog1");             System.out.println( d.getName() );             setNameStatic( d, "dog2" );             System.out.println( d.getName() );    }   Won't this output: dog1 and dog2. So aren't you going to where the reference is referring to and changing data around? What exactly does the value have to do with here? Any helpful comments are appreciated. And yes, I know it is pass by value, but why isn't it called "pass by sending copy of reference" lol?  Update: Thanks to everyone that gave a helpful answer. I know this was marked duplicate, and sorry about that. I am satisfied with the answers now.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Good day,  I'm installing Ubuntu instances in Germany or France datacenters, but with the locale/etc. set for South Africa. Now the (hyper intelligent) Ubuntu installer (contrary to the Debian installer) doesn't allow me to set the mirror/country to use for the package downloads, which makes the installations quite slow (other than setting up a mirror myself and point every installation to that one, but that would be cumbersome for various reasons)  SO, how do I tell the installer to let me pick the mirror I want to use contrary to my locale/country settings?

Without customising the Ubuntu live image, is it possible to select a mirror during installation? If not, what are the options available? I can think of customising the image, or somehow using preseeding with Ubiquity. The annoying thing is that I am booting live Ubuntu over the network (via PXE booting), so the network connectivity is assumed. This causes Ubiquity to try to fetch some things from the mirror, even though, by its admission, it doesn't have "internet connectivity", since we are behind a campus proxy. Because of this, it spends a lot of time trying to fetch something and we have to manually skip that part. We do have a (official) mirror within campus, so we would like to use that. I'd like a way that doesn't involve customising the live environment, so that I can suggest that as a way for students who use their own USB drives. (Here is, for example, a question about another problem from live booting over the network that I am facing: ) Here are a couple of screenshots from a test on a VM:   Here are a couple of screenshots from a test on a laptop: Note the usage of in.archive.ubuntu.com, even though, following @noleti's advice, I had set ftp.iitb.ac.in as the mirror:


I recently got Minecraft to join a server with my friends, however, I kept getting the failed to login the authentication are currently down for maintenance error. I later realised this to be to due to my computer being unable to connect and ping authserver.mojang.com, as I was getting a refused to connect error. I thought this might be due to my router blocking the website, but I tried accessing the website from a different device on my network, and it worked fine. I've disabled my AV and Firewall, as well as changing my local IP address. I believe it is something to do with my computer, but I have no clue what. Could anybody give me any ideas as to why this is happening?

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


Its customary not to use title of the research article in Physics Journals refernces. I am currently writing a report where I need to add title of the articles. I do not want to use 'bibitem' to manually write the titles etc. Is there any bibliography style which produces references with titles along with author name, volume, year?

I guess this question has been asked several times but still I did not find a solution :(  I used the template for physical review A, \bibliographystyle{spphys}, which the reference paper only has author name, journal title, volume, page e.g.     XXX, Phys. Rev. Lett. XX, XX (XXXX)   I need a template that could display the title of the quoted paper.  e.g.     XXX, title, Phys. Rev. Lett. XX, XX (XXXX)   Where can I find such a template? and/or bst file?


I am wondering if it is possible for other users to see your IP Address, or to see the IP of the person that submitted the post.

When editing my user profile (name, date of birth, etc.), how can I tell which information can be seen by other users (publicly visible) and what is only used by the system (and how it's used)?


In LaTeX, I can do this:  \begin{tabular}{|p{5ex}|p{5ex}|}\hline   & \\ \hline   & \\ \hline   & \\ \hline \end{tabular}   But I cannot get a variable number of blank lines this way  \newcommand{\mytable}[1]{   \begin{tabular}{|p{5ex}|p{5ex}|}\hline     \multido{}{#1}{%       &\\\hline     }% multido   \end{tabular} }% mytable \mytable{10}   or with a counter, even without a command \mytable  \newcounter{count} \begin{tabular}{|p{5ex}|p{5ex}|}\hline \whiledo{\value{count}<5}{%   & \\ \hline   \stepcounter{count} }% whiledo \end{tabular}   Does anybody know why this doesn't work?  Indeed, it is a duplicate of 'copy table row n times'. That is exactly what I wanted, thank you very much for the hint!

I would like to copy the row of a table, let say, n times, but unfortunately my sample below does not compile. It is my understanding that the \foreach command should copy what is in its argument but is not doing it here. I have looked at the error message in the compiler and I have an idea as to what may be causing it. I think it is how the table environment is constructed. I am thinking right now of enveloping the command as a group but I don't know how to do this. What is the best way to achieve this result? Some explanation will be appreciated.  \documentclass[letterpaper]{article} \usepackage{amsmath,amssymb,lipsum} \usepackage{tikz,calc} \newcommand{\test}[1]{%     \foreach \i in {1,...,#1}     {%     t1 & t2 \\%     }} \begin{document} \begin{tabular}{cc} \test{3} \end{tabular} \end{document}


I am solving tutorials of an institution which I am not a student as our faculty doesn't gives any.  Please give me some hint in solution of this problem.  Problem is - let X be a normed linear space.  Prove that X is a Banach space iff $\,\{ x: \|x\| = 1 \}\,$ is complete.

Let $X$ be a normed vector space.   Show that if a subsequence of a Cauchy sequence converges, then the whole sequence converges. Use the part 1 to show that $S = \{x\in X : \|x\| = 1\}$ is complete if and only if $X$ is Banach.     I have found the first part in a book, but I do not how to prove part 2. Thanx regards


Another question that bothers me: when muggles had big problems and wars going on, did the wizarding world interfere?  Did they help or interfere with the muggles in the world war or even in wars earlier than that? Against Napoleon or in the war against the Roman Empire? Couldn't they prevent the wars and battles?

This came up to me while I was reading the question about Magical being using firearms in battle to raise their power (which I think I have a good answer for, but it's too long to fit in this question... and it would also be inappropriate).  Anyways, I was reading it and then the following thought came into my mind: If wizards decided to use guns on their battles (the ones agains Voldemort for instance), that would create that opening for much bigger battles than we see in the books (after all even a muggle can fire a gun, so lots of guns + the Imperio curse, and presto manifesto (is that racist? talking about wizards and all) you have yourself an army). Those kinds of battles, however, would most definitely not go unnoticed by the muggles - even though they wouldn't be able to link it to magic.  Well, that thought brought up my one and final question, which I bring forth to you guys. Is there any mention on how the Wizards and Witches viewed the two world wars (which had taken part by the time Harry got to Hogwarts, and which he had probably heard about in muggle school), and what was the Wizards' part in it? What about the cold war? Did the magical world even recognise the existence of weapons such as nukes, which could render all life on earth extinct?  EDIT  DVK has brought up an  regarding the connections between the Second World War and the wizarding world (more specifically, the wizard Grindelwald). Although it doesn't fully answer my question, it does help by showing that there was indeed some form of connection between the two world at the time.


How can I allways show the menu-bar (File, Edit...) of every application? not only when I move the pointer to the top, that is cumbersome.  edit: But now I (also) have to move the pointer to the top of the window to show the menu-bar. I want that the menu-bar is allways shown, not when I move the pointer.  Thanks.

Will there be a way to disable auto-hide behavior of global application menu in Unity. While I would prefer to have this behavior disabled by default (as it is bad UX), it looks like it's here to stay, so I'm wondering if, as a user, I will be able to turn it off.


I'm a beginner at programming with little to no experience. I want to learn Java because I feel like it's such a great language to learn from. I've been following the guides on this playlist on youtube  If you look into it, I'm on the 32nd video and so far Java is very promising Anyways, I need help understanding this code: package learningjava;  class apples{ public static void main(String args[]){     int lucas[]={3,4,5,6,7};     change(lucas);          for(int y: lucas)         System.out.println(y); }  public static void change(int x[]){     for(int counter=0;counter<x.length;counter++){         x[counter]+=5;       }    } }  This code is supposed to take the array: int lucas[]={3,4,5,6,7}; and add 5 to each number inside of the array. Then, it's supposed to display the sum of these numbers with 5 added to them; which it does just that, displays 8, 9 ,10,11,12. I just hope that someone could clear up the smoke for me on this one, cause it's hard to follow. I don't understand how array lucas is connected to int x[]. I also don't understand why we need the for loop or what it does.: for(int counter=0;counter<x.length;counter++){     x[counter]+=5; }  This post was poorly made and explained, but I'm desperate at this point to know what exactly is going on in this code. If anyone could give me a thorough explanation, I would REALLY appreciate that!

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


The coefficients of a quadratic equation $ax^2+bx+c=0$ are in arithmetic progression and $a, b, c$ all are positive. If the roots of the equation be $k$ and $l$ are integers.Then $k +l+kl$ =?

Suppose the quadratic polynomial  $P(x) = ax^2 + bx +c $ has positive coefficients $ a, b, c $ in an arithmetic progression in that order. If $P(x) = 0$ has integer roots $\alpha $ and $\beta $, then $\alpha + \beta + \alpha\beta $ equals?  1) $3$  2) $5$  3) $7$  4) $14$  It's a single choice correct problem. All genuine answers are welcome :)  The question is from a famous Indian Scholarship test 'KVPY' for high school students. The official website doesn't provide any solutions to it that is why I am asking for help.  My go on the question   we know that in a quadratic equation $ax^2 + bx +c$ with roots $\alpha, \beta$ the sum of roots is $\alpha +\beta = \frac{(-b)}{a} $ and product is $\alpha\beta = \frac{c}{a} $  So $\alpha + \beta + \alpha\beta  = \frac{(-b+c)}{a}$ and since $a,b,c$ are in arithmetic progression $\frac{(a+c)}{2} = b$  Something that I tried was also this -  $  a, b, c     $   are in AP (arithmetic progression)  $a-b , 0, c-b$ are in  AP (subtracting by $b$)  $1-\frac{b}{a}, 0, \frac{(c-b)}{a}$ are in AP  (dividing by $a$)  Now I can't proceed further. After a bit of plugging and chugging I still cant get an integer as an answer...


Question: Find  the value $$A=\lim_{x \rightarrow 0 }(\frac{(1+x)^{1/x} - e  + \frac{ex}{2}}{x^2})$$  I found the value $$A=\lim_{x \rightarrow 0 }(\frac{(1+x)^{1/x} - e  + \frac{ex}{2}}{x^2})=\lim_{x \rightarrow 0 }( \frac{e- e + ex/2}{x^2}) =0  $$ Is this correct ?

$$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$   by directly substituting $x=0$ i got $\infty$ by using L-H's rule, i got $-1/8$   the given options are  $a)\frac{24e}{11}$    $b)\frac{11e}{24}$    $c)\frac{e}{11}$    $d)\frac{e}{24}$    may be the question would be  $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$


I want to do certain trips when I can get it cheaply, for example cheap flight Friday evening and the following Sunday evening. (So not a particular week-end but the cheapest week-end in a period of a few months)  How can I search for this, and keep monitoring for for example the next 2 months?  This is typically between 2 European countries, sometimes with inland connections on one side.  Sometimes the return is from a slightly different airport.  Sometimes (like when I want to leave from work) I typically want a god combination of cheapness/directness in a time-period.  Other-times, like Sunday evening return i want a good combination of lateness, cheapness and directness.  Any help to formulate this better is appreciated.  (Airports flexibility is not important, so proposed duplicate is not a duplicate at all).  If this cant be done directly, I might want to bookmark searches.  Then bookmarking should be possible, and it should be easy to create a new search from another one.

Several airline and trip planning sites will allow you to check "I am flexible with my dates" or a similar option.  Is there any way to also search more broadly for location?  For example, if you wanted to leave from YYZ or YKF and arrive at any airport in California, can a search for such flights be done somehow?  I ask because when I plan plane trips, I want the lowest price.  I'm OK with leaving a day or two later if I save $200 (same with the return trip).  There are 3 airports within 80 km of me, I'll leave from the one with the cheapest flight. And I'm also OK with changing the trip to spend time exploring San Francisco instead of lying on the beach near San Diego, and that sort of thing.  Normally this would take dozens of searches, but I'd like to see it all at once.


How do I connect a dryer with a four prong plug to a three prong socket for a Maytag electric dryer?  Is there a converter plug that goes from 4 prong to 3 prong outlet?

Our new dryer has 3 prongs vs. 4. We are changing to the new 3 prong dryer outlet, but want to make sure we are grounding. The wires coming from the wall our white, red & black - the the copper wire. Do I need to ground it?? Thank you! Molly


I have a server and would like to now if it is possible to print the X,Y,Z coordinates of a player, and how to do this.

What are the basics of Minecraft commands? If I were to start from scratch, with no knowledge on the topic, what are some things that I need to know?


So I have the following recurrence relation:  $$f(n) = f(n-1) + f(\lceil n/2\rceil)+ 1$$  I already know that:  If:  $$g(n) = g(n-1) + 1$$  $$g(n) = O(n)$$  If:  $$g(n) = g(\lceil n/2\rceil) + 1$$  $$g(n) = O(\log(n))$$  If:  $$g(n) = g(n-1) + g(\lceil n/2\rceil)$$  $$g(n) = O(nlog(n))$)  Thus can I definitely conclude that:  $$f(n) = O(n \log(n) * n * \log(n)) = O(n^2 \log(n)^2)$$

So I have the following recurrence relation for the growth rate of an algorithm:  $T(n)$ = time taken by algorithm to solve problem of size n:  $$T(n) = T(n-1) + T(\lceil(n/2)\rceil)$$  Clearly this does not obey any polynomial law but now my question is what does it obey?  I merely want an asymptotic equivalence.  My guess is subexponential since this is faster than polynomial but clearly slower than any exponential form.  What though is the question....


why does a simple python calculation give a different result than same calculation in PHP or pocket-calculator?  tmp = (50.73 / 120) * 20   in python3 tmp now is 8.45499999999 in php and other calculators it leads to 8.455 (without any manual rounding)  my problem here is that i need to round (commercial rounding) the tmp variable with 2 decimal points and this leads in python3 to 8.45 which is not correct. commercially rounded 8.455 would be 8.46

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a variable which i obtain from another class. I then run a != "" check in an IF statement. On the summary2, the value should be "" and so the if statement should go to else but it does not.        getArticle data = getArticle.getMyData();      if (data.summary1 != "") {         tvSummary1.setText(data.summary1);     } else {         tvSummary1.setVisibility(View.GONE);     }      if (data.summary2 != "") {         tvSummary2.setText(data.summary2);     }else {         tvSummary2.setVisibility(View.GONE);     }   This is what i get when debugging:

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have an old schengen visa that expires on the 11th and a new one that starts on the 12th and is valid for three months. Is it possible to arrive on 9th?

I currently have a valid multiple entry Schengen visa that expires on Feb 10th (issued by the Spanish consulate). I need to visit the Czech Republic from Feb 9th to Feb 15th. For this, I am getting a visa starting Feb 11th from the Czech consulate as I was advised that I cannot have two simultaneous visas.   Is it possible for me to enter Czech republic on the current visa on Feb 9th, and stay past its expiry up to Feb 15th using the new visa without leaving the Czech Republic? Will there be any likely problem either while entering or exiting Schengen zone (I am entering Schengen in Frankfurt)?


I feel my order has problem:  for $u\in U, v \in V, w\in W $. Since $S$ is surjective, we have $S(u)=v$. Since $T$ is surjective we have $T(S(u))=T(v)=w$. Therefore we have TS surjective.

For injective side, in my opinion, we can find two square matrices $A, B$ with each injective but $AB$ has a zero row ($\dim\ker(AB)\ne 0$), so $TS$ is not injective. But I don't know how to find such matrices.  For surjective side, I have no idea how to start.  I feel my idea is very confusing, could someone give me a clear way to solve the problem?


I have a problem where I have declared a static string vector in the .h file inside a class ,       .h file  static std::vector<std::string> VHDSigBuffer;   How to use this vector in my class function Implementations in cpp file?

What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this?


I am using SSH to another terminal with very limited disk space. upon typing ls I see a file called #korpus.txt#. I suspect this file is an emacs buffer, but upon running emacs and trying to kill it with C-x k bufname RET, it isn't found. How can I remove #korpus.txt#?

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


I want to upgrade my Ubuntu 11.10, because I cannot install WvDial on it. But In Ubuntu 13.10 WvDial is installed on Ubuntu 13.10 by default. How can I upgrade my Ubuntu 11.10 to Ubuntu 13.10 via live disc ?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


how to place the black circle on parents' middle vertically?   .title{ background:gold; padding-left:14px; }  .title::before{     content:'';     display:inline-block;     vertical-align:middle;     margin-right:9px;     width:5px; height:5px;     border-radius:50%;   background:black; }
LOREM

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I have a sphere with radius $r$ that equally divided in to two hemisphere P and S. There is a plane that separate two different zone A and B. Upper zone called A and lower zone called B.  $\alpha$ is the contact angle. So $\alpha $ larger means sphere is more in zone A and vice versa. Range of $\alpha $ can go between $[0,\pi]$The angle $\beta$ defines the orientation of the sphere which is an angle between z axis (vertical) and a unit vector. Range of $\beta $ can be $[0,2\pi]$. The  Schematic representation of this is below.  To calculate the area of $P$ portion of the sphere into $A$ is given by following equation $$ \mathrm{Area}_{P@A}=  r^2\int_{\theta=\frac{\pi}{2}-\beta}^\alpha  \int_{\phi=\arcsin(1/(\tan\theta \tan \beta))} ^{\pi -\arcsin(1/(\tan\theta \tan \beta)} \sin\theta\; d\theta d\phi. $$  After solving this equation we can get the following solution.  $$ \textrm{Area}_{P@A}= 2 r^2 \left\{ \cos (\alpha) \sin ^{-1}(\cot (\alpha) \cot (\beta)) -\tan ^{-1}\left(\frac{\cos (\beta)}{\sqrt{\sin ^2(\beta)-\cos ^2(\alpha)}}\right)\right\}+\pi  r^2 (1-\cos (\alpha)). $$  Note that the solution is defined as a function of $\alpha$ and $\beta$. If we change the value of $\alpha $ and $\beta$, the area of P into A will change eventually.     Now consider more complex case where $P$ and $S$ are not equal hemisphere.         Question:   If $P$ and $S$ are not equal hemisphere rather they are spherical cap, then what I need to consider to calculate the area of $P$ into zone $A$ as a function of $\alpha$ and $\beta$? Here $\gamma$ defines size of the spherical cap and r1 is the radius of the base of the cap. Do I need to introduce any other parameter?

Given a sphere of radius $r$ with two spherical caps on it defined by the radii ($a_1$ and $a_2$) of the bases of the spherical caps, given a separation of the two spherical caps by angle $\theta$, how do you calculate the surface area of that intersection?   To clarify, the area is that of the curved surface on the sphere defined by the intersection. At the extreme where both $a_1,a_2 = r$, we would be describing a spherical lune.   Alternatively define the spherical caps by the angles  $\Phi_1 = \arcsin(a_1/r)$ and $\Phi_2 = \arcsin(a_2/r)$.


I would first like to say that my question is very much similar to , but the proposed solutions don't seem to be working for me. I think that my question is slightly different, as I'm performing a clip/intersection rather than a difference. Onto it!  My input can be found , and an example country outline can be downloaded . I've been using the Ethiopia ESRI shapefile.  What I'm trying to do is quite simple. I first clip the country shapefile to the FEWSNET shapefile. Once the clip is performed, I need to symbolize the ML1 variables from the latter shapefile. In QGIS, I perform the vector clip, then with the newly clipped shapefile, I go to Properties > Style, change it from single to categorized, then choose my symbology for the ML1 category.   The code that I have so far has also been quite simple:  library(rgdal) library(rgeos)  #read in ML and Ethiopia shapefiles ea.ml1 <- readOGR(dsn = "D:/Mapping-R/Ethiopia", layer = "EA201507_ML1") eth <- readOGR(dsn = "D:/Mapping-R/Ethiopia", layer = "ETH_adm0")  #perform clip eth.clip <- gIntersection(ea.ml1, eth, byid = TRUE)   The problem is that the data that I need to symbolize (ML1) exists under ea.ml1@data$ML1. When I perform the clip, it appears that ea.ml1@data is lost altogether. How do I retain that data with my clip so that I can properly symbolize it?

I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result.  Unfortunately, using the gIntersection function from rgeos (which works impressively quickly to intersect the polygons), I cannot seem to retrieve the associated dataframes.  Consider the following example:  > fracPoly <- gIntersection( toSingle, fromSingle ) > class(toSingle) [1] "SpatialPolygonsDataFrame" > class(fromSingle) [1] "SpatialPolygonsDataFrame" > class(fracPoly) [1] "SpatialPolygons"   I can write a wrapper function which handles the transfer of data.frames, but it will be a minor pain to get all the checking right and before I did I was hoping someone could either confirm that there's no better way or point me towards another function (or option for gIntersection) which would allow me to retain the associated data.frames.  Update  On further reflection, this may may be very deliberate behavior by gIntersection.  After all, of the two SPDFs, whose data.frame do you pass along?  So I may have to write a wrapper which merges the two.


I have a program that reads a bin, and stores data in an array of structs.  My problem is that all the variables of the struct (int, long, unsigned int, char[8] etc) counted manually should add up to 60. A provided .bin file with only 1 entry (which is confirmed to be correct), also counts as 60 bytes using the following code:  fseek(file, 0, SEEK_END); long int length = ftell(file); fseek(record, 0, SEEK_SET);   HOWEVER, when I'm assigning space, I'm using a printf statement to debug:  struct Data *entries = malloc(length); // length is 60 from above code printf("%d entries of size %ld", count, sizeof(struct Data)); // count is number of entries  // RESULT IN CONSOLE IS "1 entries of size 80"   So obviously, there's an extra 20 bytes when using sizeof(x). Why?   Also if that's the case, how DO I go about allocating the appropriate space, reading from a .bin file, if I don't know how many entries there are?  Thanks!  EDIT: This is the struct (mine):  struct Data{     unsigned int creator;     unsigned short fish;     short vacation;     char existence[8];     short front;     int bait;     short peace;     char night;     char burst;     unsigned long snow;      char finger;     double idea;     float goodbye;     int stocking;     char bell;     double grandfather; }

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I have three computers, a Win7 laptop, a Mac and an Ubuntu box. The Win7 laptop has just died and to try to get it running again I have to run various Win7 apps, like HDScan and Intel's raid manager IAStorUI, but I can't get Windows to load.   How do I create a CD or a USB stick that will boot into a Windows GUI? My rescue disk lets me run command prompt commands, but not any app that needs a GUI.   I have looked at Oracle's virtual box and there seems to be a release called portable-virtualbox but I need Windows to run the install exe.  Are there any other solutions? e.g. iso images I can just burn to disk?  This question had been marked as a duplicate of , but for new potential answerers, my situation is different from that question and is not covered by the answers there.  To clarify:   I need a solution that I can set up using either Mac or Ubuntu, because I do not have a functional Windows OS anymore.  Anything like Win2Go or Windows to Disk does not help because I can't run them.  GRUB does not provide a solution for creating a bootable Win7 USB stick. Neither does installing VMware on Linux mint.  BartPE is no longer available.

Is it possible to install Windows OS to plug and play storage devices such as external hard drives, HDD enclosures (with SATA hard drives), USB flashdrives and the likes? What OS's? And if it's possible, can I boot on it after the installation/formatting?  I've read someone has tried this already using Windows XP but failed since XP reinitializes all attached USB devices before loading OS, thus disabling the External HDD that is attached via USB port.  What about other Windows OS: on Windows 7 or 8.... or Windows 10?  I'm asking this because I'm planning to create a portable OS. When I'm at my house, when I go to my grandmother's, or to a friend's place: I just simple plug that portable storage device, change the boot priority, and turn on the system and ta-da! I will only see one environment every time.


In my latest review  I was immediately locked when I accidentally clicked the flag link.  The question how I was able to click the link accidentally can be easily answered with, I did but I don't know either.  Why is clicking "flag" immediately counted as failed even if the flag workflow can be canceled?

Few arguments against it:   Pressing the flag button doesn't mean actually submitting it (as in every test/form). There might be an unknown duplicate, if you assume it's the first post (as you were told) it might be worthy to flag it. You might want to look if someone else thought it was duplicate by "making half way" to flagging it.   Why pressing the flag button makes you fail an audit? I think it shouldn't.  Edit:  The implementation difficulty (fake flagging UI) and the tips about how avoid failing (and reviewing!) by skipping the answer adds some insight, but still doesn't answer the question why it's not a valid review.    Moreover, I would like to add one more,  describes a reviewer that failed an audit while trying to flag a question as off topic. The question was clearly off topic, and still after 1300 views no one flagged it.


I'm not getting anywhere with my cloth design animation.  I have a city idea planned out for my animation. And I want banners to be seen on a few of the buildings with a dragon on the banner in gold.  Every time I run the animation to see how it turned out, the design just falls off. I used a .svg model which I then converted to a mesh.  From there I joined the 2 meshes together. What am I doing wrong?

I have a flag I want to waft in the wind. I imported the shape as an SVG from Adobe Illustrator.  I converted the mesh to a curve.  It wouldn't let me make some subdivisons but it still seems to work with the cloth property.    When I press play, you can see the structure of the flag stops.  How can I make those last 3 points intact? Also the fill colour seems to have disappeared, do you know why and how I can bring it back?    Thanks  Steve  File here:


Most SE sites are subdomains of stackexchange.com. However, some aren't. What are the list of those that aren't?  Right now i just know stackoverflow.com, superuser.com, serverfault.com, and askubuntu.com.

I work behind an really annoying firewall, and I just want the net admin to add all the SE websites to the whitelist. Right now I've lost access to Stack Overflow's authentication, but not Meta's... so I have to come here before I log in there.  It's driving me nuts. Basically I just want to add an exclusion rule for all SE domains; not only the website domains, but also the content domains such as gravatar.com, quantserve.com, the domain that holds static content, etc...


My problem is image is displayed correctly, however text is not wrapped over the image, but is on top of it, as the image is not there.  Sample code:  \begin{figure}   \includegraphics[width=\textwidth]{architecture.png}   \caption{Mesos architecture}\label{fig:architecture} \end{figure}

It's my first time working with a two-column document (declared as an argument to \documentclass) and I need to put in a very wide figure. The thing is, LaTeX puts it bounded by a column so it either (1) gets truncated, bleeding off the border or [right column] or (2) displays with an awkward text/line wrapping. Is there any way for me to get it to display the way \maketitle does, that is, at the top of the page (ideally) but at least spanning both columns and no awkward line wrapping? BTW, I use the following code to display my figure: \begin{figure}     \centering     \includegraphics[width=6in]{tictac.png}     \caption{\textsf{The structure of our tic-tac-toe implementation.}}     \label{fig:ds} \end{figure}


This seems useful but I can't find anything like it.  For example, I might want to say that $\mathbb{N}_{7} = \{ 0, 1, 2, 3, 4, 5, 6 \}$ or $\mathbb{N}_{7} = \{ 0, 1, 2, 3, 4, 5, 6, 7 \}$. Is some sort of notation like that accepted?

Is it true that I can write the set of the the first $n$ natural numbers as $[ n] $?  For example, $[10]= \{1,2,3,4,5,6,7,8,9,10 \}$. And in which math context this is used?


I notice a lot of people—even native speakers sometimes—change the order of certain words when asking a question (e.g., “We don't know what is it”).  As far as I know, it should be “We don't know what it is.”  Is changing the order of certain words, as in the first example (is–it), correct at all?

I understand that when I report a question, I put the subject back in front of the verb, as in:  "He asked if she was going to be late."  But I always get puzzled when it comes to reporting a question with a question. (In fact I'm not even sure this is reported speech, but I think it is, because I'm reporting my own doubts.)  My starting point is the question:     What is the task for the afternoon class?   But now I want to ask if anyone in a group knows what the task is. Which of the following alternatives would be grammatical?     (a) Does anyone know what is the task for the afternoon class?   (b) Does anyone know what the task is for the afternoon class?   (c) Does anyone know what the task for the afternoon class is?   Intuitively, I would pick (c), but I don't know if that is the correct choice, and I certainly don't know why.  Can anyone tell me which of the options is correct and why?


I want to use tdclock in beamer and I use xelatex to compile it.  \documentclass{beamer} \usepackage[timeinterval=1]{tdclock} \usetheme{Madrid} \date[\tdtime]{\today} \begin{document}  \begin{frame}     \initclock     hello \tdclock hi \end{frame}  \end{document}

I'm adding a title clock in the foot line of a beamer slide, if I compile it with pdfLaTeX it works fine; while the clock doesn't align in the middle vertically if compiling with XeLaTeX. How can I fix this.  Here is my MWE:  \documentclass[10pt]{beamer} \usepackage[font=Times,timeinterval=1]{tdclock} \usetheme{Madrid} \title{Title} \author{Authors} \institute{Institute} \date[\initclock\tddate\ \ \tdtime]{\today} \begin{document} \frame{\titlepage} \end{document}


I'm trying to install Ubuntu 18.04 on a Lenovo T470. It currently has Windows 10. In System Properties it shows Windows 10, 64-bit OS, x64 processor.  When I try to install Ubuntu from pen drive nothing happens, so tried xboot QEMU to emulate. In QEMU it showed the error     This kernel requires an x86-64 CPU, but only detected an i686 CPU.   I searched for this issue on Ask Ubuntu, and I found that the solutions provided were for setting up Ubuntu in virtual machines by enabling virtualization from BIOS, so I enabled virtualization from BIOS and tried again... but got the same error.  Some other answers suggest downloading and burning a 64-bit image, which I already have, but it didn't work.  I tried with an old Lubuntu-i386 image and surprisingly it worked.  What's the problem and how can I fix it?

I would like to see a full how-to guide on how to install Ubuntu.


Is it possible to when a user type  xxxx.com   that the url  change for   www.xxxx.com   or better that all request go to

This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to finding information that is that is covered by the question should be closed as a duplication of this question. .  Whats the point in this question? The idea while not perfect is catch the most commonly asked questions regarding redirects using the  htaccess on the Apache platform either on  some type of lamp or a live server. The type of answers should be generally those that you could imagine are used by 100,000’s of sites world-wide and are constantly asked here at Pro Webmasters repeatedly over and over in various forms.  A few examples of the type of answers we are looking for:   How can I redirect non-www to www? How can I redirect a sub domain to the main domain? How can I redirect a sub folder from domain to a root or a subdomain?  How can I redirect an old URL to a new URL?   A few examples of the types of answers that we are not looking for:   Answers that do not involve a redirect. Any answers relating to NGinx, IIS or any other non-Apache platform. Answers that involve custom and complex string or query removals.   Resources for Advanced to Complex Mod_Rewrite Rules:      Please note: that this question is still in construction and may need some refining either by myself or a real moderator of Pro Webmasters, if you have any concerns or questions .


I have been a Windows user all my life but want to move to Linux.  I have downloaded the ISO file for Ubuntu Late..now what?  please help  thanks alot   Craig


Okay so, first of all, I'm really new into programming. I want to get the hour and the date of my machine as an integer, I have tried googling it and looked up a lot of questions about time on StackOverflow but can't find an answer. Everything I tried didn't work out. Even just getting the time to print out, and that even though I just copied it from a website. The problem with that is, that Visual Studios tells me the function is unsafe and I should add a _s to it but that just makes things worse. I then looked up on how to tell it to ignore that but that doesn't work either. Now besides the fact, that I can't even get the time to print out, I couldn't find a way to just get date and the hours as a normal integer.

Total newbie question here; I apologize in advance.  Suppose I have a daemon written in C that wakes itself up every five minutes or so, does some processing if there's anything in its input queue, and then goes back to sleep. Now suppose there is some processing that it only has to do after a certain (configurable) time--say, 2 pm (and before midnight).  In C, what is the quickest, best way to get the current time's hour into an int variable, so that it can easily be checked against--to determine if, in fact, it is after 2pm on today?


I have a Base64 encoded String: iQA8AJ4ANwCjADYAqQA1ALAANAC7ADMAyAAyANUAMQACATEAEwEyACMBNABDATkAUwE8AGIBQABwAUQAfgFIAIsBTQCYAVEApQFVALIBWQC+AVwAygFgANcBYgDjAWQA8AFmAPwBZwAIAmcAFQJmACECZAAsAmMAOAJgAEMCXQBNAlkAVgJWAF8CUgBnAk4AbgJKAHUCRgB7AkIAgAI+AIQCOwCIAjgAjAI1AI8CMwCSAjIA  My system is required to Base64 decode this value. The decoded data is a series of 2 byte x 2 byte y coordinates (low order byte 1st). i.e. (-1,-1) or (0xFFFF, 0xFFFF) denotes a pen up.  How can I convert Based64 encoded to Point Array in Java?

I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6.


My husband is on a business trip to London. His trip is getting extended for a couple of months, and he holds a visa until April 2018.  I tried to apply for a UK tourist visa, since it's our anniversary in January, so that I can visit him. I had my uncle sponsoring my trip and showed a bank balance of 150,000 INR from my end as well. My visa got rejected twice: the first time saying insufficient funds and the second time saying that I will not return back to India.   I am considering applying for a Schengen visa, but how can my husband come to Europe to visit me? He doesn't have a Schengen visa and I think he has to return back to India to apply for one. Is there any other possibility for us to meet?

We are Indians and will be visiting UK on short-stay visas for about five months.  Can we apply for Schengen tourist visas while we are in London?


Prove: if   $$a+b+c=\frac1a+\frac1b+\frac1c,\quad0<a,b,c,\in\mathbb R$$   then   $$\frac1{(2a+b+c)^2}+\frac1{(a+2b+c)^2}+\frac1{(a+b+2c)^2}\le\frac3{16}$$   All I tried was $$2a+b+c=a+\frac1a+\frac1b+\frac1c$$ $$LHS=a^2b^2c^2\left(\frac1{((a^2+1)bc+ca+ab)^2}+\frac1{((b^2+1)ca+ab+bc)^2}+\frac1{((c^2+1)ab+bc+ca)^2}\right)$$ that didn't help at all. Thanks.

Let a,b,c be positive real number, such that  $\frac{1}{a}+\frac{1}{b}+\frac{1}{c}=a+b+c$. Prove that :  $\frac{1}{(2a+b+c)^2}+\frac{1}{(2b+c+a)^2}+\frac{1}{(2c+a+b)^2} \leq \frac{3}{16}$  Can anyone help me how to deal with it?


how would you find the value of : $$ \left(1-\frac{1}{2^2}\right) \left(1-\frac{1}{3^2}\right) \left(1-\frac{1}{4^2}\right) \ldots \left(1-\frac{1}{2017^2}\right)$$ Tried looking for some kind of pattern here but in vain . thanks in advance

For $n \geq 2$ prove that $(1- \frac{1}{4})(1- \frac{1}{9})(1- \frac{1}{16})...(1- \frac{1}{n^2}) = \frac{n+1}{2n}$  We need to use induction.   The Principle of Mathematical Induction, Theorem 4.2.1, states that $n_0 \in \mathbb{Z}$. For each integer $n \geq n_o$, let $P(n)$ be a statement about $n$. Suppose that the following two statements are true:   $P(n_o)$ $( \forall n \geq n_o)[P(n) \rightarrow P(n+1)]$   Then, for all integers $n \geq n_o$, that statement $P(n)$ is true.  Suppose,  $(1- \frac{1}{4})(1- \frac{1}{9})(1- \frac{1}{16})...(1- \frac{1}{n^2}) = \frac{n+1}{2n}$, the equation, is true for some natural number $k$.  $\frac{1}{2^2})*...*(1- \frac{1}{k^2}) = \frac{k+1}{2k}$  The induction hypothesis $P(k) \rightarrow P(k+1)$ must hold for any natural number $k, P(k),$ from the basis and inductive step.  $(\frac{1}{2^2})*...*(1- \frac{1}{k^2})*(1- \frac{1}{(k+1)^2}) = \frac{k+1}{2k}(1- \frac{1}{(k+1)^2})$  $\leftrightarrow$ $\frac{k+1}{2k}(\frac{(k+1)^2}{(k+1)^2}- \frac{1}{(k+1)^2})$  $\leftrightarrow$ $(\frac{(k+1)}{2k})( \frac{(k+1)^2-1}{(k+1)^2})$  $\leftrightarrow$ $( \frac{(k^2+2k+1-1}{(2k)(k+1)})$  $\leftrightarrow$ $( \frac{(k^2+2k}{(2k)(k+1)})$  $\leftrightarrow$ $( \frac{k+2}{(2)(k+1)})$  We need to demonstrate that   $(\frac{1}{2^2})*...*(1- \frac{1}{n^2}) = \frac{n+1}{2n}$  holds true for $n \geq 2$  The question is do I just substitute a number that is greater than two after I did the induction?


Part of the reason I'm asking this is because the UA centuar  and minotaur both have a feature that says the type is both humanoid and monstrosity. This implies that having a non-humanoid race would not be balanced. But it seems that if the type was something like elemental it would be balanced due to the fact you could be bound using spells like planar binding and that this would offset the boost the spells such as hold person wouldn't work on you. So would such a race be balanced?

have the Fey trait (Guildmaster's Guide to Ravnica, pg. 16):     Fey. Your creature type is fey, rather than humanoid.   What does this mean in terms of gameplay? I know that certain spells, such as hold person, require a humanoid target, so a centaur wouldn't be affected by that spell. But what about any implicit mechanics?  In the intro to the Monster Manual (pg. 6) and the , it says under "Type":     The game includes the following monster types, which have no rules of their own.   So does this mean that the only consequence of them having the Fey trait is that they cannot be affected by spells and effects that target humanoids, and can be affected by spells and traits that target fey, and that's it?  For context, the reason I'm asking is that I want to give the playable elven subrace Eladrin the Fey trait as well (to make them consistent with the "monster" Eladrin stats, where they are listed as fey), and want to know the mechanical consequences of doing so.


value = 14000;  ternary string expression is "value > 20000 ? 200 :  value > 15000 && value < 19999 ? 150 : 100 "  Ans should be 100  Is there any ways to evaluate expression?

I would like to do the equivalent of:  object result = Eval("1 + 3"); string now    = Eval("System.DateTime.Now().ToString()") as string   Following Biri s , I got this snippet (modified to remove obsolete method ICodeCompiler.CreateCompiler():  private object Eval(string sExpression) {     CSharpCodeProvider c = new CSharpCodeProvider();     CompilerParameters cp = new CompilerParameters();      cp.ReferencedAssemblies.Add("system.dll");      cp.CompilerOptions = "/t:library";     cp.GenerateInMemory = true;      StringBuilder sb = new StringBuilder("");     sb.Append("using System;\n");      sb.Append("namespace CSCodeEvaler{ \n");     sb.Append("public class CSCodeEvaler{ \n");     sb.Append("public object EvalCode(){\n");     sb.Append("return " + sExpression + "; \n");     sb.Append("} \n");     sb.Append("} \n");     sb.Append("}\n");      CompilerResults cr = c.CompileAssemblyFromSource(cp, sb.ToString());     if (cr.Errors.Count > 0)     {         throw new InvalidExpressionException(             string.Format("Error ({0}) evaluating: {1}",              cr.Errors[0].ErrorText, sExpression));     }      System.Reflection.Assembly a = cr.CompiledAssembly;     object o = a.CreateInstance("CSCodeEvaler.CSCodeEvaler");      Type t = o.GetType();     MethodInfo mi = t.GetMethod("EvalCode");      object s = mi.Invoke(o, null);     return s;  }


I want to create a new matrix environment with different spacing for a matrix instead of manually typing arraystretch locally for each matrix. I am new to more advanced LaTeX coding, and have not quite figured this out. I thought that I could just do \newenvironment{dbmatrix}{     \renewcommand*{\arraystretch}{1.5}     \ensuremath{\begin{bmatrix}  \end{bmatrix}} }}  But then, after searching through Stack, I thought maybe I need to use \bgroup,\egroup or \makeatletter, \makeatother type commands, but have not figured out how these commands really work and failed using them. It would also be great to have maybe an additional environment that took an argument to adjust \arraystretch, like \begin{dbmatrix}{1.5} \end{dbmatrix}. Would love some help and suggestions.

I'm trying to create a pmatrix whose components are rather complicated fractions (Christoffel symbols), and the line spacing is too small making the whole thing a bit cramped and hard to read.  Is there any easy way to increase the spacing (about 1.5 the default would be perfect)?


I am currently working on this application where I want to find the coordinates of a particular element in a 2D array. I've initiated the 2D array as: String[][] initGrid = new String[height][width]  the contents of this grid were read in from a .in file: 0 0 A 0  with the code: for(int i = 0; i < height; i++) {     for(int j = 0; j < width; j++) {         initGrid[i][j] = in.next();     } }    But when I tried to find the co-ordinates of "A" in the grid with this following code: for(int i = 0; i < initGrid.length; i++) {     for(int j = 0; j < initGrid[0].length; j++) {         if(initGrid[i][j] == "A")             System.out.print(i);             System.out.print(j);             }     } }  It won't print for some reason. Some guidance would be greatly appreciated!

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?