I am using ubuntu and some times it is going to hanged stage while running 2 or more webapps simultaneously. Is there any way similar Alt+Ctrl+Delete to Task manager in Windows for sudden terminations?

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


As a general rule, a sentence that begins with noun A and noun B should be followed by a "plural" form of the verb. For example, May and Tom are good students.  However, which verb should be used in the following example?  Example     The diagnosis and management of disease X require/requires an   extensive ...   As in the first example, the original sentence can be broken into      May is a good student.      Tom is a good student.      May and Tom are good students.   Following the logic,     The diagnosis of disease X requires ....      The management of disease X requires ....   Shouldn't the diagnosis AND management of disease X be followed by require? Or is there any difference between the diagnosis and management of disease X and THE diagnosis and THE management of disease X, in which the subject in the former is considered singular and that in the latter is plural?

Is the sentence "“Macaroni and cheese is on the lunch menu.” correct? I mean there 'is' is used as verb because two item means one unit. Or 'are' will be used?


I have a one question. How can I get all text file content to String format? Please show me that code. Thank you. P.S Search didin't help. Sorry for my bad English.

I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited.  Is there a better/different way to read a file into a string in Java?  private String readFile(String file) throws IOException {     BufferedReader reader = new BufferedReader(new FileReader (file));     String         line = null;     StringBuilder  stringBuilder = new StringBuilder();     String         ls = System.getProperty("line.separator");      try {         while((line = reader.readLine()) != null) {             stringBuilder.append(line);             stringBuilder.append(ls);         }          return stringBuilder.toString();     } finally {         reader.close();     } }


I downloaded an extension from gnome-shell extensions site. The file was a zip and I extracted it, now I have a folder with all the extensions files. What's next? where should I put it?

I know how to go to the  website and download gnome-shell extensions, but now I need to install some extensions available there on a computer without any internet access at all. It is in a internal corporate network and there's no way I can get outside internet access on it, so I must find another way. I can copy files in a usb disk.   At my home computer, I have found my extensions at ~/.local/share/gnome-shell/extensions/ but just copying this folder to the target corporate computer didn't do the trick.   Running gnome-tweak-tool gives me a "Install Shell Extension" button but I don't know how to download an extension in a format acceptable to install using this button. I have tried to point to the folder above but it didn't work either.  What do I need to do?


Im having trouble with the first part where the text cant be side by side with the figure

I want to put a table and a figure side-by-side. The table should fill two third of the text width, and the figure the last third.  So I'd like to achieve one of the following effects (which are equivalent in my case):   One table with 3 columns. The first two columns contain text, the third column contains a lengthy image. The height of the image should be determined by the height of the whole table, if that's possible Or, a divided page like in newspapers. On the left side I have the table, on the right side the image.   What I have tried:  \begin{multicols}{2} \begin{tabular}{ l l } Text & Text \\ Text & Text \\ ... & ... \\ \end{tabular} \vfill \begin{figure}[H]     \includegraphics[]{images/image} \end{figure} \end{multicols}   But this places the picture directly on top of the table.  I also tried using \usepackage[export]{adjustbox} and \includegraphics[right]{images/image} but the caption is still in the center of the page and therefor on top of the table.


data = pd.read_csv("customers.csv")  print("Wholesale customers dataset has {} samples with {} features each."       .format(*data.shape))   After this, I got the dimension numbers of the data. But I am wondering what is the usage of the asterisk before variable in Python.

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


Let $K$ be a compact subset of $\mathbb{R}^{n}$ and $F$ a subset of $K$ which is relatively closed in $K$. Then is $F$ a compact subset of $\mathbb{R}^{n}$?

Is there a way to prove this using sequential compactness instead of open cover definitions?  My first gut reaction was that the fact was obvious since we can show that the closed subset $[a,b]$ is compact in $\mathbb R$.


i know that my question is a duplicate of some question here before,  i tried every solution that i see from that, but no solution work for me  i have a class named FilingModel and a method name getReason, i always get a null value to my tvReason TextView  public class FilingAdapter extends RecyclerView.Adapter<FilingAdapter.FilingHolder> {   List<FilingModel> lists;     @Override     public void onBindViewHolder(@NonNull FilingHolder holder, int position) {      FilingModel model = lists.get(position);      holder.tvReason.setText(model.getReason());    }  }   public class FilingModel {      private String reason;      public FilingModel(String reason) {         this.reason = reason;     }      public String getReason() {         if ( reason.isEmpty() || TextUtils.isEmpty(reason) || reason.equals(null)) {            reason = "-";         }         return reason;     } }

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?


Simply, I want to parse URL link(s) and add html reference using jQuery, RegEx.  Source HTML is:
 my favorite search engines are http://www.google.com      and http://stackoverflow.com Do you agree?
   My Current Script is:  var exp = /(^|[^'">])((ftp|http|https):\/\/(\S+))(\b|$)/gi; $('#test').html($('#test').html().replace(exp,     "&nbsp;")); });   And its result is as following:
 my favorite search engines are    and   Do you agree?
   I know this script just replaces and can't preserve its source. I'd like to add its original URL right after 'img tag'. Anyone has an idea to get following result?
 my favorite search engines are   http://www.google.com and  http://stackoverflow.com Do you agree?
   Thank you for your comment in advance.

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


I have control files which inside will have a count of the expected records in the csv file. Each csv file has an accompany ctl file. My question is what is the best way to match the files with it's counterpart? I think there must be a better way than nested for loops. This is Bash Shellscript.  example content of ctl file:  101   Directory where files are:  /home/user/example   Example file names:  project_example_1998-01-01.ctl project_example_1998-01-01.csv project_example_1998-02-09.ctl project_example_1998-02-09.csv project_example_1999-08-09.ctl project_example_1999-08-09.csv project_example_2000-02-09.ctl project_example_2000-02-09.csv

I have files in a directory (/home/user/example) that I need to verify and match. Each file has a control and data file. I want to check if for each file there is a corresponding file of the other. For example, if example.ctl has a match with example.out or example.out has a corresponding file with example.ctl.   I had written a nested for loop and  with many if else statements. But this seemed to be far too complex for a basic check like this. I wanted to see if anyone had a better solution.   Example files in directory:  example.ctl example.out   example_1.ctl example_1.out   example_2.ctl example_2.out


I am reading the following paper on a rigorous construction of Brownian Motion: . In the paper, they give a peculiar proof of the fact that the time inverted Brownian Motion is continuous at $t=0$ (pg.4). Specifically, a time-inverted Brownian Motion is given to be:  $$ X_t = \begin{cases} 0 &: t=0 \\ tB_{1/t} &: t \neq 0 \end{cases} $$  They say that $X_t$ has the distribution of a Brownian Motion on $\mathbb{Q}$, the set of all rationals, so that:  $$ 0 = \lim_{n \to \infty}X(\frac{1}{n}) = \lim_{t \to 0}X(t) $$  What I understand is how they get the second equality, which is obtained via setting $n = \frac{1}{t}$. However, what is confusing me and what I dont understand is how the first equality, $0 = \lim_{n \to \infty}X(\frac{1}{n})$ is obtained. I am assuming it has something to do with real analysis but am not really sure why $0 = \lim_{n \to \infty}X(\frac{1}{n})$ is true. Could someone give me a hint? Thanks.

Let $B=(B_t)_{t\geq 0}$ be a brownian motion. Show the time inversion formula $\hat{B}=(\hat B_t)_t\geq0$ is a brownian motion, where for $t \geq 0$ we set $\hat{B}_0=0$ and $\hat{B}_t=tB_{1/t}$ for $t>0$.  I cant figure out how to do this question , can someone help me ? Thanks


I have a table within PostgreSQL/PostGIS that contains all point data. I need to add another large dataset to this existing table without overwriting the table. When I go into DB Manager within QGIS and try to import the new information I keep getting an error saying that the table I'm trying to write to already exists.   How can I add more information to this table without over writing the existing information already in the table? I wish to be able to do this with QGIS because it does all of the GEOM information for me.

I 'm running postgis with qgis 2.6. I created a database and tables that i need to update with new datas provided with shapes. I cannot find how to insert them in table. All attributes both shapes and table are same. I don't despair to have an "easy" way instead of using an insert to command that i'm not sure to use correctly in postgis command.  I've tried the database manager but i only succeed in erasing all previous data in the table >_<  Window 7 64 bits Qgis2.6 Postgis1.5 Postgrsql 9.4


A car moves along a flat, circular road.  It has a tangential velocity to the road, but the car tires change direction and the car experiences a force of static friction causing a centripetal acceleration towards the center of the circle.  Why does the force push it perpendicular to the direction of the velocity?

What makes frictional force the centripetal force of a car turning along a curve? As friction is the opposing force and acts anti-parallel so there is no component of frictional force towards the center,right? Then how can frictional force be centripetal force?


With a terminal I can do: ssh my_id@server1 and then ssh my_id@server2  (I first reach server1 and from it, reach server2. I need to do it because I can't directly access server2 (college policies)).  With Nautilus I can do: ssh://server1 but then there is no windows to write and so connect to ssh://server2 (talking about this window:  )  Any idea how to access server2 by accessing server1 first, with Nautilus ?

I can access a server A with SSH, and from there I can access server B, but I can't access B directly.  Is it possible to open a Nautilus folder in server B by clicking in Places → Connect to Server?


I'm trying to learn how to use Python (IDLE using Python 3.4) on my Ubuntu computer, but i dont know how to open/run a .py file from the terminal from the desktop.

I need help running python in ubuntu  I can run python without a problem in my terminal but when I create a .py file I can't get it to run.


When i try to get an image from mp3, i catch an exception.  public MediaPlayer mediaPlayer; public Media media; public MediaView mediaView; public ImageView albumPicture;  public void initialize() {     media = new Media(new File("res\\music.mp3").toURI().toString());     media.getMetadata().addListener(new MapChangeListener<String, Object>() {         @Override         public void onChanged(Change<? extends String, ?> c) {             if (c.wasAdded()) {                 if ("image".equals(c.getKey())) {                     albumPicture.setImage((Image)c.getValueAdded());                 }             }         }     });      mediaPlayer = new MediaPlayer(media);   Exception in thread "JavaFX Application Thread" java.lang.NullPointerException         at sample.Controller$1.onChanged(Controller.java:67)         at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163)         at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)         at com.sun.javafx.collections.UnmodifiableObservableMap.callObservers(UnmodifiableObservableMap.java:65)         at com.sun.javafx.collections.UnmodifiableObservableMap.lambda$new$30(UnmodifiableObservableMap.java:59)         at javafx.collections.WeakMapChangeListener.onChanged(WeakMapChangeListener.java:88)         at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163)         at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)         at com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115)         at com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:173)         at javafx.scene.media.Media.updateMetadata(Media.java:525)         at javafx.scene.media.Media.access$200(Media.java:78)         at javafx.scene.media.Media$_MetadataListener.lambda$onMetadata$10(Media.java:544)         at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)         at java.security.AccessController.doPrivileged(Native Method)         at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)         at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)         at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)         at java.lang.Thread.run(Thread.java:748)


