How to connect to Ubuntu server from Windows 10 locally and securely?

So recently I brought a pc for pretty cheap to use as a Minecraft server. I plan to set it up with Ubuntu server. I want to be able to send commands to it (to start the server, change things, stop the server) and I want to be able to turn on the pc and turn it off. The thing is that I want to put this pc/server somewhere next to my router and I don't want to have connect a moinitor and keyboard and mouse to it whenever I want to change something with it. I want to able to connect to it from my Windows 10 pc. Both the Windows 10 pc and the Ubuntu server will be at home (locally) but I want to be able to connect it without giving access to the people who connect to the game server. When researching this on Google I found out about ssh but every single article I find that tell you how to use and setup ssh seems to be using it for remote connection. I am also worried that by using ssh that once I give my IP address of the server to the people that will join it (via port forwarding) that they will be able to remote into the server and change things. Which is obviously not ideal and not that secure. So to sum up, I want to be able to connect to my server locally and send commands to it, etc. Without giving access to other people. Many thanks in advance and I am sorry if I haven't included enough information as I am new here and don't really know how to explain my problem.


I just went to cast a close vote on a programming question and instead of clicking the radio button on the option about programming questions being off topic here my mouse bumped and I hit the link instead.     This wouldn't be a problem, but the link opens in the same window so it took me away from the page I was working on.    Could links in close reasons either be removed, or at least set to target=new so that focus is not taken away from the task at hand by an accidental click?


Proving that a sequence such that $|a_{n+1} - a_n| \le 2^{-n}$ is Cauchy

Suppose the terms of the sequence of real numbers $\{a_n\}$ satisfy $|a_{n+1} - a_n| \le 2^{-n}$ for all $n$. Prove that $\{a_n\}$ is Cauchy.   My Work  So by the definition of a Cauchy sequence, for all $\varepsilon > 0$ $\exists N$ so that for $n,m \ge N$ we have $|a_m - a_n| \le \varepsilon$. However, questions like  make me understand that the $2^{-n}$ condition is necessary for this to be a true statement.   So I am wondering how to appeal to the Cauchy definition for this proof. Do I prove that every convergent sequence is therefore Cauchy, and then try to prove convergence?


Is there a way to see topics views when in mobile version?

Is there a way to see topics views when in mobile version and if there isnt, is there a way to browse the websites desktop version in mobile?


anyone can figure out what's the 2nd icon from the left ?  Thanks


How to prove $(1+i)$ is a prime in $\mathbb{Q}(i)$?

I know the definition of prime in $\mathbb{Q}(\sqrt{m})$ that is an algebraic integer is a prime if it is divisible by its associates and units of the field. Units of $\mathbb{Q}(i)$ are $+1,-1,i,-i$  How to solve this example?please help me.


Are "What does SE use for [insert feature here]?" questions valid on Meta Stack Exchange?

I had a discussion about this with TGMCians  (see screenshot at the bottom of the question), on a question that asks which control Stack Exchange uses for a specific feature. We did not agree whether they belong here or not, hence I'm asking here:  Are "What does Stack Exchange use for [insert feature here]?" questions valid on Meta Stack Exchange?  Screenshot of question and comment discussion:


Why use style.visibility='hidden' in place of style.display='none'

While working on some javascript for a billing and delivery address form, I used;  document.getElementById(itm.name + "Hint").style.visibility = 'hidden';   to successfully toggle visibility of a  element containing a hint for the field if its left empty. The problem, when the hint disappeared, the space it occupied didn't! After some head scratching I looked at some earlier code I had written which hid all the fields for delivery address when the user ticks "Deliver to Billing Address", I realised I had used instead;  document.getElementById(itm.name + "Hint").style.display = 'none';   This is my outline show/ hide function which fires from the input fields onkeyup event. I use a regular expression to ignore whitespace typed into the field  var notEmpty = /^\s*$/;  // Match all whitespace  function isFieldEmpty(itm) {     if(notEmpty.test(itm.value)) {         document.getElementById(itm.name + "Hint").style.display = 'inline'; // Hint visible     } else {         document.getElementById(itm.name + "Hint").style.display = 'none';  // Hint hidden     } }   This is the html for the field & containing the field hint. You can try this yourself by typing some text after the hint, and watching it move up into the space occuppied by the hint as soon as you type any character into the first name field.  <input name="firstName" type="text" tabindex="1" value="" onkeyup="isFieldEmpty(this)" />
Please type a first name   Update 24 Sept 14: Having noted the downvotes and read the question this is a duplicate of, please accept my apologies. The earlier question didn't flag up in the list of possible questions when I was typing it, and I created it in the context of wanting to toggle display of temporary text, which isn't covered by earlier question.


I have two device on my network LB (192.168.1.10) and RP1 (192.168.0.20) I am wanting all the MySQL stuff to be hosted on the LB and all the web stuff to be hosted on the RP1. I have installed mysql-server-5.5 on both devices. But when I perform the command: $con=mysqli_connect("192.168.1.10","foo","password","max");  On the web page I get the error:  Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on '192.168.1.10' (111) in /var/www/example.info/public_html/submit.php on line 6  And obviously when I try localhost (replacement for "192.168.1.10" in the snippet above) I get the error:  Warning: mysqli_connect(): (28000/1045): Access denied for user 'max'@'localhost' (using password: YES) in /var/www/example.info/public_html/submit.php on line 6   I have also tried: $mysql --host=192.168.1.10  On the RP1 and I get the error:  ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.10' (111)   What am I doing wrong?


Don't clear the custom flag message when dismissing the window

It has happened with me a lot of times, when the text I wrote was cleared after a flag dialog was dismissed.        Please, don't clear the message, when window dismisses.


I am very bad with proofs that ask you to show that "$\exists$ something..." because in most of them you have to explicitly show the something. The following question is one such. Any help will be greatly appreciated!  Let $\{u_n\}$ a sequence in a Banach space $X$. Suppose that $\sum_{n=1}^{\infty} \|u_n\| < \infty$. Prove that there exists some $x \in X$ such that  $$\lim_{n \to \infty} \sum_{k=1}^{n} u_k = x$$  Thank you very much in advance!


How to get shiny Pokemon in Alpha Sapphire/Omega Ruby?

I really want shiny Pokemon but I don't want to waste my time hatching eggs (ps I've tried that) where or how can you catch them. I don't want to use any cheats so please help me. Thanks


I'm trying to call a command from a variable in a script with a specific locale, example :  $ myYTDL="LANG=C.UTF-8 youtube-dl --get-filename"   but each time I try and call it in the script, I get :  $ $myYTDL $url LANG=C.UTF-8: command not found   How can I do that ?


How do I pass an input to an .sh file with python and subprocess?

In my current project I'm trying to execute a .sh file with a python program, giving input and reading output The problem is that I have no idea on how to give the input (I managed to read the output in this way, searching on the internet. I'll listen to any suggestion). Here I write an example code (for the original one is longer and more complicated, but this is the essence and the problem is the same)  import subprocess greet = subprocess.Popen(["bash", "helloWorld.sh"],                          stdout=subprocess.PIPE,                          encoding="utf-8") print(greet.stdout.read())   and this is the simple helloWorld.sh  read name echo "Hello $name"   My OS is Debian (xfce) and I'm wirting in Python 3.7 Ask  for any other detail


Is the swap partition needed when the root partition and RAM are large enough?

I want to install Ubuntu on my machine by allocating 400 GB for the / partition and 50 GB for the /home folder and 16GB RAM. Does it make sense, in this case,  to create a swap partition or is it useless?


Keyboard backlight keeps turning on after uprgade to Wily on Dell V131, what can be the cause?

I have a Dell V131 with and recently upgraded it to Ubuntu (15.10) Wily Werewolf. Now, the keyboard backlight keeps turning on. I have not seen it turn on and mostly notice when I come back to the laptop after a few minutes.   How can I find out what turns on the backlight and stop it from happening on its own?


Why are the values different when iterating them in a for loop, than when printing the whole array?


NullPointerException when setting listview adapter (DrawerLayout)

I have a fragment layout which is the drawer and looks like this:  fragment_overview.xml  <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent">  <!-- The main content view --> <FrameLayout     android:id="@+id/content_frame"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="#ffe887" />  <!-- The navigation drawer --> <ListView android:id="@+id/left_drawer"     android:layout_width="240dp"     android:layout_height="match_parent"     android:layout_gravity="start"     android:choiceMode="multipleChoice"     android:divider="@android:color/transparent"     android:dividerHeight="0dp"     android:background="#111"/> </android.support.v4.widget.DrawerLayout>   And the java class for that fragment:  OverviewFragment.java  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     View root = inflater.inflate(R.layout.fragment_overview, container, false);      mlistOptions = getResources().getStringArray(R.array.list_options);     mDrawerLayout = (DrawerLayout) getActivity().findViewById(R.id.drawer_layout);     mDrawerList = (ListView) getActivity().findViewById(R.id.left_drawer);      // Set the adapter for the list view     mDrawerList.setAdapter(new ArrayAdapter<String>(getActivity(),             R.layout.simple_list_item_1, mlistOptions));      mDrawerList.setOnItemClickListener(new DrawerItemClickListener());      return root; }   With this code in the resources folder:  <string-array name="list_options">     <item>Ship</item>     <item>Map</item>     <item>Mail</item>     <item>Settings</item>     <item>Logout</item> </string-array>   And this as a list item:  simple_list_item_1.xml  <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="15dp" android:textColor="@android:color/black" android:textStyle="italic">     However when the setAdapter method runs in the java class it generates this error:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference   What could have actually gotten wrong in that method call? It is a fragment so we need getActivity as the first parameter, the layout file is just a reference to a simple file and the optionslist is just an arraylist from the resources folder.. what can be null?  Thanks in advance!


Adding javascript object values to global var

Im building a bankAccount program and trying to add my DDs into the global var, but as I create new objects from my constructor function then add them into bankAccount it only shows the last created dd?   What im trying to do is push all DD into bankAccount..  Code is below     // Created my bankAccount with the value of 0 var bankAccount = {};  // Object constructor to created direct debit with name and cost function DirectDebit(name, cost) {   this.name = name;   this.cost = cost; }  // Creating a new DD for my phone var phone = new DirectDebit("Phone ", 20); var car = new DirectDebit("Car ", 250);  function addToBank (dd) {     bankAccount = dd }  addToBank(phone) addToBank(car)  console.log(bankAccount);     this outputs:  DirectDebit { name: 'Car ', cost: 250 }


Create bug report from "Sorry, Ubuntu 14.04 has experienced an internal error"

