I have a machine with dual boot where first OS installed was Windows 10 and after was installed Linux Mint. In BIOS boot options I see Ubuntu and Windows, and when machine boots, appears grub menu. In Grub menu appears: Linux Mint Other advance options Windows 10  My question is: If in Windows 10, from Disk Management, I delete the 3 partitions (boot, root, swap) that belong to Linux Mint would be a problem when I try to boot later in Windows? I ask because I don't know if grub boot loader will be erased and I won't be able to boot in Windows10 anymore neither. Thanks  in advance for any help/suggestion I'm how to remove Linux. Regards

I have two operating systems, ubuntu and backtrack 5. I no longer need BT5. How do I remove/uninstall BT5 without losing any data of Ubuntu ?  Edit 1: After I delete the BT5 partition how do I extend the partition to use the empty space or does it happen automatically ?


Living in France. Traveling to New Zealand via UK. I have valid Schengen Visa and New Zealand Visa do i need a Visa to transit through the airport in Heathrow?

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


I am trying to remove all instances of a pattern match from a file if it matches a pattern. If there is a match, the (complete) line with the matching pattern and the next line get removed.   The next line always appears after the line with the pattern match, but in addition it appears in other areas of the file.  I am using grep and it is deleting all occurrences of the next line in the file, as expected.  Is there a way I can remove that next line if and only if it is after the line with the pattern match?

I use this  cat foo.txt | sed '/bar/d'  to remove lines containing the string bar in the file.  I would like however to remove those lines and the line directly after it. Preferably in sed, awk or other tool that's available in MinGW32.  It's a kind of reverse of what I can get in grep with -A and -B to print matching lines as well as lines before/after the matched line.  Is there any easy way to achieve it?