Consider a number abcde. Here, we have 5 digits in that number. Let, say this abcde = n. Then I want a single mathematical function which tells how much digits are there in n.  They could be 3 or 100.  In programming it's easy but it requires more statements. Is this possible to get a single statement. Generally, I not want this for programming.

I read recently that you can find the number of digits in a number through the formula $\lfloor \log_{10} n \rfloor +1$ What's the logic behind this rather what's the proof?


Im using unity and I want to make a game where you can walk around small planets and the further away you get, the weaker the gravity, so you can go to other planets. All the tutorials so far only work with one planet, how do I code this? Is there anything I can download that does it for me?

a 2d planet in the center, where the players will be able to walk on it and also will be affected by center gravity. planet will be static and there won't be any other planets. so;  Is there a way that I can change the gravity position? yes you can adjust gravity via project settings but I want it to be in the middle x,y,z(0,0,0)  I have tried creating my own gravity but it wasn't very useful because objects wouldnt fall, stand on foot and also in contact with another object they would vibrate instead of standing still. (if they stand on the planet they would vibrate)          private void FixedUpdate() {     foreach(GameObject item in grav)     {         Attact(item);     } }  private void Attact(GameObject gmf) {     Rigidbody2D rgg = gmf.GetComponent<Rigidbody2D>();      Vector3 direction = rg2d.position - rgg.position;     float distance = direction.sqrMagnitude;      float forceMag = (10 * rgg.mass) / distance;     Vector3 force = direction.normalized * forceMag * 10;      rgg.AddForce(force); }   I can create a script that will change the gravity by the opposite of the object's position. this does work but I cannot see any way to do it for more than one object.


I am using Stack Overflow. I just logged in and am trying to post a question by clicking the "Post Your Question" button, but it gives a pop-up saying "You can only post once every 90 minutes." I didn't even post anything today. Why is this happening? This similar thing happened to me previously also.

Trying to post a question (on StackOverflow), and get the message:  Oops! Your question couldn't be submitted because:  users with less than 125 reputation can only post questions every 20 minutes; try again later.   I have not posted any questions within the last 20 minutes. Specifically I haven't posted a question since "nov 24 at 1:21" in 2009.


The following (nested) function/s  function hpf_matrix {    # Positional Parameters   Matrix_Dimension="${1}"   Center_Cell_Value="${2}"    # Define the cell value(s)   function hpf_cell_value {     if (( "${Row}" == "${Col}" )) && (( "${Col}" == `echo "( ${Matrix_Dimension} + 1 ) / 2" | bc` ))       then echo "${Center_Cell_Value} "       else echo "-1 "     fi   }    # Construct the Row for Cols 1 to "Matrix_Dimension"   function hpf_row {     for Col in `seq ${Matrix_Dimension}`       do echo -n "$(hpf_cell_value)"     done   }    # Construct the Matrix   echo "MATRIX    ${Matrix_Dimension}"   for Row in `seq ${Matrix_Dimension}`     do echo "$(hpf_row)"   done   echo "DIVISOR   1"   echo "TYPE      P" }   work/s fine, both as a standalone code and inside a script.  I.e. hpf_matrix 5 18 will return  MATRIX    5 -1 -1 -1 -1 -1  -1 -1 -1 -1 -1  -1 -1 18 -1 -1  -1 -1 -1 -1 -1  -1 -1 -1 -1 -1  DIVISOR   1 TYPE      P   and it will even work (with various values) as requested in:  Kernel_Size=5 Center_Cell_Default=18 ; Center_Level=Default eval Center_Cell="Center_Cell_${Center_Level}"  HPF_MATRIX_ASCII=`hpf_matrix ${Kernel_Size} ${!Center_Cell}` echo "${HPF_MATRIX_ASCII}"   However, integrating without any changes the above pieces of code (the hpf_matrix function and feeding the "${HPF_MATRIX_ASCII}") inside a larger bash script, errors-out with the following message:  ((: 1 2 3 4 5 == 1 2 3 4 5 : syntax error in expression (error token is "2 3 4 5 == 1 2 3 4 5 ")   Minor Update  If I understand correctly, for whatsoever is the reason behind, the line  for Row in seq ${Matrix_Dimension}  as well as the line  for Col in seq ${Matrix_Dimension}  are printed as "1 2 3 4 5" instead of "1" "2" "3" "4" "5".  What is wrong in this case?  I would like to keep a nested structure for the function unless it is clearly wrong.

I want to keep all files not ending with .bat  I tried   for f in $(ls | egrep -v .bat); do echo $f; done   and  for f in $(eval ls | egrep -v .bat); do echo $f; done   But both approaches yield the same result, as they print everything. Whereas ls | egrep -v .bat and eval ls | egrep -v .bat work per se, if used apart from the for loop.  EDIT  It's interesting to see that if I leave out the -v flag, the loop does what it should and lists all files ending with .bat.    Feel free to edit the question title, as I was not sure what the problem is.  I'm using GNU bash, version 4.1.10(4)-release (i686-pc-cygwin).     EXAMPLE  $ ls -l | egrep -v ".bat" total 60K -rwx------+ 1 SYSTEM SYSTEM 5.3K Jun  6 20:31 fsc* -rwx------+ 1 SYSTEM SYSTEM 5.3K Jun  6 20:31 scala* -rwx------+ 1 SYSTEM SYSTEM 5.3K Jun  6 20:31 scalac* -rwx------+ 1 SYSTEM SYSTEM 5.3K Jun  6 20:31 scaladoc* -rwx------+ 1 SYSTEM SYSTEM 5.3K Jun  6 20:31 scalap*   Command is working, but not in the for loop.  $ for f in $(ls | egrep -v .bat); do echo $f; done fsc fsc.bat scala scala.bat scalac scalac.bat scaladoc scaladoc.bat scalap scalap.bat scalac scalac.bat scaladoc scaladoc.bat scalap scalap.bat   DEBUG $ set -x  mike@pc /cygdrive/c/Program Files (x86)/scala/bin $ for f in $(ls | egrep -v .bat); do echo $f; done ++ ls -hF --color=tty ++ egrep --color=auto -v .bat + for f in '$(ls | egrep -v .bat)' + echo fsc fsc + for f in '$(ls | egrep -v .bat)' + echo fsc.bat fsc.bat // and so on


I am looking for an exhaustive list of all objects that can be used with the Use an Object action. RAW, official printed material only.  Depending on what falls in under the Use an Object action, the thief (sub class of rogue) could either be very good or nearly useless.     In  I found a list saying that the following items all require the use of an action in their descriptions:        Acid   Alchemist's Fire   Ball Bearings   Caltrops   Climber's Kit   Healer's Kit   Holy Water   Hunting Trap   Lantern, Hooded   Oil   Poison, Basic   Tinderbox      Is that all?

I saw this come up in another question in regards to drinking a healing potion not being a Use an Object action as the text in the equipment chapter under healing potion specifically says that using a healing potion is an action.  But if I look at the other objects in the equipment chapter, I find similar text:     Applying the poison takes an action.        Drinking or administering the potion takes an action.        As an action, you can spread a bag of caltrops...   None of these refer specifically to Use an Object.  However, the Use an Object text in the Combat chapter says this.     When an object requires your action for its use, you take the Use an   Object action.   So the text in the Combat chapter, by my reading, seems to say that the 'action' in the text of specific objects in the equipment section is Use an Object.  Is this correct?  Is using any of the objects in the equipment chapter the Use an Object action as the Use an Object text seems to say?  If not, then what can you do with Use an Object?


How can I get "people reached" data from the Users table for Stack Overflow?  I didn't find any fields related to the people reached state in the Users table/schema.  Is it possible to get that data from the Users table or using User_id?  Here is my query:  SELECT     Id,     Reputation FROM     Users WHERE     Location like '%Tamilnadu%' ORDER BY     Reputation DESC;

I know the new profile design hasn't been updated for  on the network yet, so maybe this is a bit too early. Nonetheless, please include the "People Reached" data in  at your earliest convenience. Also, I was just made aware that users helpful flag counts are now publicly displayed on their  towards the top-right, underneath the people reached stat. So please include this data in SEDE as well.


Is there a way to access a variable outside of the function that it's declared in?  var checkWidth = function () {   var $width = $(window).width(); }  $(window).on('resize', checkWidth);  // access $width here with the value from the resize   Solution:  var $width = $(window).width();  $(window).resize(function () {   var $resizeWidth = $(window).width();    updateWidth($resizeWidth);  });  function updateWidth(a) {   width = a;    // use the new width here }

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?


I've been doing a lot of research about functional half-iteration, and I posed the following question to myself:     Consider the function $q:\mathbb R\mapsto\mathbb R$ defined as   $$q(x)=x^2+1$$   Does $q^{\circ 1/2}$ exist? Does a continuous $q^{\circ 1/2}$ exist? What about a differentiable $q^{\circ 1/2}$?   It seems to me that $q^{\circ 1/2}$ exists, but I don't know how to prove that it exists (I certainly can't find it, since it's probably not an elementary function). So far, I've proven that if it exists and is continuous, then it must be bounded between $x$ and $q(x)$. My intuition tells me that a differentiable solution probably exists... but it may not be differentiable at $x=0$. I've worked out an "almost-graph" of a possible solution, but it's far from a rigorous proof:    Any ideas about how to attack this problem rigorously?

There are some math quizzes like: find a function $\phi:\mathbb{R}\rightarrow\mathbb{R}$  such that $\phi(\phi(x)) = f(x) \equiv x^2 + 1.$  If such $\phi$ exists (it does in this example), $\phi$ can be viewed as a "square root" of $f$ in the sense of function composition because $\phi\circ\phi = f$.  Is there a general theory on the mathematical properties of this kind of square roots? (For instance, for what $f$ will a real analytic $\phi$ exist?)


I am not even sure where to start with this question. Any help would be much appreciated! Thanks! We are not allowed to use Mathematical Induction!

Simplify the expression $\binom{n}{0}+\binom{n+1}{1}+\binom{n+2}{2}+\cdots +\binom{n+k}{k}$  My attempt: Using the formula $\binom{n+1}{k}=\binom{n}{k}+\binom{n}{k-1}$  $\binom{n}{0}+\binom{n+1}{1}+\binom{n+2}{2}+\cdots \binom{n+k-1}{k-1}+\binom{n+k}{k}$  =$\binom{n}{0}+\binom{n+1}{1}+\binom{n+2}{2}+\cdots +\binom{n+k-1}{k-1}+(\binom{n+k-1}{k}+\binom{n+k-1}{k-1})$  =$\binom{n}{0}+\binom{n+1}{1}+\binom{n+2}{2}+\cdots +2\binom{n+k-1}{k-1}+\binom{n+k-1}{k}$  I can again use the same formula for the term $2\binom{n+k-1}{k-1}$, and in the next to step to the term $3\binom{n+k-2}{k-2}$.   But I don't think this way the expression will get simplified.   Any help is appreciated.


I accidentally deleted my Linux partition from Windows, and when I restarted I always see the grub rescue screen. I did try setting root to each of the partitions, but I always got the unknown filesystem error. I found that the most suggested fix is to boot from a live CD/USB, but I can't perform that as well.

I just installed Ubuntu alongside to Windows 7, and now Windows 7 will not boot.  When the system starts, it shows me entry for Windows 7 in the boot menu, when I click on the Windows 7 option in the boot menu, after few seconds it will show me the boot menu again and Windows will not boot. It shows me no error message. Windows 7 option is available in the boot menu but it just does not boot.  Here are my boot info results   update - 30/01/2012 I tried windows recovery - fix startup issues - that showed no problems but issues were not resolved  Then I tried the widnows recovery console and run following commands  bootrec /fixboot bootrec/ fixmbr bootrec /RebuildBCD   But that does not help, Now neither ubuntu nor windows will boot. When I boot from windows CD it shows me a valid windows installation in c:\ drive.  update After a lot of help I got from #ubuntu channel and trying out different things, ultimately I can now boot both windows and ubuntu, still, the issue is not completely resolved though.  Here's what made it work  Boot using ubuntu live CD and then run the testdisk utility as steps mentioned  Restart system and I was able to see the boot menu and boot into Ubuntu, then put the following code in boot/grub/custom.cfg. Restart and now I can see one more entry to boot win7, clicking on it boots windows.  menuentry "Windows 7 (loader) with grub ntldr workaround" --class windows --class os   {     insmod part_msdos     insmod ntfs     set root='(hd0,msdos1)'     search --no-floppy --fs-uuid --set=root FAF0F57DF0F54085     ntldr /bootmgr }   It will make windows boot probably but now windows have a dependency on Ubuntu and I can not remove Ubuntu or else windows will stop working.  Credit goes to 'Jordan_U' on #ubuntu channel.   update Here are the win7 boot details I got from EasyBCD  Windows Boot Manager -------------------- identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795} device                  partition=C: path                    \bootmgr description             Windows Boot Manager locale                  en-US default                 {04fe8f95-4b17-11e1-a45c-909d3d25f938} displayorder            {04fe8f95-4b17-11e1-a45c-909d3d25f938} timeout                 30  Windows Boot Loader ------------------- identifier              {04fe8f95-4b17-11e1-a45c-909d3d25f938} device                  partition=C: path                    \Windows\system32\winload.exe description             Windows 7 Home Premium locale                  en-US osdevice                partition=C: systemroot              \Windows resumeobject            {8d25a443-4b0a-11e1-a835-806e6f6e6963}   Note Still, I am looking for how can I have everything clean and how can I boot windows without having a dependency on Ubuntu. so that if ever I have to remove ubuntu, windows will keep booting file without ubuntu.


I have a custom listView row which looks like this:    I have a customAdapter with the following getView method (not interesting parts were deleted)  @Override public View getView(final int i, View view, ViewGroup viewGroup) {     holder.viewProfileImageButton = view.findViewById(R.id.viewProfileImageButton);     holder.viewProfileImageButton.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {            String pubKey ((objClass_foundUsers)foundUsersList.get(i)).getPublicKey();             Intent getToUserProfileIntent = new Intent(context,activity_1_3_my_profile.class);             context.startActivity(getToUserProfileIntent);         }     }); }   When the user clicks on the first imagebutton in the row this user's profile should be displayed. In order to do this I get the publicKey of the user in the onClick method in my customAdapter and want to pass it to another activity.  When using    getToUserProfileIntent.putExtra("pubKey", pubKey);   in the onClick method in the customAdapter and   pubKey = getIntent().getExtras().getString("pubKey");   in my activity it throws a NullPointerException saying:  java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference   How can I send the publicKey from this adapter to another activity?

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 have a simple DIV that has several input forms, and textarea inputs and a submit button. Now I would like this div to be centered in the center of the page instead of to the left how is it by default. I have tried all of the DIV centering methods I found searching but they always mess up the alignment of the text forms in the DIV when it is centered. How could I center something like this in the middle of the page?

 <input type="text"> <input type="text"> <textarea id="text1" name="textbox" rows="10" cols="100" ></textarea> </textarea> <textarea id="text2" name="textbox" rows="10" cols="100"></textarea> </textarea>
 <input type="submit">

