I stumbled upon this strange behavior of  class and I want to share.  Convert.ToInt (16,32,64) methods when used on double or decimal type round in a strange way:  from msdn:     converted value is rounded to the nearest 16-bit signed integer. If   value is halfway between two whole numbers, the even number is   returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.   This is a really strange behavior and it can lead to hard to find bugs.  I looked with reflector to analyzed the code but it is an extern method:  //Convert.ToInt32 [SecuritySafeCritical, __DynamicallyInvokable] public static int ToInt32(decimal value) {     return decimal.FCallToInt32(value); }  //decimal [MethodImpl(MethodImplOptions.InternalCall), SecurityCritical] internal static extern int FCallToInt32(decimal d);   I know that Convert class is meant to converts a base data type to another base data type and it should not be used for rounding value but you will agree that we would have to expect a standard rounding.  My question is why this behavior and why it is not stamped with big red fonts on MSDN

According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals < 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) < number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead.


I work at a web design firm. I need Safari's cache to be permanently disabled on my work computer, as it creates too much confusion when I'm testing websites. This setting should persist after I restart Safari, and when the inspector is closed.  The method in  is no longer working as of Safari 11. I'm testing with .  Is there any way to accomplish this?

I am using Safari to develop for a while. One thing I always liked is when you clear the cache, it really does, unlike other browsers I tried in the past. But in previous versions, specially when working in a code in a local testing server, just reloading the page will reload everything from disk. Now I have to use de shortcut command+alt+e to clear before reload or some new CSS won't load, even some http request will return old values. Just reloading the page won't guarantee to show me the last modifications.  I looked at preferences and develop menu but didn't find an option to just don't use any caches at all - the perfect option will be don't use caches when I have the web inspector opened, means I am developing.  Did I miss this option, or there is another way to disable all caches?


When I am working in a scene sometimes the view on the viewport just won't zoom in, and I can't pan, only rotate the view...

I often find that I can zoom in to a point, but then cannot zoom any more, even when there is a lot of room to zoom to the meshes on the scene.   This is particularly annoying in the following scenario:  I often land up left clicking on the scene and the 3D cursor shifts there. I use Shift+C to shift the 3D cursor back to the origin. However, this also centers the view on the cursor and shifts the view to show all objects, and sometimes this zooms things way out – at this point, if I try to zoom in, I can zoom in to a point (using the pinch/zoom on trackpad), but then it stops zooming in.   How do I zoom in after that? Is there anything else I am doing wrong in this case?


In FreeBSD there are an utility to support circular log files called .  This is very interesting for avoid the maintenance of the logs of some services (outside systemd and their journald).  Are there any alternative to do the same in linux and/or with rsyslog?

I've got a long-running command that generates a lot of output on stdout. I'd like to be able to retain, for instance, only the last three days or the last gibibyte (avoiding cutting lines in the middle), and, if possible, in file chunks not larger than 20 MiB. Each file chunk is being named with a numeric suffix or a timestamp.  Something like:  my-cmd | magic-command --output-file-template=my-cmd-%t \                        --keep-bytes=1G \                        --keep-time=3d \                        --max-chunk-size=20M \                        --compress=xz   Would write:  my-cmd-2014-09-05T10:04:23Z   When it's reaching 20M, it would compress it and open a new one, and so on, and after a while would it starts deleting the oldest files.  Does such a command exist?  I'm aware of logrotate and its ability to manage files written by other applications, but I'm looking for something simpler that doesn't involve having to set up a cron job, specify rules, suspend the process, etc.


Scenario: A football keeper throws the ball in the air to kick it out, but the other team's striker kicks it away before the keeper can make contact. The striker scores on the play. Should the goal be disallowed?

When the ball is being bounced by the goalkeeper from his hands and a player steals it without touching the goalkeeper (while the goalkeeper is not touching the ball) and scores, is it legal or not?   shows what I'm talking about.


I have a Google Spreadsheet, which is accessible (only view) by anyone who has the link. I want to have an overview of every timestamp the document was opened by an not-logged-in (= anonymous) user. How can I do this?

I sent out links (read-only) to a number of people and am curious if there is a way to see whether people are actually going out and viewing that document.   I understand it likely won't have names for everyone/anyone that looks at it, but I'd be interested at least in knowing how many "hits" it got to make sure that at least some of those I sent it too actually looked at it.


According to relativity nothing in the universe can move faster than light through space time.  The light always appear to be at c regardless of the velocity of the observer , same is true for any object moving at c.  So how does it happens?  Does the space relatively contracts and expands when the observer is moving towards and away respectively from the direction of light?

I was told that the Galilean relative velocity rule does not apply to the speed of light. No matter how fast two objects are moving, the speed of light will remain same for both of them.   How and why is this possible?   Also, why can't anything travel faster than light?


this is quite a simple question, however I'm finding it tricky. I want to treat a char* as if it were a std::string, for instance:      char *p = ...; // read a huge chuck from a file      std::string s(p); // this is not what I want   So, if I use the constructor, I get a copy of p, which is a waste of memory and time. Is it possible somehow to avoid this, and "assign" the std::string content to a pre-existing address?  Any other idea is more than welcome!  Thanks!