I get this message very often:    it happens 1-2 times daily, since ~1 year. The default is to send an error report "to help fix this problem".  It's clear that not all error reports can go to  without flooding the platform. From , I learned that the errors go to , but they don't seem to be more than a pixel in a chart.  My Question is: How can I create a bug report in a similar way as manually calling apport-bug/ubuntu-bug would do for running processes?, so that I can track its progress and add some more information (attachments, text) about it.


Get all vertices of a polygon using OGR and Python

I'm having a little trouble with the Python OGR API.  What I am trying to do is get all the coordinates of each vertex of the outer ring of a polygon.   This is what I have so far:  import osgeo.ogr import glob  path = "/home/woo/maps/" out = path + 'output.txt'  file = open(out,'w') for filename in glob.glob(path + "*.shp"):     ds = osgeo.ogr.Open(filename)     layer1 = ds.GetLayer(0)     print layer1.GetExtent()         for feat in layer1:         geom = feat.GetGeometryRef()         ring = geom.GetGeometryRef(0)         points = ring.GetPointCount()         #Not sure what to do here   file.close()   I have heard that you can just for over the region but that only returns the rings in the polygon, not the nodes.  Anyone able to help.


Multiple literates in a listings style definition

I have a style defined for a language which has lot a lot of literate replacements.  In the individual listings that use this style I would like to introduce more listing-specific literate replacements. However, it seems that they completely override the ones from the style.  E.g. in the following example I would like both \ and >= to typeset as their math symbol equivalents.  Is it possible to append to, not replace, a literate in a style?  \documentclass{article} \usepackage{listings} \begin{document}  \lstdefinestyle{lam}{%     literate={\\}{$\lambda$}1 }  \begin{lstlisting}[style=lam] let foo = \x -> x >= 1 \end{lstlisting}  \begin{lstlisting}[style=lam, literate={>=}{$\geq$}2] let bar = \x -> x >= 1 \end{lstlisting}  \end{document}


What is the physical sector size for my HDD?

I have a 1 TB hard drive when I run:   # fdisk -l    among other details I get:   Model: ATA HGST HTS721010A9 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt   I view the logical sector size to be the operating system's sector size for I/O. However, it shows that the physical sector is 4096B. I'm not sure what's the difference between the two. Why the kernel would use a 512B sector for I/O versus 4096B sector, maybe for compatibility reasons? Wouldn't this slow I/O operations?


Why do physicists think that the dark matter is cold?

Most of the dark matter in the Universe is cold or nonrelativistic which rules out neutrinos as dark matter candidate as they are hot or relativistic. But why do physicists think that the dark matter is cold? How cold (i.e., how heavy) do these dark matter particles have to be?


Self-irony is very popular in my home country, Denmark, and I find it defined on the Internet as "the ability to laugh at oneself, to take oneself lightly".  I also find it in some dictionaries but apparently not in the most widely used. Does the word (combo) exist or don't native English speakers know how to laugh at themselves?


How can I determine the CCD (imaging area width) given image details such as focal length? I have images taken by cameras, but very little information about the cameras themselves (I have focal length and resolution). Given this, is there any way to determing the CCD width


Most times we hear that the letter A is pronounced as [ə], but sometimes I hear that it is pronounced as [eɪ] in American English. Such as the following sentence: From VOA Special English:  She says governments must make that goal of a continental free trade area a reality.  The first A is pronounced as [eɪ], the second A  is pronounced as [ə]. Why? Does it have some regularity in it?


Hi I have an array like below.    $arr = Array ( [My_name] => Sam [My_location] => United_Kingdom [My_id] => 1 );   And im trying to change the keys from     My_name, My_Location, My_id   to    Your_name, Your_Location, Your_id   So the final array would look like    Array ( [Your_name] => Sam [Your_location] => United_Kingdom [Your_id] => 1 );   I was hoping something like str_replace would work     $arrnew = str_replace("My","Your",$arr);   But this is only replacing "My" to "Your" if "My" is a value, not a key.  So how would I change the keys?  Thanks for any help.


About the absence of metal in machinery and buildings of the past

In X-Men: Days of Future Past I see several things about absence of metal that I am a bit skeptical about.  For example, Magneto is being held under the Pentagon and there should be no metal whatsoever hundreds of meters around him. But how do they provide lighting and electricity to power the security and comm systems down there? It is 1973, were there technologies to deliver energy without using metal back then?  Another example were Trask's sentinels, made of "modern polymers", without metal. What about their CPUs and other computing hardware?  So, the the question is, were there technologies back in 1973 that would allow the creation of metal-less underground prison cell and giant robots?  EDIT1: as an additional question, maybe the details about the technology are mentioned somewhere in the universe?


Why does my Android OS state that there's, "Not enough free space to install the program", when there's plenty of free space?

My hard drive on my smartphone has 100 MB free, and the app I'm trying to install is 2 MB.  I just recently deleted apps totalling to about 88.3 MB, and the computed size has already been adjusted, and is displayed on the screen.  However, I have to wait 10 or 15 minutes to install it.  It's as if the updated, computed space is not registered in some way to the operating system immediately.  It's Android 2.3.4 Gingerbread, no root, no unlocked; factory pre-set all the way(not for long though).  So, basically, is that the problem? Why do I have to wait a while after uninstalling apps, and re-computing space availability to above par to install a new, extremely small app, to actually work?  Is this all the OS's fault, or is something else at play here(e.g., hard drive or circuit-level operations reigning outside the control of just the OS software)?  Because if the re-computed size is what it's going to be, at least let the end-user know that rather than give the impression that you have the available space, but it won't install anything.


Finding the limit of the recursive sequence $r_{n+1} = \sqrt{2 + r_n}$

In the example I am given, I am told that $r_n$ is defined as:  $$ r_n = \begin{cases}        r_0       = \sqrt{2} \\       r_{n + 1} = \sqrt{2 + r_n} \\        \end{cases} $$  I was told to calculate $r_3$ and I found that to be:  $$ r_3 = \sqrt{2 + \sqrt{2 + \sqrt{2 + \sqrt{2}}}} $$  Then I am told to find   $$ \lim\limits_{n \rightarrow \infty} r_n $$  So if I let that equal L I get  $$ L = \sqrt{2 + L} $$  This is where I get stuck. I know that the limit is 2 as I have added a 10 terms together but that will not help me in my exam. How should I go about proving this?


Error using grass v.clean: " 'utf-8' codec can't decode byte... "

I try running the v.clean tool using QGIS 3.4. As input I use a vector line layer (I checked the validity and everything is fine), but running the algorithm I get the following error:  Traceback (most recent call last): File "D:/Programme/OSGeo4W/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 415, in processAlgorithm Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands) File "D:/Programme/OSGeo4W/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 372, in executeGrass for line in iter(proc.stdout.readline, ''): File "D:\Programme\OSGeo4W\apps\Python37\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 81: invalid start byte  Execution failed after 0.50 seconds   Since it is says it is a decoding error I checked the encoding and it is encoded in UTF-8.  Does anybody know how to solve the error?


How can I get the Text component from TextMeshPro ? I'm getting null exception