Here is the hexdump for the beginning of a file I am reading:  00000000  47 52 49 42 00 00 00 02  00 00 00 00 00 00 3d 0e  |GRIB..........=.| 00000010  00 00 00 15 01 00 07 00  00 02 01 01 07 e4 02 12  |................|  I am reading it into the following structs:      struct indicator_section     {       char fourcc[4];       int16_t zeros;       int8_t product_type;       int8_t two;       int64_t msg_len;     };      struct identification_section     {       int32_t twentyone;       unsigned char one;       //int16_t eight;       unsigned char ea;       unsigned char eb;       //int16_t missing;       unsigned char ma;       unsigned char mb;       unsigned char one1;       unsigned char grib2_version;       unsigned char one2;       int16_t year;       int8_t month;       int8_t day;     };   Notice the commented out int16_t declarations.  If I uncomment it, and comment out the next two unsigned char declarations, then it reads one more octet than it should in this code:      fread(&is,sizeof(is),1,fp);     fread(&id,sizeof(id),1,fp);   int16_t should be the same size as two unsigned chars.  Even the compiler thinks so when I check with the sizeof operator.    Here is the compiler info:  (base) $ cc -v Using built-in specs. COLLECT_GCC=cc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)    How is this happening?

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


I've been wanting to play some old games using  (PS2 Emulator) but every time I load the games up, I get massive frame drops. I get around 13 frames in game, but cut scenes I get full frames (30-60).   The games I'm testing are Area 51 and Metal Gear Solid: Sons of Liberty  I've researched and tested a few things but nothing has worked so far. Does anyone know what could cause this?   My specs for my computer are:   AMD Athlon 7850 Dual-Core Processor (2.8 GHz) ATI Radeon HD 4650 4 GB DDR2 RAM

I'm currently trying to play my all time favorite game, Final Fantasy X, on the PCSX2 emulator and I'm constantly running at around 35-40 FPS, about 70-80% of optimal performance.   Does anyone know what sort of settings I should be looking into configuring to optimize game performance?  My specific specs are:   OS: Windows 7 Motherboard: XFX Nforce 680i Sli CPU: Intel Core2 Quad Q6600 Memory: ~4GB RAM DirectX Version: DX11 Graphics Card: ATI Radeon HD 5800


I have this code:  function myFunction(){     alert("Hello"); }   And this other code:  var myFunction = function(){  }   What is the difference?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I'm having this error on my website EntityMalformedException: Missing bundle property on entity of type commerce_line_item. in entity_extract_ids() (line 7866 of /var/www/xxx/xxx/includes/common.inc). and I don't know why it showed up recently.   Any one has encountered this error?

I've got fatal error EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7700 of .\includes\common.inc) when trying to access user/xyz.  I tried to retrieve info about the malformed node at line 7700, where the error message is built, thinks like :  if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {  dpm($info);// or dpm($entity);  throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type))); }   dpm($entity) returns an unexpected user object, and $info a huge qty of things.   Could somebody put me on the right way ?  I already read whatever I could find about Missing bundle property errors, but none helped solving.  dpm($entity) returns  uid (String, 2 characters ) 70 name (String, 9 characters ) John pass (String, 55 characters ) $S$DUwPuOuDPiDL4nRTYXqc7a5uOfMKey7pyhOFUEKka1XM... mail (String, 30 characters ) john@example.com theme (String, 0 characters ) signature (String, 0 characters ) signature_format (String, 13 characters ) filtered_html created (String, 10 characters ) 1396286331 access (String, 10 characters ) 1397146661 login (String, 10 characters ) 1396513460 status (String, 1 characters ) 1 timezone (NULL) language (String, 2 characters ) fr picture (NULL) init (String, 30 characters ) john@example.com data (Array, 5 elements) roles (Array, 1 element) og_user_node (Array, 0 elements) message_subscribe_email (Array, 1 element) field_bio (Array, 0 elements) field_name_first (Array, 1 element) field_name_last (Array, 1 element) field_facebook_url (Array, 0 elements) field_linkedin_url (Array, 0 elements) field_twitter_url (Array, 0 elements) user_trusted_contacts (Array, 1 element) group_group (Array, 1 element) group_access (Array, 1 element) metatags (Array, 0 elements) rdf_mapping (Array, 3 elements) realname (String, 13 characters ) John Doe content (Array, 13 elements) entity_view_prepared (Boolean) TRUE privatemsg_disabled (Boolean) FALSE


I am solving the question  and the logic is very easy. But I found weird behavior when I executed the code. As far as I know in java, if I give any object from main to any method and that method modifies object,then the object from main is modified as it was being referenced. But I am not getting why this is not happening in my code and it is always giving nullpointerexception. Below is my code.`  import java.util.*; import java.lang.*; import java.io.*;   class GFG {      static class Node     {         int val;         Node left,right;         Node(int val)         {             this.val=val;             this.left=null;             this.right=null;         }     }     static int n;     static int[] a;      public static void insert(Node root,int left,int right)     {         int num=right-left+1;         root=new Node(a[left+num/2]);         if(num==1)             return;         insert(root.left,left,left+num/2-1);         insert(root.right,left+num/2+1,right);     }      public static void preorder(Node root)     {         System.out.print(root.val+" ");         if(root.left!=null)             preorder(root.left);         if(root.right!=null)             preorder(root.right);     }      public static void main (String[] args) {          Scanner in=new Scanner(System.in);         int tc=in.nextInt();         while(tc-->0)         {             n=in.nextInt();             a=new int[n];             for(int i=0;i<n;i++)             {                 a[i]=in.nextInt();             }             Node root=null;             insert(root,0,n-1);             preorder(root);         }      } }`

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


I hold both a Bahraini and a British passport. There is a slight difference ( one letter ) n my first name. To travel from Bahrain to the UK can I show the BA check in desk my Bahraini passport. It has no UK visa in it. Is it appropriate to show the British passport? The Advanced passenger information system that is requested by BA where does it go? To the country entered or that exited or both?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Background  We need PCI-DSS compliance, and so must disable TLS1.0.  In my test environment we have SQL Server 2014 SP1 with CU 1 (as per ) and IIS 8 all on the same box.  I used the  to disable TLS1.0 and rebooted.  That's when my troubles began.  SQL Agent won't start, SSMS can't connect to the server, and the website stops working.  (Fortunately, I can still make a Remote Desktop Connection to my test server.)  Then I read  which says basically SQL Server just has to have TLS1.0.  Question  Can I fix this?  (Maybe I need a separate box in test for SQL Server?)

The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption.   We need to move away from these protocols, to use newer and stronger ones. On Windows servers, you can very easily disable these old protocols, and instead offer only TLS1.1 or greater.  However, as noted , Microsoft SQL Server 2008 R2 and SQL Server 2012 (Standard, at least) both will not start if those lower protocols are disabled.  However, there are a growing number of versions of MS SQL Server.  There are SQL Server Standard, Business Intelligence, Enterprise, Express, Web, and Compact editions.  And of course there is SQL Server 2008, 2012, 2014, and (in pre-release) 2016.  Which of these editions support or will support the use of only TLS1.1 or greater protocols?


Let $R[x,\frac{1}{x}]=\{\sum_{k=-m}^m a_kx^k\mid a_k\in R\}$. Let $\varphi:R[u,v]\to R[x,1/x]$ defined by $$\varphi(p(u,v))=p(x,1/x).$$  What is $\ker \varphi$ ? To me, $\varphi(p(u,v))=0\implies p(x,1/x)=0\implies p\in (u-x,v-\frac{1}{x})$ since $u=x$ and $v=\frac{1}{x}$ are solution. but this ideal look strange... (in fact, it's $v-\frac{1}{x}$ that looks strange).

I am having trouble with the following problem.      Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$.    I just want a hint.  Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks


I'm trying to do a code that uses letters for choices, like a quiz. I can't understand how to put letters in the if statement though. This is the code I'm trying to do. if (choice == "A") {     //true } else if (choice == "B") {     //false }  Sorry because I'm quite new to java.

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


This question comes after reading:  Consider the humble one-dimensional random walk process: $$ X_t = X_{t-1} + \epsilon_t $$ Where $\epsilon_t$ is drawn i.i.d. from some distribution with zero mean and finite, constant variance. This process is well known to be non-stationary - the variance is proportional to time.  I have the following questions:  If we consider the regression $X_t = \beta_1X_{t-1}  + \epsilon_t$, and the OLS estimator $\hat{\beta_1}$, which assumption of the Gauss-Markov theorem is violated? I assume it is strict endogeneity $(\mathbb{E}[\epsilon_s | X_1, \cdots, X_T] = 0)$ which is violated, but I am not sure how to prove it. Is the only consequence of this a biased-estimate of $\beta_1$ ? (E.g. do we keep things like consistency?) Is there a reason that such a regression would give us spurious results (Inflated T-statistics and R-Square)? I have of course seen some works metion Granger's work on this, and how the statistics converge to functionals of Brownian motion in the limit. As a follow-up to this, if we consider the cousin of the random walk, the $AR(1)$ process: $$ X_t = \rho X_{t-1} + \epsilon_t $$ with $|\rho| < 1$, then this process is well-behaved (stationary) and in particular, the estimator is consistent.  Does the AR(1) process violate "fewer" OLS assumptions than the random walk as a result of its stationarity? Which assumptions does it keep intact that the random walk does not?  Thank you for all of your help!

Given a random walk $x_t$,   $$x_t=x_{t-1}+\varepsilon_t,$$  consider estimating the slope coefficient $\beta$ in   $$x_t=\beta x_{t-1}+\varepsilon_t$$  by OLS.  question and the following answer noted that $\hat \beta^{OLS}$ has a skewed distribution. My question is,  Are any of OLS assumptions violated in the model $x_t=\beta x_{t-1}+\varepsilon_t$ given that $x_t$ is a random walk? If so, what are the violations?


I'm trying to use unicode-math with amsthm. I'm using the following code:  \documentclass{article}  \usepackage{amsthm} \usepackage[math-style=TeX]{unicode-math}  \newtheorem{question}{Question}  \begin{document}     \begin{question}         My question     \end{question} \end{document}   The output produced looks like this:  ? My question   Any idea how to fix this? Thanks!

This thread evoked from .  \documentclass{article}  \usepackage{unicode-math} % This causes the question mark bug % This code requises unicode-math % How can you use the code without unicode-math -package? \setmathfont[BoldFont={latinmodern-math.otf}]{latinmodern-math.otf} \setmathfont[range=\mathscr,Scale=MatchUppercase]{Asana-Math.otf} \usepackage{tikz} \usetikzlibrary{tikzmark,decorations.pathreplacing,calc} \newcommand\MyText[4][0pt]{% \begin{tikzpicture}[overlay, remember picture] \draw [decoration={brace},decorate,thick]    ( $ ({pic cs:#3}|-{pic cs:#2}) + (#1,1.3ex) $ ) --       node[anchor=west,xshift=5pt,text width=5cm] {#4}    ( $ (pic cs:#3) + (#1,0) $ ); \end{tikzpicture}% }  % I have defined question like this \usepackage[framemethod=tikz]{mdframed} \newtheorem{question}{Question} \mdfdefinestyle{que}{   linecolor=cyan,   backgroundcolor=cyan!20, } \surroundwithmdframed[style=que]{question}  \begin{document} \begin{question} Lorem ipsum? \end{question} \end{document}   I am thinking why you need the  package for the TikZ code.  Why does the TikZ code require unicode-math package?


Will someone please help     <form action="#" class="search-bar">                 <div>                     <button type="submit" name="Submit" id="submit"><img src="/search.png" alt="Search"                             height="35px"></button>                     <input type="text" placeholder="Search" id="search">                  </div>              </form>

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

testing...


Considering the following code:  let mystr = 'abc'; let obj = {mystr: 'bla'}; console.log(obj);   Why does this output  { mystr: 'bla' }   instead of   { 'abc': 'bla' }   ?

I'm pulling items out of the DOM with jQuery and want to set a property on an object using the id of the DOM element.   Example  const obj = {}  jQuery(itemsFromDom).each(function() {   const element = jQuery(this)   const name = element.attr('id')   const value = element.attr('value')    // Here is the problem   obj.name = value })   If itemsFromDom includes an element with an id of "myId", I want obj to have a property named "myId". The above gives me name.  How do I name a property of an object using a variable using JavaScript?


Just posted a question here via iOS app - immediately I get an error that the question can't be found, it has been posted but I can't view - it the screenshot shows the error, with the post title behind it:

When I was trying to open  I just added using the iOS app I received this error:     Error The question could not be loaded   Reproduction scenario:   add a question; in my case it didn't open it directly; it doesn't show up in the list yet; I opened my profile and clicked the question; bang!


I am new to Bash Scripting and would need help to make a simple script that I will run on my CentOS. I would like the script to check if classpath is empty like this:  > [root@hdp ~]# echo $CLASSPATH >  > [root@hdp ~]#   do: export CLASSPATH="something"  else  echo -n "There's already a classpath! Appending!"   If there already is a classpath set, append to the existing one without overwriting to it.

export CLASSPATH=.;../somejar.jar;../mysql-connector-java-5.1.6-bin.jar java -Xmx500m folder.subfolder../dit1/some.xml cd ..   is the above statement for setting the classpath to already existing classpath in linux is correct or not


What is the correct sequence to follow when updating MSSQL Server to a new service pack?  For example, if I have an instance of MSSQL Server 2016 RTM and I wish to update to SP2, do I need to first update to SP1 and and any of the cumulative updates in between or is it only necessary to update to SP2?  If there were cumulative updates available for SP2, would I need to first update to SP2 before running the latest cumulative update or is it only necessary to run the latest cumulative update?

I have given an RTM version of SQL Server 2014 and I need to apply the latest SP (currently SP2) and CU (currently CU8). Do I need to apply SP1 first? Or can I straight move to SQL Server 2014 SP2 CU8 without applying the old Service Pack 1 and the related Cumulative updates?


I saw an explanation of the transistor working  by Bill Beaty. I absolutely loved it. But I'm not entirely sure why the action cannot be achieved by two diodes connected back to back by a metal piece in between. Here's what I'm thinking, Metal wire obviously has large number of charge carriers in it so any electron in base that accidentally enters the metal will cause a small current at the other end of the wire by pushing an electron into the collector region just like it happens in case of transistor. Where did I go wrong? And where does the mechanism fail exactly?

Another form of the question is: will joining two diodes with wires (pn-np) make a transistor-equivalent?  I read that they are not equivalent, but why?


Find the minimum value of $\sqrt{x^2+y^2}$, given $15x+8y=120$.   My attempt:  From $15x+8y=120$, I get $y=\frac{120-15x}{8}$.  I substitute this value into $\sqrt{x^2+y^2}$, getting $\sqrt{\frac{289x^2-3600x+14400}{64}}$.  I am stuck here as $289x^2-3600x+14400$ cannot be square-rooted.

I know this can be easily done by solving for $y$ and substituting, so that you only have to find the minimum value of the parabola $\large x^2 + \left ( \frac {60-5x}{12} \right)^2$ using standard techniques, but is there a less messy way to do this using inequalities? I tried various things such as $AM-GM$, but I don't get anywhere. One thing which I did notice about the restriction is that it is of the form $ax+by=ab$, but I don't know how to make any use of that. Thanks.


Does anyone know how to create a bash script that would SSH to a list of network devices, via IP addresses, and execute a list of commands?  The way I see this working is as follows:   List of IP addresses exist in a text file Commands to be executed exist in a text file Bash script SSH to each IP address and executes commands   NOTE: I have not been able to find a response to this question in the list of other similar questions in this group. I am not a scripter, but would like to be able to be able to create a text file containing the commands that need to be entered on a network device, and then have that file executed on multiple network devices whose IP addresses are located in another text file. It would be great to be able to execute a bash script that allows me to enter a user and pass via SSH, connects to each IP address in the in the referenced text file, executes the command text file, and then echos a success or failure type response in another text file.  It's a bit complicated for me, but I would assume it would be rather straight forward for someone with scripting experience.  I appreciate all of the assistance, and would be willing to pay someone for their time. Just message me.  Thanks,

There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter.


I'm trying to write a special N character in TeX, it looks like this:    I tried using $\mathcal{N}$, it similar but not quite the same.  Could you help me?

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


Let K be a field and a,b $\in \Bbb N$ Show that   $$a\text{ divides } b \text{ in } \Bbb Z \iff t^a-1\text{ divides } t^b-1 \text{ in }  K[t] $$   My attempt at this:  I found a formula (speculation) for the polynomial division. It states as follows  $$(t^b-1):(t^a-1)=\sum_{i=1}^{\frac{b}{a}}t^{b-ia}$$ of course this is only defined as long as $\frac{b}{a}$ is a natural number, which is only the case when a divides b. So (I think) it's sufficient to show that this formula is true.    I try to show this by induction over $\frac{b}{a}$ as follows.  $\frac{b}{a}=1$  $\Rightarrow a = b$, so $(t^a-1):(t^a-1) = 1$ and $\sum_{1}^{1}t^{b-a} = 1$  $\frac{b}{a} \to \frac{b}{a}+1$ We have  $\frac{b}{a}+1=\frac{b+a}{a}$ So  $(t^{b+a}-1):(t^a-1) = 1$ and $\sum_{i=1}^{\frac{b+a}{a}}t^{b-ia+a}$ (we have to prove this equality holds)  $\iff t^b(t^a-1):(t^a-1)=\sum_{i=1}^{\frac{b}{a}}t^{b-ia+a} + 1 $ Now susing the induction hypothesis we get  $\iff t^b\sum_{i=1}^{\frac{b}{a}}t^{b-ia} =\sum_{i=1}^{\frac{b}{a}}t^{b-ia}t^a + 1 $  I am stuck here. Thanks in advance

How to prove $x^a-1\mid x^b-1 \iff a \mid b$, where $x \ge 2$ and $a,b,x \in \Bbb Z$.  I've tried the following in attempting to solve this:  $$a\mid b \Rightarrow aq=b \Rightarrow x^{aq}=x^b \Rightarrow x^ax^q=x^b$$  Because $x^q \in \Bbb Z$, it follows that $x^a\mid x^b$.  This is as far as I have gotten; any help getting further is appreciated.  Note: It may be that this identity is not true at all?


Can I get gimp manual instruction offline?

Ubuntu 12.04 comes with Gimp 2.6, so I installed Gimp 2.8 using the instructions below:   sudo apt-get purge gimp*   sudo add-apt-repository ppa:otto-kesselgulasch/gimp   sudo apt-get update   sudo apt-get install gimp    When try to open help, I get the message below. How do I install and configure the help for 2.8 on Ubuntu?


I want a regular expression for mobile number validation. I have tried below regular expression. If I enter 1 1 1 1 1 1 it will not be accepted. Will you please help to to find what is my mistake in regular expression.   Regular expression is: "^\s*+?\s*([0-9][\s-]*){6,}$"

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Let (X,$\tau$) and (Y,$\tau_1$) be topological spaces and f : (X,$\tau$)$\rightarrow$(Y,$\tau_1$) a continuous   map. If f is one-to-one, prove that (Y,$\tau_1$) is Hausdorff implies that (X,$\tau$) is Hausdorff.   I already proved that T1 is preserved by continuous map, but I don't know how to do with T2. Please give me some idea.

$(X, \mathscr T_X)$ and $(Y, \mathscr T_Y)$ be 2 topological spaces. $Y$ be Hausdorff.  $f$ be a continuous function, $f: X \to Y$. To show that if $f$ is injective $\implies$ $X$ is Hausdorff.  Here's how I tried: Let $f(x_1)$ and $f(x_2)$ be two elements of Y. Since $Y$ is Hausdorff we can find 2 disjoint neighborhoods around $f(x_1)$ and $f(x_2)$. Let it be $U, V$ respectively.  Since $f$ is continuous there exists an open neighborhood around $x_1$ and $x_2$ in X (let it be $E(x_1)$ and $ F(x_2)$) such that $f(E) \subset U$ and $f(F) \subset V$.  After this how to use injectivity property to prove that E is disjoint with F??


I'm running a  server off of a Raspbian (Debian) machine, and I'd like to start and stop the server remotely. This for me means using  to access the shell, except when I close out of the PuTTY terminal or it times out, my server goes down with it, because I just execute my server in the foreground.  Is there a way to keep it going, but still have a way to kill the process afterwards?

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and later, after dinner, I want to check on the process that I started before leaving work. How can I do that with SSH? My understanding is that if you break your SSH connection you will also break your login session on the server, therefore killing the long running process.


I do not mean deep comparison. I just want to know if two variables refer to the same instance. Should I use a==b or a===b? Can two variables point to the same memory but with different types? Because javascript has no such concept as class in C++, I do not know what an object's type is. Do all objects have the same type: "object" so === decides their types are equal? If so, === would be the same as ==.

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I'm totally new to LaTeX and similar programs. I'm actually trying to get started with LyX as I want something easy to use and basic.  I'm trying to download the MacTeX 'distribution' (I think that's the name for it), but it requires 4.33GB! This seems very large. Is this the correct size for the distribution, or can I find something smaller elsewhere?

I would like to know how to install LaTeX on Mac 10.6 or higher.  But the MacTeX is some 1.28 GB file! Is there a smaller distribution I could install?  What exactly is TeX Live?


After some tutorials this is my first own object in blender -a race track for unity. The main object should be white, but the road itself should be red, without creating 2 objects. So I marked all the road-faces and assigned them to a new Material. But somehow the white color shines through depending on the camera angle.. even if I remove the white material, the grey default color also shines through. If I separate the road to an own object, it works fine -but I don't think that this should be the solution :/  (Object Mode)   (Edit Mode)   (Face Orientation)   (Unity)

For instance, here I have two cubes that are offset only on the x-axis. When I render them (using Blender's internal renderer), the overlapping faces interfere with each other and the result looks awful. A quick and easy solution would be to offset them by just a smidget, but is there another solution that allows faces to overlap and not exhibit this graphical glitch?


We're trying to track down a performance issue in our PostgreSQL database. We suspect of some under-performing queries, but which? Is it possible to find the most popular queries being executed on the database? What about their performance, how long they're taking? It's PostgreSQL 11, hosted in Google Cloud's CloudSQL.

I would like to gather statistics on the highest run queries in my database.   For that I need to know how I can track queries so I can create views or materialized views to cache the results of the highest run queries since I have a big DB.


I flashed a new USB with ubuntu osi file, that went okay. When I restart and hold down option key, nothing happens...it won't boot from usb I have a new MacBook Pro with M1

I am looking for a detailed instructions to install Ubuntu on a Mac with the new ARM based M1 processor, in particular the Mac Mini.


An ant has to walk from the left most lower corner to top most upper corner of $4 \times 4$ square.  However, it can take a right step or an upward step, but not necessarily in order. Calculate the number of paths.

Imagine a two-dimensional grid consisting of 20 points along the x-axis and 10 points along the y-axis. Suppose the origin (0,0) is in the bottom-left corner and the point (20,10) is the top-right corner. A path on the grid consists of a series of moves in which each move is either one unit to the right or one unit up. Diagonal moves are not allowed. How many diﬀerent ways are there to construct a path starting at (0,0) and ending at (20,10)?  I'm a little stuck on this one. I feel I'm headed towards the right direction, but I'm not sure if I'm doing this right. For every move, there are 2 possible choices. If we want to get to (20,10), then there are 200 points from the origin to this point. And I think order matters here, so we would use permutations, so I come up with 200 P 2, which is 39,800.


I am trying to write and I have no idea how to I am a beginner and I'm not advanced THANK YOU. I tried using the terminal and entering the codes people suggested!

Possible Duplicate:          I have ubuntu installed on my mac with VirutalBox. Firefox is installed and I want to clear the cache of Firefox. I don't find any menu bar, how can I do that ?


I have a connected app, which authenticates with Salesforce using REST API via OAuth. How can I convert a Lead to an Account/Opportunity etc? There was some previous solution mentioning Apex, but this is a connected app, and I need a way I can perform this conversion for other organizations (our customers) without having to perform any custom action on their part (other than the OAuth step).  Thanks!

Am a bit new to Salesforce, integrating with our existing systems which uses Python, so I'm making use of the . It's working great, except I cannot figure out how you convert a Lead to a Contact/Account via the API. Is there some endpoint to do this?


what does the -y mean in linux. this symbol is always used after a command for example dnf -y install httpd.  Everywhere I have looked I cannot find a definite answer. Please help

I've been googling and reading tutorials, but while the authors go into detail with all the things you can do with yum, no one ever mentions what the -y flag is for. I'm trying to automate this with Chef, so I needed to know what the -y does so I can determine whether to include it in my Chef recipe.


I have some questions about  (like  and ). So which Stack Exchange site is preferred to ask about these things?

I have a question about Microsoft Certifications. What is the best Stack Exchange site to ask that question on?  The question was about MCTS, whether it is an accumulation of tests (like MCSD) or if each test is stand alone.


I know how the code work. But does not know Why? What are the differences between pointers? struct List{    int val;    List *next; } /// where is the different between fun1 and fun2 receiving the List void fun1(List **head){} void fun2(List *head){} int main(){     List *head;      /// where is the different between fun1 and fun2 passing the List     fun1(&head);     fun2(head); }

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


There is a theorem in page 100 of , which says that:     If $\cfrac{dx}{dt} = f(x) = Ax + R_2(x)$, where $A = \cfrac{\partial f}{\partial x}|_{x = 0}$,  $R_2(x) = O(x^2)$, and $\cfrac{dy}{dt} = Ay$, $y(0) = x(0)$, then for any $\vphantom{\cfrac12} T>0$ and for any $\xi > 0$ there exists $\delta > 0$ such that if $|x(0)| < \delta$, then $\vphantom{\cfrac12}|x(t) - y(t)| < \xi \delta$ for all $t$ in the interval $0 < t  < T$.   How can I prove this theorem rigorously?    Cross-posted at math.se .

There is a theorem in page 100 of , which says that:     If $\cfrac{dx}{dt} = f(x) = Ax + R_2(x)$, where $A = \cfrac{\partial f}{\partial x}|_{x = 0}$,  $R_2(x) = O(x^2)$, and $\cfrac{dy}{dt} = Ay$, $y(0) = x(0)$, then for any $\vphantom{\cfrac12} T>0$ and for any $\xi > 0$ there exists $\delta > 0$ such that if $|x(0)| < \delta$, then $\vphantom{\cfrac12}|x(t) - y(t)| < \xi \delta$ for all $t$ in the interval $0 < t  < T$.   How can I prove this theorem rigorously?    Cross-posted at physics.se .


Some days ago I was searching on the net and I found an interesting article about python dictionaries. It was about using the keys in the dictionary to call a function. In that article the author has defined some functions, and then a dictionary with key exactly same as the function name. Then he could get an input parameter from user and call the same method (something like implementing case break) After that I realised about the same thing but somehow different. I want to know how I can implement this. If I have a function:  def fullName( name = "noName", family = "noFamily" ):     return name += family   And now if I have a string like this:  myString = "fullName( name = 'Joe', family = 'Brand' )"   Is there a way to execute this query and get a result: JoeBrand For example something I remember is that we might give a string to exec() statement and it does it for us. But I’m not sure about this special case, and also I do not know the efficient way in Python. And also I will be so grateful to help me how to handle that functions return value, for example in my case how can I print the full name returned by that function?

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


( it's not duplicate , its related to rDNS , please don't flag it as duplicate or give me the link of related one )  i have a problem, my emails from my mydomain.com straightly goes to spam folder in gmail, other service providers are okay.  i have setup DKIM , SPF and DMARC and test them with verifier.port25.com and the result are:  SPF check:          pass DomainKeys check:   neutral DKIM check:         pass Sender-ID check:    pass SpamAssassin check: ham  i send my emails from WordPress that using (PHPmailer function), I'm suspicious that my rDNS config is wrong, my current value of rDNS is xx.544654-5454.eu and gmail says that the xx.544654-5454.eu not encrypt your message , should i change my rDNS to mydomain.com ?

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


I noticed that $$\frac{d^{n}}{dx^{n}} f(x)g(x)=\sum_{i=0}^n {n \choose i} f^{(i)}(x)g^{(n-i)}(x)$$ and it's had me scratching for a little bit. It's easy to see how the cross terms add up but can anyone draw a direct comparison between the behavior being exhibited here and the binomial expansion? It seems to work for the case equivalent to the multinomial theorem as well ($\frac{d^{m}}{dx^{m}} \prod_{k=1}^{n} f_k(x)$). Can someone produce a proof for this more general case (preferably by induction)? Any and all insights are welcome!

The binomial expansion:  $$(x+y)^{n} = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k}$$  The General Leibniz rule (used as a generalization of the product rule for derivatives):  $$(fg)^{(n)} = \sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}$$  Both formulas can be obtained simply by induction; Newton's binomial also has a combinatorial proof . It's striking how these formulas are similar; is there a possible connection between them? I was thinking that maybe the General Leibniz rule could be obtained using a combinatorial argument as well (hence the binomial coefficients)...


I know that the two poles of a battery connected in a closed circuit would act as a voltage source. This is because the +ve terminal is at a higher potential compared to the -ve terminal. This is what drives the current through the circuit.  But for a current source, how does it work. Doesn't the -ve terminal acts like a current source?

What I understood from the definition of current sources is that it is a source which supplies a constant current across a load no matter how the other parameters (like resistances for example) in the circuit are changed. Am I right?  If I'm right, what is an example of a current source used in a practical circuit?   Wikipedia gave the example of a  as a constant current source. (I didn't read the article, because there was a note that the section appeared to contradict itself. I didn't want to get confused.)  I can think of voltage sources - for example a battery which has a constant potential difference across its ends irrespective of the changes in the circuit it is connected to, but I cannot think of a current source. Any example I can think of involves change in the current when the resistances are changed.


Motivated by ,  I'm trying to establish a logical proof to the fact that the following statement is false:     $2x+1$ is prime if and only if $x$ is prime.    There are several ways to prove it of course, but I'm trying to understand where have I gone wrong with the following logical proof, so any help pointing out the error would be highly appreciated.    Let $\mathbb{P}$ denote the set of prime numbers.  We need to prove the logical statement:  $\neg({2x+1}\in\mathbb{P}\iff{x}\in\mathbb{P})$  Or the equivalent logical statement:  $\neg[({2x+1}\in\mathbb{P}\implies{x}\in\mathbb{P})\wedge({x}\in\mathbb{P}\implies{2x+1}\in\mathbb{P})]$  Or the equivalent logical statement:  $\neg({2x+1}\in\mathbb{P}\implies{x}\in\mathbb{P})\vee\neg({x}\in\mathbb{P}\implies{2x+1}\in\mathbb{P})$  Or the equivalent logical statement:  $\neg[({2x+1}\not\in\mathbb{P})\vee({x}\in\mathbb{P})]\vee\neg[({x}\not\in\mathbb{P})\vee({2x+1}\in\mathbb{P})]$  Or the equivalent logical statement:  $[({2x+1}\in\mathbb{P})\wedge({x}\not\in\mathbb{P})]\vee[({x}\in\mathbb{P})\wedge({2x+1}\not\in\mathbb{P})]$    That last statement is obviously false, for example, with $x=2$.  But this very example yields false statements "all the way up that proof".  So I'm thinking that my initial interpretation of $\neg({A}\iff{B})$ is incorrect somehow.

$f(x)=2x+1$ produces a prime number if and only if x is prime, how can we prove this false?  I know this isn't very math-proofy, but can't we just plug in a number we know that is prime, i.e. $x=7$, and observe $f(7)=15$, which is not prime?  I'm intersting in writing a math proof for this, but I'm not exactly sure if my "proof" is good enough/proper.  How should I do this?


I am a USA female citizen. I travelled as a tourist to Singapore several times, never overstayed, but I did usually stay nearly the maximum 90 days. I have OCD and wash everything. One time I got rejected when I tried to enter Singapore with a damp passport because I was told it was not in good condition. I know that sounds stupid to present a damp passport but it gets worse ... also I got quite upset because I was being deported all the way back to USA and I did not want to go back. It was a business class ticket on Singapore airlines and the airline was responsible to pay for my return so they did not like that and subsequently banned me.    I did get accepted back into Singapore as a tourist a year or so later, but had a few weird problems like getting caught for taking a shower at a resort swimming pool facility where I did not stay. I had to leave Singapore in an odd way, with my passport held at the airport.    I had to collect it with a special letter on the day of my flight. I tried to go back again to Singapore about a year after with a good quality passport but was refused for "secret reasons".  The officer did mention to not try again for at least 6 months.  I love Singapore because it is tropical and clean. I am not a criminal but my odd OCD behavior seems to have caused a problem with visiting.  I spend a lot of time in Thailand by the way and of course immigration there is different. Any suggestions how I can get another chance with Singapore?  I think I have learned my lesson about how to behave there and hope it is not too late.

My friend who is an Indonesian citizen tried to enter Singapore this week and was refused entry at the Singapore Harbour Front Ferry Terminal by immigration.  This was his first trip overseas and is not used to international travel, so due to his inexperience and that he was excited to go to Singapore, he possibly made some mistakes on trying to be granted access into Singapore.   He was told he was to enter a Singapore address for his stay or a friend or relative he will stay with. He was only staying for one day and was going to catch the ferry back at night, so he had no plan to stay in Singapore and as such had no address to put. They then asked why he was traveling alone and that he should travel with somebody for his first trip. He told them he always travels alone in Indonesia and finds it easier to see and do things alone. He was then asked why he was entering Singapore and the reason he gave was to purchase some electronics which he cannot buy in Indonesia. They asked for how much money he had and they then advised that he did not have enough money to purchase the items he was after. They refused his entry and he was then escorted to a ferry and returned to Indonesia. His passport was not stamped and he was not fingerprinted.   He was given a Notice of Refusal of Entry which had the reason as "Being ineligible for the issue of a pass under current immigration policies" form on his departure. Also included on this form is his passport number etc. He was not advised of him being banned or a time frame that he cannot enter Singapore.  My questions are: Has he been banned or restricted to enter Singapore for a period of time? When entering countries including Singapore, does he need to tick the box stating he has been refused entry into another country? I am hoping to get my friend to Australia at the end of the year for a 10 day holiday and will this hinder his chance of getting a visa and entering Australia?


I have a date like 04-01-1965, and I want to change it to words like: Fourth January Nineteen Sixty Five   How can I do it in Laravel?

In PHP, is there an easy way to convert a number to a word? For instance, 27 to twenty-seven.


Using differentiation under integral sign evaluate $\int_{0}^{\frac {\pi}{2}} \ln (\frac {a+b\sin x}{a-b\sin x}) \cdot \frac {dx}{\sin x} $  My Attempt: Given $$\int_{0}^{\frac {\pi}{2}} \ln (\frac {a+b\sin x}{a-b\sin x}) \cdot \frac {dx}{\sin x}$$ Let, $$F(a)=\int_{0}^{\frac {\pi}{2}} \ln (\frac {a+b\sin x}{a-b\sin x}) \cdot \frac {dx}{\sin x}$$ Differentiating both sides w.r.t $a$ $$\frac {dF(a)}{da}=\int_{0}^{\frac {\pi}{2}} \frac {a-b\sin x}{a+b\sin x} \times \frac {(a-b\sin x)-(a+b\sin x)}{(a-b\sin x)^2} \times \frac {dx}{\sin x}$$ $$\frac {dF(a)}{da} = \int_{0}^{\frac {\pi}{2}} \frac {-2b\sin x}{a+b\sin x} \times \frac {dx}{\sin x}$$ $$\frac {dF(a)}{da} = -2b \int_{0}^{\frac {\pi}{2}} \frac {dx}{a+b\cdot \frac {2\tan (\frac {x}{2})}{1+\tan^2 (\frac {x}{2})}}$$ $$\frac {dF(a)}{da} = -\frac {2b}{a} \int_{0}^{\frac {\pi}{2}} \frac {\sec^2 (\frac {x}{2})}{\tan^2 (\frac {x}{2}) + \frac {2b}{a} \tan (\frac {x}{2})+1} dx$$ $$\textrm {put} \tan (\frac {x}{2}) = t$$ $$\textrm {so}, \sec^2 (\frac {x}{2}) dx = 2dt$$ $$\textrm {Also, the limit of integration becomes 0 t0 1}$$ Now, $$\frac {dF(a)}{da} = -\frac {4b}{a} \int_{0}^{1} \frac {dt}{t^2 + \frac {2b}{a} t +1 } $$ $$\frac {dF(a)}{da} = -\frac {4b}{a} \times \frac {a}{\sqrt {a^2 - b^2}} [\tan^{-1} \frac {1+\frac {b}{a}}{\sqrt {\frac {a^2 -b^2}{a^2}}} - \tan^{-1} \frac {\frac {b}{a}}{\sqrt {\frac {a^2 - b^2}{a^2}}}]$$ How do I evaluate further?

Question: Evaluate the following definite integral:   $$ I= \int_{0}^{\pi/2} \ln\left(1 + a\cos\left(x\right) \over 1 - a\cos\left(x\right)\right)\, {{\rm d}x \over \cos\left(x\right)}\qquad \mbox{where}\qquad\left\vert\,a\,\right\vert < 1 $$   This is left as an exercise in my textbook. The book says that I should use the method of "differentiating parameters" by using the provided Leibniz Formula (?):     Prerequisite: Function $f(x,y)$ and its partial derivative $f_x(x,y)$ are both continuous on region $R=[a,b]\times[c,d]$. Function $\alpha(x)$ and $\beta(x)$ are both differentiable on intervl $[a,b]$ while   $$ c \le \alpha(x) \le d,\quad c \le \beta(x) \le d \quad (a\le x\le b),$$      Conclusion: The Function $\displaystyle\Phi(x)=\int_{\alpha(x)}^{\beta(x)} f(x,y) \,\mathrm d y$ is differentiable on interval $[a,b]$, and   $$\begin{align}   \Phi^\prime(x) &= \frac{\mathrm d}{\mathrm d x} \int_{\alpha(x)}^{\beta(x)} f(x,y) \,\mathrm d y \\    &= \int_{\alpha(x)}^{\beta(x)} f_x(x,y) \,\mathrm d y + f\left[x,\beta(x)\right]\beta^\prime(x)-f\left[x,\alpha(x)\right]\alpha^\prime(x).   \end{align}$$   First, I'd like to ask: What is the correct name of this theorem?  Next, here's my (failed?) attempts at solving the question.  Following one of the textbook examples on the same topic, I tried:  $$ \begin{align} I&=\int_0^\frac{\pi}{2} \left[\ln(1+y)\right]_{-a \cos x}^{a \cos x} \frac{\mathrm d x}{\cos x} \\ \\ &= \int_0^\frac{\pi}{2} \int_{-a \cos x}^{a \cos x} \frac{\mathrm d y}{1+y} \frac{\mathrm d x}{\cos x}. \\ &=\int_{-a}^{a} \frac{1}{1+y} \int_{0}^{\arccos\left|y/a\right|}\,\mathrm d x \mathrm d y \\ &=\int_{-a}^{a} \left.\left[\ln\left|\tan x + \sec x\right|\right]\right|_0^{\arccos(y/a)} \end{align} $$  And I don't know what to do next.  Also I tried to substitute $u=a \cos x$ but I don't know how to proceed.  Please help me with this (non-homework) problem by giving hints or solution, It's been a week since I first tried this problem. Thanks for helping!  P.S.: My MathJax doesn't render (or it may need hours of time), and I don't get preview for writing questions/answers. I'm relying on LaTeX now. How can I fix this problem? It used to work. I'm using IE 9.


I am new to javascript and regular expressions.So sorry if this question looks silly.  I want to use negative lookahead to find last matched word in a string. Pattern is dynamic i.e. it may change.  Ex Find "foo" in "this foo is not same foo" here regex should return index of last "foo". To find it I used foo(?!.*foo) negative lookahead. But I need to keep "foo" in variable so that i can find other pattern also.   I am trying to use RegExp() constructor to use variables but unable to find ways in which i can use negative lookahead syntax.So is there any way to use negative lookahead in RegExp constructor ? If yes, what is it ?

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


I'm trying to find some shapefiles (administrative boundaries) of New Zealand CITIES and SUBURBS/NEIGHBOURHOODS.  I've found some boundaries for the Country, Regions, Districts (not useful for me) .. but not cities and suburbs.   Can anyone lead me in the right direction, please?

Besides Zillow's creative-commons licensed  shapefiles, what sources of neighborhood boundaries are there? Not just in the US, but all over the world.  Free/open source is ideal, but paid sources could be interesting too.


Understandably, there is a clear-cut difference between liquids and gasses. Gasses being more compressible, liquids less so. If you bring a volume of air sealed in a container from sea level to 10k feet (3048m), when you open the container, the relative volume around the container has decreased considerably and upon opening the container, it lets out a discernible sound. Clearly, there is a volume difference as less pressure allows the air/gasses to expand. What if you were to bring up, say, 100ml of water from a depth of 11,000m, would it be the same volume if you brought that same sealed sample to sea level and opened the seal? Knowing that you can't pressurize liquids as you can gasses, I'm simply curious: how much would a liquid expand if brought up from the deepest part of the ocean?

Our class is learning about hydrostatic water pressure and we have been told that we can calculate the force of the liquid on an object at any depth using "the density x 9.8 x the depth". However, as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it? So should't there be something in the equation to account for the varying density? To me, "density x 9.8 x depth" seems like it is saying that the density will be constant...


$$\text{If} \ S=\displaystyle\sum_{n=1}^{\infty}\dfrac{\sin (n)}{n}, \ \text{then what is} \ 2S+1$$   I know that $\sum \frac{\sin(n)}{n}$ converges. But now what do I do?

Here is an exercise, on analysis which i am stuck.    How do I prove that if $F_{n}(x)=\sum\limits_{k=1}^{n} \frac{\sin{kx}}{k}$, then the sequence $\{F_{n}(x)\}$ is boundedly convergent on $\mathbb{R}$?


So I'm running a fresh install of Win8 on a 60gb SSD with a another 300HDD for storage. I have set a 20gb space for the installation of Ubuntu alongside Win. The issue is when I run the DVD with Ubuntu for installation it shows that there is no other OS even though I just restarted from windows desktop... I don't have secure boot and my fast start up is turned off. Mobo is a Sabertooth 990FX R2.0

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


My brand new ASUS computer does not seem to find a driver to make MEDIATEK MT7630e work? I've tried .  The driver then worked but the computer did not shut down anymore.  It seems to be a well-know problem that has not been fixed. Really? Never had a single unsolved problem with Ubuntu before.    *-network                       description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:02:00.0        logical name: eth1        version: 10        serial: 1c:b7:2c:8e:e3:11        size: 100Mbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-3_0.0.1 04/23/13 ip=192.168.1.107 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:47 ioport:e000(size=256) memory:f7104000-f7104fff memory:f7100000-f7103fff   *-network UNCLAIMED        description: Network controller        product: MT7630e 802.11bgn Wireless Network Adapter        vendor: MEDIATEK Corp.        physical id: 0        bus info: pci@0000:03:00.0        version: 00        width: 32 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:f7000000-f70fffff    00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09) 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:04.0 Signal processing controller: Intel Corporation Broadwell-U Camarillo Device (rev 09) 00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03) 00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3) 00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3) 00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3) 00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) 00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03) 00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter  0: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: asus-bluetooth: Bluetooth     Soft blocked: yes     Hard blocked: no

I'm new to Ubuntu. I installed it today, but the first thing I encounter is that I can only connect to the Internet through wifi.  Can someone help me?   iwconfig result :  eth0      no wireless extensions.  lo        no wireless extensions.   lspci:  00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM     Controller (rev 09) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4) 00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) 00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4) 00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04) 01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (rev a1) 03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter 04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01) 04:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0a)   lspci -nnk | grep 0280 -A2:  03:00.0 Network controller [0280]: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter [14c3:7630]     Subsystem: Foxconn International, Inc. Device [105b:e074] 04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device [10ec:5289] (rev 01)


I currently try to create a tikzpicture with multiple scopes. The scopes should be positioned relative to each other, so I use "local bounding box=..." for each scope to access their sizes.  My Problem: The corner positions of the bounding boxes are not known before drawing and not necessarily at (0,0), because my final content cannot be drawn by starting at a corner. (I have to start somewhere in the center of the scopes final bounding box.)  So my main question is: How to shift a scopes local bounding box so that its bottom left corner is positioned at (0,0), not knowing the bounding box corners before drawing its content?  Because then I can easily position the scopes/bounding boxes relative to each other.  \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning}  \newcommand{\A}{   \begin{scope}[local bounding box=A]     \node[blue] at (0, 0) {A};   \end{scope} } \newcommand{\B}{   \begin{scope}[local bounding box=B]     \node[red] at (-1, 0) {B};   \end{scope} } \begin{document}  % Problem: Bounding box B should be positioned as if its bottom left corner starts at (0, 0). The bounding box B is not known before drawing, so the solution below does not work in general. \begin{tikzpicture}     \A     \begin{scope}[shift={(A.east)}]         \B     \end{scope} \end{tikzpicture}  % Desired Result: (With shift=(1, 0) just to demonstrate the desired result.) \begin{tikzpicture}     \A     \begin{scope}[shift={(A.east)}, shift={(1, 0)}]         \B     \end{scope} \end{tikzpicture}  \end{document}   Resulting tikzpicture:  Left (B A): problem; Right (AB): desired result

Is it possible to anchor a TiKZ-pic on an internal anchor?  I know (more or less) how to use TiKZ pics and know that they are draw arround their origin. What I would like to be sure is that it's not possible to use another internal coordinate as origin.  As an example consider next code.   \tikzset{     mytest/.pic = {          \node  (-A) at (0,0) {A};          \node  (-B) at (0,1) {B};              \node[fit=(-A) (-B),draw] (-C) {};     } }   It defines a pic with three nodes: A, B and C being A.center the pic origin. A command like  \draw pic (T) at (2,1) {mytest};   draws the pic with A.center at (2,1).   Now, I would like to draw this pic but selecting B.center (or any other internal anchor like C.120) as anchoring (pic-origin) point. Is it possible?  In case you needed, there is some complete code:  \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{fit}  \tikzset{     mytest/.pic = {          \node  (-A) at (0,0) {A};          \node  (-B) at (0,1) {B};              \node[fit=(-A) (-B),draw] (-C) {};     } }  \begin{document} \begin{tikzpicture}  \draw[blue!20] (0,0) grid (3,3);  \draw pic (S) at (0,0) {mytest};  \draw pic (T) at (2,1) {mytest};  \draw (S-A.north) to [out=90,in=-90] (T-B.south);  \end{tikzpicture} \end{document}   Question updates:   I would like a general solution. For this particular case I know that node B.center is 1cm above A.center and it's easy to shift the whole picture, but it's more difficult to shitf it if the origin must be at C.120 or C.100-|B.35. Consider also some pic with variable size nodes. The example is just an example. I'm not trying to solve a particular problem. The question is more ... conceptual(?).  The answer could be no, it's not possible. But, please, with some explanation as I always ask to my students ;-)


I have this weird error on my Kubernetes test cluster. I'm running Kubernetes 1.7.0 and docker Docker version 1.12.6, build 78d1802  I have a separate volume mounted as /dockerdata and symlinked /var/lib/docker into this volume. I have ample space available on both my system volume and the dockerdata volume (more than 50% free). I still get ImagePullBackOff errors from kubernetes, the detailed error is:  Failed to pull image "<redacted>": rpc error: code = 2 desc = failed to register layer: ApplyLayer exit status 1 stdout:  stderr: open /usr/share/man/es/man1/fakeroot-sysv.1.gz: no space left on device.  If I manually clean up by removing stale images I can get around this, but as far as I can see I shouldn't have to - since none of my volumes are nearing full capacity (which I guess is also why the Kubernetes GC doesn't kick in).  I'm guessing there's something I don't understand about how Docker works in relation to local disks but I'm stumped. Any pointers appreciated.  Here's some more info: symlink info:   file /var/lib/docker /var/lib/docker: symbolic link to /dockerdata    df Filesystem     1K-blocks     Used Available Use% Mounted on udev             2014736        0   2014736   0% /dev tmpfs             404520    44628    359892  12% /run /dev/xvda1      20263528  4121240  16125904  21% / tmpfs            2022600        0   2022600   0% /dev/shm tmpfs               5120        0      5120   0% /run/lock tmpfs            2022600        0   2022600   0% /sys/fs/cgroup /dev/xvdb       51475068 18385324  30451920  38% /dockerdata tmpfs             404520        0    404520   0% /run/user/1000    lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.2 LTS Release:    16.04 Codename:   xenial

I'm running an Ubuntu 12.04.1 server in a VMware virtualized environment that has a strange issue. Twice now, at seemingly random times, the machine has suddenly been unable to write to the root partition despite plenty of space seemingly available. I'm at a loss trying to figure out what's wrong.  "df -h" shows all mounted volumes with 40% or more free space. Both times this has happened, rebooting resolved it for a few minutes, and then it was back to saying "no space left on device." Restoring it from a snapshot seems to fix it for longer, but since this has now happened again, I'm not sure what to do with it.  If it helps, the machine is a network print server running CUPS 1.5.3 and Samba 3.6.3.


If a sentence is starting with both an introductory element and a participial clause, where do I need to set the comma(s) appropriately?  Consider the following versions of an example sentence:     (A): Finally, having explained the consequences, we recommend bringing the car to the dealer's garage.   (B): Finally having explained the consequences, we recommend bringing the car to the dealer's garage.   I do know that for short introductory elements (such as "Finally") the comma is not mandatory, but I am unsure if in the given example sentence it is at all possible. Personally, I prefer version A; however, this preference is driven by my gut feeling rather than by a specific formal rule.  So, maybe someone knows? I appreciate any help!

Should you always type a comma after "therefore","however" etc. in the beginning of a sentence? Also, when these (and similar) words are used in the middle of a sentence, should there be a comma or semi-colon before and after the word?  Therefore, he must be killed! That man is revolting, however, some find him attractive.  Sorry for the lousy examples. I couldn't think of any better.


If $G$ is a cyclic group that is generated by $g\in G$ so that $G= <g>$, how would I show that for any subgroup $H \subseteq G$ then $H$ must be cyclic?   I've already attempted to start this proof:  Let $G$ be a cyclic group and $H$ any subgroup of $G$. I claim that for some $m \in \mathbb{Z}$ we have $H=<g^m>$.  Case 1: If $H=\left \{ 1 \right \}$ then $H=<g^0>$ and so H is cyclic.  Case 2: If $H=G$ then $H=G=<g^1>$ and so H is cyclic,  Case 3: $H$ is a proper, non trivial subgroup. Then $\exists \ k\in H $ such that $k\neq 1 $ and since $k\in G \implies k=g^m$ for some $m \in Z$ and so $g^m \in H$. It then follows by closure under the binary operation on $H$ that $\forall  \ n\in \mathbb{Z}, (g^m)^n \in H \implies <g^m> \subseteq H$  My question is how do I show that $H \subseteq <g^m>$ in order to show that they are equal?

I'm having some trouble understanding the proof of the following theorem  A subgroup of a cyclic group is cyclic  I will list each step of the proof in my textbook and indicate the places that I'm confused and hopefully somewhere out there can clear some things up for me.  Proof Let  G be a cyclic group generated by "$a$" and let H be a subgroup of G. If $H = {\{e\}}$, then $H \text{ = <e>}$ is cyclic. If $H \neq \space {\{e\}}$, then $a^n \in H$ for some $n \in \mathbb{Z}^{+}$. Let $m$ be the smallest integer in $\mathbb{Z}^{+}$ such that $a^m \in H$. We claim that $c = a^m$ generates H; that is, $$H \space = \space <a^m> \space = \space <c>.$$ We must show that every $b \in H$ is a power of c. Since $b \in H$ and $H \leq G$, we have $b = a^n$ for some $n$. Find $q$ and $r$ such that $$ n = mq + r \space \space \space \space for \space \space \space 0 \leq r < m,$$  Alright this is the first part in the proof where I start to get confused. Where does the division algorithm come from and why are we using it? The proof continues as follows:  $$a^n = a^{mq + r} = (a^m)^q \cdot a^r,$$ so $$ a^r = (a^m)^{-q} \cdot a^n.$$ Now since $a^n \in H$, $a^m \in H$, and $H$ is a group, both $(a^m)^{-q}$ and $a^n$ are in $H$. Thus $$(a^m)^{-q} \cdot a^n \in H; \space \space \space \text{that is,} \space \space a^r \in H.$$  This is another point at which I’m a little confused. What exactly about $a^n$ and $a^m$ being elements of $H$ allows us to accept that $(a^m)^{-q}$ and $a^{n}$ are in $H$? The proof continues:  Since $m$ was the smallest positive integer such that $a^m \in H$ and $0$ $\leq r$ $< m$, we must have $r = 0$. Thus $n = qm$ and $$b \space = \space a^n \space = \space (a^m)^q \space = \space c^q,$$ so b is a power of c.  This final step is confusing as well, but I think its just because of the previous parts I was confused about. Any help in understanding this proof would be greatly appreciated


I have a dell E6230, installed Ubuntu 14.04 in VirtualBox. The display defaults to 600x400 showing the upper left corner of the screen. It's the only resolution that shows in the GUI.   How do I get it to a higher resolution?  The system has an Intel HD graphics 4000.

I've recently installed Ubuntu on Oracle's Virtualbox.  Now I want to install the guest additions.  I started up my Ubuntu guest OS, clicked "Devices" and chose "Install Guest Additions". Nothing happened, and I don't see the CD icon on my desktop.  How can I make this work?


So far I have seen  and  both which did not work for me. Currently I have: import bpy  bpy.data.scenes['Scene'].render.engine = "CYCLES"  bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=False, location=(1.00003, 0.176902, 0.72441),                                 layers=(True, False, False, False, False, False, False, False, False, False, False,                                         False, False, False, False, False, False, False, False, False)) bpy.ops.object.material_slot_add() bpy.ops.material.new()  mat_name = 'Material.001' bpy.data.materials[mat_name].node_tree.nodes.new("ShaderNodeEmission") bpy.data.materials[mat_name].node_tree.nodes["Emission"].inputs["Color"].default_value = (1, 0, 0.07, 1) mat = bpy.data.materials.get(mat_name) ob = bpy.context.active_object ob.data.materials[0] = mat  When I perform this process in blender the hover text for use nodes in the material->surface section the code is: bpy.ops.cycles.use_shading_nodes() and I get: RuntimeError: Operator bpy.ops.cycles.use_shading_nodes.poll() failed, context is incorrect so I'm not sure if I can/have to perform this action or there is a prerequisite to doing it? I tried starting blender with --debug-wm but this didn't give me more information of how to perform this action in a script. Is there a better way to show what blender is doing than --debug-wm? Because I can do what I want in blender itself just not in a script. I also read a lot of api documentations and the tips for blender scripting, but this didn't really help me.

How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?


I've taken the following picture to demonstrate:    This is Chrome 28 in Ubuntu 13.04.  As you can see by the magnificent freehand circle, the should, which is wrapped in <i> tags (Really? Why not <em>? Seriously, I expected more). is offset from the rest of the line.   It's not present when the question is finally closed. As seen in the following example, on hold question:

"Should" word in italics is shifted down in the vote-to-close popup when there is at least one pending close vote.  Just have a look at this:        Now without close votes:        So the issue occurs when there is a close vote on it. It doesn't look good.    Tested on Chrome 27.0.1453.116 m, Windows XP. And it looks fine on Firefox 21.0 and Opera 12.02 (Windows XP)  Here is an example of a slightly different but obviously related problem in Windows 7 SP1 and Firefox 21.0:    This seems to have something to do with how line-height and/or margin attributes are being interpreted.  Can this be fixed?


The mounted combatant feat (PHB 168) allows someone to "force an attack targeted at your mount to target you instead." Suppose I am playing on a grid. Let E be enemies without reach/ranged weapons. M be the spaces a large mount occupies. And R be the space I occupy while riding the mount.  \$\begin{array}{|l|l|r|} \hline \text{E} & \\ \hline \text{E} & \text{M} & \text{R}\\ \hline \text{E} & \text{M} & \text{M} \\ \hline \end{array} \$  What happens when I redirect an attack with mounted combatant but I am outside the reach of their weapon on a grid?

The second benefit of the  feat says (PHB, p. 168):        You can force an attack targeted at your mount to target you instead.       I was playing a campaign, and my DM attacked the mount. Imagine this is the battlefield (seen from above); I was on the C, my mount is large (A), and the monster is M:  # # # # # # # # # # A C # # # # # A A # # # # M # # # # # # # # # # #   When I said "I deflect the attack to me," the DM said "But the foe does not reach you, which means you can't pull the attack to yourself." That got me thinking. I'm wanting to know how this works in this situation.  How does the attacker's reach interact with Mounted Combatant's ability to force an attack against the mount to target the rider instead?


How to show that $[-2,2)$ is not compact?   I can show that $(-2,2)$ is not compact since $K=\bigcup_{n\in\mathbb{N}}(-2,2-\frac{1}{n})$ has no finite subcover.  However I'm not sure how I can write a union of open sets which will include $-2$?

I have to give cover by open intervals of [0,1) that don't accept a finite sub cover of it.  My idea was to use the the Sorgenfrey topology because the open sets in $\mathbb{R}$ are [a,b) so if I take the open sets as A$_n$ = [1/n , 1) for n>2 then $\cup$ A$_n$ with n>2 it will be a open cover of [0,1) with no finite sub cover.  But I don't know if it is right because they asked me to use open intervals and I don't know if there is a cover of [0,1) by intervals like (a,b) with no finite sub cover.


After loading up 15.04 my laptop boots to the login screen and, when I enter my login code, it cycles back to the beginning of the boot process.     Any ideas how to fix this - I have no access to the Internet or any of my files !!!

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


Q.> A high school has a strange principal. On the first day, he has his students perform an odd opening day ceremony:  There are 1000 lockers and 1000 students in the school. The principal asks the 1st student to go to every locker and open it. Then he has the 2nd   student go to every 2nd locker and close it. The 3rd goes to every 3rd locker and, if it is closed, he opens it, and if it is open, he closes it. The 4th student does this to every 4th locker, and so on. After the process is completed with the 1000th student, how many lockers are open ?

There are 1000 lockers in a high school with 1000 students.  The    problem begins with the first student opening all 1000 lockers; next    the second student closes lockers 2,4,6,8,10 and so on to locker 1000;   the third student changes the state (opens lockers closed, closes    lockers open) on lockers 3,6,9,12,15 and so on; the fourth student    changes the state of lockers 4,8,12,16 and so on. This goes on until    every student has had a turn.      How many lockers will be open at the end?   I worked out this problem by doing it for 10 lockers. The pattern was obvious (1,4,9 remained open).It's easy to then say that 31 lockers remain open at the end. I don't quite understand why only square numbers remain open at the end. Is there some deeper reason?


If I properly understand relativity, time ticks faster for an object sitting still than for an object passing by.  So, in a universe with only two objects which have the same "age", object A is sitting still and object B is quickly approaching it, then we can assume that when object B stops, object B will be "younger" than object A. That works if you choose object A as your point of reference, but what if you choose object B as your point of reference? In that case, object A is the one moving and therefore will end up being "younger" than object B.  How is this possible? How does relativity account for this paradox?

I read a lot about the classical twin paradox recently. What confuses me is that some authors claim that it can be resolved within , others say that you need . Now, what is true (and why)?


I have a database with several tables that are heavily partitioned and I'm trying to optimize part of an ETL operation that involves one of those tables. The table has 1347 partitions involving 35 different file groups. I want to recreate the table in a different database but I don't see a way to get the partition scheme definition or function definition for my new database (it's not included when I script the table out in SSMS). I can get other pieces of the puzzle with the query below but I can't seem to find a way to bring it all together! I've created the new database with all the filegroups and such to match the original.  select distinct  ps.Name AS PartitionScheme, pf.name AS PartitionFunction,fg.name AS FileGroupName, rv.value AS PartitionFunctionValue     from sys.indexes i       join sys.partitions p ON i.object_id=p.object_id AND i.index_id=p.index_id       join sys.partition_schemes ps on ps.data_space_id = i.data_space_id       join sys.partition_functions pf on pf.function_id = ps.function_id       left join sys.partition_range_values rv on rv.function_id = pf.function_id AND rv.boundary_id = p.partition_number     join sys.allocation_units au  ON au.container_id = p.hobt_id        join sys.filegroups fg  ON fg.data_space_id = au.data_space_id   where i.object_id = object_id('PartitionedTable')    The database is on SQL Server 2016 SP1 CU7 Enterprise Edition

I have a script to generate the create table script. .  However, now I need to script my  and    , see the answer has examples on how to add a partition to a table and how to remove a partition from a table, and I would like to have a look at the scripts at any stage.  I have found this link:   how to generate the scripts for create partition function and partition schema?  I was working on a script to generate the create partition function  as you can see below, but it only works for my own PF_year partition function because it was tricky to get over the fact that  has a  data type as value.  when I used a case I got the following error:     Msg 206, Level 16, State 2, Line 35       Operand type clash: int is incompatible with date   Then in his great answer , showed us  some wonderful thing that I was not aware of, now I am a new DBA and person.     SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED     SELECT     RADHE = 'CREATE PARTITION FUNCTION' + space(1) + quotename(spf.name) +  '(' +       COALESCE(baset.name,'data type not found') +   ')' + CHAR(13) +      'AS RANGE ' + CASE WHEN CAST(spf.boundary_value_on_right AS int) = 1  THEN 'RIGHT ' ELSE 'LEFT ' END  + CHAR(13) +     'FOR VALUES (' +     (SELECT STUFF(     (SELECT     [text()] = N',''' + CAST(                       CASE st.system_type_id                         WHEN 40 THEN CONVERT (date, sprv.value,126)                         --WHEN 56 THEN CONVERT (int,  sprv.value)                        --ELSE CONVERT (int,  sprv.value)                       END                        AS NVARCHAR) + ''''     FROM sys.partition_range_values sprv      WHERE sprv.function_id=spf.function_id     order by sprv.boundary_id      FOR XML PATH('') ), 1, 1,N'')+ N');')      ,st.system_type_id     ,spf.name AS [Name],     spf.function_id AS [ID],     CAST(spf.boundary_value_on_right AS int) AS [RangeType],     spf.create_date AS [CreateDate],     spf.fanout AS [NumberOfPartitions]     FROM     sys.partition_functions AS spf      INNER JOIN sys.partition_parameters AS spp              ON spp.function_id=spf.function_id      INNER JOIN sys.types AS st              ON st.system_type_id = st.user_type_id             and spp.system_type_id = st.system_type_id      LEFT OUTER JOIN sys.types AS baset                    ON (     baset.user_type_id = spp.system_type_id                         and baset.user_type_id = baset.system_type_id)                     or (     (baset.system_type_id = spp.system_type_id)                         and (baset.user_type_id = spp.user_type_id)                         and (baset.is_user_defined = 0)                         and (baset.is_assembly_type = 1))     WHERE spf.name = 'PF_YEAR';


trigger ServiceReporttoSA on ServiceReport (after insert) {      for (ServiceReport SR: Trigger.new) {        ServiceAppointment SA = [select Id FROM ServiceAppointment WHERE ID         =:SR.parentId];        SA.servicereportCompleted__c = true;        update SA;        } }   Test Class  @isTest public class TestServiceReporttoSA {      @isTest static  void TestSR(){         //Test data         Account a = new Account(Name = 'testAccountSA',                             BillingPostalCode = '83059',                             BillingCountry = 'Deutschland');         insert a;           Contact c = new Contact(FirstName = 'TESTOS',                            LastName = 'TEstmann',                            AccountId = a.id);         insert c;          Product2 e =new Product2 (Name = 'Top AG', VK_netto__c = 250,                         created_by__c = 'bla');         insert e;          Pricebookentry f = [Select Id From PriceBookEntry where Product2Id = :e.Id and PriceBook2Id= :Test.getStandardPricebookId()];             f = new Pricebookentry (Id = f.Id,                                      UnitPrice = 250,                                     usestandardprice = false,                                     isactive = true);         update f;          Opportunity g = new Opportunity (Name = 'testOpp',                                         AccountId = a.Id,                                         Amount = 250,                                         StageName = 'new',                                         CloseDate = date.today(),                                         Category__c = 'Sonstige',                                          created_by__c = 'bla');             insert g;             update a;          OpportunityLineItem h = new OpportunityLineItem ( OpportunityId = g.Id,                                                         Quantity = 1,                                                         TotalPrice = 250,                                                         PricebookentryId = f.Id);             insert h;           Case cas = new Case (AccountId = a.Id,                             STATUS = 'New',                             Origin = 'Homepage',                             created_by__c = 'bla');             insert cas;          WorkOrder WO = new WorkOrder (AccountId = a.Id,                                      CaseId = cas.Id);             insert WO;          ServiceAppointment SA = new ServiceAppointment (Case__c = cas.Id,                                                         ParentRecordId = WO.Id);             insert SA;      //System.AssertEquals(a.Id, g.AccountID);     //     //      //SR = TestSR.createServiceReport();      //ServiceReport SR = new ServiceReport (ServiceReport = SR.ID, parentid = SA.Id);       System.AssertEquals( );     } }   Can someone help me to add a Service Report for this test class?

In Field Service Lightning I have a Trigger on ServiceReport which sends an email with attachment coming from ContentVersion.   This is the Test class I have written.  @isTest  private class testCreateServiceReport{       static testMethod void validateWO() {       WorkOrder wo = new WorkOrder();       wo.subject = 'Testing';       insert wo;       ServiceAppointment sa = new ServiceAppointment();       sa.ParentRecordId = wo.Id;       sa.EarliestStartTime = DateTime.now();       sa.DueDate = DateTime.now();       insert sa;       List<ServiceReportLayout> srl = [Select Id FROM ServiceReportLayout];       ServiceReport sr = new ServiceReport();       sr.ParentId = sa.Id;       sr.Template = srl[0].Id; //Need to check if there is a way to avoid srl[0] notation       insert sr; //If I comment this the text result is pass. When I enable it I get too see the below mentioned error.  }  }   This is the error Methods defined as TestMethod do not support Web service callouts I know that we need to write Test Classes for code that involves web service callouts using setMock() but I dont understand in what way inserting ServiceReport is related to making a callout.  Any help on this will be really helpful.


They are all 10 years old. They are all ten-year-olds  What is the difference between these? And, what is the reason why we must add s to the following?"  They are all ten-year-olds

Why are year, pound and mile in the singular form in the phrases below?   five-year-old children  20 pound note 10 mile run   Is that because they're acting as adjectives, which are always invariable in English?  Is it incorrect to say...   five-years-old children? 20 pounds note? 10 miles run?


Is any way to copy file system from VirtualBox .vdi file (or others like that) to physical partition on a hard drive?

Aka: How can I convert a .vdi or .vmdk to a real installation on a physical disk? Is it possible/feasible to migrate a Virtual Machine installation of Ubuntu onto a physical machine? If possible, how difficult would this be to accomplish and what steps would i need to take to prepare for the migration. I'd like to do some testing on a VM and if it works out migrate that system to physical hardware instead of reinstalling everything. Is this possible?


They were looking for the origin of a signal that had an intelligent structure to it. Was it ever shown what the signal actually was and/or who it was sent by? If not, have there been any good assumptions?

I remember after Stargate: Universe was cancelled, that I read, somewhere on the web, either part of an interview or an article by one of the producers about what they were planning if there had been a third season.  (He said they weren't sure whether they'd set it soon after the ending of the second season, or later, or were going to do something else.)  He also wrote that, while he felt okay discussing that, he did not feel like he could reveal how the story about the superstructure the Destiny had found would turn out.  He said that was something the other two producers had worked out and he didn't want to reveal it and would leave it up to them to reveal it if they wanted to.  Was this ever revealed?  Did the other producers ever discuss or reveal anything about what was going to happen with that storyline?    Addition: I'm referring to the superstructure that is the message found in the background radiation throughout the universe, not anything from the planet builders or other easily seen physical structures.


What is the Ubuntu equivalent of Mspaint.exe? I need VERY BASIC image editing to make cheap comics or minor changes, creating memes, etc

I want something similar to "preview" in macs.  For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and white, change size or format, crop.  THATS IT.  I know gimp can do all those things but its a bit overkill.  I just want to right click an image, open it with this magical program i just described, do a few quick adjustments, and then save and exit.  Nothing really fancy.  Anyone know of anything like this?  Btw I am using ubuntu 12.04 :) It rocks and I am glad I switched from mac, i just need to replace this one piece of software.


I do a   git reset --hard HEAD@{1}   But I removed some things wrongly. I try solve it  git fsck −−lost-found   But it no found the "revert"  Thanks...

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


I have been programming JavaScript for a little and am completely confused by the interchangeable usage of single and double quotation marks.  I spent some time researching such matters and it appears there are now performance differences or memory impact, so what gives?  Are they really just the same or is there something I am missing?  AFAIK the only benefit of double quotation marks is that you can reference single quotation marks without the pain of including the backslash escape character.  console.log('here is my sentence'); console.log("It's my sentence");   --- Update --- Forgot to say thank you for all of the responses and time taken to think about such questions and creating/fostering such a nice community.

console.log("double"); vs. console.log('single'); I see more and more JavaScript libraries out there using single quotes when handling strings. What are the reasons to use one over the other? I thought they're pretty much interchangeable.


Suppose $R$ is a  ring with unity $1$ and for some $a\in R$  there exists  more than one left inverse of $a$ in $R$. Show that $R$ has infinitely many left inverses of $a$.  I am trying to define a map $f:X\to X$ which is one-to-one but not onto or vice versa where $X=\{x\in R\mid xa=1\}$. That will directly imply that cardinality of $X$ can't be finite. But I don't have exact idea of proceeding further.   Edit:Given Ring is non commutative.

Let $A$ be a ring and $a\in A$ an element that has a right-inverse but does not have a left-inverse. Show that $a$ has infinitely many right-inverses.


What is the W component on graphics programming. I read a blog about opengl that says that w must be equal to either 0 or 1 . But the book I am currently reading has put w component to more than 1 value. So im kinda confuse what does it really do. The book I am reading is OpenGL es a quick start guide.

From  it appears you would want a four-element position vector, as it is simpler to modify its position with matrix multiplication.  On its own this would imply the fourth element should simply be ignored when considering it as a representation of a 3D point (assuming no transformation), but I know this is not true, as when I supply a vector4 to the GPU, if the fourth element is not one, it is not rendered - why?  What is the significance of the fourth element, once it is in the rasterizer?   EDIT: On review this question was somewhat poorly worded; it would be more accurate for the second paragraph to say: "if the value of the fourth element is not within a certain range, it is not rendered 'correctly'/'as expected'".


Gravitational force is a bend in the space-time fabric.....so I would like to know that is every other fundamental force is a bend or a wave in some kind of field/s?

For gravity, we have    General Relativity, which is a geometric theory for gravitation.  Is there a similar analog for Electromagnetism?


During typical conversation, how would one define couple, few and several?  I have read the actual definitions; however, they appear to be a bit vague.  My thoughts are:    A couple is two. A few is three to five. Several is six to 11.  After 11 is obviously a dozen...    What is the consensus among us rational people?  Please do not get too literal.

What does “a couple” mean to you, and what does “a few” mean to you?  Is there a proper way to use these words?  It was striking to hear that “a couple” meant two (2) to someone.  My reaction was, “how/why do you make a short word longer by adding an extra syllable to just say ‘two?’”  I think Few: 2-3, Couple 4-6, Several 7+.  What are your thoughts?


I have a table with a primary key set on an id field that uses a sequence to generate numbers as its default value. When inserting records, this works fine and the sequence is correctly updated. However, if I insert records with an id field (e.g. an import from a backup), the sequence is not updated.   CREATE TABLE public.my_table (   my_id integer NOT NULL DEFAULT NEXTVAL('my_id_seq'),   name text,   CONSTRAINT my_primary PRIMARY KEY (myid) );  CREATE SEQUENCE public.my_id_seq    START WITH 1     INCREMENT BY 1     NO MINVALUE     NO MAXVALUE     CACHE 1;   This updates the sequence:  INSERT INTO my_table (name) VALUES ('Bart');   This doesn't:  INSERT INTO my_table (my_id, name) VALUES (12, 'Bart');   Causing problems when the sequence hits 12 and I try to insert without an ID.  Is there a good/standard way to do this automatically? I know MySQL does it in its AUTO_INCREMENT column (which is way I ran into this problem, I came from MySQL). I looked online and found some ways: using a trigger, or manually updating the sequence after inserting, but many of these resources are quite old. Perhaps version 9.1 has some features to address this?

I ran into the problem that my primary key sequence is not in sync with my table rows.   That is, when I insert a new row I get a duplicate key error because the sequence implied in the serial datatype returns a number that already exists.  It seems to be caused by import/restores not maintaining the sequence properly.


I don't play Terraria much, but my little brother saw me playing on my PC and said he wanted to try. I let him, and he loved it. Once I told him we could play together, he got extremely happy and now I'm trying to figure it out, but can't. I looked around and I'm getting tons of answers, all of which are very unclear.

I have a Mac only, so I am not able to get Terraria through Steam. I was wondering if I can play Terraria on my iPad Mini with a friend who has it on his PC. I was wondering this, because I saw that Deepworld on iOS is compatible with the Mac version.


I am thinking about installing  onto several old computers in a school setting which currently run Windows XP.  These only are used for certain tasks.  I want it to where the users can only access certain programs.  For instance: Firefox, Chrome, Thunderbird, VLC, LibreOffice, Wine (for MS Office), and such need to be accessible.  I don't want them to access things that can mess up the computers easily (administrative things).  I know this usually requires sudo so maybe it will be safe as is and I can just remove the programs these users would never use.  Still, I would like to find some way to pick and choose what certain groups have access to like a program with check boxes to enable/disable programs.  This is all initially going to be an experiment so I am just trying to prepare for it if I decide to try this.  Most of the programs used are accessed with a web browser.  These users are not tech-savvy.  The goal is not to make them tech savvy but to allow the continued usage of old computers with a superior OS hopefully.

How to block certain applications from opening on certain accounts (eg: Stop account John from opening Firefox or Gimp). It is assumed this is for the GUI and not the terminal and would only apply to specific users, so for example user X can open Gimp but not Firefox, user Z can open Software Center but not VirtualBox.  What good and easy way is there to do this for a new user of Ubuntu.


I can't get to the end of this problem without getting confused about my own computations. Perhaps someone could help?  Problem: A stick of length 1 is broken uniformly. Then the smaller piece is broken uniformly. What is the Covariance of the resulting 2 pieces?  In fact this problem is posed here exactly:   I found some work there, but I'm a bit lost.

A stick of unit length is cut into three pieces of lengths $X, Y, $and $Z$, with $X \le Y \le Z$. First the stick of length $1$ is cut into two pieces at a randomly chosen point uniformly distributed along its length. Then the smaller of these two sticks is also cut into two pieces at a randomly chosen point uniformly distributed along its length. These two cuts are conducted independently. Find Cov(X,Y).  I need to get $E(XY)-EXEY$. First, I write $S=X+Y$. Then the length function of $S$ is $\min(s, 1-s)$. Given $S=s$, I can find the covariance of $X,Y$ as follows. The distribution of $X$ is $\min(x, s-x)$, so $E[X|S]=\int_0^{s/2} xdx + \int_{s/2}^s (s-x) dx=s^2/4.$ Likewise, $E[Y|S]=\int_0^{s/2} (s-y)dy + \int_{s/2}^s y dy=3s^2/4.$ Now $E[XY|S]=\int_0^s x(s-x)dx=s^2/6$,since $y$ is just $s-x$(I'm not sure about this part). Now to get the expectation, I just need to integrate them over $s$, which has the uniform distribution, so that would be integrating them over $[0,1/2]$. Is this correct? I would greatly appreciate any comment.


I had 2 accounts, e.g:  Account 1 having : 1000 reputation. Account 2 having : 50 reputation.    After merging these two: the reputation while on the Stack Overflow site shows the updated Reputation i.e. 1050, whereas in chat it shows reputation as: 1000.

When two accounts are merged, all the posts/votes are moved over to the "master" account, and the other account ("slave"?) is deleted. The merge is propagated network-wide, so a similar thing happens on each site.  But, this does not happen to the chat user. The "slave" chat user is kept, with a 404 parent profile link. I feel that the chat user should be merged as well, re attributing all the chat messages.  Thoughts?


I have renamed the account of a user in windows 7. How can I rename the profile directory to match the new user name?

During Windows installation I accidentally typed an accented name for my user name and my profile name is named after it. I already renamed my user to not have an accented character, but the profile folder is an other topic.  Basically I want this because I have some applications what have a problem with the accented character.  Is there a way to rename it? I know I have to make a copy from my profile, but how can I perform a relocation itself? I wouldn't like touch any other profiles on the machine just mine.