I have a situation where I need to process large (many GB's) amounts of data as such:   build a large string by appending many smaller (C char*) strings trim the string convert the string into a C++ const std::string for processing (read only) repeat   The data in each iteration are independent.  My question is, I'd like to minimise (if possible eliminate) heap allocated memory usage, as it at the moment is my largest performance problem.  Is there a way to convert a C string (char*) into a stl C++ string (std::string) without requiring std::string to internally alloc/copy the data?  Alternatively, could I use stringstreams or something similar to re-use a large buffer?  Edit: Thanks for the answers, for clarity, I think a revised question would be:  How can I build (via multiple appends) a stl C++ string efficiently. And if performing this action in a loop, where each loop is totally independant, how can I re-use thisallocated space.


Because we took the average over 80 students but sum up over 52 weeks, I feel that it’s correct only under certain assumptions but I can’t pinpoint them. Are they the following?   The distribution in each week (over the different students) is the identical. The distribution for each student (over the different weeks) is the identical.

Why I think it might be correct:  Search “not an integer” in  and you would find 2 occurrences of the author stating that CLT is valid even if $n$ is not an integer.  Why I think it might be wrong:  If $X$ is assumed to be Poisson, then I can see why CLT still holds for non-integer values of $n$. But I don’t see why CLT should hold for all possible distributions for $X$. The 2 proofs for CLT at  don’t make sense to me for non-integer values of $n$.


I'm working with ASP.NET MVC 3 C# and I have this regex:     @"([a-zA-Z0-9%._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4})+"   It works for almost all cases, unless after the @ have less than 2 characters.  Ex:  stackoverflow@ab.com < Valid e-mail.  stackoverflow@a.com < Invalid e-mail, but my regex don't works.  I don't found something like this on forum and i I know almost nothing about regex.  Someone can help with this? Thanks. (Sorry for bad english).

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


My wife has a Visitor Visa for Canada and daughter has Study Permit for Canada which is valid more than six months from the date they are travelling.  They have a layover at London for 6 hours which does not cross the day meaning day of landing and boarding the next flight is on the same day.  So, do they require a Transit Visa? I have already gone through the  to check the same but I could not understand last question which says ask your airline whether you need to pass the border control.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I have the following issue.  With a Monte Carlo simulation I have generated a data set, x values and their frequencies. When I plot the histogram I noticed that the shape of the distribution is skewed. The distribution of ln(x) is almost a perfect Gaussian distribution. As far as I have understood this right a quantity is ln-normal distributed when ln(x) is normal distributed. So what then I calculated $\mu$ and $\sigma$ of the distribution of ln(x). As I mentioned I assumed that ln(x) is normal distributed so that its PDF is $y=A\times e^{-0.5\times(ln(x)-\mu)^2/\sigma^2}$.   Now, how do I get the standard deviation of x (being ln-normal distributed) and its expected value?

I am trying to calculate the variance and standard deviation for a log normal distribution.  I was able to calculate the mean after reading this stack exchange article .  Now I want to calculate the variance and standard deviation.  I am unclear what formulas I can use.  I will calculate this in R.


I have an existing windows application, for which I have decided to create a Mac version. The problem is that the current UI involves a lot of buttons, tabbed panels, multiple windows etc.  This UI had been rated as intuitive and easy to use and straightforward by many customers and editors. But a beginner (very less experience) may find in confusing a little, but it has been complemented with tutorial.  When creating the Macintosh variant, should I focus on creating a simplified and minimalistic UI (this does not mean the current UI is complex, but I think Mac user's prefer a simple UI right?) or should I try to copy the exact same thing?  By reducing the UI some of the features may be missing. But it can be added later if needed. Should I focus on a fresh approach (this is easier rather than copying the complex UI pattern) or should I go with the old recognized setup?


I have drop-down list with list of many options. Every time when a user make a choice then specific function starts.  $('#host').on('change', function() {    if ( $('#host').val() == 'stack' ) stack();   else if ( $('#host').val() == 'exchange' ) exchange();   else if ( $('#host').val() == 'something' ) something();   ...  }   The list become very long because more function will be added. Is there a shorter way to execute name of the function from $('#host').val()?

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I want to solve ${y^2}=x^4+x^3+x^2+x+1$ in $\mathbb{Z}$.    I can find four solutions. Is there another solution? I know that there are six solutions. $$(-1, \pm 1)\;,\;(0, \pm 1).$$  My try: \begin{align}   & x^4+x^3+x^2+x+1=0\quad \Rightarrow \underbrace{\left( x+\frac{1}{x} \right)^2}_{t^2}+\underbrace{\left( x+\frac{1}{x} \right)}_{t}-1=0\,\Rightarrow t\notin \mathbb{Z} \\   & x^4+x^3+x^2+x+1={\pm 1}^2\quad\Rightarrow \,x=-1\,\,,\,x=0.\\  \end{align}   Thanks.

I successfully thought of bounding our expression examining consecutive squares that attain values close to it, and this led to the solution I'll post as an answer, which was the one reported. However, before that, I had briefly tried manipulating $$n^4+n^3+n^2+n+1=m^2.$$Since $n=1$ is not a solution, I rewrote this as $$\frac{n^5-1}{n-1}=m^2 \\ n^5-1=nm^2-m^2 \\ m^2-1=n(m^2-n^4) \\ (m-1)(m+1)=n(m-n^2)(m+n^2),$$ but in vain. Does manipulation lead somewhere? Is there a different approach from both of mine?


I have installed WAMP server in students labs. It is working fine through admin login. But when student login though their account in  Windows 7 , it doesn’t not working. It only works after admin login and I have start the services automatically and also add in startup. But this also could not solve the problem.   I do not want to give admin rights to student group. Please help me to solve this problem.

I just set up Dexpot to start WampServer automatically when I enter a new desktop. The problem is that I've hidden my taskbar, and WampServer needs administrative rights. So I have to use Alt-Tab to get to the "Give admin rights" box, and accept it. This is not as automatically as I want. Is it possible to give WampServer admin rights every time automatically?


I am new to Ubuntu...Want to use this as a web browser and DVD player

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


Greetings,   I have a large number of fitnesse tests for a project (1000+). Over time as features change, and shared fixtures come and go we have been left with unused orphaned code. But how to find it?   For those who don't know how fit works, you have a wiki page with a like like this:  | When a User Adds | 1 | and | 2 | He is returned | 3 |  Which is mapped at run time to a method like:  public bool WhenAUserAddsAndHeIsReturned(int first, int second, int expectedResult){      return ((first + second) == expectedResult) }   finding all of these mappings by hand would be drudgery, writing a script to do it would be a long and difficult task. Im sure there must be a better solution.  Is there a utility out there that could monitor the fixture dll while the tests are running and then return a list of all classes and methods that were NOT run?

I wonder what options there are for .NET (or C# specifically) code coverage, especially in the lower priced segment?  I am not looking for recommendations, but for a comparison of products based on facts. I know the following:      Seems to be very popular and looks quite good Supports statement coverage and branch coverage  Older beta versions are available      Well, it's Microsoft so I'd expect it to work properly Fully integrated into Visual Studio At least $5,469   - no further development (moved to OpenCover)   Open source Supports statement coverage   - successor to PartCover   OpenSource Supports branch and statement coverage 32 and 64 bit support Silverlight support   No      Works with 32 and 64 bits, full C# 4.0 Handles both small and very large code bases $250 for single user license     $100 for Personal License. Free for user groups, open source projects, students and teachers. Supports statement coverage Silverlight support     $159 for personal license $289 for commercial seat license   * Free during beta,  . Code coverage indicators in Visual Studio Continuous (near real time) testing Visual per-test code coverage Performance metrics, parallel multi-core test execution      for developer license NDepend can import coverage data from NCover, DotCover, Visual Studio 2017; 2015, 2013, 2012, 2010 and 2008 Code Coverage files. Dependency graph Dependency structure matrix Visualizing code metrics Validating code rules


In my android apps i have 2 Layouts created using viewFlipper    <?xml version="1.0" encoding="utf-8"?>   <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"       android:orientation="vertical" android:layout_width="match_parent"       android:id="@+id/switching"       android:layout_height="match_parent">            <include layout="@layout/activity_login"/>           <include layout="@layout/content_team_choose"/>           <include layout="@layout/waiting"/>   </ViewFlipper>   and  <?xml version="1.0" encoding="utf-8"?> <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical" android:layout_width="match_parent"     android:id="@+id/switch_game"     android:layout_height="match_parent">      <include layout="@layout/main_game"/>     <include layout="@layout/chat"/> </ViewFlipper>   in my fist activity have access to the view like this    protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.switching );         viewFlipper = (ViewFlipper) findViewById(R.id.switching);  //some other code which triggers the change of the view, //like a onClickListener                      viewFlipper.setDisplayedChild(1);   and this works fine. In my second activity, if i try to access to the other view flipper, and i do vievFlipper.setDisplayedChild(1) a NullPointerExcption is thrown. So i tried this   protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.switch_game);     viewFlipper = (ViewFlipper) findViewById(R.id.switch_game);   if(viewFipper == null)          Log.d("ViewError", "the viewFlipper is null");   and the Log appears, but i can't get why only in this case the view is null. I have even tryied to get the Layout "switching" in the second activity and this too gave me the same issues.  EDIT. The NullPointerException was thrown by a viewFlipper.setDisplayedChild(1); trying to access to a children of the layout, but i wasn't sure if only the childrens were null or all the viewFlipper, so i tryied the last part of code, verifying that the whole layout was null

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


I know that there are some options for wallpapers on Ubuntu, but how to pick up a custom image and set as wallpaper?

I have Ubuntu 11.10 installed and want to download and install additional wallpapers on my desktop.   How do I do this?


Let $A$ be a subset of $\mathbb N$.$A$ contains 5 elements.sum of any three elements is prime.does $A$ exists ?please give some hints .

Does there exist $A \subseteq \mathbb N $ such that $|A|=5$ and sum of any $3$ distinct elements of $A$ is a prime number ?


I'm trying to create a SWOT (strengths, weaknesses, opportunities, threats) table, which is a basic 4x2 table. The cells that aren't part of the header will contain itemized text. All cells have to be vertically and horizontally aligned to the center.  I've managed to get it nearly working, as such:  \begin{tabu}{|X[c,m]|X[c,m]|} \tabucline-  \rowfont{\bfseries} \cellcolor[HTML]{009925} STRENGTHS & \cellcolor[HTML]{D50F25} WEAKNESSES \\[5pt] \tabucline-  \begin{itemize}     \item Hello     \item This is an item     \item This is another item \end{itemize}  & \begin{itemize}     \item Hello     \item This is an item     \item This is another item \end{itemize} \\ \tabucline-  \rowfont{\bfseries} \cellcolor[HTML]{3369E8} OPPORTUNITIES & \cellcolor[HTML]{EEB211} THREATS \\[5pt]  \tabucline-  \begin{itemize}     \item Hello     \item This is an item     \item This is another item \end{itemize}  & \begin{itemize}     \item Hello     \item This is an item     \item This is another item \end{itemize} \\  \tabucline-  \end{tabu}   This outputs the following table:    The headers of the second column are not vertically aligned (like with the first). However, the itemize of the second column are vertically aligned, which leads me to think I've made a small mistake. However, I can't manage to figure out what the issue is. Please help.

Unfortunatly, I have a problem with m-columns (array package) in tables with adjusted row height. Somehow in the last column (only there) the text is not centered vertically.  Check it out:    \documentclass{article} \usepackage{array}  \begin{document}  \begin{tabular}{|m{0.18cm}|m{0.18cm}|m{0.18cm}|} \hline a & b & c  \\[2ex] \hline 0 & 0 & 0  \\ \hline \end{tabular}  \end{document}


Let $p$ and $q$ be two distinct primes. Prove that $$p^{q-1} + q^{p-1} =1 \mod pq$$  I try to used Fermat little theorem and I obtain the congruence $p^q +q^p=0 \mod pq$. From this I don know how to relate to the congruence on the question.

If $p$ and $q$ are distinct primes , prove that $$p^{q-1}+q^{p-1} \equiv 1 \pmod {pq}$$     Using Fermat's Theorem we can get $$p^{q-1} \equiv 1 \pmod q, \qquad q^{p-1} \equiv 1 \pmod p.$$  After that I have no idea at all. Can anyone help me please


I answered a question on Stack Overflow and had an upvote and was an accepted answer. I then log in later and what was +25 reputation points is now gone.  I know it's probably not a big deal people with a lot of reputation points, but when you're new it really stings. If the user determined that the answer was what he/she wanted, I feel like it should not be able to be deleted.

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


I used to use "snapshot" command to capture screen shots in the Linux Redhat environment. Is there the same or similar command with ubuntu 12.04 LTS?

I wrote a bash script as below:  #!/bin/bash echo "Enter a file name" read filename import -window root $HOME/Desktop/$filename.png   I expected this script to take a screen shot and save the image with the given filename on my desktop.  Problem:  My Ubuntu terminal is giving error:     import: Command Not Found


Every field with 6 elements is isomorphic to $\Bbb Z_2\times \Bbb Z_3$  I think it's false because:  $\Bbb Z_6[x] / (3x +2)$ is such that $3x+2$ is irreducible in $\Bbb Z_6$ so $\Bbb Z_6 [x]/ (3x +2)$ is a  field with 6 elements.   This is isomorphic to $\Bbb Z_2\times \Bbb Z_3$ $\approx \Bbb Z_6$, as the elements are actually the same. We also know that if $f:A\rightarrow B$ is an isomorphism, if A is field then B is field and as  $\Bbb Z_6 [x]/ (3x +2)$ $\approx \Bbb Z_6$, with $\Bbb Z_6 [x]/ (3x +2)$ field, then $\Bbb Z_6$ is a field (contradiction as 6 isn't prime).   Then not every field with 6 elements is isomorphic to $\Bbb Z_2\times \Bbb Z_3$, because $\Bbb Z_6[x] / (3x +2)$ is not isomorphic to $\Bbb Z_2\times \Bbb Z_3$.

Are there any galois fields which consist of product of two primes, as in $\mathrm{GF}(2\cdot 3) = \mathrm{GF}(6)$?


How can I show Comment Count in a specific place of the node template? I want to show Comment Count's of a node (article) in the submitted area instead of in the node links area. I do this already in Drupal 7 with this codes in node.tpl.php:  <?php if (module_exists('comment') && $node->comment) { print t('Comments'). ': ' .$node->comment_count;} ?>   or this code:  <a href="<?php print $node_url;?>#comments"><?php print t('Comments'). ': '. $comment_count; ?>   What is the equivalent code for Drupal 8?

I have had the bright idea of changing my user permissions so as guests cannot see the comments on a node. I have no problems with Views around my site, as they can clearly see there are comments on nodes, and they will be more inclined to register. The problem seems to be when they arrive on my site directly to a node, they don't see any comment, and think "that's a bit crap; let's go."  Is there a way I could show the amount of comments below a node?


I am having trouble manipulating this and decomposing it to its partial fractions. We are asked to find the sum of this but I have tried to find references on summations with factorials in the denominator only and I am still very confused. $$\sum_{n=1}^\infty \frac{(n)}{(n+1)!}$$ How do I decompose this to its partial fractions? Any help is appreciated thank you!

Is my approach to evaluating this series correct?   $$\sum_{n=1}^\infty \frac{n}{(n+1)!}$$  Has partial sum equivalent to:  $$S_m = \sum_{n=1}^m \frac{n}{(n+1)!} = \sum_{j=2}^{m+1} \frac{j-1}{j!} = \sum_{j=2}^{m+1} \frac{1}{(j-1)!} - \sum_{j=2}^{m+1} \frac{1}{j!} $$  For $j$ such that $m+1>j>2$ the terms of the left sum are cancelled by the terms of the right, leaving  $$ S_m =1-\frac{1}{(m+1)!}$$  Hence $ \lim_{m\rightarrow\infty} S_m  = 1$  Apologies for this one. The book I am using hasn't really offered anything on series with factorial denominators (yet). Thanks!


Currently I am using HTC Desire A8181. Currently it is connected to some wifi for Internet. I need to use this device as a Wifi Hotspot to connect Multiple devices. Need Some one help to use Both Wifi and Wifi hotspot.

I would like to extend a WiFi signal. I could buy a WiFi repeater, but a much cheaper solution would be using an older Android 4 device, which I own and don't use. The Android device is capable of creating a WiFi AP. So if I bought an external WiFi USB adapter for it, with a large antenna used as the receiver and the Android device itself as the AP, I could bridge the network.  The hardware should be possible. But how about the Android software? Will there be any issues, or any considerations I need to take note of?


\begin{pmatrix} 2na & -a & -a & -a & -a &  -a& -a\\   -a& a+b & 0 & 0 & -b & 0 & 0\\   -a& 0 & a+b & 0 & 0 & -b &0 \\   -a& 0 & 0 & a+b & 0 &  0&-b \\   -a& -b & 0 & 0 & a+b & 0 & 0\\   -a&  0&-b  & 0 & 0 & a+b &0 \\   -a&  0&  0&-b  & 0 & 0 & a+b \end{pmatrix}   Above matrix is for $n=3$. There are block matrices $(a+b)I_3$ and $(-b)I_3$ above. I think the characteristic polynomial of this matrix for any natural number $n$ is calculated efficiently.  The rank is $2n$, so the characteristic polynomial should zero as the constant part. But I cannot calculate the determinant and I can't get zero when I put $t=0$ when I calculate $\text{char}(M)(t)$ for any $n$.   Also, I would like to know about the form, for example, spectral decomposition or Jordan from to compute eigenvalue of this matrix rapidly. Please give me a favor.

\begin{pmatrix} 2na & -a & -a & -a & -a &  -a& -a\\   -a& a+b & 0 & 0 & -b & 0 & 0\\   -a& 0 & a+b & 0 & 0 & -b &0 \\   -a& 0 & 0 & a+b & 0 &  0&-b \\   -a& -b & 0 & 0 & a+b & 0 & 0\\   -a&  0&-b  & 0 & 0 & a+b &0 \\   -a&  0&  0&-b  & 0 & 0 & a+b \end{pmatrix}   I represent the matrix when $n=3$. There are block matrices $(a+b)I_3$ and $(-b)I_3$ above. I think the characteristic polynomial of this matrix for any natural number $n$ is calculated efficiently.  The rank is $2n$, so the characteristic polynomial should zero as the constant part. But I cannot calculate the determinant and I can't get zero when I put $t=0$ when I calculate $\text{char}(M)(t)$ for any $n$. Please give me a favor.


In season 2 episode 1, Rin's friends are still mad over the fact that he is the son of Satan.  Isn't this already over/resolved in season 1?

The first season of Blue Exorcist ended with Rin lauded by his friends. Even in the movie, they are still on good terms.  What happened between these seasons to make everyone afraid of Rin? They already knew him to be Satan's spawn... Is it shown in anime media, or only in the manga?


I've been doing some shell scripting.  It always gives me a headache.  Clearly this language has evolved organically, much as real life languages; new constructs have been dynamically added, constantly introducing new rules and complexities.  Here is an example:     I understand that people like to avoid polluting the variable   namespace; hence the function and the local part, which in turn forces   the use of double quotes, which in turn forces the need to double up   some but not all backslashes (and to know which ones -- oy!). I find   that unnecessarily complicated. Granted, there's a tiny risk of   collision if someone overrides BLUE or whatever, but on the other   hand, the double-quote solution also carries the risk that a terminal   will have backslashes in its escape sequences. And since the contents   of the escape sequences are being parsed in the double-quote solution,   but not in the single-quote solution, such a terminal could mess   things up. Example of the difference:      taken from    It is common to find this level of complexity in technical conversations about shell scripting.  Also there exist a multitude of different shells with subtle syntactic differences.  If a group of experts started from scratch, I bet they could come up with a universal shell scripting language that was much easier to learn, understand and program.  Just as a group of C experts planned C++, or C++ -> C#  There is an ANSI C standard, but is there something similar for shell scripting?  Might it be possible to construct an intermediate shell language, that can expand to various shells?  Is there any effort in this direction, or are we just stuck with things the way they are, like the QWERTY keyboard?

I see POSIX mentioned often and everywhere, and I had assumed it to be the baseline UNIX standard.. until I noticed the following excerpt on a Wikipedia page:        The Open Group is most famous as the   certifying body for the UNIX   trademark, and its publication of   the Single UNIX Specification   technical standard, which extends   the POSIX standards and is the   official definition of a UNIX system.     If the official definition of a UNIX system is an extension of POSIX, then what exactly is POSIX? ,,, It surely seems to be a touchstone of the UNIX world, but I don't know how it fits into the overall picture.


I have a StreamTokenizer that accepts numbers. However, the parsed number is not the same as the input.  Sample code:  String str = "1000000000000.0000000000000"; double initial = 1000000000000.0000000000000; InputStream in = new ByteArrayInputStream(str.getBytes()); StreamTokenizer input = new StreamTokenizer(new BufferedReader(new InputStreamReader(in))); input.parseNumbers(); int n = input.nextToken(); if (n == StreamTokenizer.TT_NUMBER) {     System.out.println("Original: " + str);     System.out.println("Parsed: " + input.nval);     System.out.println(initial + " == " + input.nval + " -> " + (initial == input.nval)); }   Output:  Original: 1000000000000.0000000000000 Parsed: 9.999999999999999E11 1.0E12 == 9.999999999999999E11 -> false   How can this be prevented so the two double values are equal?  EDIT: Linked question discusses why this issue appears. I am asking what are the possible ways to avoid this issue.

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


I've got an NSArray and have to iterate over it in a special case backwards, so that I first look at the last element. It's for performance reasons: If the last one just makes no sense, all previous ones can be ignored. So I'd like to break the loop. But that won't work if I iterate forward from 0 to n. I need to go from n to 0. Maybe there is a method or function I don't know about, so I wouldn't have to re-invent the wheel here.

I need to reverse my NSArray.  As an example:  [1,2,3,4,5] must become: [5,4,3,2,1]  What is the best way to achieve this?


I get this error when I compile on sharelatex, but the strange thing is that it appears only when I'm compiling in normal mode and instead it works fluently when I'm compiling in draft mode (with sharelatex built in).  The error suggestions tells me the error is in chapter1.aux (that I don't have).  l.7 \@LN         {0}{18} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.   Any suggestions are appreciated since I can't understand how to fix it.  UPDATE: chapter1.tex is a file that I still have to complete and as of now is super simple:  \chapter{Introduction}  %Title of the First Chapter  \ifpdf     \graphicspath{{Chapter1/Figs/Raster/}{Chapter1/Figs/PDF/}{Chapter1/Figs/}} \else     \graphicspath{{Chapter1/Figs/Vector/}{Chapter1/Figs/}} \fi  \todo[inline]{Write Introduction}  \section{Outline} \todo[inline]{Write outline}

I'm using package lineno for proofreading of my documents.  So I usually have something like the following MWE:  \documentclass{article}  \usepackage{blindtext}  \usepackage{ifthen}           % to use if then else \newboolean{korrektur}        % for proofreading: true/false  \setboolean{korrektur}{true} % choose one, comment the other %\setboolean{korrektur}{false}  % What we need for proofreading \ifthenelse{\boolean{korrektur}}% proofreading wanted? {% YES:   \usepackage{showframe}          % shows type area   \usepackage{lineno}             % numbers lines   \pagewiselinenumbers            % lines per page }% {% NO: % error if lineno was used before:   \typeout{***** Please delete .aux files if you get errors! *****} % What to add here so that I get no errors?  %<================= }  \begin{document} \Blindtext \end{document}   Run it two times. Everything should be well, blindtext is numbered.  Now please move the % sign from line 8 (false) to line 7 (true).    Because we had had the run before there is an .aux-file, including lines with the macro \@LN.  If you compile now you will get the following error message (and some more):   ***** Please delete .aux files if you get errors! ***** (C:\Users\...\LaTeX\_TeX.SX\lineno\test-lineno.aux ! Undefined control sequence. l.2 \@LN         {0}{0}   Question:  Is it possible to add in line 20 (see %<===========) something to get rid of the error messages? Something that resets the meaning of macro \@LN?


If we have a Lagrangian $\mathcal L$ that depends on some scalar field $\phi$, we define the momentum as $\pi \doteqdot {\partial \mathcal L \over \partial \dot \phi}$. The Hamiltonian then is $\mathcal H \doteqdot \pi \dot \phi - \mathcal L$.  This rubs me the wrong way. It seems weird to be defining a quantity that puts special emphasis on time if you want a relativistic field theory. I would expect something like defining various momenta as $\pi^\mu \doteqdot {\partial \mathcal L \over \partial (\partial_\mu \phi)}$ and the Hamiltonian as $\mathcal H \doteqdot \pi^\mu \partial_\mu \phi - \mathcal L$, but I've never seen anyone use this.  I get that the Hamiltonian is the generator of time translations, but why should I care about it in the context of a relativistic field theory?

While deriving Hamiltonian from Lagrangian density, we use the formula $$\mathcal{H} ~=~ \pi \dot{\phi} - \mathcal{L}.$$ But since we are considering space and time as parameters, why the formula  $$\mathcal{H} ~=~ \pi_{\mu}\partial^{\mu} \phi - \mathcal{L}$$ is not used? Is there any particular book/lecture notes dealing with these kind of issues in theoretical physics, I would love to know them?


I have a piece of code that counts. The function showResultAndCount() shows counter and adds 1, the other function showResult() just shows counter.   I would like both functions to be able to work with the latest value of the variable counter. At the moment both functions seem to have their own version of the variable. How can I achieve this without using global variables?  This so elementary I assume it will be a duplicate, but I have no idea how this behaviour is called and therefore have no idea what I should be searching for on stack overflow or Google.      <button id='counter1'>   Show counter and count </button>

 <button id='counter2'>   Show counter </button>

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Let $M$ be a $2$-dimensional orientable manifold. Is $M$ a Riemann surface? If it is true, how can I show it? Thank you very much.

Does an orientable closed 2 manifold always admit a complex structure?  I know that an almost complex doesn' t necessarily give rise to a complex structure(the almost complex structure should be integrable) I am studying 2 manifolds over R, and I wonder if an almost complex structure always exist? This almost structure may be chosen integrable?  I ask because there are certain known results on the different possible geometries in dimension 2.I don' t know exactly how these manifolds (closed and orientable) are classifyied, but I know there are three cases. May be I am confused, and the complex structure is irrelevant to this classification. Some help please!


I am asking some basic questions here. I have a sensor whose voltage specs are 0-5V and I have to interface this with my TI MSP430's ADC, whose voltage Vcc is 3.3V . For this I have to convert the level of the output of the sensor.   1) Can I accomplish this using a simple potential divider, that is, I use two appropriate resistors in series, and then tap the drop across one of them and feed that to the ADC?  2)If yes, then are there some additional things that I should look into?  3)If no, can someone suggest a suitable alternative?

I have a  (BB) and want to connect the analog output of a motor controller to it. The motor controller creates an output in the range of -4V to +4V and the BB anlog inputs only accept voltages between 0V to 1.8V (digital  pins run at 3.3V). I only have a comparably small limited space of perfboard available, but 4 motors to monitor. I can provide 5V and 3.3V supply and 1.8V ref Voltage. Here are the options I found so far:   Make an op-Amp circuit to convert [-4..4] to [0..1.8]. Probably a nice way, because I could use directly the BB-ADCs, but I am not to confident with these circuits (I found this ) and I would need one for every input which seems to be to many parts/space. Use an ADC and connect it via I2C: The  seems to provide exactly what I want. Single 5V supply, analog input range between [-5..+5] and I2C interface. I would really like to use this one, the only problem I have is that according to the data sheet digital high is seen as 0.7*Vdd = 3.5V. I do not now if 3.3V would be detected correctly (anyone has experience with that?). Pulling up to 5V is not possible as the BB is not 5V tolerable. The  is basically the same as the Max127 but with SPI-interface. There the data sheet states the digit high threshold is 2.4V. I know that the I2C slave only pulls down. How does it work with spi, because the data sheet mentions digital outputs voltages (which are Vdd)? Lose some resolution and only use the output range from [0..4]V. That gives a larger variety of possible unipolar ADCs, but most of them have the same limitation with 0.7*Vdd for digital high signals. As in 4. But use ADCs with 3.3V supply voltage which have a range of [0..5], but I could not find any with 4+ channels.    I believe that I somehow going in circles. Does someone know a viable solutions or how to address the mentioned problems of (at least) one of the above described?  I would generally prefer through hole parts (as it's perfboard) but I could probably get some small breakout boards for SMD-devices as well.


Let $z,w \in \mathbb{C}$ Show that $\frac{1}{2}(|z|+|w|)|\frac{z}{|z|} + \frac{w}{|w|}| \le |z+w|$ with $z \neq 0$ and $w\neq0$  I know that $|z+w|\le |z| + |w|$ And that $z \cdot\bar z = |z|^2$  I tried to change values in the inequality but can’t get anything.  According to  I think that proving $0 \le |\frac{z}{|z|} + \frac{w}{|w|}| \le 2$Would prove the inequality. Note: I couldn’t prove this either.  Could anybody give me a hint? Thank you

Prove the inequalities $|z_1 +z_2| \geq \frac{1}{2}(|z_1|+|z_2|)|\frac {z_1} {|z_1|} +\frac {z_2} {|z_2|}|$  Here is what I got so far  I start with $z_1=r_1 cis \theta_1$ (at this time we are not allowed to use $e^{i\theta}$ but $cis \theta =e^{i \theta}$)  $z_2 =r_2 cis \theta_2$. I will focus on the right hand side of the inequality   $RHS= \frac{1}{2}(r_1 +r_2)| \frac {r_1 cis \theta_1}{r_1} +\frac{r_2 cis \theta_2}{r_2}|=\frac{1}{2}(r_1 +r_2)|cis \theta_1 +cis \theta_2|=\frac{1}{2}(r_1 +r_2)((\cos \theta_1 +\cos \theta_2)^2 +(\sin \theta_1+\sin \theta_2)^2 )^{1/2}=\frac{1}{2}(r_1 +r_2)(2+2(cos \theta_1 cos \theta_2+ sin \theta_1 sin\theta_2))^{1/2}=\frac{1}{2}(r_1 +r_2)(2+2(cos (\theta_1 -\theta_2))^{1/2}=(r_1+r_2)(1+\cos(\theta_1-\theta_2))$  but I'm not sure how this result can help me prove the inequality, because I can't see how the left hand side related to this.


At present, there are 2 options for flairs.  Either the site specific flair (OR) The network Flair.  That is if I choose it from StackOverflow,  I can either use this    Or I can use this    So My feature request is Can We have a flair containing only Selected sites?  That is  If I want to only include Stack Overflow and Travel.se,  Then I may put something like this  https://stackexchange.com/users/flair/2824081.png?theme=clean&site=stackoverflow&site=travel   Another Case  If I want to show only Android SE and Meta SE,  I can use  https://stackexchange.com/users/flair/2824081.png?theme=clean&site=android&site=meta.se

It would be nice if you could pick which profiles to show on your combined flair image. Or to create multiple combined flair images with different associated profiles.  I'm suggesting this because I believe not all SE sites are relevant to each other. I'd like to use a combined flair for SO, Programmers.SE and Code Review, but not other SE sites I'm active on.


I started with Fennikin and finished the game but I guess I never saw Froakie. His second and third evolved forms I have in my pokedex.  I know that people can show you a pokemon that will be added to your pokedex.  How can I find Froakie in order to get him over a trade through the GTS?

I just got this game, and I picked Fennekin, the fire Pokémon as my starter. Is there a way to get the other two starters too, or am I limited to only getting one?


This is probably a duplicate, but I haven't been able to find one.  I remember early on in my days of learning LaTeX that I was in the habit of using \\ to end every line of text. These days, I don't - what I do is I add a blank line after the line of text, and then start a new line of text a few lines later. I.e., instead of  This is some text \\ This is some more text   I do  This is some text  This is some more text   I saw the use of \\ in some code to end every line, and my instinct was that it was bad code.   Can someone (re)-explain to me why it is bad to use \\ to end every line of text, preferably with examples to illustrate the points? Or did I just imagine that it is bad to use \\ to end each line of text?

Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a line after a paragraph...  This is really annoying so I wanted to know if there is a real advantage of using \\ over just leaving a space.  Note that I am not referring to the paragraph environment, but to the simple term paragraph.


I use encrypted home folders on my notebook, which prevents use of hibernation on standard setup, because - and for a good reason - besides encrypting the home folder with ecryptfs, it reformats the swap partition with one-time passwords each boot. Thats why it is impossible to share hibernation data (which is stored in swap) between reboots.  One way of enabling the hibernation without sacrificing the security is to use persistent password for the swap an ask user to enter it at system boot.   AFAIK the standard way to achieve it is by adding or modifying scripts in /usr/share/initramfs-tools/scripts/local-top, and there was a .   On Linux Mint 16, although the patch doesn't work anymore, although the file /usr/share/initramfs-tools/scripts/local-top/cryptroot didn't change between the ditributions. I guess there was introduced a difference on how the kernel handles those scripts. Can anyone help me out?

When you want to use hibernation and you care for security, you'd like to have the swap encrypted. But not with the random password, chosen for you at startup, but with a fixed one, supplied by you at the boot time, so the hibernated state would be available for resuming upon next boot.  There was a cool way to do this, that worked up until Mint 15:   This doesn't work anymore on Petra. Can anyone help me with working it out? The main culprit, the /usr/share/initramfs-tools/scripts/local-top script didn't change, so I guess it has something to do with the kernel. It looks like the recent kernel just ignores all the scirpt, or at least the part that asks for a password for swap.  Oh, and I was able to get the password prompt, when I accidentally booted the Mint 16 with the kernel from Mint 15.   See also a related question:       Some debug info  After opening the swap device with sudo cryptsetup luksOpen /dev/sda5 cryptswap:  sudo lsblk -o name,uuid  NAME                  UUID sda                    ├─sda1                F251-38C0 ├─sda2                c66b8e51-dd1b-4d92-8605-a3ba7df6af83 ├─sda3                77af32db-038d-4c10-b302-039634cf943a ├─sda4                7a3cde35-ab80-4618-ad76-7aa064d55f56 ├─sda5                fc068dd2-759c-4779-b521-c73cc5499e86 │ └─cryptswap (dm-1)  964eafeb-c88b-49c8-8b5e-6f8395e040b4 ├─sda6                926fa7cc-6f97-4672-85a7-a1ed8f5bd842 ├─sda7                804b9c88-907b-43d9-b23f-964c32ecc2ac └─sda8                ce2cd926-133f-4e20-86f8-45bc4844271c   └─adama-docs (dm-0) 61a32b98-3b65-4af6-81ff-da090cae039f sr0                 cat /etc/crypttab  #cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256 swap UUID=fc068dd2-759c-4779-b521-c73cc5499e86  none luks   cat /etc/fstab  UUID=926fa7cc-6f97-4672-85a7-a1ed8f5bd842   /   btrfs   defaults,subvol=@,compress,autodefrag   0   1 # /boot was on /dev/sda2 during installation UUID=c66b8e51-dd1b-4d92-8605-a3ba7df6af83   /boot   ext3    defaults    0   2 # /boot/efi was on /dev/sda1 during installation UUID=F251-38C0  /boot/efi   vfat    defaults    0   1 # /home was on /dev/sda6 during installation UUID=926fa7cc-6f97-4672-85a7-a1ed8f5bd842   /home   btrfs   defaults,subvol=@home   0   2 # /mnt/ext4 was on /dev/sda7 during installation UUID=804b9c88-907b-43d9-b23f-964c32ecc2ac   /mnt/ext4   ext4    defaults    0   0 # swap was on /dev/sda5 during installation UUID=964eafeb-c88b-49c8-8b5e-6f8395e040b4 none            swap    sw              0       0   /etc/initramfs-tools/conf.d/resume  RESUME=/dev/disk/by-uuid/964eafeb-c88b-49c8-8b5e-6f8395e040b4     update:  When I setup everything like above, the system does display the familiar password prompt. It doesn't do that every time, and if it does, it is a fraction of second before the login screen (Linux Mint uses mdm for login). I guess there is racing condition; the mounting of swap is done parallel with the system booting; I expect the system to wait booting until the swap is mounted, and do it as early as possible. Otherwise how could it resume the hibernated state?  There is a similar question for Ubuntu:  It seems, that it worked for someone if he encrypted the root as well.


I'm not sure if 'inspired' here is a verb in past participle or an adjective.  Director George Lucas was inspired to create the Wookiee character Chewbacca—a “gentle, hairy, non-English-speaking co-pilot”—after seeing his wife’s dog sitting in the passenger seat of his car.

According to a dictionary, rumor can function as a noun or a verb.  I can see rumor being a noun, but am having difficulty accepting it as a verb.   The dictionary gives the example sentence, John is rumored to be next in line for a promotion.   In this sentence I would argue that rumored is functioning as an adjective, not a verb as the dictionary suggests.    Are there any clear examples of using rumor as a verb?   The only example I came across was For years people have been rumoring the CEO's imminent retirement.


I would like to split 10 subfigures over two pages (6 at the bottom of one page, 4 at the top of the next page). I am using \ContinuedFloat for that. To set the position of the two blocks, I wrote [!b] and [ht] for each one, respectively. However, I get a full page of text between the two blocks of figures. If I write [H] instead of [ht], I get the second block (figures 7-10) above the first one (figures 1-6). Does anybody have an idea how to solve it? Thank you in advance. \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document} \begin{figure}[!b]     \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig1} \end{subfigure}     \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig2} \end{subfigure} \newline \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig3} \end{subfigure} \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig4} \end{subfigure}     \newline \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig5} \end{subfigure} \begin{subfigure}{.5\textwidth}     \centering       \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig6} \end{subfigure} \end{figure}  \begin{figure}[ht]\ContinuedFloat \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig7} \end{subfigure} \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig8} \end{subfigure} \newline \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig9} \end{subfigure} \begin{subfigure}{.5\textwidth}     \centering     \includegraphics[trim=0 0 430 0,clip, width=1.0\linewidth]{xxx.eps}       \caption{fig10} \end{subfigure}     \caption{Description }     \label{fig:labelfig} \end{figure} \end{document}```

I have the following code for a Figure with 4 subfigures:  \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document}  \begin{figure}[b]     \centering     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm1.pdf}         \subcaption{$Q^{*}$ values for arm 1}         \label{fig:arm1}     \end{subfigure}     ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm2.pdf}         \subcaption{$Q^{*}$ values for arm 2}         \label{fig:arm2}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm3.pdf}         \subcaption{$Q^{*}$ values for arm 3}         \label{fig:arm3}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm4.pdf}         \subcaption{$Q^{*}$ values for arm 4}         \label{fig:arm4}     \end{subfigure}      \caption{$Q^{*}$ values for different arms}     \label{fig:arms} \end{figure}  \end{document}   This results in   But this way, the 4 subfigures are too large to fit on 1 page. I would like to split this over 2 pages, keeping the subcaptions a, b, ... How can I do this?


71 people were rescued from the sinking ferry by the Latvian helicopter crew. (This is not wrong, but it is untidy.) The Latvian helicopter crew rescued 71 people from the sinking ferry.  (This re-worded version is tidier.) Seventy-one people were rescued from the sinking ferry by the Latvian helicopter crew.  (In this version, the number has been written in full to avoid starting the sentence with 71.)   Above are the examples from . Are the guidelines sound, and backed by a recognised authority? Is there any limit to the number, I mean, does the same rule apply to the following sentence:  7100 people were rescued from the sinking ferry by the Latvian helicopter crew.


How do I install 18.04 on a 32Bit machine?  The graphical version, not the console version - which I have already installed.  I answered NO to password but when I boot to Ubuntu I'm asked for a username and password - which of course there is none.  I would like to do a re-install but to the graphical Ubuntu as mentioned above.  Thanks

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I'm creating logo with illustrator, and when I export to PDF, where the meshes joins I get gaps which doesnt look good when you work in photoshop or looking in PDF reader.    I have one solution to fix it - make one shape go under the other. BUT it's not good thing for a logo, if in future it goes to printing and similar things..

I often have .ai files that need to be exported to .psd but with paths retained. To retain all vectors I follow .  All works as fine, expect for the fact that I often end up having small hairline gaps between different shapes, the same shapes stick perfectly to each other in Illustrator or even an exported PNG.  Here's what it looks like as a PNG / AI     And this is what I get in Photoshop    Here's a few questions I came across on SE        There are a few more that I went through, but can't find them now. In any case, they all had the same explanation and solution suggested.   This is caused due to issues with Anti-Aliasing in Illustrator Solution 1 : Keep an object behind the area where the line shows up and give this object a favourable solid fill color Solution 2 : Use Illustrator's path offset feature to "grow" all shapes my  a small unnoticeable amount so the shapes then appear to be contact   I can't use the first solution as these AI files are normally icons with no specific background, would be tedious to fill the gaps manually  The second solution is helpful, but more of something I would try if all else fails. This is because :    The solution I followed to retain vectors needs all shapes to be converted to compound shapes before exporting. However, because of this, I tend to have a lot of compound shapes for each separate element. To make things worse, any group in AI get's exported as a rasterized layer. So I need to keep a rather long list of compound shapes.  When using the offset feature, I noticed that it adds a slightly larger new path below the selected shape, which means I'll have even more elements to handle now. This doesn't seem like a problem with simple designs, however when it comes to larger complex artworks things get quite messy.    Are there any other ways of solving this problem.  EDIT :   Here's the


I'm confronted with a problem: prove that $\displaystyle \int_{0}^{\frac{\pi}{2}}\frac{x\ln{\cos(x)}}{\tan x}dx=-\frac{\pi}{4}\ln^22$  I've already known $\displaystyle \int_{0}^{\frac{\pi}{2}}\frac{x}{\tan x}dx=\frac{\pi}{2}\ln2\ $ and $\displaystyle \int_{0}^{\frac{\pi}{2}}\ln{\cos(x)}dx=-\frac{\pi}{2}\ln2\ $(which are actually  equivalent to each other)  But they're not sufficient to solve this, I guess.

I am trying to evaluate $$P=\frac\pi2\sum_{n\geq1}\frac{{2n\choose n}}{4^n n^2}$$ I used the beta function to show that  $$P=\int_0^1\frac{\mathrm{Li}_2(x^2)}{\sqrt{1-x^2}}dx$$ IBP: $$P=\sin^{-1}(x)\mathrm{Li}_2(x^2)\big|_0^1+2\int_0^1\frac{\ln(1-x^2)}{x}\sin^{-1}(x)dx$$ Which is $$P=\frac{\pi^3}{12}+4\int_0^{\pi/2}x\cot(x)\ln(\cos x)dx$$ Which I'm not sure how to handle. I will continue working on this integral and update on my progress.


I am new to Linux. I have installed Ubuntu distro. I would like to access the files on my internal hard drive using the terminal.  Can I use cd command to do so? Is there any other possible way using the terminal? (I want to learn to use the terminal)

How can I access (remove to be specific) files from my external hard drive which is already mounted using terminal?


For an (R) analysis project I am working on I need to automatically generate reports containing graphs and tables that will later be reviewed by other people. I wrote my thesis in latex, but I never had to do layout-intensive parts. I want to a achieve a layout similar to this:    (the horizontal lines are just for illustration, I don't need them in the document)  In the ideal case, I would be able to define presets for three different kinds of pages that, I could define similar to beamer slides:   1/3rd top frame(graph), 2/3 bottom frame (table)  2/3rd top frame(graph), 1/3 bottom frame (table)  full-page graph/table   The images/tables should not be able to screw up the grid, and in the worst case be cropped to the 'frames' they are in.  Is this even possible in latex?

I was wondering if anyone ever tried to typeset slides with a grid layout, ie. something like (see below the tikz grid showing it).  Expected functionalities:   ability to write text or place image across several columns on the fly (ie. provide kind of start coordinate/ size of frame containing text or image + text aligned on a grid) compatibility with [c] option for frame (or similar) I don't care about the crappy blocks from beamer (less is better) would appreciate to get something in the vein of    Starting point code (but no need to stick to it), where the grey block could be text and the yellow block an image:  \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc}  \setbeamertemplate{headline}{}  \setbeamertemplate{navigation symbols}{}  \usebackgroundtemplate% {%     \begin{tikzpicture}[overlay,remember picture]         \draw[step=.4cm,gray,thin] (current page.south east) grid (current page.north west);         \draw[thick] ($(current page.north west)+(.4cm,-.4cm)$) rectangle ($(current page.north west)+(6cm,-1.6cm)$); % frametitle        \draw[thick] ($(current page.south west)+(0cm,.4cm)$) rectangle (current page.south east); % footer         \draw[thick] ($(current page.south west)+(1cm,.8cm)$) rectangle ($(current page.north west)+(3.4cm,-2.4cm)$);         \draw[thick] ($(current page.south west)+(3.8cm,.8cm)$) rectangle ($(current page.north west)+(6.2cm,-2.4cm)$);         \draw[thick] ($(current page.south west)+(6.6cm,.8cm)$) rectangle ($(current page.north west)+(9cm,-2.4cm)$);         \draw[thick] ($(current page.south east)+(-3.4cm,.8cm)$) rectangle ($(current page.north east)+(-1cm,-2.4cm)$);     \end{tikzpicture} }  \setbeamercolor{footline}{fg=white,bg=black}  \begin{document}  \begin{frame} \begin{tikzpicture}[overlay,remember picture]     \fill[yellow] ($(current page.center)+(.2,1.6cm)$) rectangle ($(current page.east)+(-1cm,-1.6cm)$);     \fill[gray] ($(current page.center)+(-.2,2.4cm)$) rectangle ($(current page.west)+(1cm,-2.4cm)$); \end{tikzpicture} \end{frame}  \end{document}     Note: if a ConTeXt solution is much convenient to use (less code to type), please feel free to share.


I keep getting error messages when I try to install programs via Software Centre or terminal.   This is the code I get in terminal after a failed install.   Preconfiguring packages ... (Reading database ... 540926 files and directories currently installed.)  Removing linux-image-extra-4.4.0-71-generic (4.4.0-71.92) ... depmod: FATAL: could not load /boot/System.map-4.4.0-71-generic: No such file or directory run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-71-generic /boot/vmlinuz-4.4.0-71-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-71-generic /boot/vmlinuz-4.4.0-71-generic update-initramfs: Generating /boot/initrd.img-4.4.0-71-generic depmod: WARNING: could not open /var/tmp/mkinitramfs_GEtzy8/lib/modules/4.4.0-71-generic/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/mkinitramfs_GEtzy8/lib/modules/4.4.0-71-generic/modules.builtin: No such file or directory  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.4.0-71-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.4.0-71-generic (--remove): subprocess installed post-removal script returned error exit status 1 Removing linux-image-extra-4.4.0-72-generic (4.4.0-72.93) ... depmod: FATAL: could not load /boot/System.map-4.4.0-72-generic: No such file or directory run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic update-initramfs: Generating /boot/initrd.img-4.4.0-72-generic depmod: WARNING: could not open /var/tmp/mkinitramfs_gTkI9t/lib/modules/4.4.0-72-generic/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/mkinitramfs_gTkI9t/lib/modules/4.4.0-72-generic/modules.builtin: No such file or directory  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.4.0-72-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.4.0-72-generic (--remove):  subprocess installed post-removal script returned error exit status 1  Errors were encountered while processing:  linux-image-extra-4.4.0-71-generic  linux-image-extra-4.4.0-72-generic  E: Sub-process /usr/bin/dpkg returned an error code (1)   And when doing df -h i got :   Filesystem                   Size  Used Avail Use% Mounted on  udev                         2.7G     0  2.7G   0% /dev  tmpfs                        544M  8.2M  536M   2% /run  /dev/mapper/ubuntu--vg-root  682G   61G  586G  10% / tmpfs                        2.7G  103M  2.6G   4% /dev/shm tmpfs                        5.0M  4.0K  5.0M   1% /run/lock tmpfs                        2.7G     0  2.7G   0% /sys/fs/cgroup /dev/sda2                    473M  468M     0 100% /boot /dev/sda1                    511M  3.6M  508M   1% /boot/efi tmpfs                        544M   80K  544M   1% /run/user/1000 /dev/sdb                     7.5G  5.5G  2.1G  73% /media/aleksc/UUI

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


I'm not entirely sure if my question is valid or not but I'll ask it anyway. So my physics porf. told us the Photons are constantly in motion and they never come at rest and the sub-topics relating to it. Now since they never come to rest we cannot possible observe them, but [ There's always a but] if we're able to move at the same speed $c= 3*10^8 m/s$ we will be in a position to observer them. For instance I'm standing still and a fighter jet whooshes past me all I'm able to observe is a blurred object but if I'm in another fighter plane overserving the other plane, I'm able to look at every minute detail of the jet. Likewise if we move as fast as light then photons would seems stationary, but if they are stationary then how will be observe them because for us to appreciate the presence of a particle around us we need those proton to reach our retina. This might be an issue of Biology but my question is that is it possible for say a device to observe PHOTONS, or is there any way we can manage to observe them?

Quite a few of the questions given on this site mention a photon in vacuum having a rest frame such as it having a zero mass in its rest frame. I find this contradictory since photons must travel at the speed of light in all frames according to special relativity.  Does a photon in vacuum have a rest frame?


$$ Fn =  \frac{1}{n+1} +\frac{1}{n+2}+\frac{1}{n+3}+\cdots+\frac{1}{n+n}$$  I need to show that 1 is an upper bound for this sequence.I tried to use induction but didn't manage to prove it.

How do I prove the following inequality  $$\frac 34\geq \frac{1}{n+1}+\frac {1}{n+2}+\frac{1}{n+3}+\cdots+\frac{1}{n+n}$$  without the help of induction?  Thanks for any help!!


Hi I just started to inequality  I came across this Q I don't get how to solve show that   $$(a^2-b^2)(c^2-d^2)\le(ac-bd)^2$$ and $$(a^2+b^2)(c^2+d^2)\ge(ac+bd)^2$$ for all a,b,c,d and the sign of equality holds if and only if ad=bc

Prove that $\forall a,b,c,d\in \mathbb{R}\,$,  $(a^2-b^2)(c^2-d^2)\leq(ac-bd)^2$ and equalities hold if and only if $ad=bc$.    I need hints in dealing with the inequality. I think what I have with dealing with the case of equality is sufficient.   $\begin{align}(a^2-b^2)(c^2-d^2)\leq(ac-bd)^2&\Longleftrightarrow(ac)^2-(ad)^2-(bc)^2+(bd)^2\leq(ac)^2-2abcd+(bd)^2\\ &\Longleftrightarrow-(ad)^2-(bc)^2\leq-2abcd \\ \end{align}$  Suppose $ad\neq bc$, then $-(ad)^2-(bc)^2\leq-2abcd\Longrightarrow 2abcd\leq(ad)^2+(bc)^2,\,$ since $0<(ad)^2$ and $0<(bc)^2$ if $ad\neq bc$. Thus, the equality is only satisfied if and only if $ad=bc$, since this implies:  $$-(ad)^2-(bc)^2=-(ad)^2-(ad)^2=-2(ad)^2\leq-2abcd=-2ad\cdot ad=-2(ad)^2.$$  Hints to show inequality? Thanks.


Is it possible to create .dmg package from SLES 11 Linux?  The idea is - copy native Mac JRE to Linux, copy JARs (crossplatform files), copy application icon to Linux, and use some bash script to create a .dmg file which can be installed later on Mac OS X?  Also, make a note that SLES is os390 64 bit, if it matters.  @Thomas, my question is not duplicate. Answer on linked question is about (a) Windows, (b) commercial tools. The Linux solution proposed there creates invalid .dmg

Is it possible to build a .dmg file (for distributing apps) from a non-Mac platform? And if yes, how?


Basically whenever I debug through my asp.net MVC application and hit an unhandled exception I get the error in the browser - it doesn't step into the application as usually allowing me to view variables etc.  As seen in the picture below the browser merely displays the error:    How do I make the debugger step into the code when an unhandled exception occurs.

When debugging an application in Visual Studio, there are 2 options for breaking on exceptions. Break as soon as an exception is thrown, and breaking only when an exception isn't caught. This works fine when developing desktop applications. However, when developing ASP.NET applications, all exceptions are eventually caught by the code in IIS.  Is it possible to disable this behavior, so that the debugger breaks when my ASP.Net application code fails to catch an exception?  Edit: Just to be clear, I don't want to break whenever an exception is thrown, as many times they are handled just fine by my code, and I don't want to stop on every exception. I only want to stop on the exceptions that aren't handled by my code.  Edit: This seems to not be an issue in Visual Studio 2008. In Visual Studio 2003, all exceptions were treated as user handled, because the ASP.NET runtime caught all the exceptions so as not to bring down the web server process. It seems that in Visual Studio 2008, this type of exception catching is not counted when checking for user-unhandled exceptions.


\documentclass[oneside,12pt]{article} \usepackage{geometry} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}  \usepackage{enumitem} \setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,   labelsep=1.5em} \setlist[enumerate,2]{label=\arabic*.,labelindent=1em,labelsep=1.5em,   leftmargin=*}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{sol}{Solution}  \usepackage{forest} \forestset{   ass/.append style={     before computing xy={l=\baselineskip},     no edge   },   prooftree/.style={     for tree={       child anchor=north,       parent anchor=south     }   },   default preamble={     prooftree,     for root={baseline},     for tree={%       if n children=1{for children={ass}}{},       math content     }   } }  \begin{document} \subsection*{Exercises 28} \begin{enumerate} \item Let's use `$\vDash$' now to abbreviate `q-entails'. Which of the   following claims are true? Provide arguments in the style of 28.2 and 28.6   to defend your answers.   \begin{enumerate}   \item $\forall x(Fx\supset Gx)\vDash\forall x(Gx\supset Fx)$     \begin{sol}       False. Try the following q-valuation:       \begin{quote}         Domain = all people\\         Extension of `F' = all singers\\         Extension of `G' = all people who know how to sing       \end{quote}       Then, the premiss is true, but the conclusion is false.     \end{sol}   \item $\forall x(Fx\supset Gx)\vDash\forall x(\neg Gx\supset\neg Fx)$     \begin{sol}       True.        \begin{forest}         prooftree         [$\forall x(Fx\supset Gx)\Rightarrow_q T$,baseline         [$\neg\forall x(\neg Gx\supset\neg Fx)\Rightarrow_q T\checkmark$,ass         [$\exists x\neg(\neg Gx\supset\neg Fx)\Rightarrow_q T\checkmark$,ass         [$\neg(\neg Ga\supset\neg Fa)\Rightarrow_{q^+}T$,ass         [$\neg Ga\Rightarrow_{q^+}T$,ass         [$\neg\neg Fa\Rightarrow_{q^+}T$,ass         [$(Fa\supset Ga)\Rightarrow_{q^+}T\checkmark$,ass         [$\neg Fa\Rightarrow_{q^+}T$ [*,ass]]         [$Ga\Rightarrow_{q^+}T$ [*,ass]]]]]]]]]       \end{forest}     \end{sol}   \item $\forall x\exists yLxy\vDash\forall y\exists xLyx$     \begin{sol}       True because the conclusion just swaps x and y in the premiss.     \end{sol}   \item $\forall x((Fx\wedge Gx)\supset Hx)\vDash\forall     x(Fx\supset(Gx\supset Hx))$     \begin{sol}       True because the following proof tree closes.        \begin{forest}         prooftree         [$\forall x((Fx\wedge Gx)\supset Hx)\Rightarrow_q T$,baseline         [$\neg\forall x(Fx\supset(Gx\supset Hx))\Rightarrow_q T\checkmark$,ass         [$\exists x\neg(Fx\supset(Gx\supset Hx))\Rightarrow_q T\checkmark$,ass         [$\neg(Fa\supset(Ga\supset Ha))\Rightarrow_{q^+}T\checkmark$,ass         [$Fa\Rightarrow_{q^+}T$,ass         [$\neg(Ga\supset Ha)\Rightarrow_{q^+}T\checkmark$,ass         [$Ga\Rightarrow_{q^+}T$,ass         [$\neg Ha\Rightarrow_{q^+}T$,ass         [$((Fa\wedge Ga)\supset Ha)\Rightarrow_{q^+}T\checkmark$,ass         [$\neg(Fa\wedge Ga)\Rightarrow_{q^+}T\checkmark$         [$\neg Fa\Rightarrow_{q^+}T$ [*,ass]]         [$\neg Ga\Rightarrow_{q^+}T$ [*,ass]]]         [$Ha\Rightarrow_{q^+}T$ [*,ass]]]]]]]]]]]       \end{forest}     \end{sol}   \end{enumerate} \end{enumerate} \end{document}   results in an ugly page split as below.    How can I make the document look pretty?