At the top of the screen : public GameObject uiSceneText; private TextMeshPro textMeshPro;  Then in the script at some point : uiSceneText.SetActive(true);  if (textMeshPro.text != "")     textMeshPro.text = "";  The exception error null is on the textMeshPro on the line : if (textMeshPro.text != "")  textMeshPro is null. This screenshot shows the TextMeshPro in the Hierarchy :  and I see that the Scene Image object and its child Scene Text both are enabled true. I want to get the text and add replace a new text with the text already in the Text but the textMeshPro is null. The complete script : using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine;  public class PlayerSpaceshipAreaColliding : MonoBehaviour {     public float rotationSpeed;     public float movingSpeed;     public float secondsToRotate;     public GameObject uiSceneText;      private float timeElapsed = 0;     private float lerpDuration = 3;     private float startValue = 1;     private float endValue = 0;     private float valueToLerp = 0;     private Animator playerAnimator;     private bool exitSpaceShipSurroundingArea = false;     private bool slowd = true;     private TextMeshPro textMeshPro;      // Start is called before the first frame update     void Start()     {         textMeshPro = uiSceneText.GetComponent<TextMeshPro>();          playerAnimator = GetComponent<Animator>();     }      // Update is called once per frame     void Update()     {         if (exitSpaceShipSurroundingArea)         {             if (slowd)                 SlowDown();              if (playerAnimator.GetFloat("Forward") == 0)             {                 slowd = false;                  LockController.PlayerLockState(false);                  uiSceneText.SetActive(true);                  if (textMeshPro.text != "")                     textMeshPro.text = "";                  textMeshPro.text = "Here I will add the new text.";                              }              if (slowd == false)             {                              }         }     }      private void OnTriggerEnter(Collider other)     {         if (other.name == "CrashLandedShipUpDown")         {             exitSpaceShipSurroundingArea = false;             Debug.Log("Entered Spaceship Area !");         }     }      private void OnTriggerExit(Collider other)     {         if (other.name == "CrashLandedShipUpDown")         {             exitSpaceShipSurroundingArea = true;             Debug.Log("Exited Spaceship Area !");         }     }      private void SlowDown()     {         if (timeElapsed < lerpDuration)         {             valueToLerp = Mathf.Lerp(startValue, endValue, timeElapsed / lerpDuration);             playerAnimator.SetFloat("Forward", valueToLerp);             timeElapsed += Time.deltaTime;         }          playerAnimator.SetFloat("Forward", valueToLerp);         valueToLerp = 0;     } }


sed - Print lines matched by a pattern range if one line matches a condition

I have a multi line log entry format that I need to process.   The log looks something like this:   --START-- Device=B Data=asdfasdf Lorem=Ipsum --END-- --START-- Device=A Data=asdfasdf Lorem=Ipsum --END-- --START-- Device=B Data=asdfasdf --END-- --START-- Device=A Data=asdfasdf --END-- --START-- Device=B Data=asdfasdf --END-- --START-- Device=C Data=asdfasdf Lorem=Ipsum --END--   I want to print everything between --START-- and --END-- if a particular pattern is matched.   e.g:   Print all entries where Device=A  --START-- Device=A Data=asdfasdf Lorem=Ipsum --END-- --START-- Device=A Data=asdfasdf --END--   All I've been able to do so far is write:   sed -e -n '/--START--/,/--END--/p' < input   Which effectively prints the input but I think I need to add {} to filter with N and then print if that condition matches.   I also think I'm completely lost.  Any idea on how to print multiple lines if a single line matches a condition?


how a cosine similarity measure can be made a distance measure

I want to make  cosine similarity  a distance measure  for undersampling of fraud data , but the problem is if I get the zero values it will give 0/0, what can I do for this what can be the alternative similarity  measures that are also distance measures.


I need help with reading this output of free -m. This server has a total of 32 GB of ram but it shows 9383 used and 290 free. The rest seems to be in the buff/cache. I am running mysql on this server and we get high CPU usage from time to time intermittently. I was wondering if this had to do with all the memory being used up and it's swapping or possibly a MySQL configuration issue?  Does buff/cache mean the 22GB of RAM is free or used up? Only thing running on this server is MySQL and we do get tons of queries a day. Approximately 6 million queries per hour.                total        used        free      shared  buff/cache   available Mem:          31876        9383         290         216       22203       21840 Swap:         16383        1541       14842


Need advice what method or algorithm to use for calculating topology matrix for node voltage method in matrix form

I want to make a program that will calculate everything in a scheme with the node voltage method in matrix form. The problem is I don't know really how to do this. I want to translate this scheme with this edges to the matrix A0. edges=[(1,2),(1,3),(2,3),(2,4),(3,4),(4,1)] A0=[ [1,0,0,-1,1,0], [-1,1,1,0,0,0], [0,0,-1,1,0,-1], [0,-1,0,0,-1,1], ] Could someone tell me what algorithm or law to use in this situation? Thanks in advance.


I am using ubuntu 17.10. After installing driver for USB wifi adapter. I still cannot see the usb wifi adapter.    $ lsusb Bus 001 Device 004: ID 04f2:b52b Chicony Electronics Co., Ltd  Bus 001 Device 003: ID 13d3:3496 IMC Networks  Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 006: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU  802.11a/b/g/n/ac WLAN Adapter Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  $ ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group  default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host         valid_lft forever preferred_lft forever 2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000     link/ether 10:7b:44:27:57:1a brd ff:ff:ff:ff:ff:ff 5: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP  group default qlen 1000     link/ether 4a:f7:08:20:90:d2 brd ff:ff:ff:ff:ff:ff     inet 172.20.20.20/24 brd 172.20.20.255 scope global dynamic wlp1s0        valid_lft 248sec preferred_lft 248sec     inet6 fe80::c3e3:cefb:36eb:43d1/64 scope link         valid_lft forever preferred_lft forever


I accidentally hit Ctl Alt F. How do I return to the GUI?

I'm using 12.04, I accidentally used Ctl-Alt-F9 and got a black full screen with command line cursor (Terminal).  How can I go back to the normal Unity screen?


How do you prevent the Visual Studio designer auto-generating columns in a DataGridView?

I generate all my columns in a subclassed DataGridView programmatically. However Visual Studio 2008 keeps reading my constructor class (which populates a DataTable with empty content and binds it to the DataGridView) and generates code for the columns in the InitializeComponent method - in the process setting AutoGenerateColumns to false.  This causes errors in design-time compilation which are only solved by manually going into the design code and deleting all references to these autogenerated columns.  How can I stop it doing this?  I have tried:   Making the control 'Frozen' Setting the DataGridView instantiated object protected (suggested in a previous post which referred to )


A biased coin has probability p of showing heads. We toss the coin repeatedly until three heads or three tails occur in row. What is the probability that three heads occur before three tails?  I know how to solve this for two heads and two tails.  $$ P(A) =  p^2 + pq \cdot P(A|HT) + pq \cdot P(A|TH)  $$  Then, it is easy to relate $$ P(A∣HT)=p \cdot P(A∣TH) $$ and $$P(A∣TH)=p+qP(A∣HT) $$  And find solution. However for three we will have equation like this:  $$ P(A) = p^3 + p^2q \cdot P(A|HHT) + p^2q \cdot P(A|HTH) + p^2q \cdot P(A|THH) + q^2p \cdot P(A|HTT)  + q^2p \cdot P(A|THT) + q^2p \cdot P(A|TTH)  $$ How can we relate these conditional probabilities? The link for case with 2 tosses:


The goal is to trigger an automatic alert when disk usage goes above a given threshold. So far I have only found the command df -hP /disk/path that returns disk usage. However, it returns lots of other information as well, as in the image below.      I am looking for the most convenient way to retrieve the Use% statistic. Either through Regex or another Linux command.  It is different from existing question in that it only deals with extracting the right value from the df command while the other questions deal with this part, plus sending the alert as well. The top answer given to this question which I accepted is the most elegant way I have seen to extract the right value.


difficulty in understanding how pointers work in c

I am learning c language for over a year now. But I still don't understand how pointers work. Can anyone suggest a good online resource to make concepts clear.


Moving bone without affecting skinned Mesh

I use blenrig 5..   when I skinning I realize that the bone isn't in correct position, i need to fix my bone position without affecting any weighted mesh (skinned mesh)


Mobile site does not have Winter Bash pulldown in notification bar

There is no snowflake on the mobile site, and there does not appear to be any other way to see Winter Bash notifications.    Workaround is to switch to desktop site on mobile to check.


Normal Map bad shading in Rendered display

I have a Normal Map problem: I've baked a high-poly sphere to a low-poly, but whatever I try there's always a bad shading on the surface of the low-poly in Rendered display, between the light and the shadow. It disappears if I unplug the Normal Map. What am I doing wrong? Is it inevitable? Am I missing something? Thanks in advance.  Edit: Solved by Serge, it looks like it's the terminator issue, fixed with a bigger light size. Answer also given  by IkariShinji, and as Leander pointed out,  by Crazycourier.  file:


Do irreversible processes indicate that time reversible symmetry is a limited phenomenon instead of a universal law?

Physics and chemistry indicate various , while physics also proposes the theory of . I suppose that evidence of irreversible processes indicates that T-symmetry is a limited phenomenon instead of a universal law, but I also suppose that proponents of T-symmetry have considered the facts of irreversible processes. I answer yes to my question, but I want to learn more about this.


Is there a cross-browser CSS/JavaScript technique to display a long HTML table such that the column headers stay fixed on-screen and do not scroll with the table body. Think of the "freeze panes" effect in Microsoft Excel.  I want to be able to scroll through the contents of the table, but to always be able to see the column headers at the top.


How to install a file manager to Xperia L WITHOUT internet connection?

It's a big shame that this phone does not have any file manager by default.  I have the .apk installer of the file manager on my PC, but how to install it on phone offline? (offline = no internet connection)  Help


Weird numpy array element check behaviour

I have been chasing an error for a long time. I have finally tracked it down to this: a = 3*np.arange(0.5,1.6,0.1) b = 3*np.array([0.5,1,1.5])  for c in a:    print(c in b)  I would expect 3 of the elements of a to appear in b but when I execute the code above I only get that one of them is in b. Is anyone able to explain whats going on here?


Confidence interval for the product of two parameters

Let us assume we have two parameters, $p_1$ and $p_2$. We also have two maximum likelihood estimators $\hat{p_1}$ and $\hat{p_2}$ and two confidence intervals for these parameters. Is there a way to build a confidence interval for $p_1p_2$?


As I understand it, the hosts file is one of several system facilities that assists in addressing network nodes in a computer network. But what should be inside it? When I install Ubuntu by default   127.0.0.1 localhost    will be there. Why?   How does /etc/hosts work in case of JVM systems like Cassandra? When is DNS alternative, I guess not on a single computer?


Do people normally own more than one wand?

Is there any canon information in Harry Potter that proves one way or another whether a wizard always owns only one wand as a matter of routine?  What I am talking about is a wizard buying and owning one wand and also a second wand (for backup, or simultaneous use, or separate purpose, or ceremonial+work wand), akin to people buying more than one pair of boots, guns or hammers.  A proof would be either canon info showing someone owning 2 wands simultaneously; or a statement showing why that does not happen except in rare exceptions (see below).    NOTE: I am discounting special situations such as winning an extra wand in a duel ala Harry (e.g. the second wand's obtainment wasn't intended/planned), or someone winning a Death Stick from prior owner (in which case it was intended as a replacement wand and not an extra one); or taking another's wand for a time being, ala Voldemort and Lucius Malfoy (since it was more of a "temporary replacement because main wand was useless for the purpose due to paired cores" - far from a normal situation).  Also, I meant wands intended for use - e.g. if Malfoy would have a (imagined by me) collection of rare antique wands, that's as irrelevant as someone having flintlocks in a display case.


I accidentally made my post community wiki

I posted  and found out that the answer was community wiki. I checked revision history and found out the answer was made community wiki by me (which I must have done accidentally). I was about to flag the post for a moderator to remove it from community wiki till I saw that the answer has been accepted.  My question is what is the use of bothering moderators to remove the post from community wiki. Will I still get the 15 rep for accept?


"Turn screen off when inactive"-setting from terminal

I want to turn the "Turn screen off when inactive for x minutes" setting (in the brightness settings) to "never" from the terminal, but I couldn't find the right command.  This will be used in a executable file to change a few settings on a Ubuntu live installation.  Edit:  Due to more involved reasons I want to change this specific setting which is independent of the screen saver settings (I think).


What are the rules governing how a Patronus can interact with the physical world?

Inspired by :  In my answer, I had stated that Patronuses appear to not be physical beings because they have no effect on anything other than Dementors.     They don't cause leaves to stir in the movies. They passed straight through the tent. They don't appear to be bound by normal laws pf physics and can travel great distances almost immediately (Shacklebolt was presumably in London when his Patronus issued the warning). They can apparently walk across water without sinking (as they did in The Prisoner of Azkaban). They can jump, walk, and float in mid-air (as seen in the Room of Requirement in the movie version of The Order of the Phoenix). They make no footprints in lightly powdered snow (The Deathly Hallows Chapter 19) and make no sound of crunching snow as Harry does (further down the same page in Chapter 19).   I stated incorrectly that the only place in canon where there is an exception is with Dementors, where the Patronus physically fends them off with its horns.  A Dementor is clearly a physical being, if it prised Dudley's mouth open and (in the movie anyway) physically slid open the train door.)   Based on comments and further thought, I can think of at least two other examples when a Patronus interacts physically with a physical being.   As pointed out by Slytherincess, a Patronus can fend off a Lethifold (Living Shroud). When training, the Patonus took form against a Boggart, which had taken the form of a Dementor.   All three of these things have, AFAIK, only three things in common (but I may be off).   They are evil They are magical They are, indeed, physical beings.   So the question is, why can a Patronus interact with all three of these, but seems to have no physical effect on everyday things?


How to do you know when to add "the" before organisations' names?

On my grammar book, it says;     many organisations have names with 'the'. ex. the European Union, the BBC   How do you know when you add the with organisations names? Do most organisations names have the in front?


I am trying to learn how to tweak my shell in the file but can't seems to find the file in my home directory or in /etc/profile.  Is there any other file I need to search for, or am I expected to create one from scratch?


Difference Between Generating Functions And Exponential Generating Functions

What is the difference between generating functions and exponential generating functions?   I mean, we can solve a combinatorics sum by using just simple generating functions.   Or simply, for which parts in combinatorics do we use simple generating functions and in which parts we use exponential generating functions?


I offered a bounty (50 rep) on  and it expired. It still haven't got the attention I need for it to change something so I wanted to add another 50 rep to try and get an answer.  Now I cannot start a bounty cheaper than 100 reputation.         Is this a bug, by-design or am I just cheap ?


How long does the Truffle take to move in after building the mushroom biome?

I currently find myself in a pickle because even after I've built the mushroom biome and met all other requirements, the Truffle NPC won't move in.   I've defeated not only the Wall of Flesh but Ocram already. Created a surface mushroom biome. Built a house made out of mushrooms with mushroom furniture.   I have no idea how long it takes for the NPC to move in or if I'm wrong in any of the steps.


I'm trying to launch an applet(called Tennis) from a different class(called NewClass) where the user enter a number and based on that number which applet should be ran.. I can create an object of the applet but when I call the init function I get a nullpointer exception. but when I run the applet from itself without the newclass it runs fine.  public class NewClass {      public static void main (String [] args) {          Tennis t = new Tennis();         t.init();       }  }    public class Tennis extends Applet implements Runnable, KeyListener {      final int WIDTH = 700, HEIGHT = 500;     int pts = 0;     Thread thread;     HumanPaddle p1;     AIPaddle p2;     Ball b1;     boolean gameStarted;     boolean lost;     Graphics gfx;     Image img;     String points;     int level = 0;     String user;     public Tennis(String user){         this.user = user;     }     public Tennis(){     }       public void init(){          this.resize(WIDTH,HEIGHT);          this.addKeyListener(this);         p1 = new HumanPaddle(1);         b1 = new Ball();         p2 = new AIPaddle(2, b1);         img = createImage(WIDTH,HEIGHT);          gameStarted = false;         lost = false;         thread = new Thread(this);         thread.start();         gfx = img.getGraphics();      }     public void reset() {         b1.x=350;         b1.y=250;          b1.xVel = b1.getRandomSpeed() * b1.getRandomDirection();         b1.yVel = b1.getRandomSpeed() * b1.getRandomDirection();         gameStarted = false;         p1.y=210;         p2.y=210;         lost = true;      }      public void paint (Graphics g){         gfx.setColor(Color.black);         gfx.fillRect(0, 0, WIDTH, HEIGHT);         points = ""+b1.pts;         if(b1.getX() < -10 || b1.getX() > 710){             reset();         } else {         p1.draw(gfx);         p2.draw(gfx);         b1.draw(gfx);         gfx.drawString("Score: " +points , 10 , 30);           }          if(!gameStarted && !lost){             gfx.setColor(Color.white);             gfx.drawString("Press Enter to Begin", 290,160);             gfx.drawString("CS Project",310,130);          } else if (!gameStarted && lost) {             gfx.setColor(Color.red);             gfx.drawString("Game Over" , 320 , 120);             gfx.drawString("Score: " + points , 330 , 140);             gfx.drawString("Press Enter to Begin", 300,160);          }          g.drawImage(img, 0, 0, this);     }      public void update (Graphics g){         paint(g);       }      public void run(){         for(;;){             if (gameStarted) {                  b1.move();                 p1.move();                 p2.move();                  b1.checkPaddleCollision(p1,p2);                 //gfx.setColor(Color.red);                //gfx.drawString("Score: " + pts, 300,150);             }             repaint();             try {                 Thread.sleep(10);             } catch (InterruptedException e){                 e.printStackTrace();             }         }      }      @Override     public void keyTyped(KeyEvent e) {      }      @Override     public void keyPressed(KeyEvent e) {         if (e.getKeyCode() == KeyEvent.VK_UP){             p1.setUpAccel(true);         } else if (e.getKeyCode() == KeyEvent.VK_DOWN) {             p1.setDownAccel(true);         } else if(e.getKeyCode() == KeyEvent.VK_ENTER && lost){             gameStarted = true;             points = "";             b1.pts = 0;         } else if(e.getKeyCode() == KeyEvent.VK_ENTER && !lost){             gameStarted = true;             level++;         }     }      @Override     public void keyReleased(KeyEvent e) {         if (e.getKeyCode() == KeyEvent.VK_UP){             p1.setUpAccel(false);         } else if (e.getKeyCode() == KeyEvent.VK_DOWN) {             p1.setDownAccel(false);         }     }  }   Exception in thread "main" java.lang.NullPointerException     at infMode.Tennis.init(Tennis.java:56)     at infMode.NewClass.main(NewClass.java:25)   (Tennis.java:56)  gfx = img.getGraphics();   (NewClass.java:25)  t.init();


How do I move the Unity title bar buttons to the right side?

Can I put the title bar buttons in Unity on the right side somehow, or is that impossible?


How to send personalized HTML emails from a spreadsheet

I have a Google spreadsheet that contains recipient's names, emails, and a message that anonymous people have sent this Valentine's Day.  I am aware of applications such as the various Mail Merges that allow one to send personalized messages. All of which that I have found, however, send in plaintext  (at least in their free versions).  In the Mail Merge add-ons I have used, I can't seem to include images either.  I am also aware of scripts that can send HTML emails, but none that can send personalized emails automatically to a large number of people. An example message I am looking for may just be something like a simple banner image, greeting (with variable name), and variable message, perhaps with everything centered. The easiest way I can think of to achieve this is by sending an HTML email, so I'm looking for a way to retrieve spreadsheet values for a template HTML document to send the personalized messages.


Was Elrond always supposed to be an Elf?

This passage in The Hobbit puzzled me:     The master of [Rivendell] was an elf-friend... He was as noble and as fair as an elf-lord, as strong as a warrior, as wise as a wizard, as venerable as a king of dwarves, and as kind as summer.   -The Hobbit, Chapter 3: "A Short Rest"   The person being described is none other than Elrond.  All of this suggests that Elrond isn't an elf, let alone an elf lord.     "Elf-friend" is a title bestowed upon individuals from other races who are friendly with Elves;  it makes no sense to call an elf "elf-friend".   Elrond is compared to an elf-lord, but clearly isn't one, in Tolkien's opinion (at the time he was writing The Hobbit): notice that he isn't any of the other things he is compared to - he isn't a dwarven King; he isn't a wizard; he isn't summer; and although he was once a warrior, according to LotR, he isn't one in The Hobbit.    Did Tolkien originally consider Elrond to be something other than an Elf, and an Elf-lord?


Whenever I try to login to bash using the Windows Subsystem for Linux, I try to cd into C:\Users\, but all I get is directory not found.  Where is the C drive for the Windows Linux subsystem? Is it isolated?


How do you clean tupperware that is always so stained after pasta sauce has been in it


I have the code below:  static IEnumerable<int> YieldReturn() {     yield return 1;     yield return 2;     yield return 3; } static void Main(string[] args) {     // Lets see how yield return works     foreach (int i in YieldReturn())     {         Console.WriteLine(i);     } }   I have a couple of questions:  1-How many times does YieldReturn() get called? one or three times?  2-If YieldReturn() get called three times, how does IEnumerable store value 1, 2 and 3?


Rename multiples files using Bash scripting

I want to rename multiple files in the same directory using Bash scripting. Names of the files are as follows:  file2602201409853.p file0901201437404.p   file0901201438761.p   file1003201410069.p   file2602201410180.p   I want to rename to the following format:  file2503201409853.p file2503201437404.p   file2503201438761.p   file2503201410069.p   file2503201410180.p   I was reading about the rename command, and try to do it this way, but it does nothing, I think I have questions about the syntax. Then I read that you can make a loop using the  command as follows:  for file in cmpsms*2014*.p; do     mv "$file" "${file/cmpsms*2014*.p/cmpsms25032014*.p}" done   But I can not rename the files. What am I doing wrong?


MOSFET triode and linear region difference

I am currently reading about MOSFET curves. I thought that the linear region and the triode region are the same , but I suspect I was wrong. my questions are briefly :  Whether ohmic and linear region are the same. What is exactly the triode region and how it is different from ohmic/linear region?


If $A \in \mathbb{M}_{n\times n}(\mathbb{R})$ with $n\ge 2$ has rank $1$, then the minimal polynomial of $A$ is of degree $2$.  I think it is true because i did not get any example which makes it false. So either give its proof or any counter example to disprove this. Thanks in advance.


How can a distribution have infinite mean and variance?

It would be appreciated if the following examples could be given:   A distribution with infinite mean and infinite variance. A distribution with infinite mean and finite variance. A distribution with finite mean and infinite variance.  A distribution with finite mean and finite variance.   It comes from me seeing these unfamiliar terms (infinite mean, infinite variance) used in an article I am reading, googling and reading a thread on the , and not finding it a sufficiently clear explanation. I also haven't found any explanations in any of my own textbooks.


Is it OK to have one of my letters of recommendation written by a Postdoc?

I am a Master's student in Mathematics who is planning to apply to a PhD program.  During my research I have been closely working with a Postdoc of my advisor, who is now leaving for another Postdoc position in Europe, and it is not likely he will have a permanent position by the time I need to send the recommendation letters.  Would having him write one of 3 letters of recommendation put me at a significant disadvantage comparing to a case where the author of said letter is a tenured professor who is however less familiar with my research abilities (e.g someone I have taken a course with, or someone who has read my thesis/papers but haven't had significant interaction with me in person)?


can you connect two mobile usb modem to access the internet

i have two usb modem from different ISP provider, can i connect them simultaneous to the internet?


Is it becoming illegal for a Canadian citizen to enter Canada presenting a foreign passport?

Some countries (e.g., U.S., Israel) require their citizens to present themselves as such when entering the country - that is, they cannot enter using another country's passport.  In Canada there is no such requirement:  Currently, , if they have one.  Starting March 15, 2016, , except for U.S. citizens.  On the , it says:     Reminder      You cannot apply for an eTA if you are:         a Canadian citizen or a dual Canadian citizen, ....      Does this mean that when the eTA requirement takes effect, it will become illegal for Canadians to enter Canada by air using a passport from any visa-exempt country other than Canada or the U.S.?  If a Canadian citizen obtains an eTA using their foreign passport and enters Canada with it, what law or regulation will they be violating?


Anyone know where I can buy Button airport friendly suspenders? I know there are several clip on brands but need the button suspenders that are airport friendly.


How is my understanding of $\vdash, \vDash, \to$, etc

My current understanding:  $\vdash$ is "syntactic consequence", e.g. if we have $a \vdash b$ it means if we've written down $a$ as something we know, we can immediately write down $b$ as something we know. This is saying nothing about whether any of these pieces are true, false, something else, etc, it's just saying that we can say something about $b$ by virtue of being able to say something about $a$.  $\vDash$ is "semantic consequence", e.g. if we have $a \vDash b$, then it (usually) means if $a$ is always true in every interpretation (i.e. no matter how we mess with any of the underlying variables driving $a$'s valuation), then $b$ is true as well. However I don't know if this is necessarily just a "true"-only thing. It seems conceivable that we could make one for falsehoods too, i.e. if $a \vDash b$ might mean if $a$ is always false then $b$ is always false, of if $a$ is always "dog" then $b$ is always "dog", etc. But I am unsure of this one.  $\to$ is material implication, which exists solely within the logic system (as opposed to the previous two metalogical relations) and has a specific semantic meaning / definition in terms of a truth table in something like prepositional logic ($a \to b$ is always true unless $a$ is true and $b$ is false). It's defined this way simply because it is a helpful / useful model to describe things like "whenever $a$ is true, $b$ is true".  Do I have the right idea so far?


Why is OLS estimator of AR(1) coefficient biased?

I am trying to understand why OLS gives a biased estimator of an AR(1) process. Consider  $$ \begin{aligned} y_{t} &= \alpha + \beta y_{t-1} + \epsilon_{t}, \\ \epsilon_{t} &\stackrel{iid}{\sim} N(0,1). \end{aligned} $$ In this model, strict exogeneity is violated, i.e. $y_t$ and $\epsilon_t$ are correlated but $y_{t-1}$ and $\epsilon_t$ are uncorrelated. But if this is true, then why does the following simple derivation not hold? $$ \begin{aligned} \text{plim} \ \hat{\beta} &= \frac{\text{Cov}(y_{t},y_{t-1})}{\text{Var}(y_{t-1})} \\ &=\frac{\text{Cov}(\alpha + \beta y_{t-1}+\epsilon_{t}, y_{t-1})}{\text{Var}(y_{t-1})} \\ &= \beta+ \frac{\text{Cov}(\epsilon_{t}, y_{t-1})}{\text{Var}(y_{t-1})} \\ &=\beta.  \end{aligned} $$


Where are the rest of the White Walkers?

The White Walkers take      Craster's sons and turn them into more White Walkers.   There was a scene where a White Walker      converts a baby into another White Walker,   surrounded by other White Walkers. There should be an army of White Walkers by now, not considering the wights. But when fighting with the      Wildlings/Night’s Watch/Brotherhood Without Banners/random tag-alongs and the dragons   and during      the destruction of The Wall   too few White Walkers were shown. Where are the rest of them?


Why do font size commands like \large have to be wrapped in blocks as opposed to e.g. \textbf?

This is probably a beginner question, but it's always been throwing me off about LaTeX, especially because when I'm showing new people the basics, I can't explain why that is.  So the question is: Why does \large have to be wrapped inside {} to not make everything after it become large as well? When I type \large{Some text} it doesn't mean at all what one might expect ({Some text} isn't an argument apparently). For commands like \textbf it works the way I'm used to for most commands: Without braces, it just affects the next token, with curlies, it affects that whole argument inside the curlies and nothing beyond that.  Is there a term for these kinds of commands? I don't recall having seen very many others that behave like this.


While a photon is mass less but when it converts to an electron how mass can come into being ?


Converting bike from rim brakes to disc brakes

I just bought a used  and it comes with regular rim brakes. I'm perfectly happy with them so far, but have been wondering if disc brakes would come handy when it rains.  What is involved in converting a bike from rim brakes to disc brakes (mechanical or hydraulic)?   Is this something that is feasible, or am I better off buying another bike that already has disc brakes?


How should XP be awarded when facing enemies with class levels?

A lot of games I've been in have had either enemies with player levels or straight up PvP. How should XP be awarded when facing enemies like that? Should you attempt to calculate the CR of the enemies based on the DMG tables or is there a guideline on how XP should be awarded based on the class levels?


Since Beyond Light I noticed that there is a number next to a Guardian's name. (Before the update, the blue box used to hold the equipped class of the player.)  When I die and am waiting for respawn, I always see that my number is 1, so I don't think it is the Season Pass level, but then again it may simply be a bug. So, what does this number mean?


How to write "and" in Regex. Like we can write "or" using pipe | similarly is there a way to write "and"  I have   REGEX1 : ^(?!([0-9])\1{2}[-. ]*\1{3}[-. ]*\1{4}$) which validates anything except numbers like 111-111-1111 or 111.111.1111 and another REGEX2: ^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$ which validates numbers like 784-223-4567   I want the digit string to be valid only if both REGEX1 && REGEX2 conditions are satisfied


I have a already installed game which is .exe but to open it I have to always go to the folder or type commands to open it with wine. I don't know how to add it to the applications menu where I can just easily search and open the game without running any commands or using wine every time.


Asking the vector form of the equation about velocity

In the undergraduate text of physics, the equation for velocity and displacement at constant acceleration are given in scalar form. For example, my text reads  $$v^2 = v_0^2 + 2a(x-x_0)$$  But today, I am reading another text which gives the vector form for displacement. I am trying to write above equation in vector form also but how do I deal with that square in vector? I am tackling that square with dot product of two vector such that $v^2 \to \vec{v}\cdot\vec{v}$, is that correct? So what about the multiplication of acceleration and the displacement? dot product again?  This equation looks a bit confusing to me. Let's say I throw a stone upright with initial speed $v_0$ and it reaches the highest point sometimes later (so $v=0$), and the coordinate is given with y axis down and x axis horizontal. Note that the displacement is negative since the coordinate's yaxis is downward, also the gravity is along the positive y axis so the equation becomes $$   0 = v_0^2 + 2g(-x) $$ which gives $$   x = \frac{v_0^2}{2g} $$ is that right?


Package xparse continues to throw "Support package l3kernel too old"

I tried to compile a (flawlessly working) LaTeX document on a different computer, and suddenly was faced with the above error message printed by the xparse package (after that, many errors follow).  I'm working on both computers with miktex 2.9 (and Texnic-Center) on Windows 7 (64 bit).  I tried EVERYTHING I found on stackexchange or anywhere else on the web, including:   Updating all packages Removing the l3 packages and reinstalling them Doing the above for both the current user and in admin mode Removing the complete miktex distribution and re-installing it   for only the current user for "anyone who uses this computer" with all packages only the basic packages  Downloading the newest l3 packages manually from CTAN and copying them into the miktex folder Refreshing the FNDB and updating formats afterwards   Nothing worked. Right now, I'm just out of ideas. ANY suggestions??  EDIT: After performing UlrikeFischer's suggestion, I get different errors. After a long compilation process, this is the log file I get:


Do I need an Irish transit visa to connect in Dublin onto UK? (Saudi passport and UK visa)

I'm a Saudi passport holder with permanent residence in the United States, and I'd like to book a flight from Washington to Edinburgh with a three-hour layover in Dublin. I know there's a Common Travel Agreement between the Republic of Ireland and the UK, and so I was wondering if I need an Irish transit visa to connect to a flight from Dublin to Edinburgh, or if a UK visa is sufficient. And are there any users who traveled US-RoI-UK under the same circumstances with needing a UK visa who can share their experience? Users who aren't visa-free for the UK or Ireland, that is.  From what I've read in these forums and others, it seems like Irish immigration in effect does controls on behalf of the UK government unofficially.  I have also heard concerns from people saying Aer Lingus employees could deny me boarding depending how confused an employee would be when looking up visa requirements on TIMATIC.


How can I start my chapter from "Chapter 2" instead of "Chapter 1".  I am preparing LaTeX document for each chapter. when I put \chapter{Introduction}, it produces "Chapter 1" Introduction. However I want it to be "chapter 2" Introduction instead.


An alternative to eval() or Function() for a two-dimensional array in Javascript?

I know eval poses security issues and that there are already several questions here concerning this problem. However, in my case, I'm not sure there is a better alternative, or whether the risk is low enough considering the source of data.  I have a 2-dimensional array containing floating point numbers, so something like this:  arr = [[1.0,0.0],[2.0,1.0],...,[1.0,8.0,9.0]]   This array is initially a string I read from a file in my server, meaning that eval() or Function() should always run a string with a known value, since the file never really changes (though sometimes some strings' position in the file change, but the overall content remains the same).  Now I know I could just loop through the string and dynamically create this array of numbers but I wonder if it's worth the trouble, since, in this case, eval() seems to not be as harmful as it could be.


Quenya, the popular Elvish language is used in all The Lord of the Rings books and movies and appears very beautiful due to its flowing letters and has a charismatic visual appeal.  How would I go about learning the Quenya alphabet and word definitons?


How do I tell if ACR will work with my camera and how do I get the correct version for Photoshop?

I am a beginner photographer with a Canon 7d and MacBook Pro. I'm not sure if Adobe camera Raw is compatible with either and really need advice on how to go about downloading the correct version.


set focus of textfield to the last character entered in plain javascript

In an HTML file, I have a text field and a button. When the button is pressed, text is added to the to text field via plain JavaScript.  HTML:  please input : <input id="city" type="text" name="city" /> <button onclick="myFunction()">click</button>   JavaScript:  function myFunction() {    var a=document.getElementById("city").value ;    document.getElementById("city").value = a; }   How to set the focus of the text field to the last entered character by using only plain JavaScript, without jQuery or other libraries?  Thank you in advance.


align list items content at the same level

What this the best way to accomplish the following? using tabular ?  i dont want to use \hfill and pushing them to the end of the line.  • list-item           i want this • longggg-item        and this to be aligned • another-item        at the same level auto   in a more general way  • some text                  i want this                  same here • another text               and this to be at the        same here • not the same length        same level after let say     seconde level here


Does anyone know how historically we came to notate functions as f(x) instead of (x)f? For example g(f(x)) instead of ((x)f)g or for matrices B A x instead of x A B.  After all (in the Western world) we write from left to right, but in mathematics we notate operations from right to left. Also if anyone of Arabian origin sees that, does it mean you don't have that particular confusion?


Is the following inequality True or False?

Ι got a feeling that $$\sum_{x=1}^{\infty}\Big\lvert\sum_{k=0}^{\infty} \frac{x^{2k}}{(k+1)!}(-1)^{k} \Big\rvert \geq \sum_{n=1}^{\infty} \frac{1}{n} $$  because $$\sum_{x=1}^{\infty} \Big\lvert x-\frac{x^2}{3!}+\frac{x^4}{5!}... \Big\rvert \geq 1+\frac{1}{2}+\frac{1}{3}...$$ i feel that somehow terms will get canceled but i cant prove it!!   **this came up as a part of problem i was solving . I got no idea if the above inequallity is true **


how to get rank number that group by a column

I spend hours trying to solve this, but I can't.  Well, I simply have a table call invoices  I have data like this    I want to know each customer rank by their total sum  How can I archive this?


How can Kitty Pryde achieve time travel with her phasing abilities?

In X-Men: Days of Future Past, how does Kitty Pryde suddenly get the power to send people's minds back in time? Initially she was only able to phase through objects and could extend this power to other people. The explanation of this cited molecular spaces.  How does she go from there to time travel all of a sudden??


I want to create a cron job that runs a command on a remote linux box using ssh but I want ssh to answer password

Thank you for the reply.This is not what I am after. The ssh from server 0 to (1,2,3) (no password) but a remote script on server (1,2 & 4 ) which starts a service/application needs a password for it to start. I want to be able to ssh and run this automatically, so ssh would expect a password from the remote script and answer with a password.–  Sal Allan32 mins ago  I want to create the cron job to run every Monday morning at 5AM.  Example  ssh -n -o StrictHostKeyChecking=no server1 /app/pkg/solaris/start_script ssh -n -o StrictHostKeyChecking=no server2 /app/pkg/solaris/start_script ssh -n -o StrictHostKeyChecking=no server3 /app/pkg/solaris/start_script   When I run the above script from a cron job on a remote server every Monday morning, the application/start_script will prompt for a password to start the script. This is the application password. say password is BOB.  Please enter password:   Is there a way to answer the password prompt (by the start_script) without any manual interaction. The password prompt is for the application and not server I am ssh to. Its all trusted domain from one admin group.


Is it possible to disown a background process and then later open it in another terminal window?

Say you have a script that takes a while to do something, but then later requires some user input e.g. something like:  #!/usr/bin/python -u import time x=0 while(x<10):     time.sleep(1)     x+=1     print(x) print(input())   and you wanted to run this process in the background and then later recall it in another terminal window, perhaps using  ./script.py > output.txt & disown   This process is no longer listed under jobs, but you can see it is still running with pgrep script.py (because you disowned it). Thus you can't recall this job with fg . Is there a way to re-own the process and/or bring it to the foreground in another terminal window? This would be particularly useful when you are controlling the machine remotely with ssh and are worried about an unstable connection.


How would I show that $$d_E = \sqrt{\sum_{i=1}^n(x_i-y_i)^2}$$ and $$d_\infty= \sum_{i=1}^n|x_i-y_i|$$ and $$\sup\{|x_1-y_1|,|x_2-y_2|,...,|x_n-y_n|\}$$ are topologically equivalent on $\mathbb{R}^n$? I can do it for $\mathbb{R}^2$, but I'm not sure how a generalization looks like.


Why can't iPhone 11 on iOS 13.0 upgrade to 13.2.2?

A friend got a brand new iPhone 11 just over three weeks ago. It's running iOS 13.0 (17A577), so presumably it hasn't ever had a software update.  When my friend tries to update iOS to the current version (13.2.2), the "Verifying update..." dialog appears for a while, then the   A dialog then appears, saying:     Unable to Install Update      An error occurred installing iOS 13.2.2      Retry      Remind me later   Retrying ends up with the same result.  iOS 13 has various fairly serious bugs, including super-slow tap responsiveness (several seconds passing before taps on the screen register).  Is there any way to get past this error and get my friend's iOS updated?


Construct a function whose 2nd order derivative exists at 0 but 1st order derivative not continuous

As the title suggests, I need to construct a continuous function on $\mathbb{R}$ whose 2nd order derivative exists at $x=0$, but $\forall \delta>0$, this function’s first order derivative is not continuous on $(-\delta,\delta)$. I have been told to use functions like $f(x)=x^2[sin(1/x)] $as components for construction, but have no idea about the function that satisfies the requirement. Can you give me an example?


If you are well-organised, you (manage OR will manage) your time.   Everyone in my test was saying "will manage" is the correct answer, but the way I understand it is this sentence is talking about a general truth in the present, or it's just explaining the former sentence.  If it were worded "If you become organised" I think the answer would be "will manage" then.  What is the correct answer?


Does back E.M.F. create a second back E.M.F. which creates a third back E.M.F. and so on?

Does back E.M.F. also generate a back E.M.F. of it's own?  If so, why do I not hear this discussed? Is this because it has a very small effect, i.e. it lasts a small amount of time or it has a small magnitude.


I'm using Blender 2.78 on OSX and I'm trying to subtract one cuboid from another but no luck. I am in object mode and have selected one of them but modifiers tab is missing. (I really miss help search the way it works in most tools on mac)


Show Appendix Number/Counter After Appendix Title

I would like to reference appendices with "A,B,C,...", as in "Appendix A", but in the appendix at the end of the document I want the letter "A" after the word "Appendix", as in "Appendix A".  \documentclass[12pt]{article}  \begin{document}  \section{Introduction}  Reference to appendix \ref{ap:a}.   \appendix \section{Appendix} \label{ap:a}  \end{document}


Why are the two definitions of covariance equal?

For example in Wolfram mathworld, you get these two definitions of covariance.    cov(X,Y)    =   E[ (X - E[X])(Y - E[Y]) ]             =   E[XY] - E[X]E[Y]      I don't see why they are equal.


I gave everyone at the company, including myself, a huge Christmas bonus.  Is "including myself"—not "including me"—correct here?  Thank you.


Both DHCP and static IP addresses simultaneously on one interface

We can use multiple IP addresses for a single interface in Linux (eg. eth0:0, eth0:1). But can we use DHCP and static IP at the same time? eth0:1 should have a static IP address and eth0:0 should be configured using DHCP.  How can we accomplish both?


Overlapping nodes in a red-black tree in TikZ

I took the example of a red-black tree from the  and adjusted it for my own needs, but I get overlapping nodes in the bottom level of the tree:  \tikzset{     treenode/.style = {align=center, circle, draw=black, inner sep=0pt, text centered, font=\sffamily, thick, text width=2em},     w/.style = {treenode, black},     b/.style = {treenode, white, fill=black},     level/.style = {sibling distance=0.45\textwidth/#1} }  \begin{figure}     \begin{center}         \begin{subfigure}{0.45\textwidth}             \begin{tikzpicture}                 \node [w] {15-8}                     child {node [b] {4-9}                         child {node [w] {4-2}}                         child {node [w] {2-1}}                         child {node [w] {3-1}}                     }                     child {node [b] {4-6}                         child {node [w] {3-1}}                         child {node [w] {3-3}}                     };             \end{tikzpicture}             \caption{1}         \end{subfigure}         \begin{subfigure}{0.45\textwidth}             \caption{2}         \end{subfigure}         \vskip\baselineskip         \begin{subfigure}{0.45\textwidth}             \caption{3}         \end{subfigure}         \begin{subfigure}{0.45\textwidth}             \caption{4}         \end{subfigure}     \end{center} \end{figure}   resulting in    I've tried fiddling with the sibling distance parameter but can't get it to space out the nodes properly.  I've looked at some other answers but they use different packages to draw trees. Is there a good way to draw such trees in tikz without overlapping? Possibly using all the available 0.45\textwidth to space out the leaf nodes?


Idiom for things going wrong one after another

I know I've heard of an idiom which means : Something was already wrong, and more bad thing(s) got added on top of it. I just cant remember it now. Its not "striking someone when they're already down" - this has a connotation of someone actively trying to cause harm. What I'm looking for is more passive, like bad things just happen one after another.


Just another suggested edit-suggestion suggestion

Instead of seeing:     (username) has approved 297 edit suggestions and rejected 121 edit suggestions and improved 21 edit suggestions   Can that be rephrased to this?     (username) has approved 297, rejected 121, and improved 21 edit suggestions   Or perhaps something better? The duplicated edit suggestions seems wordy and superfluous and redundant.  would naturally remove the common bits between elements joined by the coördinating conjunction, so the current wording sounds somewhat un-Englishy.  What are your thoughts? Or is this a pointless suggestion?


Integration of $\int \frac{e^x}{e^{2x} + 1}dx$

I came across this question and I was unable to solve it. I know a bit about integrating linear functions, but I don't know how to integrate when two functions are divided. Please explain. I'm new to calculus.   Question: $$\int \frac{e^x}{e^{2x} + 1}dx$$  Thanks in advance.


How can I Increase swap partiton by decreasing root partion and be able to hibernate my system

OS: Ubuntu 16.04 LTS, Platform: 64bit, Root partition(/) size: 153.6 GB,  Free space in root partition(/): 140.2 GB, Swap partition size: 6 gb, Any free/Unallocated space in disk: No, Dual Boot/Other OS: Yes, Windows 10, Main objective: To be able to hibernate ubuntu   I tried to hibernate my system but it failed. I read in some articles that I must allocate swap space equal to the size of RAM installed on my system to perform hibernate. I have no space left in my hard disk other than Ubuntu root partition so how can I shrink it and add 2 GB to swap to make it 8 GB.  Will it hibernate then? Is there any other way?


Need antivirus for Ubuntu? antivirus recommendations?

I researched on possible antivirus for Ubuntu.  But I have not found any antivirus for my distro Ubuntu 12.04 LTS 32 - bit .  Really necessary ?  Try installing ClamAV , but always crashes  Any recommendation?


I feel that this sentence has a missing word?

I feel that this sentence has a missing word. Am I right?     Eating a healthy diet may take some getting used to, but it has many benefits for your health.   I think it must be     take some time getting used to


I am unable to install WinUSB in Ubuntu 14.04 using command:  sudo apt-get install winusb  What is the correct way to install WinUSB in Ubuntu 14.04? Or is there any other application available to create Windows bootable USB in Ubuntu 14.04?


Prove that the kernel is a principal ideal

Is the kernel of $\mathbb Z [x]\to \mathbb R, x\mapsto 1/2+\sqrt{2}$ a principal ideal?  I proved that $(4x^2-4x-7)$ is a subset of the kernel. Now I need to prove that everything in the kernel lies in this ideal. If the polynomial that generates the ideal were monic, I would be able to write $$f(x)=(4x^2-4x-7)q(x)+(ax+b)$$ where $f$ is an arbitrary element of the kernel, and then it would follow that $a$ and $b$ must be zero. But what to do in this case when the leading coefficient isn't 1? This exercise is given after the chapter on primitive polynomials and stuff like that, but I don't know what exactly to apply and how. I can go to $\mathbb Q[x]$ and do division with remainder there. But then what?


jquery .on click not detected on dynamically added content

I'm using an ajax call to insert a menu.html inside my index.html, the call for the jquery script menu-script.js which handles the hide\show feature of this nested menu is properly loaded and executed into the index.html(indeed the menu is all closed), however the on.('click', function(){.. etc is not fired when menu items are clicked.  This is the script:  $(function() { $('body').addClass('js'); var menu = $('#menu'),     menulink = $('.menu-link'),     menuTrigger = $('.has-subnav > a');  menulink.on('click', function(e) {     console.log('menulink cliked');     e.preventDefault();     menulink.toggleClass('active');     menu.toggleClass('active'); });  menuTrigger.on('click', function(e) {     console.log('menutrugger cliked');     e.preventDefault();     $(this).toggleClass('active').next('ul').toggleClass('active'); });  $('a[href*=#]:not([href=#])').on('click', function() {     console.log('ahref?');     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {         var target = $(this.hash);         target = target.length ? target : $('[name=' + this.hash.slice(1) +']');         if (target.length) {             $('html,body').animate({ scrollTop: target.offset().top }, 600);             return false;         }     } });   And the menu.html (part of it):

                 Manuale Base

Per iniziare

Razze

Classi

Abilitàs


I need to show that $v_1,...,v_n$ is basis for $V$ whenever $e_1,...,e_n$ is an orthonormal basis for V and $v_1,...,v_n$ are vectors in $V$ such that $$\left\Vert e_i-v_i\right\Vert < \frac{1}{\sqrt{n}}.$$ I know already that I only need to prove that they are lineary independent. Also I tried to prove it by contradiction, but I got stuck fairly fast. Any help, or hint how to prove it (with ot without contradiction) will be appriciated.


Difference between Make Feature Layer (Data Management) and using in_memory workspace?

I was wondering the difference is between  and using an ?   To me, one can use either to do some steps in memory, instead of writing data to a location on disk or a network location, and expedite the process.


How can I remove header from the 2 first pages in document?

I have a long header on my document (WORD 2010) and I want to remove it from the two first pages. But I don't know how to do that.


I have unmounted a partition, yet mkfs.ext4 says it won't run on a partition in use, why is that?

/dev/sda11 is a partition that I'd like install NixOS 18.03 on following . The problem is that /dev/sda11 is unmounted, yet mkfs.ext4 is acting like it is still is mounted. I had it mounted in /fedora-28 (I originally intended to use it for Fedora 28 beta), with /dev, /sys and /proc mounted up (for chrooting purposes), yet for some reason even though I unmounted it with:  sudo umount /fedora-28 -l   running:  sudo mkfs.ext4 -L 'NixOS 18.03' /dev/sda11   returns the error:  /dev/sda11 is apparently in use by the system; will not make a filesystem here!   Here's the kicker, just to prove I hadn't unknowingly mounted it somewhere else I ran:  sudo umount /dev/sda11   and it too confirmed the fact that it was unmounted, with the output:  umount: /dev/sda11: not mounted.   So does anyone know what I should do? Besides the obvious, that is, rebooting? If relevant I am using openSUSE Tumbleweed, although I have had this problem on other distributions.


how to prove that $\lim \limits_{x \to \infty}[f(x+1)-f(x)] = L \implies \lim \limits_{x \to \infty} [f(x)/x] = L$

I don’t know how to formally prove that if $$\lim_{x \to \infty} \left(f(x+1)-f(x)\right) = L,$$ then $$\lim _{x \to \infty} \frac{f(x)}{x} = L$$  where L is a constant and the function is limited whit in a limited domain. I tryed to expand the definition of infinit limit but have no idea where to go on from there or even if that is the best aproach.


For Dragon Age: Inquisition, how do I move my old save files from one system to another?

I am going to buy the game soon, and I am wondering if there is any way I can load the game files that are currently on my older PC? I am thinking about getting Dragon Age: Inquisition on my PS3 as my computers are not strong enough, any more, for such a game.  Is there anyway of getting those saved files from my old PC to my PS3?


Math.Random always setting random number to 0

Creating a program where a random number is generated using math.random which i have put into a function and called this function in the program to make things tidier but the random number that gets outputted is always what the integer secret_number is set to, and i am not sure how to fix this to create a random number. I would like to keep the math.random in the function and use parameters  package guessinggame3; import java.util.Scanner; //imports scanner to read from keyboard import java.util.ArrayList;   public class GuessingGame3 { //start of public class  static Scanner kboard = new Scanner(System.in); //calls scanner    public static void main(String args[]) //start of main  {  System.out.println("Welcome to the guessing game, the computer will  generate a random number that you have to guess, good luck!"); //opening  message explaining how to play   int secret_number = 0; int number_of_guesses = 0; int user_guess ; ArrayList<Integer> entered_numbers = new ArrayList<Integer>();   generate_random_number(secret_number); //calls he function  generate_random_number to say the random number has been generated      for(int i=0; i<20;i++) { // start of for loop sets user attempts to 20   System.out.println("Please make your guess"); //asks user to enter make  their guess              user_guess = kboard.nextInt(); number_of_guesses++; // adds on to the counter after each user guess   if(entered_numbers.contains(user_guess)) //checks if entered number =  number stored in array { System.out.println("You have already entered this number"); //displays  error message if user enters same number again continue; }  else  { entered_numbers.add(user_guess); if (user_guess == secret_number) System.out.println("Your guess is corret you win!"); }  if (user_guess < secret_number) { System.out.println("Guess is too low"); }  if (user_guess > secret_number)  { System.out.println("Your guess is too high"); }   System.out.println (20 - number_of_guesses + " Guesses remaining");  //Tells the user how many guesses they have remaining    } //end of for loop  } //end of main  static void generate_random_number(int secret_number)  //start of function  generate_random_number function passing secret_number as a parameter {        secret_number = (int)(Math.random()*100) + 1; //generates random number  between 0 and 100 System.out.println("The computer has generated it's number"); //lets the  user know that the random number has been generated } //end of function generate_random_number   } //end of public class


I've recently moved to xenial ubuntu. After upgrading, I was no more able to run  sudo apt-get update   The output is the following:  Get:1 http://it.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:2 http://it.archive.ubuntu.com/ubuntu xenial-updates  InRelease              Hit:3 http://it.archive.ubuntu.com/ubuntu xenial-backports InRelease            Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease               Hit:5 http://archive.canonical.com xenial InRelease                             Hit:6 http://repository.spotify.com stable InRelease                            Fetched 247 kB in 0s (307 kB/s)                                                 Reading package lists... Done W: Problem unlinking the file backup - Clean (21: Is a directory)   I've tried googling for this particular problem but with no success. Thank you for your help


What is the effect of changing the Aperture on the quality of the image?


How can I fix Print Composer errors due to huge file size?

I have put together a map using the British OS Strategi data set which is pretty densely detailed. It is surveyed at 1:250,000 and so contains roads down to track level, rivers, villages, railway lines - you name it. There's a lot of data.  When I try and export an image version of the map (at about 1m x 1m), I always get an 'Exception: bad allocation' error. This happens when I try to export as a raster image or PDF. I have tried printing to a PDF generator (CutePDF) but the same thing happens. The print spooler shows the file size at 1.6Gb.  I am running QGIS on a dual core 2ghz Windows 8 system with 4Gb of RAM. Is it just a case of the file being too big? Is there anything I can do? Or is there an alternative, free GIS package that would do a similar job?


java.lang.NullPointerException using Jackson Tree Model

I'm trying to get translation from web dictionary. Here is a piece of Json which I want to parse using JsonNode.  { "result" : "ok", "tuc" : [ { "phrase" : {   "text" : "powitanie",   "language" : "pl" }         and java code:   try {          JsonNode node = translationMapper.readTree(jsonContent);         String result = node.get("result").asText();         System.out.println("result: " + result);         JsonNode tuc = node.get("tuc").get(0);         JsonNode phrase = tuc.get("phrase").get(0);         String textPhrase = phrase.get("text").asText();         System.out.println("translation: " + textPhrase);      }      catch (IOException e) {         e.printStackTrace();     }   output:  result: ok  Exception in thread "main" java.lang.NullPointerException at Requests.main(Requests.java:63)  line 63 is:  String textPhrase = phrase.get("text").asText();


Remove an object from a list - ConcurrentModificationException

I have this code:  public static void main(String[] args) {     User user = new User("user1","user1",1l);     User user1 = new User("user2","user2",2l);     User user2 = new User("user3","user3",3l);      List<User> list = new ArrayList<User>();     list.add(user);     list.add(user1);     list.add(user2);      for(User user3 : list){         System.out.println(user3.getName());         if(user3.getName().equals("user1")){             list.remove(user3);         }     } }   when executing this code , I get the following error:  Exception in thread "main" java.util.ConcurrentModificationException     at java.util.AbstractList$Itr.checkForComodification(Unknown Source)     at java.util.AbstractList$Itr.next(Unknown Source)   How can I avoid it?


Does the set theoretic definition of a function include the information for what the codomain is?

I think I remember reading that a function $f:A\rightarrow B$ is a subset of $A\times B$ such that for each $a\in A$ there is exactly one element of $f$ such that $\{a\}\in F$ (assuming $(a,b) = \{\{a\},\{a,b\}\}$, although I guess this detail isn't important probably). Wouldn't this definition mean that we cannot know what the codomain of the function is?


Area under the graph of a convex function

Consider the following problem:  Suppose that $f$ is a twice differentiable real function such that $f''(x)>0$ for all $x\in[a,b]$. Find all numbers $c\in[a,b]$ at which the area between the graph $y=f(x)$, the tangent to the graph at $(c,f(c))$, and the lines $x=a$, $x=b$, attains its minimum value.  The solution starts with the observation that the condition on $f''$ implies convexity of $f$, i.e. the graph of $f$ is always above any tangent to it, and therefore $$A(c)=\int\limits_a^b (f(x)-f(c)-f'(c)\cdot(x-c))dx,$$ where $A(c)$ is the area the problem refers. I'm really confused with this formula for the area and can't comprehend it even after drawing the picture. Can anybody explain it? Any help is appreciated.


Closed form for sine graphic rotated by 45 degrees?

Is there a non-parametric closed form for a function looking like a sine rotated 45 degrees?  I have encountered also a  but it asks for a function resembling the rotated sine, but not necessarily exact.


What happen with bounty in following case?

I am going to start bounty for a my question. If no one will answer my question, what happens to that bounty?


I am not a native speaker and would like to know the difference between these two:  1. Profile was removed  2. Profile has been removed  Yes I know it is Past Simple vs Present Perfetc. For me, the second one is better because there is a consequence but in some cases also first one is used. Why?


When does it make sense, if ever, to remove the intercept from a logistic regression

I normally work with linear regression, but came across a need to use logistic regression. I started with glm(y ~ x1 + ..., data, family = binomial()). Almost none of my variables were showing large coefs, which is fine.   Just for kicks I ran the same model, but excluded the intercept glm(y ~ x1 + ... - 1, data, family = binomial()). In this model most of the coefs were large and significant.   My problem is that I don't have too much experience with logistic regression and I am afraid of using this model simply because I don't want to mess up the interpretation. So my question is:   What is the interpretation of the exponentiated coefficients of a logistic regression model that has no intercept?


I am new in PHP.  I use two ways to escaping string:  method 1. by using replace  function htmlreplace($str, $useBR = false) {     $str2 = $str;     $str2 = preg_replace ( "/</", "&lt;", $str2 );     $str2 = preg_replace ( "/>/", "&gt;", $str2 );     $str2 = preg_replace ( "/(\r\n|\n|\r)/", $useBR ? "<br />" : " ", $str2 );     $str2 = preg_replace ( "/&/", "&amp;", $str2 );     $str2 = preg_replace ( "/\'/", "&#39;", $str2 );     return preg_replace ( "/\"/", "&#34;", $str2 ); } $string='some string needs to insert into mysql'; stripslashes(htmlreplace($string));   method 2. After connecting to MySQL  function sanitizeString($var, $DBconnection) {     $var = strip_tags ( $var );     $var = htmlentities ( $var );     $var = stripslashes ( $var );     return $DBconnection->real_escape_string ( $var ); } $string='some string needs to insert into mysql'; trim ( sanitizeString ($string) );   From    shows these characters need to escape  NUL,  BS,  TAB,  LF,  CR,  SUB,  %,  ',  \,  _,  all other non-alphanumeric characters with ASCII values less than 256  From   shows addslashes() function will escape these characters: single quote ('), double quote ("), backslash () and NUL (the NULL byte)  As far as I know, escaping is for prevent SQL injection.  So I am curious about how many characters need to be escaped? what are they? Are they all ?  As for SQL injection prevent, thanks to Slico, Marc B, and bub help.  Thanks!


Is it possible to have graph paper as an underlay and then run the usual latex commands?  For instance, instead of having a latex document written on a blank page, is it possible for the page to be graph paper instead?  I'm a tikz novice, but I'm proficient enough to do what I need to do, but grids and tikz and enumerated lists, don't play nicely together. If the paper was graph paper to begin with at least one of my problems would be solved.  I've found partial workarounds, although nothing definitive: one that allows me to have graph paper but only on the first page, and it overlays my title anyway - I use maketitle for that.  Any suggestions?


Ordinary Differential Equations used in Cosmology

I'm just reading over some Cosmology notes and there is a little ODE solve that I am not quite understanding.  I have an equation of the form:  $$ \ddot{R}=-\frac{GM}{R^{2}} $$  Integrating gives:  $$ \dot{R}^{2}=+\frac{2GM}{R}+C $$  The notes are essentially saying that this can be solved with a parameter $\theta$:    Could anyone run through the method for solving ODE's such as this.  In terms of density this can be written as:  $$ \dot{R}^{2}=\frac{4\pi{G}}{3}\rho_{0}R $$


i am facing an error in the windows control button, please see below screenshots, i have changed to other themes but did not work, this is only happening in the terminal, at other places but I have not yet found.


When the rancher spends that 8 hours producing potatoes, she spends 8 hours less producing meat...   Is this usage of less correct, or should fewer be used instead?


proving the inequality $\triangle\leq \frac{1}{4}\sqrt{(a+b+c)\cdot abc}$

If $\triangle$ be the area of $\triangle ABC$ with side lengths $a,b,c$. Then show that $\displaystyle \triangle\leq \frac{1}{4}\sqrt{(a+b+c)\cdot abc}$   and also show that equality hold if $a=b=c$.  $\bf{My\; Try}::$ Here we have to prove $4\triangle\leq \sqrt{(a+b+c)\cdot abc}$  Using the formula $$\triangle = \sqrt{s(s-a)(s-b)(s-c)},$$ where $$2s=(a+b+c)$$  So $$4\triangle = \sqrt{2s(2s-2a)(2s-2b)(2s-2c)}=\sqrt{(a+b+c)\cdot(b+c-a)\cdot(c+a-b)\cdot(a+b-c)}$$  Now using $\bf{A.M\geq G.M}$ for $(b+c-a)\;,(c+a-b)\;,(a+b-c)>0$  $$\displaystyle \frac{(b+c-a)+(c+a-b)+(a+b-c)}{3}\geq \sqrt[3]{(b+c-a)\cdot(c+a-b)\cdot(a+b-c)}$$  So we get $\displaystyle (a+b+c)\geq 3\sqrt[3]{(b+c-a)\cdot(c+a-b)\cdot(a+b-c)}$  But I did not understand how can I prove above inequality  help Required  Thanks


How to find the id of the last added feature using pyQGIS?

Is it possible to programmatically (in python) access the attribute info of the last added feature in QGIS 2.0 before edits are saved? I'm failing to find a way to get the ID and subsequently other attributes of my feature of interest (the one most recently added).  idx = layer.fieldNameIndex('myField') myList = [] lastEdited = ID THAT I'D LIKE TO RETRIEVE for feature in layer.getFeatures():     if feature.id() == lastEdited:         print feature.attributes()[idx]   From this I'd like to get 'myField' of my most recent addition.   UPDATE: Following lead of this , I was able to achieve my goals via the Python console, but am failing to get it to work for my plugin.  def updateTableWidget(self, fid):     idx = layer.fieldNameIndex('myField')     myList = []     for feature in layer.getFeatures():         if feature.id() == fid:             myList.append(feature.attributes()[idx])   Via the python console, I was able to connect to my layer like so:  layer.featureAdded.connect(updateTableWidget)   After adding a QgsMessageLog to my function, the attributes were correctly identified. I now have a beginner python issue, however. Calling the function in my plugin as shown below gives me TypeError: updateTableWidget() takes exactly 2 arguments (1 given):  self.updateTableWidget()   The function was called from feature form python file.


How do you add a PDF attachment to an email?

Goal: I need to send an email with a pdf attachment in Drupal 8.  Progress  I am able to send an email with subject and message but have never been able to get the attachment. When I turn on the logic to attach the file to the email, the email never gets sent but the mail service returns True as if the email was sent anyway. There are no errors and the logs say nothing.   I have the following modules installed:   SMTP MailSystem MimeMail   What I've tried   Tried using $message['params']['files'][] = $params['attachments'] instead of $message['params']['attachments'][] = $params['attachments'] like some examples have recommended Tried changing $file->uri to $file->filepath Tried attaching the file like so:  $params['attachments']['filecontent'] = $this->generatePDF($foa_list); $params['attachments']['filename'] = 'MyFormsOfAssistance.pdf'; $params['attachments']['filemime'] = 'application/pdf';  Tried attaching the file by path alone with an array:  $attachment = array(     'filepath'=>'sites/default/files/MyFormsOfAssistance.pdf', );  $params['attachments'] = $attachment;  Tried attaching the file a different way:  $attachment = array(     'filepath' => 'sites/default/files/MyFormsOfAssistance.pdf',     'filename' => 'MyFormsOfAssistance.pdf',     'filemime' => 'application/pdf' );  $params['attachments'][] = $attachment;    Setup   There is email landing page in which a user enters the recipient's email address, subject for the email, and message for the email.  When user clicks Send button, that data is routed to my Email Controller  Email controller creates the pdf file, attempts to attach the pdf to the email, and then sends the email.  I have the hook_mail() function defined in my module file.    Here is the code for my Email Controller:  public function submit_email($foa_list = null) {     $lang = "en";     $email_to = "blah@blah.com";     $params['subject'] = "Test subject";     $params['body'] = "Test body";      // -------------------- Attachment Logic -----------------------     // Create pdf file and store file     file_put_contents('sites/default/files/MyFormsOfAssistance.pdf', $this->generatePDF($foa_list));       // Attach pdf file to email params     $file = new \stdClass();     $file->uri = 'sites/default/files/MyFormsOfAssistance.pdf';     $file->filename = 'MyFormsOfAssistance.pdf';     $file->filemime = 'application/pdf';     $params['attachments'][] = $file;      // Send email     \Drupal::service('plugin.manager.mail')->mail('email', 'email', $email_to, $lang, $params);      $response = new Response();     $response->setContent("true");      return $response; }   Here is the hook_mail() code in my Email module file:  // Note that print_and_email is what my module is called. function print_and_email_mail($key, &$message, $params) {     switch($key) {         case 'email':             $message['subject'] = $params['subject'];             $message['body'][] = $params['body'];             $message['headers'] = [               'MIME-Version' => '1.0',               'Content-Type' => 'text/html; charset=UTF-8; format=flowed; delsp=yes',               'Content-Transfer-Encoding' => '8Bit',               'X-Mailer' => 'Drupal',             ];             // $message['params']['files'][] = $params['attachments']; // Note: I have seen other examples implement attachments this way             $message['params']['attachments'][] = $params['attachments'];             break;     }  }   The Drupal 8 documentation isn't really helpful and I would like to be able to figure this out without installing SwiftMailer, like some sources have recommended. Really not sure why this isn't working as it has worked for others. What am I missing?


How negative velocity and negative acceleration works?

I understand what negative velocity means, but how does negative velocity and negative acceleration works together. Although it depends on frame of reference, how negative acceleration with negative velocity make it more negative. (I understand the math but want an intuitive explanation.)


In ubuntu 18.04.1 LTS I can't open the bios

I open the computer and select ubuntu to flash it but on any site they tell you to open the bios. I'm searching on all websites to know how to open bios but none of them show it. PLS Help me to fix this.


Challenge question; How do I prove the expected value of the following?

It's a little tricky to me, I am not sure how to proceed...my atempt was to stick strictly to the definitions given and the formula for the (continuous) expected value.  Prove that $E[e^{\mu+\sigma Z}\mathbb{1}_{Z>-d}]=e^{\mu+\frac{\sigma ^2}{2}}\Phi(d+\sigma)$, where $\Phi$ is the standard normal distribution function, $Z  \sim N(0,1)$(i.e. standard normal distribution) and $\mathbb{1}_{Z>-d}$ denotes the following indicator function of an event such that, $$\mathbb{1}_{Z>-d}=1 \text{ when } Z >-d \text{ and, } \mathbb{1}_{Z>-d}=0 \text{  otherwise}$$ during your work, denote the standard normal density function as $\phi$.  I only got up to thinking $e^{\mu+\sigma Z}\mathbb{1}_{Z>-d}$ is essentially just $e^{\mu+\sigma Z}$ if $Z>-d$ for some $d$ and $0$ otherwise. And so, the expected value is defined (for continuous random variables) $E[X]= \int_{-\infty}^{\infty}xf(x)dx$ where $f(x)$ is the probability for each random variable $x$. I thought this would lead me to using $\phi$ and ultimately leading me to $\Phi$ in my final conclusion as in the RHS. But I am not sure about how to proceed, would someone please help me? It would be great if you could explain the steps to me...thank you very much in advance...