How can I horizontally center a
 within another
 using CSS?

Foo foo


I would like to compress backup directory, but not saving all path of data. After unpack i want have only destination directory. How Can I do this?  This command save all path:  $tar -czf /home/user/backup/www_`date +%Y-%m-%d`.tar.gz /home/user/www  $ tar -xvf redmine_www_2018-03-02.tar.gz  home/user/www/

I try to create an archive with tar using relative paths. I use the following command:  tar czf ~/files/wp/my-page-order.tar.gz -C ~/webapps/zers/wp-content/plugins/ ~/webapps/zers/wp-content/plugins/my-page-order   But the archived files still have absolute paths. How can I use tar with relative paths?


Question :     Explain this fallacy:      $$-1=\sqrt{-1}\sqrt{-1}=\sqrt{(-1)(-1)}=\sqrt{1}=1$$   (Complex Variables Schaum c1:1.128)  Btw, it's not a homework, i'm curious why it can be false?  Well, i'm considering we're not allowed to multiply these two negative numbers under the roots.  But, what is the reason? Could it be proven? Or it's just an agreement?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


It would be convenient if the chat event page (e.g. ) had the same social media sharing buttons as questions do (i.e. Twitter and Facebook).  This would make it easier to promote upcoming events.  The link in the tweet (and whatever Facebook calls a post? status update? thing) would take you to the event page, where you could register interest.

: Add share buttons to chat events! Here's a concept drawing of what I'd like it to be: Let's get rid of the export and delete links right after each title, and replace it with a chat-style popup-popper-upper:  Which would popup a popup!  Clicking share would bring up options to share the event to Twitter, Facebook, etc. Of course, the concept art is pretty crude (and devoid of red freehand circles), but it should be enough to give you an idea. I'm open to any way to get a share button, this was just the best one to pop into my mind. Opinions?


I want to format binary numbers by grouping them into blocks of four and adding leading zeros to fill 8, 16 or 32 bit numbers. E.g: 11001 -> 0001 1001.  I've already found the siunitx package, which makes number formatting possible, but it doesn't work as expected.   \num[group-four-digits=true]{00011001} gives 0001 1001(as expected) \num[minimum-integer-digits=8]{11001} gives 00 001 001 (as expected) \num[group-four-digits=true,minimum-integer-digits=8]{1001} gives 00 001 001 (the group-four-digits option is ignored).   How can I make siunitx use the group-four-digits switch in combination with minimum-integer-digits? Or is there a better way to format binary numbers in LaTeX? Thanks in advance.

I would like to format binary or hexadecimal numbers with a space separator at each 2 or 4 digit (or any other value like 8 digit or more).  A small picture is better than a long explanation, here is what I would like to do:    As you can see in this mwe, I use the fmtcount package with padzeroes:      \documentclass{article}     \usepackage[utf8]{inputenc}         \usepackage[T1]{fontenc}               \usepackage{fmtcount}     \begin{document}             Binary value : {\padzeroes[16]\binarynum{129}}$_{(2)}$ %             should display 0000 0000 1000 0001$_{(2)}$              Hexadecimal value: {\padzeroes[8]\Hexadecimalnum{65000}}$_{(16)}$ %             should display  00 00 FD E8$_{(2)}$     \end{document}   What I want to do is displaying numbers with various radix (2, 3, 7, 8, 10, 16) given a decimal number and format these numbers correctly with spaces and leading 0 (without having to perform the conversion by myself).  I already found some posts with similar questions, but none of them achieve this (they display number with thousand separators, like the numprint package, every 3 digits; or they do not make it automatic). Here are these posts :         EDIT two other linked questions:       I also prefer to use pdflatex.


Suppose $f\in L^{1}(\mathbb R) $  My Question is:      Can we show, $\lim_{ |x| \to \infty } f(x) = 0$?   Thanks,  (this question is obviously related to  a thing I've already proven.)

1) Construct a continuous function $f$ on $\mathbb{R}$ that is integrable on $\mathbb{R}$ but $\displaystyle\limsup_{x \to \infty} f(x)  = \infty$.  I took the function that is equal to $n$ on $[n, n + 1/n^{3})$ and made it continuous by saying that $f$ is the line segment joining $n$ and $n+1$ on $[n + 1/n^{3}, n+1)$. But I am failing to prove this integrable. For this, $\lim f(x) = \infty$ but how do you prove in general, if limit does not exist that $\limsup$ is infinity?  2) Prove that if $f$ is uniformly continuous and integrable on $\mathbb{R}$ we have $\displaystyle\lim_{|x| \to \infty} f(x) = 0$.  Any help is appreciated.  Thanks


I've just uninstalled all languages on my Windows 10 except for English and set the system locale to English (US). python says that my preferred encoding is cp1252 which is quite the opposite of what I prefer (utf-8).  C:\Users\nope>python Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.getpreferredencoding() 'cp1252'   How do I change my preferred encoding to utf-8? And most importantly where is python getting cp1252 from?

When piping the output of a Python program, the Python interpreter gets confused about encoding and sets it to None. This means a program like this:  # -*- coding: utf-8 -*- print u"åäö"   will work fine when run normally, but fail with:     UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)   when used in a pipe sequence.  What is the best way to make this work when piping? Can I just tell it to use whatever encoding the shell/filesystem/whatever is using?   The suggestions I have seen thus far is to modify your site.py directly, or hardcoding the defaultencoding using this hack:  # -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') print u"åäö"   Is there a better way to make piping work?