\documentclass[oneside,12pt]{article} \usepackage{geometry} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}  \usepackage{enumitem} \setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,   labelsep=1.5em} \setlist[enumerate,2]{label=\arabic*.,labelindent=1em,labelsep=1.5em,   leftmargin=*}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{sol}{Solution}  \usepackage{forest} \forestset{   ass/.append style={     before computing xy={l=\baselineskip},     no edge   },   prooftree/.style={     for tree={       child anchor=north,       parent anchor=south     }   } }  \begin{document} \subsection*{Exercises 29} \begin{enumerate} \item Use QL trees to evaluate the entailment claims (1) to (10) in Exercises   28A.   \begin{enumerate}   \item $\forall x(Fx\supset Gx)\vDash\forall x(Gx\supset Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(Gx\supset Fx)\checkmark$,ass       [$\exists x\neg(Gx\supset Fx)\checkmark$,ass       [$\neg(Ga\supset Fa)\checkmark$,ass       [$Ga$,ass       [$\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$] [$Ga$]]]]]]]]     \end{forest}      $\neg Fa$ and $Ga$ make the premisses and the negation of conclusion true.     Thus, the entailment is invalid.   \item $\forall x(Fx\supset Gx)\vDash\forall x(\neg Gx\supset\neg Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\exists x\neg(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\neg(\neg Ga\supset\neg Fa)\checkmark$,ass       [$\neg Ga$,ass       [$\neg\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$ [*,ass]] [$Ga$ [*,ass]]]]]]]]]     \end{forest}      Since the tree closes, the entailment is valid.   \item $\forall x\exists yLxy\vDash\forall y\exists xLyx$      \begin{forest}       prooftree       [$\forall x\exists yLxy$       [$\neg\forall y\exists xLyx\checkmark$,ass       [$\exists y\neg\exists xLyx\checkmark$,ass       [$\neg\exists xLax\checkmark$,ass       [$\forall x\neg Lax$,ass       [$\exists yLay\checkmark$,ass       [$Lab$,ass]]]]]]]     \end{forest}      \begin{forest}       prooftree       [$\neg Lab$,ass [*,ass]]     \end{forest}   \item $\forall x((Fx\wedge Gx)\supset Hx)\vDash\forall     x(Fx\supset(Gx\supset Hx))$   \item $(\forall xFx\vee\forall xGx)\vDash\forall(Fx\vee Gx)$   \item $\forall x(Fx\supset Gx),\forall x(\neg Gx\supset Hx)\vDash     \forall x(Fx\supset\neg Hx)$   \item $\exists x(Fx\wedge Gx),\forall x(\neg Hx\supset\neg Gx)\vDash     \exists x(Fx\wedge Hx)$   \item $\forall x\exists y(Fy\supset Gx)\vDash\forall y\exists x(Gx\supset     Fy)$   \item $\forall x\forall y(Lxy\supset Lyx)\vDash\forall xLxx$   \item $\forall x(\exists yLxy\supset\forall zLzx)\vDash\forall x\forall y     (Lxy\supset Lyx)$   \end{enumerate} \end{enumerate} \end{document}   Usually, I have to manually split a forest tree into two to emulate page breaking in a forest tree. However, the second tree doesn't vertically align with the first as in the picture below. How can I vertically align them together? @cfr


I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


I have a html string, where i need to grab the src and href values, if they meet a pattern. The pattern is;  /myfolder/[gu-id]/[image,file]   The gu-id is in the pattern of '65f2383b-de39-4a9c-8e8c-de1c06e469ca' The image or file can be any jpg,gif,pdf,doc,xlsx.png,txt,zip and so on.  My current regex is this: ((\/myfolder\/[({]?[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12}[})]?\/?.*\.(?:png|jpg|pdf|gif|jpeg|xls|xlsx|word|doc|txt|zip)))  But in a string with multiple files, it ends with the last one, as the end of the first match - so it only finds one match, but the end point, is another file.  How can I make it match every file, and not only one?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


If $x\equiv  a\pmod{n}$, prove that either $x\equiv a\pmod{2n}$ or $x\equiv a+n\pmod{2n}.$  Well I am a bit stuck in this congruence problem. I tried out :- $n\vert x-a$ so for $2n|x-a$, $x-a$ must be even but I am not able to prove what if $x-a$ is odd, how can I prove that $x-(a+n)$ will be even and divisible by $2n$. Is this the right approach? Though it seems a very vague one, I can't think of any other.

I want to ask a question about modular arithmetic. I know, that modular multiplicative inverse exists only if modulo and integer are relatively prime. I want to know, are there any ways of division in modular arithmetic, if modulo and integer aren't relatively prime? I tried to find info about that, but failed.