It seems like cocoa powder is very tricky to dissolve in liquid without using a slurry. So how do store-bought cocoa mixes dissolve so easily?

Why do some powders like flour or matcha green tea causes lumps in hot water while other powders like sugar or cocoa or wheat grass (triticum aestivum) readily dissolve? Wheat grass powder is green and easily dissolves in cold water.  Cocoa:


<xsl:for-each select="./Indexes/Index">       <xsl:value-of select="Caption" />:       <xsl:value-of select="Description" /> </xsl:for-each>   convert lower case to Upper case in XSLT

How do you do case conversion in XSL?  <xsl:variable name="upper">UPPER CASE</xsl:variable> <xsl:variable name="lower" select="???"/>


I am going for a 4 day trip in Zürich and I would like to bike quite a lot. Though biking is quite advertised, I failed to find a decent bike rental shop in the city. Would highly appreciate some tips!


I'm just trying to get my head around the differences between these three approaches to statistical inference. I'm just not entirely sure what the significant differences are between the three.

Can someone give a good rundown of the differences between the Bayesian and the frequentist approach to probability?  From what I understand:  The frequentists view is that the data is a repeatable random sample (random variable) with a specific frequency/probability (which is defined as the relative frequency of an event as the number of trials approaches infinity). The underlying parameters and probabilities remain constant during this repeatable process and that the variation is due to variability in $X_n$ and not the probability distribution (which is fixed for a certain event/process).  The bayesian view is that the data is fixed while the frequency/probability for a certain event can change meaning that the parameters of the distribution changes. In effect, the data that you get changes the prior distribution of a parameter which gets updated for each set of data.  To me it seems that the frequentist approach is more practical/logical since it seems reasonable that events have a specific probability and that the variation is in our sampling.  Furthermore, most data analysis from studies is usually done using the frequentist approach (i.e. confidence intervals, hypothesis testing with p-values etc) since it is easily understandable.  I was just wondering whether anyone could give me a quick summary of their interpretation of bayesian vs frequentist approach including bayesian statistical equivalents of the frequentist p-value and confidence interval. In addition, specific examples of where 1 method would be preferable to the other is appreciated.


The font  is a font that provides (at the moment two) different optical sizes. The  package will automatically choose the appropriate optical size (cf. the manual under section 8.6.).  But how can one do this when fonts are explicitly selected with path specifications? In the first MWE below, fontspec loads the system font EB Garamond, and notice the differences in the fonts in the tiny size and the normal size. In the second MWE, fontspec loads an explicitly declared font, and in this case, the font is simply scaled down.  \documentclass{standalone} \usepackage{fontspec} \setmainfont{EB Garamond} \begin{document} {\tiny{1234567890}} 1234567890 \end{document}     \documentclass{standalone} \usepackage{fontspec} \setmainfont     [         Path = M:/MyStuff/Fonts/EBGaramond-0.015d/otf/,         UprightFont = EBGaramond12-Regular.otf     ]     {EB Garamond} \begin{document} {\tiny{1234567890}} 1234567890 \end{document}

I am a big lover of the  by Georg Duffner. As of now, he has made two sets of font files, EB-Garamond-8 and EB-Garamond-12, respectively for “design size 8pt” and “design size 12pt”. Is there a way to make fontspec (and possibly unicode-math, too) use EB-Garamond-8 fonts for small sizes e.g. sub/superscripts, footnotes… and EB-Garamond-12 fonts for regular sizes when using local font files¹?  If I use only EBGaramond12, the following code works if I put the EBGaramond12-* .otf files in a fonts/ directory sibling to the .tex²  \setmainfont[     Path=fonts/,     Extension=.otf,     UprightFont=*-Regular,     ItalicFont=*-Italic,     BoldFont=*-Bold,     RawFeature={+clig,+dlig,+cv11},]{EBGaramond12}   but if I try to adapt it to use the SizeFeatures options  \setmainfont[     Path=fonts/,     Extension=.otf,     UprightFont=*-Regular,     ItalicFont=*-Italic,     BoldFont=*-Bold,     RawFeature={+clig,+dlig,+cv11},     SizeFeatures={         {Size={-12}, UprightFont=EBGaramond8-Regular, ItalicFont=EBGaramond8-Italic},         {Size={12-}, UprightFont=EBGaramond12-Regular, ItalicFont=EBGaramond12-Italic, BoldFont=EBGaramond12-Bold}     }]{EBGaramond12}   Then the document won't compile and I get the following error. Using complete names instead of wildcarded ones changes nothing.  The key 'fontspec/UprightFont' is unknown and is being ignored.     ¹ It means that using features that automagically select the right system fonts is not an option.  ² the file structure is  . ├── fonts │   ├── EBGaramond08-Italic.otf │   ├── EBGaramond08-Regular.otf │   ├── EBGaramond12-Bold.otf │   ├── EBGaramond12-Italic.otf │   └── EBGaramond12-Regular.otf └── paper.tex


In the process of replacing my gear cassette on my Trek 820 bike I took apart my rear wheel hub and bearings and I have no clue how the parts are supposed to go back together.

So I thought I would sort out my wheel bearings (after asking a few questions here first).  Did the front without much of a problem, (reused the existing bearings at the moment, had not got round to going to the LBS to get new ones).  I tried to do the rear wheel tonight.   So I got the wheel off, took the quick release out.  undid one side of the axle (disk brake side I believe), took out the bearings etc.  I noticed that a few of the bearings from the cassette side had fallen out while taking the other side off. I then used the chain whip and other bit thing (who's name I can not remember) to eventually undo the cassette (was on real tight).  Took everything apart (trying to remember the order, even placing things in rows of where it came from) and cleaned it all up.  Went to put it back together again and I can not figure out at all (not with any confidence) how the bearings go into the cassette side under the locking nut (think its called that, the bit that comes off with the chain whip and tool).  Here are all the bits and the wheel.  Think I may have to admit defeat and go the LBS to get it sorted but they had a 5 or so day wait.  I am hoping someone might be able to guide me in the right direction to get this working again please.  Thanks      If anyone else has this problem here is a picture of the final way I assembled it:


According to  first two sentences (which I find a bit confusingly formulated), there are two different meanings to the expression.   No way out and no options other than a single, not pleasant one. Full speed ahead, all-in, whole-range approach.   After reading/googling, I'm unclear on which of the meanings is the correct one. Furthermore, I realize that it's possible that both are valid, in which case I wonder if there are geographic relation to which is the most commonly used. Is there a trend of popularity (raising/dropping) for any of them?

I know the phrase means "going all out" but I can't figure out what it literally means or where it originates from.


I think review is better thing to do than answering questions, when I am on mobile. But I cannot find option for review in my iPhone app. Is it not possible to do review tasks from mobile?

I enjoy reviewing on SO, is it currently possible to review on the iOS app? If not, is it planned to be implemented?


There is an earlier exchange on this, but one that does not include "and others" and that uses only the verb "to be." My question:  What if it were "Joan, along with Jake and others" and the verb were not "to be," but a regular transitive verb? For example, "bake": Joan, along with Jake and others, bake/s cakes every Saturday. Would the singular still be absolutely necessary, or would plural be acceptable usage as well?

I was interested in the following sentence which appeared in a   in The Washington Post, Politics, (WHO RUNS GOV).     She, along with Mark Childress, were set to be Daschle's deputies at   the White House before he stepped down.   Can someone clarify if the fragment "She, along with Mark Childress, were set to" is ungrammatical, as I think it is?  I would reword were with was because I think that the subject of the sentence - obviously, in grammatical terms - is "She", not "She" and "Mark Childress", but I'm not sure on this correction.  More precisely, I'm not so sure that "She, along with Mark Childress" is equivalent to She and Mark Childress with regard to the effects on the grammatical numbers.


I’m about to turn 38 and after much research and consideration I have decided that I need to return to school. My goal is to apply to applied math PhD programs and work in industry, ideally working on problems in computational science or fluid dynamics.   My major (economics and math) GPA from a good public school was around 3.03 and my GPA for my math courses fell at 2.88. Previously I experienced some very serious issues in my life that played its role in this (not an excuse but just an unfortunate fact at the time).   I’ve reached out to some professors about my background and have been told that my GPA, though not considered the sole factor in determining admission, is a problem. I plan on applying to and enrolling in a post baccalaureate program at an Ivy league college near my home and plan on sitting for the math GRE subject test but I feel like I need to take more courses than I can afford to even be considered for such programs (the courses for the post bac. program are around $6K each).   I’m prepared to use a good bit of my life savings and working part time to fund this but I would like to learn how I can get a better sense of how many more courses I should take to counterbalance my low GPA.  Would graduate committees be open to giving an unofficial assessment of my background before applying? I don’t plan on applying to the elite schools because I feel that my GPA would knock me out regardless.   Some background on me:  Since graduating I’ve had varied work experience such as working as a math tutor to working in finance in the last 10 years. I also have a good bit of experience programming and have furthered my education to some extent for what it's worth: passed an online specialization course in R programming that spanned roughly 9 months, picked up a number of financial licenses, and even passed an actuarial exam when I was considering that route.   I do have course work in calculus, econometrics, ODEs, linear algebra, and an intro to analysis course.  Any thoughts/insights are definitely much appreciated.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I have a question and concern on the passport scanner issue.  It happened at South Korea airport.  Before I went to luggage inspection, I have to scan the passport with airport staff and when my passport was being scanned, there was warning sound or weird sound from the passport reader machine. It was a different sound from other people before me. And staff just handed a passport to me normally. And then I went to luggage inspection normally.   My question: does this situation happen normally, and there is nothing on my passport right?

Earlier this year I was in Japan and Korea. Now I'm back in my home country. However, when I was in Korea the "scan" machine before going to luggage inspection, right before accessing the boarding gates made a weird "alert" sound. It has happened at least twice already, but both times the officer just handed me back my passport and didn't ask me anything. They just made sure I looked the same as in the photo.  When I was checking out of Japan, before going to the boarding gates, when the officers scanned my passport, they all looked at each other confused but never looked at me or asked any question.  I'm wondering if there's something wrong with my passport and what it could it? I'm a little concerned even though I've never been asked anything whenever this happens.


I am trying to create a simple multi browser chat web application. I thought I finished creating it. But when I try run it I get 500 status and  Internal Server Error  The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.   Not really sure why this is occurring. I am doing this project in Flask and I am currently learning at the same time. Because I am currently learning Flask and Flask-socketio and websockets.   chatty.py:  from gevent import monkey # Do all of the default monkey patching (calls every other function in this module. monkey.patch_all()  from threading import Thread from flask import Flask, render_template from flask.ext.socketio import SocketIO, emit from time import strftime  app = Flask(__name__) app.config['SECRET_KEY'] = 'secret' socketio = SocketIO(app) thread = None   @app.route('/') def index():     global thread     if thread is None:         #thread = Thread(target=background_thread)         thread.start()     return render_template('index.html')  # handle messages @socketio.on('send message') def handle_message(message):     #msg = strftime("%H:%M:%S") + ': ' + str(message)     emit('response',              {'data': strftime("%H:%M:%S") + ': ' + message['data']},              broadcast = True)  @socketio.on('connect') def conn():     emit('response', {'data': 'Connected'})  if __name__ == '__main__':     socketio.run(app)   index.html:                                <form id="broadcast" method="POST">         <input type="text" name="message" id="msg" placeholder="Enter message here...">         <input type="submit" value="Send">     </form>
Chat

Okay, what is it, and why does it occur on Win2003 server, but not on WinXP.  It doesn't seem to affect my application at all, but I get this error message when I close the application.  And it's annoying (as errors messages should be).  I am using pyOpenGl and wxPython to do the graphics stuff.  Unfortunately, I'm a C# programmer that has taken over this Python app, and I had to learn Python to do it.  I can supply code and version numbers etc, but I'm still learning the technical stuff, so any help would be appreciated.  Python 2.5, wxPython and pyOpenGL


Im a beginner in (infinite) set theory, So keep that in mind. I know cantor's diagonal, cantors pairing function , the ZFC axioms and basic stuff like that.  Im very intrested in infinite sets and in particular cardinality and the continuüm hypothesis.  Now I read an article ( see link ) where They mention that - If I understand correctly - that two types of cardinality are equal : card(p) = card(t).  Im not sure If $p$ and $t$ are the standard notation for these sets / Cardinals / ordinals.  But the article says who worked on it , So I hope you guys can explain $p$ and $t$ to a beginner like me.  It is Said - I think - that $p$ and $t$ are candidates to break CH.  In case the article goes away here is a quote :    INFINITY  Mathematicians Measure Infinities and Find They’re Equal By KEVIN HARTNETT September 12, 2017  Two mathematicians have proved that two different infinities are equal in size, settling a long-standing question. Their proof rests on a surprising link between the sizes of infinities and the complexity of mathematical theories. 70  Colors Collective for Quanta Magazine In a breakthrough that disproves decades of conventional wisdom, two mathematicians have shown that two different variants of infinity are actually the same size. The advance touches on one of the most famous and intractable problems in mathematics: whether there exist infinities between the infinite size of the natural numbers and the larger infinite size of the real numbers.  The problem was first identified over a century ago. At the time, mathematicians knew that “the real numbers are bigger than the natural numbers, but not how much bigger. Is it the next biggest size, or is there a size in between?” said Maryanthe Malliaris of the University of Chicago, co-author of the new work along with Saharon Shelah of the Hebrew University of Jerusalem and Rutgers University.  In their new work, Malliaris and Shelah resolve a related 70-year-old question about whether one infinity (call it p) is smaller than another infinity (call it t). They proved the two are in fact equal, much to the surprise of mathematicians.  “It was certainly my opinion, and the general opinion, that p should be less than t,” Shelah said.    Here is the article    So What is this all about ?  I looked on arxiv but I was not sure If there was a connection.  Also quantamagazine says it is a big result , but I have not heard anyone mention it ??  Now that $p = t$ I wonder If They are both countable or both uncountable ... or still candidates to break CH ??

I found  pop math article saying that there was a paper published last year that proved that the cardinalities of the reals and naturals are equal. Is this true or is it a misinterpretation of the result? If it is true, I'm dying to know what the bijection between the two sets is.


I can't find a good closed form expression for this, $\sum_{k=0}^n\left[\binom{n}{k}\binom{m}{k}\right]$, where n is the variable, and m is a fixed constant, to be included in the formula. :( Can someone provide me with a formula?

I need to proof this following equality :  $$\binom{m+n}{m}=\sum_{i=0}^m \left(\binom{m}{i}\binom{n}{i}\right)$$  This is what I did combinatoric proof:  Left : subset with $m$ members from $m+n$  Right : $\binom{m}{i} \rightarrow$ The number of subsets in set $m$ could also be written as $2^m$ AND $\binom{n}{i} \rightarrow$ the number of subsets with $m$ members from set $n$  In case $ n \leq m \implies \binom{n}{i}=2^n$  So this is what I came up with I still can't see why those expression are equal.  Any ideas? Thanks.


I'm stuck if $m$ is not a prime or has a single prime divider (Then using Eisenstein's criterion), e.g, $m=4$ and $p=5$.  Any suggestions?