I am trying to use Gedit as an IDE for learning C. So far everything is working great but i have this problem: when using ls in its embedded terminal I am unable to see all the files and directories in my workspace directory (only shows .c files but not the .out and other directories), yet when i run terminal from CTRL+ALT+T all the files in the current directory show.  I can't seem to figure out why this is happening, so any ideas would be greatly appreciated. it seems to me that only the colored files aren't showing in the embedded terminal and i need them to show.  thank you!

I've just updated to 11.10 and now my embedded terminal in gedit does not match my default terminal. I hate looking at a white and black terminal. Does anyone know how to make the embedded terminal match the default terminal?  This is a screenshot:    I want my embedded terminal in gedit to match my default terminal.


The problem is the next:  Suppose that $A\in B(X,Y)$, $K\in K(X,Y)$, where $X,Y$ are Banach spaces. Show that, if $A(X)\subset K(X)$, then $A\in K(X,Y)$.  Here $B(X,Y)$ stands for the set of all bounded linear operators from $X$ to $Y$, and $K(X,Y)$ stands for all compact operators from $X$ to $Y$.  I've tried some ways to prove it, but none of them successfully. What I reach to prove is the easy case, when $K$ is a surjective operator, because in this case$Y$ is finite-dimensional and every bounded linear operator on a finite-dimensional space is a compact operator. Then, I remember (but I'm not sure if it is true!) that a compact operator is one-to-one if and only if it is not surjective, so if we suppose that $K$ is not a surjective operator, then $K$ is one-to-one. I've tried to use this property but I could conclude nothing.  Any help or hint is well received.

I have a problem were I have to prove the following statement:  Let $X$ and $Y$ be Bannach spaces. If $A$ is a Linear Bounded operator between $A:X  \rightarrow Y$ so that   $$Range(A)\subset Range(K)$$   with $K$ a compact operator from $X$ to $Y$ then $A$ is compact.  But I have no clue how to start and the statement Itself sounds pretty incredible anyone can give a hand?


How do to find the square root of a complex number?  $z=a+ib$  $z=\sqrt{3+i4}=a+ib$  remove the square by squaring both side  $a^2+2iab+b^2=3+i4$  $a^2+b^2=3$  $2ab=4$  So I just solve the simultaneous equation. But my friend is telling me this way I am doing is wrong. Can anyone give a hand, thank in advance

If I'm given a complex number (say $9 + 4i$), how do I calculate its square root?


Given two identical pieces of gear (armour, weapons) with the same level requirement and base stats, is one that has gained "experience" or upgraded worth more glimmer/scrap when you dismantle it? I like to level my extra gear up before selling it but I haven't noticed any clear benefits so far.

I heard an advice once to level up your gear before dismantling to produce more parts and materials. From my subjective experience this seems to work more or less with rare items, though I can't say for sure.  As I care most for Ascendant Shards and other top-level materials, the question is mainly about legendary gear. So basically what I'm asking is this: is there a difference in material output between these options:   Dismantle item right away; Level up item before dismantling, but without actually upgrading it; Level up item and upgrade (buy) it's skills before dismantling;   I can't seem to find any concrete info on this, and don't have enough legendaries to experiment yet (the ones from Queen don't produce Shards).