Hungerford's book of algebra has exercise $6$ chapter $3$ section $6$ [Probably impossible with the tools at hand.]:     Let $p \in \mathbb{Z}$ be a prime; let $F$ be a field  and let $c \in  F$. Then $x^p - c$ is irreducible in $F[x]$ if and only if $x^p - c$   has no root  in $F$. [Hint: consider two cases: char$(F) = p$ and   char$(F)$ different of $p$.]   I have attempted this a lot. Anyone has an answer?


Suppose a patent has been filed (or is in process of being filed) over the same research that is described in a paper.  Does filing a patent application require disclosure in the paper publication process?  If so, what would be the expected format of disclosure during the paper publication process, regarding the patent pending status?

After working on a project some times, some results are obtained and we decide to publish it. I know publishing a paper and applying a patent can actually happen in the same time, but is there any difference for their priority?   For example, if I obtain a patent first for my results, will it make it more difficult to publish the same results in academic paper, or vice versa?   If I do it together, will there be any conflict between them?


I am making a parser for a language I call "Dint" in Java, and I added a statement for debugging: System.out.println("tok's val: "+tok); and it has the same value as the parser, but won't print "Found a print", why?  I have tried moving statements between lines, I have tried to look up the issue, and as a last resort I added that debugging statement, but I am confused as to why it won't work.  public class Dint {     public static void main(String[] args) {         System.out.println("Welcome Dint ISE v0.0.1! use \"help\" for help!\n");         Scanner Input = new Scanner(System.in);         String In = Input.nextLine();         boolean Program = true;         while(Program) {             String tok = "";             String string = "";             int state = 0;             String[] strings = new String[100];             for(int i = 0; i < In.length();) {                 tok += In.charAt(i);                 if(tok == " ") {                     tok = "";                 } else if(tok == "\"") {                     tok = "";                 } else if(tok == "out") {                     System.out.println("Found a print");                     tok = "";                 }                 i++;             }             System.out.println("tok's value: "+tok);             In = Input.nextLine();         }     } }   I get  out tok's val: out    When I expected to get:  out Found a print tok's val: out

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


Can black holes act as a lens for gravitational waves?  If space-time dips around a black hole or any source of gravity then can the gravitational waves be affected by that?

Do gravitational lenses work on gravitational waves? Could we get an Einstein cross of gravity?


I have a set $A:=\{1,2,3,4,5,6,7\}$.  How many ways I have to partition $A$ in $5$ non-empty subsets? Which are these ways?

Suppose we have a finite set $S$ of cardinality $n$. In how many ways can we partition it into $k$-many non empty subsets?  Example: There is precisely one way to partition such a set into $n$-many subsets. and there is one way to partition into a single (sub)set.


Is there (or is there not) support for encrypting the whole boot/system drive with Truecrypt in Ubuntu?

Is there a way to do full disk encryption after the install?  I have Ubuntu 11.10 installed with /home encrypted but really need the whole drive encrypted.  I would really like to do that with out a re-install.  Is there anyway to do that?


I just want to check how safe (if at all) my PHP-MYSQL queries are, I'm using user data which is coming through $_POST and then validating - the validation process of all data includes using mysqli_real_escape_string() on the string and trim(). The nature of some of my inputs however means that I don't restrict any characters on user input. Is what I'm doing safe and if not how could it be improved.  An example of an insert query (where $name and $description are $_POST data values which have been through a validation function.)      $sql = "INSERT INTO company(company_name, company_description) VALUES('".$name."', '".$description."')"; $result = mysqli_query($con, $sql);   An example of a select query (where $companyid is user input, real_escaped and stripped)      $sql = "SELECT * FROM events WHERE event_company=".$companyid.""; $result = mysqli_query($con, $sql);   Thanks in advance.

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


I have several ideas how to improve the usability of the Ubuntu desktop.  What the next step?  Where should I post my ideas?

I'm running Ubuntu 11.04 Beta 2. Is there a way, or a place, to give feedback on this system? Not file bugs, just give feedback.


If a  black hole collapses on itself, then could the energy and matter that causes from the implosion/explosion, could a new universe/galaxy be born from that?

I have four questions about black holes and universe formations.   Do new universes form on the other side of black holes? Was our own universe formed by this process? Was our big bang a black hole seen from the other side? Are there solid reasons why this might not be the case?


I get one string by query like '5e6,5e4,123'. And I want to make an array containing this query as below in JS.  ['5e6', '5e4', '123']   How can I make this? Thank you so much for reading it.

I have this string  'john smith~123 Street~Apt 4~New York~NY~12345'   Using JavaScript, what is the fastest way to parse this into  var name = "john smith"; var street= "123 Street"; //etc...


I'm using Debian 8.  How do I get my external IP address from a command line?  I thought the below command would do the job ...  myuser@myserver:~ $ /sbin/ifconfig $1 | grep "inet\|inet6" | awk -F' ' '{print $2}' | awk '{print $1}' addr:192.168.0.114 addr: addr:127.0.0.1 addr:   but as you can see, it is only revealing the IP address of the machine in the LAN.  I'm interested in knowing its IP for the whole world.

I need to find my external IP address from a shell script. At the moment I use this function:   myip () {      lwp-request -o text checkip.dyndns.org | awk '{ print $NF }' }   But it depends on perl-libwww, perl-html-format, perl-html-tree installed. What other ways can I get my external IP?


New to c#. I want my program to count the amount that a specific letter appears in a string.  public static int countLetters(string word, string countableLetter) {     int count = 0;     foreach (char c in word)     {         count++;     }     return count; }