When I execute the code, it print" function aa in 0x0000... "and all.  I want it to print aa,a,b,c,d,. Is it possible?  Sorry for the stupid question, thanks a lot.  def main():     lunch = {         0: aa,         1: a,         2: b,         3: c,         4: d,         }      for i in range(len(lunch)):         print(lunch[i]) def aa():     print("aa") def a():     pass def b():     pass def c():     pass def d():     pass if __name__ == "__main__":     main()

In Python, how do I get a function name as a string, without calling the function?  def my_function():     pass  print get_function_name_as_string(my_function) # my_function is not in quotes   should output "my_function".  Is such function available in Python? If not, any ideas on how to implement get_function_name_as_string, in Python?


In a case study  Scattering of light affects the image captured by camera.  Now how to write  The scattering affected image...  Or  The Scattering effected image...  And  Image affected by scattering  Or  Image effected by scattering...  Which one is correct?

I am tangled with the problem of using affect /effect.  In an experiment,  The defocusing of projector lens blurs the projected images that are projected onto an object.The projected images are used to generate the shape of the object using a method X.  Now I want opinion regarding these cases   Projected images are effected/affected by defocusing The defocusing of images further effects/affects the method X. The method X is effected/affected by defocusing. The defocusing of projected images further effects/affects object's shape.


I have a file, which is an assembly source with comments. These comments contain 1Ah character. It is a control character, the "substitute", but it also prints a nice right arrow in DOS, so someone long time ago thought it would be a shame not to use it.  Somehow, it works like end of file character for Python. All I do is:  f = open('file.asm') for line in f:     print line f.close()   And everything goes ok just until the first entrance of 1Ah.   The question is, how to read this symbol along with other text?

I have the following file:  abcde kwakwa <0x1A> line3 linllll   Where <0x1A> represents a byte with the hex value of 0x1A. When attempting to read this file in Python as:  for line in open('t.txt'):     print line,   It only reads the first two lines, and exits the loop.  The solution seems to be to open the file in binary (or universal newline mode) - 'rb' or 'rU'. Can you explain this behavior ?


In my settings for Google Analytics I need to add a javascript snippet in the "after" section, to track a second account (the main account works fine).  I added this:     ga("create", "UA-xxxxxxxx-x",  {"cookieDomain":"auto"}); ga("set",   "anonymizeIp", true); ga("send", "pageview");   It does not work at all though. How shall I change this to make it work? The Google Analytics module version is 7.x-2.3.  Note: I don't think this question is a duplicate of "": the other question is about two different domains, I have only one domain, which is tracked by 2 accounts. Also under the text box where I am supposed to paste my javascript snippet in the GA module UI, you can find this text: '     This is useful if you'd like to track a site in two accounts   ... which suggests that you really can track 2 accounts for 1 site. My problem is that the snippet I entered does not work. The second account does not recieve any data.

I have one Drupal site and I am using  for add ing GA account? Now client want to add two separate accounts.  UA-87XXX-XX UA-87YYY-YY  How can I add these two accounts?


I have a Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01) and unless I run rmmod b43 ; sudo rmmod bcma ; sudo rmmod wl ; sudo modprobe wl after restart, the wireless device isn't available in network devices. Is there a way of making it work without having to modprobe the device issues?

I had a script that automatically enables my wifi without using networkmanager, but I don't know how to run the script as root while the system is booting. How do I make the script run automatically during boot?


I would like to connect a BME280 sensor to an Arduino board through the i2c bus connection. I read that i2c was not meant to be used over long wires and will not work properly over 50cm. I want to get it to work within 5-15m. Is there some sort of chip or device I can to attach to one or both sides of an i2c connection to extend the wire length? I would like to use only one power source, not two, and have the wire carry the power over those 5-15 meter as well, if that is possible.  P.S. Pardon my drawing. My electronics skills aren't up to the level of making a schematic

In my current project, I need to communicate between a microcontroller and some sensors over I2C. One of them is a temperature sensor, it needs to be placed at approximatively 2 meters far from the microcontroller. I cannot choose another protocol (the sensor is on a module with given connector/pins/protocol).  Do you think it is possible to communicate in this configuration? What information should I look up to ensure it can or can't be possible? Do you have some advice?  It is my first time communicating with IC outside the PCB.


Can I say: "a group of ten-year-olds" or should I add the noun for example students  "a group of ten-year-olds students"? Thank you in advance for your answer.

1) a ten years old boy is sitting on the couch.      2) a ten year old boy is sitting on the couch.      3) a ten-years old boy is sitting on the couch.      4) a ten-year old boy is sitting on the couch.   Which is correct?


From a program created in Ruby is it possible to find out what OS the user is running from within the program?  For example could you check for a systems32 folder and from there decide that the user is running windows and use batch commands, or check for a root folder or something that all linux machines run and use bash commands instead?

I want my Ruby program to do different things on a Mac than on Windows. How can I find out on which system my program is running?


Any way to keep the inventory and the items without losing them once we die and respawn? There is no option for LAN and the cheats doesn't work as I am in a polycraft mod server.

I once played a vanilla Minecraft adventure map (called "Herobrine's Mansion") that prevented the player from losing their items on death. Which commands can be used to prevent the player from losing their items on death (in vanilla Minecraft)?


Is "none" singular or plural? I understand it to mean no one which is obviously singular. But I have seen sentences like:  None of them have seen it  which equals:  No one of them have seen it  The subject is singular but we use the plural form "have" I haven't seen "has" used in this sentence. Which one is more correct? Are both correct? What about its grammar (should it be "has" or "have")?

That car is way better than any car any of us have/has ever driven.      None of us know/knows which direction Ron's house is (in).    I have two questions here.   In both the cases, are we to use the singular verb, or the plural? In the end of the second sentence, is using the preposition where it's been used, necessary? Would it be okay if it had no prepositions in it?


i need a little help in html css, i want to disable all contents in a div having class "main-wrapper" after user clicks on a logout button through a jquery function, i tried in 2 ways, but in vain! here is my jquery function,   function loadLogoutBox() {     $('#logout_box').fadeIn("slow");     $(".main-wrapper").css({ // this is just for style             "opacity": "0.3"       });     $(".main-wrapper").disable();     $(".top-menu").attr('disabled', true);  }   any help please!

I was under the assumption that if I disabled a div, all content got disabled too.  However, the content is grayed but I can still interact with it.  Is there a way to do that? (disable a div and get all content disabled also)


I'm new to Entity Framework and I just want to know what is the difference between these two code lines:  using (dbStudentEntities db = new dbStudentEntities()) {     var classList = (from cl in db.tblClasses                      select cl.className).ToList();      var classList2 = db.tblClasses.Select(clss => clss.className); }   It returns the same result. But what are they called? And what is better to use?

LINQ is one of the greatest improvements to .NET since generics and it saves me tons of time, and lines of code.  However, the fluent syntax seems to come much more natural to me than the query expression syntax.  var title = entries.Where(e => e.Approved)     .OrderBy(e => e.Rating).Select(e => e.Title)     .FirstOrDefault();  var query = (from e in entries              where e.Approved              orderby e.Rating              select e.Title).FirstOrDefault();   Is there any difference between the two or is there any particular benefit of one over other?


i would like to know if there is a way to conver a string + to a real plus. Example  string bla = "4+2";   i would like to reach, 4 + 2 = 6  Thanks!

Is there a function the .NET framework that can evaluate a numeric expression contained in a string and return the result? F.e.:  string mystring = "3*(2+4)"; int result = EvaluateExpression(mystring); Console.Writeln(result); // Outputs 18   Is there a standard framework function that you can replace my EvaluateExpression method with?


alphabet='abide' >>>alphabet[-1::-1] 'ediba' >>>alphabet[::-1] 'ediba'   Why did this two print out the same thing? Shouldn't the second one be 'aedib'?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Can the program default colors be changed, that is the grey menu and screen itself.  I simply cannot see properly with the dull grey colors.

I just downloaded blender and its very bright. I want it darker. How can I change the color of it?


First, I'm really sorry for the weird title as I don't know what's the best way to describe. I'm a self-learner in C and there is a problem when I try to print the character. Here is the code:  #include <stdio.h>  main() { int num; float amt; char ch; long int pop_of_Indian; printf("value of num: "); scanf("%d", &num); printf("value of amt: "); scanf("%f", &amt); printf("one character: "); scanf("%c", &ch); printf("Indian population: "); scanf("%ld", &pop_of_Indian);  printf("NUM = %d\n AMT = %f\n Code = %c\n population of India is %ld\n", num, amt, ch, pop_of_Indian); }   Everything runs smoothly until the code required the character from user:   However, when I run the character part separately, it runs normally:  #include <stdio.h> main() { char ch; printf("one character: "); scanf("%c", &ch); printf("Code = %c \n", ch); }   What am I doing wrong here?

I've been having a lot of problems trying to figure out how to use scanf().  It seems to work fine with integers, being fairly straight forward scanf("%d", &i).  Where I am running into issues is using scanf() in loops trying to read input.  For example:  do {   printf("counter: %d: ", counter);   scanf("%c %c%d", &command, &prefix, &input); } while (command != 'q');    When I enter in a validly structured input like c P101, it seems to loop again before prompting me.  This seems to happen even with a single:  scanf("%c", &c)    in a while loop.  It'll do the loop twice before prompting me again.  What is making it loop twice, and how do I stop it? When I enter in less amount of input that programmatically wouldn't have another character or number such as q, pressing enter seems to prompt me to enter more.  How do I get scanf() to process both single and double character entries?


Please, carefully show that   $$ e^{\pi} > \pi^e $$  You are not allowed to use a calculator!  thanks

How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ?


I have a problem which involves finding composite numbers among given set of numbers of the form $11111...1$$(n-digits)$.  Which of the following numbers is/are composite (i)   $11111...1$$(91-digits)$ (ii)  $11111...1$$(81-digits)$ (iii) $11111...1$$(75-digits)$ (iv)  $11111...1$$(105-digits)$  Now I know that these numbers can be simplified using Geometric series. $$11111...1(n-digits) = 10^0+10^1+10^2+....+10^{n-1}$$ $$= \Biggl(\frac{10^n-1}{10-1}\Biggr)$$ But I can't further simplify from here so I help for this.  I have seen a similar post in MSE  but it was tagged under number theory which I am not familier with, my question is about a specific problem from sequence and series.It would be good if I am able to solve using various sequences and series.

Let $Y(k)$ be the number consisting of $1$, repeated $k$ times. We know that $Y(2) =11$ is prime. It so happens that $Y(19)$ and $Y(23)$ are also prime.   Are there any more?   Regards,  David


I am having trouble running the network animator on Ubuntu14.04.  It gives me this error segmentation fault (core dumped). I am using NAM version 1.15 and ns2-2.34.

when i use NS2  through terminal i keep getting a segment fault (core dumped) message.  g_0zek@g-0zeK-pc:~$ ns lab1.tcl g_0zek@g-0zeK-pc:~$ nam lab1.nam Segmentation fault (core dumped)   despite that xgraph works ok   the code in the tcl seems ok as it was given from university and one friend of mine runs it fine.  Any ideas?