I am doing something where I realised I wanted to count how many /s I could find in a string, and then it struck me, that there were several ways to do it, but couldn't decide on what the best (or easiest) was.  At the moment I'm going with something like:  string source = "/once/upon/a/time/"; int count = source.Length - source.Replace("/", "").Length;   But I don't like it at all, any takers?  I don't really want to dig out RegEx for this, do I?  I know my string is going to have the term I'm searching for, so you can assume that...  Of course for strings where length > 1,  string haystack = "/once/upon/a/time"; string needle = "/"; int needleCount = ( haystack.Length - haystack.Replace(needle,"").Length ) / needle.Length;


Is it possible to get the user_path in the User model?  I'm trying to implement the following method:  def link_path    link_to self.name, user_path(self.id_ end   But i'm getting that user_path is undefined. Any ideas?

Say I have a Rails Model called Thing. Thing has a url attribute that can optionally be set to a URL somewhere on the Internet. In view code, I need logic that does the following:  <% if thing.url.blank? %> <%= link_to('Text', thing_path(thing)) %> <% else %> <%= link_to('Text', thing.url) %> <% end %>   This conditional logic in the view is ugly. Of course, I could build a helper function, which would change the view to this:  <%= thing_link('Text', thing) %>   That solves the verbosity problem, but I would really prefer having the functionality in the model itself. In which case, the view code would be:  <%= link_to('Text', thing.link) %>   This, obviously, would require a link method on the model. Here's what it would need to contain:  def link   (self.url.blank?) ? thing_path(self) : self.url end   To the point of the question, thing_path() is an undefined method inside Model code. I'm assuming it's possible to "pull in" some helper methods into the model, but how? And is there a real reason that routing only operates at the controller and view layers of the app? I can think of lots of cases where model code may need to deal with URLs (integrating with external systems, etc).


I have a laptop and someone wants to connect to my world through their iPad mini. Is this possible?

My kids are playing Minecraft on 2 PCs, creative mode.  They are connected by the way of one of them starts a single player game on the other one than joins that game over the LAN.  Can I, using Minecraft PE on my iPad, join their game as well?


If $Y=\frac{\ln(U_1)}{\ln(U_1)+\ln(1-U_2)}$ where $U_1,U_2$ are independent $U(0,1)$ random variables, then variance of Y equals.  I usually use Jenson's inequality to underestimate or overestimate expectations of function of random variables (of any distribution ) but this is something different here the question is asking for the equality of variance how to do such questions thanks. Please suggest tags if they are not proper.

We have the following Random variable:  $Y=\frac{\log Z}{\log Z+\log (1-W)}$ where both $W$ and $Z$ are $U(0,1)$. The question asks to calculate the variance of the random variable $Y$.   I think the random variable $Y$ will follow the exponential distribution with parameter $2$. How I obtained this result is as follows:  First, after a little simplification, the random variable $Y$ turned out to be $\log ZW$ which can further be written as $\log Z+ \log W$. Each of which follows exponential distribution. Hence, the variance of the random variable$Y$ can be obtained as $\frac{1}{4}$. What is wrong in this approach? Because at the back, the answer is $\frac{1}{12}$ as they are saying that $Y$ will follow uniform distribution.


I'd like to know the following about this example code: 1. What is the difference between these two? 2. When or under which scenarios one will be used or preferred over the other? 3. Can I achieve inheritance with both methods or only with prototype?  //e.g 1 without prototype Test = function(){  this.val = null;  this.getVal = function(){     return this.val;  }  this.setVal(a){     val = a;  } }    //eg 2 with prototype. Test2 = function(){     this.val = null; } Test2.prototype.getVal = function(){    return this.val; } Test2.prototype.setVal = function(value){    this.val = value; }   As pointed out by one of the answerer the top one is duplicating the methods and the second one is sharing the methods. Can somebody please explain what is the difference between duplicating and sharing [I am newbie to JS...to me it sounds the same because they are going to return the same result.]

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Suppose on the following example:  a='a'   while multiplying by an integer both a*2 and 'a' *2 yields same result  >>a*2 'aa' >>'a' *2  'aa'   however this does not hold same for comparing:  >>a*2 is 'aa' False >>'a' * 2 is 'aa' True >> a*2 is 'a' *2 False

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


Hello I have a mini gaming keyboard (60%) how can i press Insert? it doesn't have that key

I have this , but it doesn't have an Insert key.    Is there another way to press the Insert key?


I'm new to overleaf and having trouble with something seemingly quite basic . . . having 'single' quotation marks show up in my document.  I am copy and pasting from Microsoft Word.   (I've look at related posts, but i'm still having trouble)  Here's my MWE:  \documentclass[twocolumn]{article}         \usepackage{graphicx}  \newcommand{\rvec}{\mathrm {\mathbf {r}}}  \usepackage{graphicx} \usepackage{subfigure} \usepackage{amsmath} \usepackage{xcolor} \usepackage{color, soul} \usepackage[symbol]{footmisc} \usepackage{booktabs} \usepackage{caption} \usepackage{tabularx}  \begin{document}  'these' don't work  \end{document}   Any suggestions are appreciated!  Thanks   Edit: I tried implementing @Bernard 's code, but didn't have any luck. Here's what I tried:  \documentclass[twocolumn]{article}     \newcommand{\rvec}{\mathrm {\mathbf {r}}}  \usepackage{graphicx} \usepackage{subfigure} \usepackage{amsmath} \usepackage{xcolor} \usepackage{color, soul} \usepackage[symbol]{footmisc} \usepackage{tabularx} \usepackage{booktabs} \usepackage{caption} \usepackage{array} \usepackage[autostyle]{csquotes}  \newcolumntype{L}{>{\raggedright\arraybackslash}X}  \usepackage[utf8]{inputenc} \usepackage[british]{babel}   But it is giving me an error message: Any suggestions?

How do I get a straight quote instead of curly quotes? I’m not inside verb or listing or any other special environments, and I’m not using XeLaTeX or anything—just normal LaTeX. I don’t want to change all quotes, just get the occasional straight quote. For example, I’d like a way to get something like this in the TeX:  ... some examples of these glyphs are curly quotes (``''), straight quotes ('"), and angled quotes ($'$$"$) ...   to look like this in the output:  ... some examples of these glyphs are curly quotes (“”), straight quotes ('"), and angled quotes (′″) ...   As I’m using an academic-publisher-provided template that does its own required font setup, I’m extremely wary of changing fonts or font encodings. I think the template uses the times package, and the formatting instructions say all fonts must be Type 1.


I'm studying measure theory from the book Real Analysis by H. Royden & P. Fitzpatrick. I'm stuck at the question 19 of the chapter 2.  The question is:     Let $E$ has finite outer measure. If $E$ is not measurable, then there is an open set $O$ containing $E$ that has finite measure and for which $m^*(O\setminus E) > m^*(O) - m^*(E)$   Applying the definition of measurability, i get a set satisfying the inequality but cannot find an open set.  PS: I've found  but it has no answers. So i decided to ask again.

(1)  If $E$ is a subset of $\mathbb R$ with finite outer measure, i.e. $m^{*}(E) <\infty$; and   (2) $E$ is not Lebesgue measurable, i.e. there exists $F$ such that  $m^{*} (F) < m^{*}(EF) + m^{*}(FE^{c}).$  [Claim] There exists an open set $O\supset E$ with finite outer measure, such  that   $$m^{*}(O E^{c})  > m^{*} (O)  - m^{*} (E).$$  My  questions are the following.  (1) Is the above claim correct? I've seen this in Royden's book, but have a bit concern. Note that a set $E$ is Leb measurable if  it satisfies caratheodory condition: $m^{*} (F) = m^{*}(EF) + m^{*}(FE^{c})$ for  all subset $F$. If the claim is yes, it seems that measurability condition can  be reduced from all subset $F$ to Borel set $F$.  (2) If the claim is correct, a proof is needed.


I want to center the content of MAIN horizontally and vertically on the page, but whichever solution I tried, it didn't work. I'm absolutely frustrated atm, because I got it to work, then I changed a lot and it reset itself.  Maybe someone could look over it and give me a hint where I'm wrong. Thank you.    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed,  figure, figcaption, footer, header, hgroup,  menu, nav, output, ruby, section, summary, time, mark, audio, video {  margin: 0;  padding: 0;  border: 0;  font-size: 100%;  font: inherit;  vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure,  footer, header, hgroup, menu, nav, section {  display: block; } body {  line-height: 1; } ol, ul {  list-style: none; } blockquote, q {  quotes: none; } blockquote:before, blockquote:after, q:before, q:after {  content: '';  content: none; } table {  border-collapse: collapse;  border-spacing: 0; }  /********** LANDINGPAGE.CSS **********/ /**********  **********/ *, header, footer { font-family: 'Roboto', sans-serif; font-size: 1vw; color: #4c4c4c; letter-spacing: 0.05em; text-decoration: none; }  h1 { font-family: 'Lato', sans-serif; font-weight: normal; font-size: 4vw; }   /********** SITE **********/ .wrap_site { max-width: 100%; margin: 0 5%; }  .wrap_content { display: flex; align-items: center; justify-content: center; }  .button { border: 1px solid #4c4c4c; display: inline-block; cursor: pointer; font-size: 1vw; padding: 8px 18px; background-color: white; }  .button:hover { transition: background-color 0.5s ease; color: white; background-color: #4c4c4c; }   /********** HEADER **********/ .wrap_header { left: 0; right: 0; top: 0; border-bottom: 1px solid #4c4c4c; padding-top: 1rem; padding-bottom: 1rem; }  header { display: flex; justify-content: space-between; }   /********** FOOTER **********/ .wrap_footer { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 5%; border-top: 1px solid #4c4c4c; padding-top: 1rem; padding-bottom: 1rem; }  footer { display: flex; justify-content: space-between; }  <!DOCTYPE html>

This website is currently under construction.

Hi, my name is x. Welcome to my website.

你好, 我叫 x。欢迎来到我的网站。

ABOUT ME

       contact@x.com 📧     ⚖ Imprint

Best way to center a <div> element on a page both vertically and horizontally?  I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?


\documentclass{article} \usepackage[a4paper,bindingoffset=0.2in,% left=1in,right=1in,top=1in,bottom=1in,% footskip=.25in]{geometry} \usepackage[magyar]{babel} \usepackage[utf8]{inputenc} \usepackage{t1enc} \usepackage{amsmath} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture} \begin{axis}[ x tick label style={     /pgf/number format/1000 sep=}, ylabel=Eltérés, enlargelimits=0.2, ybar interval=0.8, ] \addplot  coordinates {(1,25) (2,8.5)     (3,7.9) (4,3.8) (5,4.2) (6,7.7) (7,6.8) (8,3.2) (9,15.2) };  \end{axis} \end{tikzpicture}  \end{document}

I have the following code  \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents}  \begin{filecontents}{testdata.dat}   -3.316988309367815e-07 0.07000000000000001   -1.948815911147526e-08 0.13   7.15864175355987e-08 0   1.799432483450127e-07 0   0.0002850606647384129 0   0.0009429559686380238 0.08999999999999997   0.00157188462064142 0   0.005259918700865051 0   0.01739392641273605 0.18   0.06208364670743995 0.55   68.69485148165926 6.970000000000001   31.217611224923 79.12   0 12.89 \end{filecontents}  \pgfplotsset{compat=newest} \pgfplotstableread{testdata.dat}\datatable  \begin{document} \begin{tikzpicture} \begin{axis}[   ybar interval,   width=10cm,   height=5cm,   enlargelimits=false,    xtick=data,   ymin=0, ymax=100,   xticklabels={0 -- 0.063,0.063 -- 0.125,0.125 -- 0.25,0.25 -- 0.5,0.5 -- 1,                1 -- 2,2 -- 4,4 -- 5.6,5.6 -- 8,                8 -- 11.2,11.2 -- 16,16 -- 22.4,22.4 -- 31.5},   x tick label style={rotate=60,anchor=east}   ]   \addplot table[x expr=\coordindex,y=0]{\datatable};   \addplot table[x expr=\coordindex,y=1]{\datatable};  \end{axis} \end{tikzpicture} \end{document}   and the output looks like this:    But the command ybar interval does skip the last value. It should look like:    I prefer to have the last value to show up in the interval 22.4 -- 31.5. How do I achieve this without inserting a row of zeros to my table?


I'm working on finding the max pairwise product of an array algorithm as practice. I've been able to get it down to 2n comparisons, by finding the largest and second largest numbers in the array using two seperate for loops. I know i could get it down even farther if I sorted then compared.   In the algorithm below is it n comparisons? I only have 1 loop so I'm assuming it is. also, what would be the Big O number for this? Is it the same as the number of comparisons? I know that we remove any constants if there is a variable and take the largest degree of the problem [sorry for the unclear explanations of algorithms -I'm just beginning on this.  static int EvenFasterAlgorithm (int[] numbers) {         int maxNum1, maxNum2, index, index2;         maxNum1 = -1;         maxNum2 = -1;         index = -1;         index2 = -2;         System.out.println("the size is "+ numbers.length);         int k = numbers.length-1;          if(numbers.length > 1)         {         for(int i = 0; i < numbers.length; i++) {              if(numbers[i] > maxNum1 && i != index2) {                 maxNum1=numbers[i];                 index = i;              }              if(numbers[k] >= maxNum2 && k != index)             {                 maxNum2 = numbers[k];                 index2 = k;              }             k--;         }         return maxNum1*maxNum2;         }         else         {             return numbers[0];         }     }

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


Can you please explain how can we derive the total number of factors of a composite number using the concept of combinations ? Thanks in advance !

How to find the number of factors of $884466000$ without using a calculator?


I have all the necessary information like password and email address but I am unable to remove the apple account / icloud / iTunes accounts from my new device. How can I get them removed so I can add my information to my device.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


How do i fetch the details of following table  table1:  c1    c2     ta     a     tb     c     ta     b     tb     d       by grouping with same name, like  ta    a,b tb    c,d   which function to use in mssql

To illustrate, assume that I have two tables as follows:  VehicleID Name 1         Chuck 2         Larry  LocationID VehicleID City 1          1         New York 2          1         Seattle 3          1         Vancouver 4          2         Los Angeles 5          2         Houston   I want to write a query to return the following results:  VehicleID Name    Locations 1         Chuck   New York, Seattle, Vancouver 2         Larry   Los Angeles, Houston   I know that this can be done using server side cursors, ie:  DECLARE @VehicleID int DECLARE @VehicleName varchar(100) DECLARE @LocationCity varchar(100) DECLARE @Locations varchar(4000) DECLARE @Results TABLE (   VehicleID int   Name varchar(100)   Locations varchar(4000) )  DECLARE VehiclesCursor CURSOR FOR SELECT   [VehicleID] , [Name] FROM [Vehicles]  OPEN VehiclesCursor  FETCH NEXT FROM VehiclesCursor INTO   @VehicleID , @VehicleName WHILE @@FETCH_STATUS = 0 BEGIN    SET @Locations = ''    DECLARE LocationsCursor CURSOR FOR   SELECT     [City]   FROM [Locations]   WHERE [VehicleID] = @VehicleID    OPEN LocationsCursor    FETCH NEXT FROM LocationsCursor INTO     @LocationCity   WHILE @@FETCH_STATUS = 0   BEGIN     SET @Locations = @Locations + @LocationCity      FETCH NEXT FROM LocationsCursor INTO       @LocationCity   END   CLOSE LocationsCursor   DEALLOCATE LocationsCursor    INSERT INTO @Results (VehicleID, Name, Locations) SELECT @VehicleID, @Name, @Locations  END      CLOSE VehiclesCursor DEALLOCATE VehiclesCursor  SELECT * FROM @Results   However, as you can see, this requires a great deal of code.  What I would like is a generic function that would allow me to do something like this:  SELECT VehicleID      , Name      , JOIN(SELECT City FROM Locations WHERE VehicleID = Vehicles.VehicleID, ', ') AS Locations FROM Vehicles   Is this possible?  Or something similar?


Whenever I try to install anything I repeatedly get the error below and then the installation stops. Moreover I also get the error that I have to fix the Ubuntu software center but I cant due this same error.  For example, when I run the command:  sudo apt-get install unity-tweak-tool   I get this error:  Reading package lists... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:   adobe-flash-properties-gtk:         Depends: adobe-flashplugin (= 1:20160310.1-0ubuntu 0.12.04.1)                   but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages     (or specify a solution)

I tried multiple times installing the unity tweak tool via the terminal but every time it give me the following output. Similarly i cant install it via the Ubuntu software center. I have tried sudo apt-get install -f & sudo apt-get install unity-tweak-tool . the output when using the terminal is as follows:  nikunj@nikunj-DL-H61MXE-V:~$ sudo apt-get install unity-tweak-tool [sudo] password for nikunj:  Reading package lists... Done Building dependency tree        Reading state information... Done The following NEW packages will be installed:   unity-tweak-tool 0 upgraded, 1 newly installed, 0 to remove and 170 not upgraded. Need to get 0 B/368 kB of archives. After this operation, 2,761 kB of additional disk space will be used. (Reading database ... 197290 files and directories currently installed.) Preparing to unpack .../unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb ... Unpacking unity-tweak-tool (0.0.7-0~201~ubuntu15.10.1) ... dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt dpkg-deb: error: subprocess <decompress> returned error exit status 2 dpkg: error processing archive /var/cache/apt/archives/unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb (--unpack):  cannot copy extracted data for './usr/share/unity-tweak-tool/monitor-window-snapping.png' to '/usr/share/unity-tweak-tool/monitor-window-snapping.png.dpkg-new': unexpected end of file or stream Errors were encountered while processing:  /var/cache/apt/archives/unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) nikunj@nikunj-DL-H61MXE-V:~$


Let $(a_n)$ be a Fibonacci sequence , Prove that $a_1+a_3+a_5+\cdots+a_{2n-1} = a_{2n}$  In this question $a_n$ is a Fibonacci sequence, I tried solving it with the PMI , problem arose when i was solving it for $P(n)=k+1$ , I could not make both of the sides equal.

Trying to prove that the sum of odd-index consecutive Fibonacci numbers is the next even-index Fibonacci number. I have a gap in my proof that I cannot figure out. I know that induction would be easier and I have already done it that way, I am looking to use alpha and beta. $$\sum_{i=1}^n F_{2i-1} = F_{2n}$$  $$\begin{align*} \sum_{i=1}^n F_{2i-1}&=\sum_{i=1}^1  \frac{1}{\sqrt{5}}(\alpha^{2i-1}-\beta^{2i-1})\\ &=\frac{1}{\sqrt{5}}\left(\sum_{i=1}^1\alpha^{2i-1}-\sum_{i=1}^1\beta^{2i-1}\right)\\ &\;\;\vdots\\ &=\frac{1}{\sqrt{5}}[(\alpha^n-\beta^n)(\alpha^n+\beta^n)]\\ &=\frac{1}{\sqrt{5}}(\alpha^{2n}-\beta^{2n})\\ &=F_{2n} \end{align*}$$


**********NB -i have read previous posts that look like duplicates but I cannot get this to work, Id really appreciate an explicit answer ********** I know this is a duplicate but I have read the previous posts and I still cant get this to work. sorry.  I'm working in bash trying to match a pattern that is stored in a variable using awk  In this example the string I want to match is xxx and I am storing it in the variable pattern. Imagine in the file $file there is a line that reads xxx yyy  Then if I enter the pattern string explicitly  awk '/xxx/{print $0}' $file   the output is xxx yyy (which is what I want, its printed out the line containing xxx)  but if I pass the pattern to be matched via a variable then there is no match  pattern="xxx" awk -v pat="$pattern" '/pat/{print $0}' $file   no output  I checked the variable was getting passed to awk with  awk -v pat="$pattern" 'BEGIN {print pat}'   output: xxx as I was hoping.  Sorry, I guess this is easy but I'd really appreciate an answer. thanks

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


The proof is already given in the textbook but I tried other way around.   Proof by contradiction: Let's assume that $p$ doesn't divide $a$ and $p$ doesn't divide $b$, but $p$ divides $ab$. So $\gcd(p,a)=1$ and $\gcd(p,b)=1$. Given that we can construct linear combinations   $sp+ta=1$ together with $up+wb=1$. Multiplying the left and the right sides of the equations we get  $spup+spwb+taup+tawb=1$ or $p(sup+swb+tau)+ab(tw)=1 \implies \gcd(p,ab)=1$. This is a contradiction.   Is it rigorous and sound proof?


If $A$ is an $n \times n$ matrix and $AA^*=AA,$ how to prove $A$ is Hermitian?

Let $A$ be $n \times n$ matrix and $A^2=A^*A$.  Why is $A$ a Hermitian matrix?


I'm creating a website in which a registered user can see a post only once.i have used a DB table (viewed posts) in which i save user id  of the logged in user and post id of the post he viewed . i want to show only those posts to user which he has not seen yet from the (post) table. please help me how i can do this . i have tried left joint etc but none of them works well   i also tried this one but it not works  select * from post, viewed_post  where post.p_id !=viewed_post.p_id    AND viewed_post.u_id!='$logged_in_user_id';


I want to label two or three equations in the same line such as  x = r,  y = w                   (1a,b)  z = t,  a = q, b = p            (1c-e)  Thanks

I link two questions below because I use their solution, to number my equations and generate a list of my equations.   My question about numbering equations:  Generate a list of equations:    Although they might not be directly relevant, I mention I use them because I am not sure if this messes up possible solutions.  Below my MWE. This works fine so far (Figures attached).  But I want the "list name" of my equation (in this case: \myequations{PDE of the diffsion process}) to be available as a kind of variable so that I can refer to it as "The \XXX is given by", where \XXX is a command giving me the Name (\myequations{...}) of the equation I refer to (e.g., \tag{\ref{eq:litdiff}}).  I hope my equation is clear, if not, please tell.  MWE:  \documentclass[12pt]{report} \usepackage{tocloft} \usepackage{amsmath} \usepackage{physics} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}  \newcommand{\listequationsname}{List of Equations} \newlistof{myequations}{equ}{\listequationsname} \newcommand{\myequations}[1]{% \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par} \setlength{\cftmyequationsnumwidth}{2.5em}  \newcommand{\subs}{\text{s}}  \begin{document}  \listofmyequations  \chapter{Diffsion}  The PDE of the diffsion process is given by \begin{subequations}\label{eq:litdiff} \begin{equation} \pdv{}{t} (\widetilde{c}_{\subs}(r,z,t)+c_{\subs,0})=\frac{D_{\subs}}{r^{2}}\pdv{}{r} \left(r^{2}\frac{\partial (\widetilde{c}_{\subs}(r,z,t)+c_{\subs,0})}{\partial r}\right) \tag{\ref{eq:litdiff}} \end{equation} \myequations{PDE of the diffsion process} \noindent The boundary conditions of Eq.~\eqref{eq:litdiff} are given by \begin{align} D_{\subs}\pdv{}{r} \widetilde{c}_{\subs}(0,z,t) &= 0 \label{eq:diffusionpartialdiff_boundaries0}\\ D_{\subs}\pdv{}{r} \widetilde{c}_{\subs}(R_{\subs},z,t) &= -j(z,t)\label{eq:diffusionpartialdiff_boundariesRs} \end{align} and the initial condition is given by     \begin{equation}         \widetilde{c}_{\subs}(r,z,0) = 0 \quad r\in [0;R_{\subs}].     \label{eq:diffusionpartialdiff_init}     \end{equation} \end{subequations}  \end{document}


If $A,B\subset \mathbb{R}$ are closed in $\mathbb{R}$, is $A+B$ also closed in $\mathbb{R}$? I think it is not, but could not find a counter example: any suggestions?

Is there a counterexample for the claim in the question subject, that a sum of two closed sets in $\mathbb R$ is closed? If not, how can we prove it?  (By sum of sets $X+Y$ I mean the set of all sums $x+y$ where $x$ is in $X$ and $y$ is in $Y$)  Thanks!


I'm new to salesforce (apex - trigger) development and I'm currently reading through the manual and other threads on here on how to do this stuff, but I wanted to put this out here in case it was a simple fix someone would notice right away.  If not, maybe some leads or pointers would even help.  This is code I'm picking up from another developer.  trigger updateAllOpportunities on Opportunity (after insert, after update, after delete) {    List<Opportunity>   triggerOpps = Trigger.isDelete ? Trigger.old : Trigger.new;   for (Opportunity triggerOpp : triggerOpps) {     if (triggerOpp.Parent_Opp__c != null) {        // Add this Site Opp's properties to DOPP's site configuration.        List<Opportunity> opps = [Select Id, Name,             (select Id,                  Name,                  NumberofPositions__c,                  Account.Name  from Opportunities__r)                from Opportunity where Id = :triggerOpp.Parent_Opp__c];         Opportunity dopp = opps.get(0);        List<Opportunity> sopps = dopp.Opportunities__r;        Decimal totalPositions = 0;         for (Opportunity sopp : sopps) {             totalPositions += sopp.NumberofPositions__c == null ? 0 : sopp.NumberofPositions__c;        }             dopp.NumberofPositions__c = totalPositions;          update dopp;     }   } }

I have written a trigger for before update and after insert function  trigger EstimateBudgetPerMonth on Opportunity__c(after insert, before update) {     Date startDate = Date.newInstance(2008, 1, 1);     Date endDate = Date.newInstance(2008, 1, 30);     Set < Id > oppId = new Set < Id > ();     Integer totalBudget;     for (Opportunity__c opp: Trigger.new) {         startDate = opp.Campaign_Start_Date1__c;         endDate = opp.Campaign_End_Date1__c;         totalBudget = Integer.valueOf(opp.Budget1__c);         oppId.add(opp.Id);     }      InsertBudgetOpp insertRec = new InsertBudgetOpp();     InsertBudgetOpp updateRec = new InsertBudgetOpp();        if (Trigger.isInsert) {         System.debug('--===Insert==--#--===Insert==--#--===Insert==--');          List < Budget_Allocation__c > baList = insertRec.insertChild(oppId, startDate, endDate, totalBudget);          insert baList;      } else if (Trigger.isUpdate) {         System.debug('--===Update==--#--===Update==--#--===Update==--');          Map < String, Budget_Allocation__c > baNewMap = updateRec.updateChild(oppId, startDate, endDate, totalBudget);          upsert baNewMap.values();     }    }    Its throwing the below error.     Error: Invalid Data.  Review all error messages below to correct your   data. Apex trigger EstimateBudgetPerMonth caused an unexpected   exception, contact your administrator: EstimateBudgetPerMonth:   execution of BeforeUpdate caused by: System.DmlException: Upsert   failed. First exception on row 0 with id a0Up00000000FHJEA2; first   error: SELF_REFERENCE_FROM_TRIGGER, Object (id = a06p0000000N3WU) is   currently in trigger EstimateBudgetPerMonth, therefore it cannot   recursively update itself: []: Trigger.EstimateBudgetPerMonth: line   38, column 1


I just installed Ubuntu 14.04  After the installation it won´t boot and I done the boot-repair in Ubuntu and I Think I have the right boot-setting in BOIS. It will directly go to the windows OS.  After the boot-repair it send me this:  What should I do?

I installed Ubuntu on a Dell XPS 13 laptop that had Windows 10 preinstalled on it. I installed it from a USB flash drive on a partition. When I boot my computer I can only boot into Windows 10 and Ubuntu is nowhere to be seen.  If I boot into my USB then I can see that Ubuntu is installed, but I can't get to it from the BIOS boot menu.


On Windows, when I try and open a file that doesn't have a program registered for its extension, it asks you "How do you want to open this file?" and shows you a list of suggested programs it thinks will be able to open the file.     Clicking "More apps" shows a list of apps, and at the bottom you have the option to "Look for another app on this PC".  Clicking on that opens up a "file-finder" in program files. Which is fine if you want to open a win32 application.   But if you want to open the file with a UWP app? How can you do that?   gives you a way to add these via regedit.  However, Microsoft has recently announced Windows 10 S, which only allows apps from the Store, and regedit is blocked/banned. So is there a graphical way to achieve this?

Usually, right clicking on a file, selecting "Open with" followed by "Choose another app..." brings up the following menu which also includes installed apps, so that one may be set as the default application for the file type:    However, when trying to open a file using a Windows 10 Store app and the above method, the app is not listed. I can open the app, then open the file from within it, however this is less convenient.   So far I have tried to use the app's exe file (CodeWriter.exe), but this does not work without an app container.  To reitterate - I am not asking for suggestions for workarounds as I can open the file; I am specifcally asking how to set a store app as the default application when it is not in the above list.


You are standing on hard floor. Clothes weigh negligibly. You move only your leg. Everything else remains stationary. Assume you are made of the same material as the average human. Can the force exerted by the one leg alone exceed your body weight?

So, because I'm a hardcore person, I risked all this afternoon by going out in the wind, the rain and the cold to construct a willow den.  Yes, it seems a menial task, but it was actually quite thought-provoking: some pieces of willow were harder to push into the ground than others, and to try and force them in I'd sometimes end up hanging off of them, but other times I'd just push with all my strength, placing my body above the hole and pushing down, my feet still firmly planted on the ground.  Now, I was wondering, which of these two methods is better for sticking the stick into the ground? Ignoring the fact that by hanging from it, it is likely to topple, which method help me be more efficient in my future den-building exploits?  In other words, can you ever exert more downwards force than your weight? If so, then I'm guessing pushing down would be the better method, and if not, then hanging from the stick, putting all your weight into it, would exert the most possible downwards force.  Here's what a willow den looks like:   (source: )


How can I print all the lines between two lines starting with one pattern for the first line and ending with another pattern for the last line?    Update I guess it was a mistake to mention that this document is HTML. I seem to have touched a nerve, so forget that. I'm not trying to parse HTML or do anything with it other than print a section of a text document.    Consider this example:  aaa bbb pattern1 aaa pattern2 bbb ccc pattern2 ddd eee pattern1 fff ggg   Now, I want to print everything between the first instance of pattern1 starting at the beginning of a line and pattern2 starting at the beginning of another line. I want to include the pattern1 and pattern2 lines in my output, but I don't want anything after the pattern2 line.  pattern2 is found in one of the lines of the section. I don't want to stop there, but that's easily remedied by indicating the start of the line with ^.  pattern1 appears on another line after pattern2, but I don't want to look at that at all. I'm just looking for everything between the first instance of pattern1 and the first instance of pattern2, inclusive.  I found  that almost gets me there using sed:  sed -n '/^pattern1/,/^pattern2/p' inputfile.txt   ... but that starts printing again at the next instance of pattern1  I can think of a method using grep -n ... | cut -f1 -d: twice to get the two line numbers then tail and head to get the section I want, but I'm hoping for a cleaner way. Maybe awk is a better tool for this task?  When I get this working, I hope to tie this into a git hook. I don't know how to do that yet, either, but I'm still reading and searching :)  Thank you.

How can I select first occurrence between two patterns including them. Preferably using sed or awk.  I have:  text something P1 something content1 content2 something P2 something text something P1 something content3 content4 something P2 something text   I want the first occurrence of the lines between P1 and P2 (including P1 line and P2 line):  something P1 something content1 content2 something P2 something