I would like explain the set theory, but I don't know how to do this.   For example I want to combine them.     This is my inital code:  \documentclass{beamer} %contains the document size %handout for better printing results % use [draft] instead handout and it compiles faster \usepackage{beamerthemesplit} \usetheme{PaloAlto} \usecolortheme{crane} %http://www.hartwork.org/beamer-theme-matrix/  %\setbeamercovered{transparent} %transparente overlay \beamertemplatenavigationsymbolsempty \usepackage{tikz}  \usepackage{pgfpages} \pgfpagesuselayout{resize to}[a4paper,border shrink=5mm,landscape] %for printing, beamer has a differnt paper size. \keywords{Learning Latex} %\logo{\pgfimage[width=1cm,height=0,5cm]{TU Graz}} \setbeamertemplate{footline}[frame number] %if you have a lots of frames, it is better do not show the pagenumbers.   \newtheorem*{com}{Comment}   \usepackage[UKenglish]{babel} \usepackage[utf8]{inputenc}  \definecolor{BlueLUH}{cmyk}{1.0,0.7,0,0.9}   \begin{document} %------------------------------------------------------------- \def\firstcircle{(0,0) circle (2cm)} \def\secondcircle{(0:5cm) circle (2cm)}  \colorlet{edge}{BlueLUH!20!white} \colorlet{area}{BlueLUH!80!black!20}  \tikzset %\tikzset{every path/.style={}} {filled/.style= {fill=area, draw=edge, thick},  outline/.style={draw=edge, thick}} %-------------------------------------------------------------  \date{\today}   \frame{\titlepage}  \part[par]{Documentclass beamer}  %at lectures with several presentations   \begin{abstract} In this short presention, I explain you the set theory. \end{abstract}  \frame{\frametitle{Table of contents}\tableofcontents}  \section{Circles} \begin{frame} \uncover<1-2> {\begin{tikzpicture}  \draw[filled]   \firstcircle node {$A$}; \end{tikzpicture} }  \uncover<2-2> {\begin{tikzpicture}  \draw[filled]   \secondcircle node {$B$}; \end{tikzpicture} }  \only<3-3> {\begin{tikzpicture}     \begin{scope}         \clip \firstcircle;         \fill[filled] \secondcircle;     \end{scope}     \draw[outline] \firstcircle node  {$A$};     \draw[outline] \secondcircle node {$B$}; \end{tikzpicture} } \end{frame}  \section{Outro} \frame{ \begin{center} \huge Thank you! \end{center} }  \end{document}   I edited it, but it still doesn't work:  \section{Circles} \begin{frame} \begin{tikzpicture} \uncover<1-2>{ \draw[filled]  \firstcircle node[name=A] {$A$}; } \uncover<2> { \draw[filled,opacity=0.8, xshift = 2.5cm],   \secondcircle node[name=B] {$B$}; \path [name intersections = {of = firstcircle and secondcircle } ] (intersection-1) -- (intersection-2) node [pos=0.5] {$A \cap B$}; } \uncover<3> { \draw[filled,opacity=0.8],   \secondcircle node[name=B] {$B$}; \path [name intersections = {of = firstcircle and secondcircle } ] (intersection-1) -- (intersection-2) node [pos=0.5] {$A \cap B$}; } \end{tikzpicture} \end{frame}   Infact I see this error:     tikz Error: giving up on this path did you forget a semicolon? \end{frame}   ! Package pgf Error: No shape named intersection-1 is known.   ! Package tikz Error: I do not know the path named `secondcircle'.    Perhaps you misspelt it.

What I am up to is to write some exercises dealing with logical formulas for my students, like:     And the students should draw these formulas on . At the end of the lesson, I really would like to print the correct answer for them. I found a great resource on a forum thread at , which helped me a lot to make up some Venn diagrams with tikz, but have some problems with visualizing complements, like ~A.  A simple, modified version of the TeX file found on the forum linked above, can be seen below, which produces the following expression:    \documentclass{letter}   \usepackage{tikz}   \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}   \begin{document}     \begin{tikzpicture}       \begin{scope}     \clip \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \firstcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$A$};       \draw \secondcircle node [text=black,below left] {$B$};       \draw \thirdcircle node [text=black,below right] {$C$};     \end{tikzpicture}   \end{document}   Which looks like:    Could anyone please help me out plotting/defining some expressions dealing with complements? A nice example could be:    That should look like: (image from )    I do not insist on the red color :)  I would like to use the simplest possible solution, as I would like to mass generate the exercises with the help of . So any suggestion dealing with gnuplot, R or any other opensource packages is welcome. Thank you!    UPDATE (25/01/2011): added details based on answers.  Thank you @Leo Liu, you helped me a lot! I modified a bit the code you suggested to be able to color the area outside of the two circles also (in the H universe), but have no idea how to set a background to that polygon also. The code:  \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle (2,2)       (1,0) circle (1); \fill (0,0) circle (1); \endscope % right hand \scope \clip (-2,-2) rectangle (2,2)       (0,0) circle (1); \fill (1,0) circle (1); \endscope % outline \draw (0,0) circle (1) (0,1)  node [text=black,above] {$A$}       (1,0) circle (1) (1,1)  node [text=black,above] {$B$}       (-2,-2) rectangle (3,2) node [text=black,above] {$H$}; \end{tikzpicture}   And the image generated:    I will also look for even odd rule in the near future which does not make sense for me at the moment but looks really simple and promising!


So I have a python file sample.py which is in let's say 'A/B/C' and my current working directory is let's say 'D/E'. Now in sample.py I am needed it's directory that is 'A/B/C' . Can anyone help me with this. I have tried "dir_path = os.path.dirname(os.path.realpath('__sample__'))" but it returns the current working directory.

I have scripts calling other script files but I need to get the filepath of the file that is currently running within the process.   For example, let's say I have three files. Using :   script_1.py calls script_2.py.  In turn, script_2.py calls script_3.py.    How can I get the file name and path of script_3.py, from code within script_3.py, without having to pass that information as arguments from script_2.py?  (Executing os.getcwd() returns the original starting script's filepath not the current file's.)


Let's consider a setup consisting of a table with friction, and a block on top of it. Suppose we drag the block across the table with a constant speed. The applied force $f_{app}$ acting through a distance $d$ does a work $f_{app}d$. The frictional force $\mu N$ is equal to $f_{app}$ since there is no acceleration. So the total work done on the block by these external forces will be $\Sigma W = W_{app} + W_{friction} = F_{app}d - f_{Kinetic Friction}d = 0$  According to law of conservation of energy, if there is an energy change in the system , it is because the energy is being transferred across the system boundary by a transfer mechanism (work, heat, mechanical waves, matter transfer, electromagnetic radiation etc.) So, $\Delta E_{system} = \Sigma T$, where $\Delta E_{system} = \Delta K + \Delta U + \Delta E_{internal}$ and  $\Sigma T$ is an energy transfer mechanism.  In our case, we have $ W_{app} + W_{friction} = \Delta K + \Delta E_{internal} $, $\Delta K = 0$ as there is no change in speed, then $ W_{app} + W_{friction} = \Delta E_{internal} $ , but as $ W_{app} + W_{friction} = 0 \Longrightarrow \Delta E_{internal} = 0$ So that means there is no increase in the internal energy, but clearly the block heats up. Can anyone explain to me what's happening here?

What does positive and negative work done indicate? What I understand is that positive work done implies that energy is gained by the rigid body and negative work done implies energy is lost by the body.   For example, a box is kept on a rough table, and when I push it, the work done by the force applied increases the energy of the block and the work done against friction is energy lost by the block while moving against friction assuming there is some displacement. Is this correct? In that case, what would be the effect on the internal energy of the body?


If black holes are so dense that they do not allow light to pass through them then how can we see them ? We can see anything if it reflects light but it is not in the case with black holes.

I'm not very knowledgeable about physics generally, but know that nothing can escape a black hole's gravitational pull, not even light (making them nearly invisible?).   My question is: What has been obtained from direct observation of a black hole to prove their existence? Please note that I'm not questioning the existence of black holes, but am just curious as to how we have come to realize it.


Hot Network Questions (HNQ) are an eyecatcher of very strong leverage. To be placed there attracts a lot of attention. And posts are (AFAIK) tested for strict requirements to get there. To keep HNQ's content and purpose as interesting as possible.  But why then there are non-English sites sometimes displayed, where just a fraction of the community is even able to understand?  This question comes up to after I now have seen there a post on Spanish Stack Overflow for multiple times and I'm not even able to say it were different posts or the title just has been changed since I can't translate what its about.  So my question: Is this really what the HNQs should support?

As figured out in  localized SE sites must not be displayed in the HNQ's. But  actually is.        Has to be fixed I guess?


I'm running Ubuntu Linux 12.04.1, with VirtualMin 4.08.gpl GPL and 2 CPU cores.  Pretty much all the time for the last few weeks, it's been running at well above load average of 5, usually up closer to 10, sometimes reaching 20.  Right now, CPU load averages: 9.20 (1 min) 8.20 (5 mins) 7.81 (15 mins)  At the same time, VirtualMin returns:  Virtual Memory: 996 MB total, 15.44 MB used Real Memory: 3.80 GB total, 972.43 MB used  Local disk space: 915.94 GB total, 116.03 GB used   Have restarted (shutdown -rf now) the machine a few times and sure enough sooner or later we're back up with high CPU loads.  Running top (or htop) returns nothing significant at all running at high CPU - in fact watching it for a few minutes and the highest item would maybe high 3% CPU.  Top returns this also:  Cpu(s): 2.2%us, 1.2%sy, 0.0%ni, 0.0%id, 96.5%wa, 0.0%hi, 0.2%si, 0.0%st   The %wa concerns me as it's so high - seems to stay up above 80%. I understand this is % in wait, but not sure what that means in practical terms.  Where can I start to debug this and figure out what's causing the high CPU load?

I'm getting the following output from top:  Cpu(s): 43.8%us, 32.5%sy,  4.8%ni,  2.0%id, 15.6%wa,  0.2%hi,  1.2%si,  0.0%st Mem:  16331504k total, 15759412k used,   572092k free,  4575980k buffers Swap:  4194296k total,   260644k used,  3933652k free,  1588044k cached   the output from iostat -xk 6 shows the following:  Device: rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util sda       0.00   360.20   86.20  153.40  1133.60  2054.40    26.61     1.51    6.27   0.77  18.38 sdb       0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00 sdd      22.60   198.80   17.40   31.60   265.60   921.60    48.46     0.18    3.70   1.67   8.20 sdc      16.80   218.20   22.20   23.40   261.60   966.40    53.86     0.21    4.56   1.49   6.78   Based on the above it looks like something must be overloaded. But what?   Questions   If its not the harddisk or the CPU then what? It seems as though 15.6% of the CPU's time is spent waiting. What exactly could it be waiting for?


I'm trying to find/build a query to show me those queries that are consuming more resources in SQL Server so that I can optimize them or at least have a statistical idea of what is really happening.  For now I'm using these queries:  select        er.percent_complete     ,SUBSTRING(text,statement_start_offset/2+1,(CASE             WHEN statement_end_offset = -1 THEN LEN(CONVERT(nvarchar(max), text)) * 2             ELSE statement_end_offset         end - statement_start_offset)/2) AS query_text     ,se.session_id     ,se.login_name     ,se.login_time     ,er.session_id as 'Vitima'     ,blocking_session_id as 'Bloqueador'     ,wait_resource     ,start_time     ,er.status,command     ,db_name(er.database_id) 'Database'     ,SUSER_NAME(er.user_id) 'Usuario de contexto'     ,wait_type,wait_time     ,text     ,query_plan FROM     sys.dm_exec_requests as er     INNER JOIN sys.dm_exec_sessions as se         ON er.session_id = se.session_id     CROSS APPLY sys.dm_exec_sql_text (sql_handle)     CROSS APPLY sys.dm_exec_query_plan (plan_handle) WHERE     se.session_id>50 and se.session_id <> @@SPID   and  SELECT --TOP 10     SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1,         ((CASE qs.statement_end_offset             WHEN -1 THEN DATALENGTH(qt.TEXT)             ELSE qs.statement_end_offset         END - qs.statement_start_offset)/2)+1) as vQuery,     qs.execution_count,     qs.total_logical_reads, qs.last_logical_reads,     qs.total_logical_writes, qs.last_logical_writes,     qs.total_worker_time,     qs.last_worker_time,     qs.total_elapsed_time/1000000 total_elapsed_time_in_S,     qs.last_elapsed_time/1000000 last_elapsed_time_in_S,     qs.last_execution_time,     qp.query_plan FROM     sys.dm_exec_query_stats qs     CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) qt     CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp --ORDER BY qs.total_logical_reads DESC -- logical reads --ORDER BY qs.total_logical_writes DESC -- logical writes --ORDER BY qs.total_worker_time DESC -- CPU time --ORDER BY last_execution_time DESC ORDER BY vQuery   They show similar info, but from different places and with different attributes.  The problem with both queries is that they seem to show only late queries. I've added comments to my queries that are being listed, and these comments aren't appearing, which means that latest queries (for about 15 minutes) aren't still being listed by them.  I'm ok with seeing historical data, as long as I'm able to control how historical it is. It's good to have a long run view.  But still, sometimes, I need to see the current situation. In example, all of a sudden the server starts to get slow, then I wanna see what exactly is doing it right now.  I'm still googling more queries, but I still didn't find anything better than these 2, to show more current data.  Anybody can give me a tip?  Another question. Regarding SQL Server optimization and possible caching, is it troubling to add a timestamp to each sent query? Since I can't see how old a query is, I'm thinking in adding in each query the date and time it was sent to SQL Server. But I'm afraid that SQL Server will lose the ability to see that the same query is being requested over and over, and think each query is brand new, and thus stop doing any optimization it might be doing.

We have a customer server containing SQL Server 2008R2 with about 50 databases. The issue is that the CPU usage reaches 100% (or close to it) and it lasts for a couple hours. This typically happens in the morning (usually somewhere around 6am - 9am). Average CPU usage is 30%  We looked at the scheduled reports and couldn't find anything - we did decide to schedule them earlier in the morning and that didn't do anything.  I'm going to remote in tomorrow to investigate the issue. We've rebuilt the indexes and that didn't help. I have a set of DMVs to check for queries with highest worker time and longest running time.  Do the SQL Server track all the queries run so that the DMVs can access the information? What other sql snippets would be helpful to diagnose the problem?   edit: Memory usage is pretty high too - about 80-90%. Actually another server is experiencing the same issue at the same time, I believe they're both hosted on a citrix server.  We've also done an index rebuild.


Here is my document: \documentclass{article} \begin{document} Hello, \input{name.txt}! \end{document}  My file name.txt has a single line Jeff\n (with EOL at the end). It's rendered to: Hello, Jeff !. How do I remove the space after Jeff?

I've noticed a significant issue with the \input command, it seems.  For some reason, I can't seem to prevent it from adding a space after it reads its input.  Even if there is no newlines or spaces at the end of the file, LaTeX seems to be just driven to add a space.  Minimal working example is this:  \documentclass{article} \begin{document} A\input{TestInput.out}B \end{document}   Where TestInput.out contains only the text "SomeText" and no special characters  This provides the output:  ASomeText B   Does anybody know how to prevent this?  For a typesetting program, it's kind of weird to just arbitrarily add spaces IMO.  I'd like to think there's an easy fix, but I'll take any portable, robust fix if it works.


I created this simple function and want to know that if it is enough for preventing SQL Injection.  $sub_username = encr(mysqli_real_escape_string($conn, $_POST['username'])); $sub_password = encr(mysqli_real_escape_string($conn, $_POST['password']));  $sql = "SELECT password FROM login WHERE username='$sub_username'"; $result = mysqli_query($conn, $sql);   function encr($data) {     $data = trim($data);     $data = stripslashes($data);     $data = htmlspecialchars($data); }

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


I'm using Windows XP SP3. I installed iOS 5 on my iPhone 4. The installation process went OK, but, when trying to restore my contents, it gives me ERROR -50. I tried all the different things assosiated with this error.  Question: The only things that I miss are photos and, of course, my text messages. Is it possible to get the photos from my backup files manually?  iTunes does not show that it actually backed up the data on that date. The backup before that was a month earlier, which is did allow me to restore, so I'm stuck with the loss of a month.

I recently tried to sync my iOS device, but I got a message similar to this one:    I tried googling around, and people generally recommended to disable syncing photos to fix this, but in my case syncing photos was already off.  Any ideas on how to fix this?


UPDATE: I went back to 1703. See source:   Listing power plans using powercfg shows only the Balanced one.    And that's the registry situation:    And the power schemes, which seems fine:    What happend here?

After upgrading my windows 10, I can no longer change powersettings. It only says the one I use and Balanced.  Where has the setting to change power plan settings moved to?


Currently i am trying to change the viewport of the 3D View window using a python script. I am using this function   bpy.ops.view3d.viewnumpad(type='TOP');   But it always get this error      RuntimeError: Operator bpy.ops.view3d.viewnumpad.poll() failed,   context is incorrect   The same error is gotten when I use this function  bpy.ops.view3d.view_persportho();   Waht is the problem?

I keep on getting context errors in the Blender Python API.  I don't understand the issue of the context in the API, how do I know which is the correct context?   Thanks!


Ubuntu 18.04 Beta is looking good, but I keep running across a few difficulties related to how they have altered the boot process.  What is best way to report bugs?

I found a problem with an application on Ubuntu.   Questions :   How do I best report the issue?  What sort of information should I provide?


I installed the latest version of Virtualbox on a Windows 10 guest laptop, and when selecting the 'Create Virtual Machine' menu, it only shows 32-bit options for Linux.  How do I install Ubuntu 14.04 64bit on Virtualbox Windows 10 host?

I have Virtualbox 4.1.20 in Ubuntu 12.04 32 Bit (With PAE) and I want to run Ubuntu Server 64 Bit on the Guest. Is this possible?. I ask since I get the following warning:    I want to make sure that there is no option to "emulate" this. I have a 64 bit CPU that supports virtualization. The Intel DZ68DB motherboard with an Intel I7 2600 CPU.


I have a iterable sequence nums = [1,2,3,4]. I want to create a generator function which, when next(nums) is used, will return the values one by one in reverse order. My goal is to do this using len(). I know the length of the list minus one would be the index of the last item in the list. How would I write the code for the output using len():      next(nums) 4     next(nums) 3     next(nums) 2     next(nums) 1   EDIT: Forgot to mention no other built-in functions are allowed.

So I can start from len(collection) and end in collection[0].  I also want to be able to access the loop index.


Why this code compiles succesfully in VS13 and fails to compile by gcc?  template <typename T>     class Base { protected:     typedef std::map<T, double> MyMap;     MyMap m_map;  public:     void func(const T& key)     {         typename MyMap::iterator it = m_map.find(key);         if(it != m_map.end()) {             // ....         }     } };  class Inherited1 : public Base <char> { }; class Inherited2 : public Base <int> { };   It results in following errors (gcc 4.1.2)  test.cpp: In member function ‘void Base<T>::func(const T&)’: test.cpp:16: error: expected `;' before ‘it’ test.cpp:17: error: ‘it’ was not declared in this scope   EDIT1: Thanks for replies. Tried using keyword typename as juanchopanza suggested, now I got this errors:  /tmp/ccotJWFl.o: In function `__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, double> > >::deallocate(std::_Rb_tree_node<std::pair<int const, double> >*, unsigned long)': test.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKidEEE10deallocateEPS5_m[__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, double> > >::deallocate(std::_Rb_tree_node<std::pair<int const, double> >*, unsigned long)]+0x19): undefined reference to `operator delete(void*)' /tmp/ccotJWFl.o: In function `__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<char const, double> > >::deallocate(std::_Rb_tree_node<std::pair<char const, double> >*, unsigned long)': test.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKcdEEE10deallocateEPS5_m[__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<char const, double> > >::deallocate(std::_Rb_tree_node<std::pair<char const, double> >*, unsigned long)]+0x19): undefined reference to `operator delete(void*)' /tmp/ccotJWFl.o:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'   EDIT2: This whole stuff becomes even more ridiculous - it results in the above mentioned errors if I use gcc test.cpp compiles successfully if I write g++ test.cpp

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I copied few video files in mkv format from windows to ubuntu. In windows the size of files is shown 20GB and in ubuntu it shows 21.6GB. what can be the reason for this difference in file size?

I want to give some scenarios:   A movie file shows 700 MB in Windows but it shows around 735 MB in Ubuntu, which is in my drive having NTFS partition. Similarly another file shows 446 MB in Windows but 467 MB in Ubuntu. Also when I download files from internet they change once downloaded in Ubuntu but do not change in Windows. I generally have to upload torrents mentioning the file sizes. Most of the time I use Ubuntu, I use Windows to play games only.   Actually my questions are:   Which size should I mention while creating torrents? Is there any tool or software or formula to calculate the file size in Ubuntu equivalent to file size in Windows?   I have already tried following links but could not find my actual answers:


So I use bibtex and I have set my \bibliographystyle to be unsrt. I want Latex to render something like this:  ref [1]-[5] support this claim.  but if i write:  \cite{x1} - \cite{x5} blah blah   citation items 2, 3 and 4 are not gonna be listed in the bibliography list in the end, whereas I want them to be present. How can I do it?

How can I cite a range of papers, the output is a range of numbers, instead of a list of numbers? In other words, when I type  ... some dummy text here is due to me \cite{me1, me2, me3, me4} ...   I want the output to be     ... some dummy text here is due to me [3-6] ...   instead of     ... some dummy text here is due to me [3.4.5.6] ...   (I use LaTeX, and am currently using the amsart class and whatever it includes. But I am open to other suggestions.)


I am learning C++ from tutorialspoint. In the topic of polymorphism, they have the following code (only relevant parts added):  class Shape {    protected:       int width, height;     public:       Shape( int a = 0, int b = 0){          width = a;          height = b;       }       int area() {          cout << "Parent class area :" <<endl;          return 0;       } }; class Rectangle: public Shape {    public:       Rectangle( int a = 0, int b = 0):Shape(a, b) { }        int area () {           cout << "Rectangle class area :" <<endl;          return (width * height);        }   I don't understand this line: " Rectangle( int a = 0, int b = 0):Shape(a, b) { }", specifically this part: ":Shape(a, b)". I read earlier that in constructors of a class, we can assign values to the class member variables using the following syntax:  Classname ( type arg1, type arg2, ...) : member_variable1(arg1), member_variable2(arg2), ... {.. }   But here Shape is a constructor (a function) of base class. Moreover, I also read that constructors (along with destructors, overloaded operators and friend functions) cannot be inherited - so how can we use a call to Shape?

What are the C++ rules for calling the base class constructor from a derived class? For example, I know in Java, you must do it as the first line of the subclass constructor (and if you don't, an implicit call to a no-arg super constructor is assumed - giving you a compile error if that's missing).


I will be graduating from BS Aeronautical Engineering in about 6 months. But over the last couple of years, I realized that I'm more passionate about Geopolitics, international relations and diplomacy. So, I'm thinking of changing fields in Masters. I intend to opt a degree in International relations, public policy and economics.   Now, as mentioned in the question, how difficult is changing majors like that? What is the attitude shown by universities toward applicants like me? And how do I go about convincing professors to take me in?

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


Evaluate the following $$\int \frac{2\ dx}{\sin x \cos x}.$$

Question: How to evaluate $\displaystyle \int \frac{1}{\sin x\cos x} dx $  I know that the correct answer can be obtained by doing: $\displaystyle\frac{1}{\sin x\cos x} = \frac{\sin^2(x)}{\sin x\cos x}+\frac{\cos^2(x)}{\sin x\cos x} = \tan(x) + \cot(x)$ and integrating.  However, doing the following gets a completely different answer: \begin{eqnarray*} \int \frac{1}{\sin x\cos x} dx &=&\int \frac{\sin x}{\sin^2(x)\cos x} dx\\ &=&\int \frac{\sin x}{(1-\cos^2(x))\cos x} dx. \end{eqnarray*} let $u=\cos x, du=-\sin x dx$; then \begin{eqnarray*} \int \frac{1}{\sin x\cos x} dx &=&\int \frac{-1}{(1-u^2)u} du\\ &=&\int \frac{-1}{(1+u)(1-u)u}du\\  &=&\int \left(\frac{-1}{u} - \frac{1}{2(1-u)} + \frac{1}{2(1+u)}\right) du\\ &=&-\ln|\cos x|+\frac{1}{2}\ln|1-\cos x|+\frac{1}{2}\ln|1+\cos x|+C \end{eqnarray*}    I tested both results in Mathematica, and the first method gets the correct answer, but the second method doesn't. Is there any reason why this second method doesn't work?


Subspaces$W$ and $Z$ of $\mathbb R^4$  are  generated by   $\{(1,1,0,-1),(1,2,3,0),(2,3,3,-1)\}$ and $\{(1,1,0,-1),(1,2,3,4),(0,1,3,5)\}$, respesctively.  Find a basis for $W$$\cap$$Z$.   I already know how to find the basis for $W+Z$, but I am confused on how to find the basis of $W$$\cap$$Z$.

What is the general way of finding the basis for intersection of two vector spaces in $\mathbb{R}^n$?  Suppose I'm given the bases of two vector spaces U and W: $$ \mathrm{Base}(U)= \left\{ \left(1,1,0,-1\right), \left(0,1,3,1\right) \right\} $$ $$ \mathrm{Base}(W) =\left\{ \left(0,-1,-2,1\right), \left(1,2,2,-2\right) \right\} $$  I already calculated $U+W$, and the dimension is $3$ meaning the dimension of $ U \cap W $ is $1$.  The answer is supposedly obvious, one vector is the basis of $ U \cap W $ but how do I calculate it?


Can I use id with "(" and ")" in jquery mobile ?  for example:  <div id="RSI(3,4)"> </div>   I have tried that id and want to access that element in js.  $("#RSI(3,4)").html("some text");   but it didn't worked.

When creating the id attributes for HTML elements, what rules are there for the value?


I have this equation $x \equiv (2003^{-1}) \mod 1511$ and am confused with how to try solving it. Since $2003^{-1} < 1511$, you can't use the extended Euclidean algorithm with regards to the inverse. So I'm looking for some tips on where to start with solving this equation. Thanks.

For example: $$7x \equiv 1 \pmod{31} $$ In this example, the modular inverse of $7$ with respect to $31$ is $9$. How can we find out that $9$? What are the steps that I need to do? Update If I have a general modulo equation: $$5x + 1 \equiv 2 \pmod{6}$$ What is the fastest way to solve it? My initial thought was: $$5x + 1 \equiv 2 \pmod{6}$$ $$\Leftrightarrow 5x + 1 - 1\equiv 2 - 1 \pmod{6}$$ $$\Leftrightarrow 5x \equiv 1 \pmod{6}$$ Then solve for the inverse of $5$ modulo 6. Is it a right approach? Thanks.


I wonder if there is a place on Stack Exchange where I can ask for advice when repairing household appliances.   Like a washing machine that is shocking people from the drum, or a TV with interference on the screen.

I am having a few issues with my iron at the moment and have searched for similar questions but there's doesn't appear to be a site. More specifically my question is:  How do I de-calc an iron when the button becomes too hot to hold in?  There are a few other related(ish) questions I have. Is there like a site for household questions or would such a site have to be proposed in Area 51?


Can someone explain to me what a Wald test is please. I have seen it twice today and cannot figure out what it does (other than test for sig difference like a t-test or chi-square).  What would you use it for, and what makes it the right test to chose?  Thanks in advance Cat

The "z" hypothesis test is derived from the fact the mean estimator $\hat\Theta$ is distributed normally. If we don't know the variance, we just estimate it ($\widehat{se}$).  The Wald test, derived from the fact that the fisher information of the MLE is distributed chi squared.  We basically get the same result with the two tests.   I just want to make sure that the Wald test is the generalization of the "z" test - or is there any difference?  Thanks!


I am very new to blender (2.81) and have been following a number of different tutorials to produce this file.   Rendered images (cycles) were working fine but suddenly they now come up as black screens. I don’t understand as the rendered viewport view shows everything correctly!  I found a forum help post that gave a long list of things to try and fix this issues and I have attempted tthose I understood but none have worked.   Blend file:   If any of you kind folk could take a look and tell me what stupid mistake I have made I would be eternally grateful

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


Just wondering, if there's a word for:  One who makes it appear as if they're an expert on a subject while there are also signals (subtly or blatantly noticeable) that this person doesn't know very much on the subject or at least as much as they're acting like they do on the subject; pretending to have much knowledge on a subject matter.  I found pedantic but I don't suppose it's the right word.

If someone thinks they are always doing the right thing, and believes others are wrong, what would I call them?  Say, for example, I did something that person considers wrong. But then on another occasion, the same person does the same thing I did and believes they are right. So they feel like they're an exception, but at the same time, others are wrong and can't act like that.


Do we know why the Dursleys gave Harry a proper bedroom after Philosophers Stone? From their viewpoint it would seem to have been a mistake, as his rescue in Chamber of Secrets would have been harder, if not impossible, had he still been sleeping under the stairs.

In Harry Potter and the Chamber of Secrets, Uncle Vernon says:     We even let you have Dudley's second bedroom purely out of the goodness of our hearts.   There is plenty of evidence that there's no "goodness in their hearts" when it comes to Harry. They had no problem with him living under the stairs for almost 11 years. Why did that change?  Did someone in the wizarding world force them?  Did they decide to use the cupboard under the stairs for something else?  Or (much less likely), did they develop a tiny bit of sympathy for Harry?


private void Label_GenerateMouseClicked(java.awt.event.MouseEvent evt) {                                                 // TODO add your handling code here:     try{         String sql = "select from Account ORDER BY RAND()";         PreparedStatement st = con.prepareStatement(sql);         ResultSet rs = st.executeQuery();          if(rs.next()){             TextField_Username.setText(rs.getString("EMAIL"));             TextField_Password.setText(rs.getString("PASSWORD"));         }     }catch(Exception e){         System.out.println("Cannot generate.");     } }                                              This code keep catching the error and i cant figure out why. im gettign error java.lang.NullPointerException. Please help

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


I have checked and apparently you can't left-pad zero onto an integer. Converting to string and back to integer doesn't work either. Although, what I am trying to do is use the integer for a FOR loop and then send into a JPQL query, using concatenation, which needs the date format to be in XML Gregorian Calendar(YYYY-MM-DD HH:MM:SS).   One way to solve my problem would be to use formatter before sending it into a JPQL query. What I mean to ask is : Is there a better way to do this, in my case?   Here is the relevant piece of code:  for (int month = startMonth; month <= endMonth; month++) {                      inputDates = "SELECT COUNT(d) FROM Datafile d WHERE d.datafileCreateTime BETWEEN {ts  2013-" +month+ "-01 00:00:00}  AND {ts 2013-" +month+ "-02 23:59:59}";                     ...

How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).


The Death Star is spherical, and as big as a moon.  It has a gravity generator, but how does it work ?  Which one of the case below (Fig.1 or Fig.2) is the correct one ?

As we all know the Death Star is spherical. I don't know if it generates gravity on its own or has a gravity generator, but that's not important. I think we have basically two scenarios:    Gravity works the same way as Earth. If you are in the lower hemisphere, you are upside down, but that's normal for you.  If that's the case, when would the gravity shift? What if you're taking an elevator, would it be same as in the Total Recall remake? Everyone has the same gravity. Same as if you were in one big house.  Now what if the trench ran in the lower hemisphere. Would the stormtroopers in the turrets be upside down?   I accept any sort of canon.


Probably my head is a kind of scrambled now, but I'm having some difficulty understanding the description about the already-defined EventHandler delegate of .NET. The  says it "Represents the method that will handle an event that has no event data." Then if every time we use it we'll definitely not pass data, why the argument "EventArgs" is still there? Its existence makes every time we have to pass an EventArgs.Empty to it which is quite tedious. Is there any particular reason for it, or is it just for compatibility and code flexibility? I'm new to .NET so sorry if this question seems naive. Thanks in advance.

It's known that you should declare events that take as parameters (object sender, EventArgs args). Why?


Since the $\vec{E}$ field inside a "perfect" conductor is zero, do the electrons(the current) flow only on the outer surface? This has bothered me since I studied electromagnetism.   Thank you for your time.

I was having a conversation with my father and father-in-law, both of whom are in electric related work, and we came to a point where none of us knew how to proceed.  I was under the impression that electricity travels on the surface while they thought it traveled through the interior.  I said that traveling over the surface would make the fact that they regularly use stranded wire instead of a single large wire to transport electricity make sense.    If anyone could please explain this for some non-physics but electricly incline people, I would be very appreciated.


which way would gravity pull at the center of the earth

If you could travel to the center of the Earth (or any planet), would you be weightless there?


I tried to create my own command to run Clion from terminal and I found a way to declare a function without creating a script. I run this command in terminal:   function CLion { /opt/clion/bin/clion.sh "$1"; }      So any time I want to run the app I call the function name, but when I restart my PC I have to declare it again and again, any solution?

I am planning to create a function that would simplify things for me. The function  would be something like  function lazymode() { echo "Hello World!"; }   so that when I use the command lazymode in the shell , it will output the Hello World!.  What file should I put the user-defined function?


I'm trying to upgrade my 12.10 system, but I can't even run the Software Updater because it dies when trying to find the now non-existent quantal packages. Similarly with command line level apt-get upgrading. Very frustrating.  How do you upgrade now that ubuntu's wiped out those packages that are needed to upgrade?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I was at Brussels airport yesterday and was surprised that gates information are not published until (exactly) 15 minutes before boarding time. The panel says      Relax, gate info at 16:20     So I went to the gate as soon as it was known, and the aircraft was already there, connected to the passenger boarding bridge. Meaning the gate was definitely known for some time before it is published!  Then I queried some information from the staff ; and indeed, gate information is always only published 15 minutes before boarding time.  The only reason I could think of is BRU wants people to spend time in shops...  Is there another reason for not informing gate details earlier? (which is a bit annoying)

I am not a frequent traveler but it's been like this with all the flights I have been on. Here is the most recent example:  Below is my boarding pass    As you can see Gate Closes at 20:20  Here is the departures board at 18:32, clearly it says that they will announce the boarding gate at 20:10  ?!    I was hoping they will do that earlier but at 19:41 it's still the same    In fact they announced it at 20:11 but since I was freaking out and had to leg it to the gate I didn't have the time to take a photo.  You might think 9 minutes is enough, well below are the times required to reach the gates from the closest place to them     And that's for a healthy young person, no way my grandmother could be able to be at the gates within 9 minutes.  Is there a specific reason? it's not like they allocate the gate dynamically! The staff must have known about the gate hours ago as I don't expect the pilot to drive the airplane from the garage to the gate within 9 minutes?


I am facing trouble with a statement made after eq 5.2.4 in sakurai modern qm and the statement is $P_1(E-H_0-\lambda P_1VP_1)$ is singular in $P_1$ subspace. How one can we show the validity of the statement?  This question is similar to problem asked previously in this forum but haven't answered appropriately. So I am asking again here. The link for the  qn is

I am studying Perturbation Theory from J.J. Sakurai's textbook Modern Quantum Mechanics. I am having trouble proving formulas on page 299 (5.2.5) and (5.2.6) from the previous ones [mainly (5.2.4)]. Can anyone help?  This is a problem of working with perturbation theory when the non-perturbed state has degeneracy. To elaborate I do not get why $(E-H_0-\lambda P_1VP_1)$ is not singular.  More importantly is the equation below correct and if so why:  $$(E-\lambda P_1VP_1)|l \rangle = E_D^{(0)}|l \rangle $$  That is the core of my problem. If the above equation - in the framework of Sakurai's statement of the problem - is correct I can work out all the rest on my own. However I do not get why this equation would hold true.


I have a shapefile with 64 lines with the metadata:  General: Storage type of this layer: ESRI Shapefile Source for this layer: C:/Users/toke.nielsen/Desktop/lines.shp Geometry type of the features in this layer: Line The number of features in this layer: 64 Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries Extents: In layer spatial reference system units : xMin,yMin 563677.42,6223900.13 : xMax,yMax 568136.66,6227899.44 Layer Spatial Reference System: +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs   How do I export the coordinates from these lines to a .csv file? I have tried to write GEOMETRY=AS_XY in the layer options when creating the .csv and I have tried the vector->geometry tools->export/add geometry columns, but then I only get the length of each line.

I am very new to QGIS, so please bear with me.  I have a ".shp" file, which is contains a set of boundaries for suburbs of Australia. I opened it to QGIS and I would like to export it into a CSV file so that the final file would be like following.  POSTCODE, LATITUDE, LONGITUDE  When I select "Layer > Open attribute table" I can see the "postcode" column.  I had a look at a similar question here     Which told me to simply go to "Layer > Save as" and then type "GEOMETRY=AS_XY" or "GEOMETRY=AS_XYZ" in the "Layer" section of the "OGR creation options".  I followed exactly, but the latitude and longitude values are not being returned.


In its document (), it reads "If enabled, option-click will move the cursor to where the mouse pointer is. If you install shell integration, this will be well-behaved at the shell prompt by not sending up and down arrow keys." But it seems like when I do Options-Click it just goes to last command (arrow up).  This answer here is no longer a solution - deprecated, and the source code is removed (), and the thread should be removed/archived.

In Terminal, Option + click allows me to place my cursor at any point on the current line-- great for editing really long commands.  How can I do this in iTerm2?  Update: According to , the feature has been around since 0.7.0 (2003). I've also noticed that if I hold Command+Option, the cursor changes into the familiar cross like in Terminal...  but clicking still does not reposition my cursor.


In gparted, why can’t I modify partitions that are in use, like root, but in Windows I can shrink the root partition while booted into it.   Is there any program I can use to modify a partition while it’s in use?

How can I increase the size of the root partition of a system at runtime?   I have a partition that is not allocated after the root partition (which is also ext4), how can I add that unallocated space to the space allocated to the root partition without having to shutdown the server?


This is a follow up question to:   Is there a scenario when a surprise attack can be made without triggering combat? Maybe there is a different term for it than "surprise attack".   For example, If the entire party is hidden, can a surprise attack be made without triggering combat?   Scenario : Party is hidden behind a castle wall, Rogue fires a crossbow bolt thru an embrasure / arrowslit. The NPC down below would only know a general direction. But it seems there is no way for that NPC to engage in combat.

Say, a PC fires a longbow at an enemy without their knowledge before combat has begun, how should combat start?   Should there be a stealth/perception opposed check? Should a successful/unsuccessful opposed check give a benefit/failure to initiative? Should a successful opposed check cause an automatic hit or crit? When should initiative be rolled? Should there be a surprise round? If I whisper to my party what I'm doing, do they automatically fail to be surprised?


How common are arXiv delays? (putting a paper on hold status?). I have recently (yesterday) submitted my first paper on arXiv, it was supposed to show up a while ago, however the status of the paper was changed to on hold. How common is this? Also is it because I'm submitting my first paper on arXiv? Also how many days does it generally takes for the paper's announcement after on hold?

I have recently submitted a paper to arXiv, but the arXiv moderators put my paper in status "on hold", because they have to make a decision on the right classification for the paper.   To those who have experienced a similar situation, how long did it take before they made a decision and published the paper on the arXiv? I just want to have an idea of how long I will have to wait.


I've been trying to find the title of these lyrics; it's rather jazzy from 90ish, female singer    "it's the story of my life if you want to know. a play where everything is meant to be. You're the story of my life and I can't let you go"

I'm trying to identify a song by a female 80's pop group.   Here are the lyrics I remember:     It's the story of my life if you want to know   a play where everything is meant to be   you're the story of my life and I can't let you go


I have a question about hyperbolas as follows.  Given this basic diagram of a hyperbola, with points $a, b, c$ (and their negatives respectively), how can I prove the fundamental formula $a^2 + b ^2 = c^2 $ geometrically (in terms of $a, b,$ and $c$) and be able to explain it to my math teacher and class (high school sophomores in PreCalculus).  My difficulty lies in how the line from $(0,b)$ to $(a,0)$  is the same as $(c,0)$ .  Best, A PreCalculus Student

When I teach conics, I give a simple geometric argument for the Pythagorean relation for ellipses. (By "Pythagorean relation" I mean the fact that the square of the focal length $c$ is the difference of the squares of the semimajor and semiminor axes, i.e. $c^2=|a^2-b^2|$ for the ellipse defined by $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$.) The picture argument goes as follows: just draw the obvious isosceles triangle from the two foci to one of the two points at the end of the minor axis. We see two right triangles; in each, one leg is the focal length $c$ and the other leg is the semiminor axis, while the hypotenuse is the semimajor axis. The result follows from the Pythagorean theorem applied to this right triangle.  But when it comes to the Pythagorean relation for hyperbolas, I can't think of an equally convincing picture to draw. Instead I have to give a rather inelegant algebraic argument for the relation $c^2=a^2+b^2$ (for the hyperbola defined by $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$, with focal length $c$), directly from the definition of the hyperbola. The messy details are below.*  Now, obviously there is an asymmetry between the argument for the ellipse and the argument for the hyperbola: the ellipse argument is almost trivial and doesn't involve working straight from the locus definition, but the hyperbola argument is tedious and does require working straight from the definition. So, my question:     Is there an equally persuasive picture I could draw to convince high   school students of the Pythagorean relation for hyperbolas -- without having to get technical with points at infinity, say?   The natural triangle to draw is the right triangle with legs from the center to a vertex and from that vertex to an asymptote, which has legs of length $a$ and $b$; but then the problem becomes why the length along the asymptote should be equal to $c$. I doubt there is a purely (Euclidean) geometrical reason because this triangle lies on the asymptote, not on the hyperbola itself; I suspect some sort of limiting procedure will be required.    [*] The tedious algebraic details:     The foci lie at $(\pm c,0)$.   Say $a>b$. Then hyperbola is the locus of points $(x,y)$ such that       $$\left|\sqrt{(x+c)^2+y^2}-\sqrt{(x-c)^2+y^2}\right|=2a$$      Assume for simplicity the expression between the absolute value bars   is positive. (The algebra is even more tedious if we don't make such a   simplifying assumption.) Then moving the right root to the other side   and squaring gives      $$(x+c)^2+y^2=4a^2+(x-c)^2+y^2+4a\sqrt{(x-c)^2+y^2}$$      Simplifying gives      $$xc-a^2=a\sqrt{(x-c)^2+y^2}$$      and upon squaring again we have      $$x^2c^2-2xca^2+a^4=a^2(x^2-2xc+c^2+y^2)=a^2x^2-2xca^2+c^2a^2+a^2y^2$$      which reduces to      $$x^2(c^2-a^2)-y^2a^2=a^2(c^2-a^2)$$      Defining $b^2:=c^2-a^2$ brings the equation into the form   $x^2/a^2+y^2/b^2=1$, and the Pythagorean relation follows from the   definition of $b$.


for(int counter=0;counter<cells.size();counter++){             System.out.println("The name typed is "+name);             System.out.println("got to the loop");             String storedName=cells.get(counter).toString();             System.out.println("The cell name is "+storedName);               if(storedName==name){                 System.out.println("Found it!");                 break;             }else{                  System.out.println("Did not find it");             }          }   OUTPUT:  The name typed is JACK  got to the loop  The cell name is JACK  Did not find it  I don't understand why the if statement never returns true?

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


I am trying to make a 360degree photo. I just do such i saw in some you tube tutorials. I change blender render to cyclic render and change camera to panoramic .But when I render it I got a fully black image. How i can solve this.(hopping you can understand. Because my English is very bad)  This is my blender file:   Can you just render it to image and show me it  Because I think it may be problem of my system.   My project  Camera view  Rendering window

In solid mode with Material or Texture, it is shown fine.   But in the Render mode, everything is pitch black. I have a sun, and the Opacity of the scene is set to 100%.    I am new to using Blender, so I have no idea what is wrong. If you could help, I would appreciate it. If you need more information to help me, I would be glad to give it.


I downloaded a  fresh copy of ubuntu 18.04.2 installation disc (yes I did the md5 checksum of the image before making the bootable USB disk).  I then installed it on an old laptop.   I had an old installation of 14.04 on it, but I formatted the / partition (but not /home /opt/ partition), so there was no old libraries or binaries around, and install the new ubuntu 18.04 on the formatted / partition, but then mounted the old /home and /opt. Pretty standard stuff. When installing, I chose "download all updates" after installing, which I take is just doing apt-get update && apt-get dist-upgrade.  I then boot into the new installation. I did a  apt-get update apt-get install build-essential  The following packages have unmet dependencies: build-essential : Depends: gcc (>= 4:7.2) but it is not going to be installed Depends: g++ (>= 4:7.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   This is a fresh installation and I could not install build essential! aptitude install build-essential throw up some none-sense errors like this  Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed   Not to be daunted, I tried a simpler fare:  apt-get install gcc Depends: gcc-7 (>= 7.3.0-12~) but it is not going to be    installed     E: Unable to correct problems, you have held broken packages.  But of course, I have gcc-8 installed!  aptitude install gcc libtsan0 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed liblsan0 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed libatomic1 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed   I tried to install the basic numerical package lapack  aptitude install liblapack3 libquadmath0 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed   There must be something really broken in ubuntu's end. My /etc/apt/sources.list is pristine, and has only these lines not  commented off:  deb http://archive.ubuntu.com/ubuntu bionic main restricted deb http://archive.ubuntu.com/ubuntu bionic universe deb http://archive.ubuntu.com/ubuntu bionic multiverse deb http://archive.ubuntu.com/ubuntu bionic partner   I've been using Ubuntu as my primary os for over 14 years, since 5.04 days, but never seen anything like this before. I thought by doing a fresh installation (rather than upgrade) on a LTS  version would be relatively safe...  Any help would be greatly appreciated by this very confused user.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Ser Ilyn Payne is still alive and Arya stopped mentioning him in her death list; after all he was the one who beheaded Ned Stark in the first place. So why has he fallen off her list?

As per this  , Arya tells the Hound her kill list:  - Walder Frey  - Meryn Trant  - Tywin Lannister  - Melisandre  - Beric Dondarrion  - Thoros of Myr  - Ilyn Payne  - Gregor Clegane  - The Hound  - Cersei Lannister  - Joffrey Baratheon    As per this  at 2:10 Arya only says:  - Cersei Lannister  - Gregor Clegane  - Walder Frey    waif: "That is a short list. That can't be everyone you want to kill. Are you sure you are not forgetting someone?" Arya: "Which name would you like a girl to speak?"  Did Arya actually fail this test? Did the waif know Arya was lying about the length of her list and then started testing her by using the second person pronoun, you. And Arya did respond to you. Previously, Arya only talked about herself in the third person.  Or, had Arya's feelings actually changed? Realizing she was too blood thirsty, she had shortened her kill list even before going to Braavos?    And, what did Gregor Clegane ever do to House Stark? Why is he on the shortened kill list? Tywin did order him to raid the Riverlands in season 1, and House Tully is from the Riverlands, and Arya's mother is from House Tully... so is that why Arya hates the Mountain more than even Joffrey? Tywin? (Arya could not know that they are both dead)  Addendum Unlike her killing of Meryn Trant, I bet Arya now has "permission" to assassinate Cersei, the Mountain, and Walter Frey. After all, she was not whacked for saying those 3 are on the kill list.


In this exercise I've shown first that if we have $P'(X)=0$ then the $Car K$ different $ 0$. Now they are specifing that if$ K$ is a finite field than $P$ is reductible. I've been searching for hours, tried to write the derivative of $P$ but I get nothing intersting.  Any Hint ?   Thanks for reading,

I'm hoping someone can give me a nudge in the right direction...     Let $F$ be a finite field, and let $f(x)$ be a nonconstant polynomial whose derivative is the zero polynomial.  Prove that $f$ cannot be irreducible over $F$.   I've got that every root of $f$ is a multiple root and that for $F=\mathbb{F}_{p^r}$, the exponent of every term of $f$ is a multiple of $p$.


I don't know how to install aircrack-ng I have downloaded its latest version. I am new to use ubuntu.So,please respond forward to my question

I have downloaded the tar.gz package from the site and then I have extracted using tar -zxvf command as mentioned over there. After that I used sudo apt-get install build-essential then I further installed libssl-dev. Then I changed directory to the aircrack folder. But when I type either sudo make or just make I am getting this same error. I don't know what to do. I have installed the file what they have asked in the error as well. Still the same error is shown. Okay I am not permitted to upload images.   The error is :   common.mak:85: *** Cannot find development files for any supported version of libnl. install either libnl1 or libnl3..  Stop.


This is my spinet:  $scope.foodtypes = {    'GRAINS': {       'HOT': ['Rice','Beans','Sogum'],       'ROOT': ['Yam','Potato','Cassava']    } }     I like to store the exact word "GRAINS" or "ROOT" in a variable for decision making:  something like:  if foodtypes is "GRAINS"     then ......  if foottypes is "ROOT"   then ......  Please how do I capture "GRAIN" or "ROOT" for use?

Say I create an object thus:  var myObject =         {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"};   What is the best way to retrieve a list of the property names? i.e. I would like to end up with some variable 'keys' such that:  keys == ["ircEvent", "method", "regex"]


Is there a way to force windows to display in monochrome(also known as grayscale)?  I'm working with a student who has ADHD (and I am mildly ADHD myself).  The colors are too much for him/her to handle.

Is there a universal way to turn Windows 7 Aero desktop, all windows, etc into grayscale? I had an option to do this in Intel video drivers on my old laptop, now I have NVIDIA and don't know how to replicate this effect.   There might be a shader or filter that would cause Aero to render stuff into grayscale, but I was unable to find anything. Or must it be explicitly supported by video driver as a bonus?


I have a computer with an Intel i7 6700HQ processor that seems to support 2133 MHz DDR4 memory. My question is: what would happen if I add DDR4 RAM running at a clock speed of 3000 MHz?  The reason I ask is because I'm currently getting 3000 MHz RAM cheaper than 2133 MHz RAM on Amazon.ca:        Which should I buy and why?

Looking at the  CPU, under Memory types it says "DDR3-1333/1600". My question is, in what way does the CPU limit the RAM speed? What would happen if I put in a DDR3-2133 RAM chip together with the CPU, if the motherboard supports the faster RAM speed? Would it be better to get a RAM chip that is DDR3-1600 so it matches the CPU's listed frequency?


I have a shapefile with several forest data. One of the field is called forest types.  I would create a shapefile for each forest type so Select tool with an easy SQL Expression, such as "forest types" = 'larch' and then "forest types" = 'spruce', but I would automate this operation with ModelBuilder and not changing every time the attribute for selection.  How can I do this?

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field.   Is there a way to do this?


I've read in several places around the Student Loans repayment policies and I see a lot of forgiveness perks for having made more than 125, or 300 payments.  I am currently on the IBR repayment plan and I receive a monthly bill for $0.00.  Does this $0.00 count as a payment?  What about the payments greater than the amount due? If I made 300 payments of $1.00 each, would that constitute forgiveness?

Student loans can be forgiven after ten years of being a teacher ().  If there is no chance for a new teacher to pay off the loan in ten years, is there any benefit to pay anything other than the minimum (income-based) payment for ten years?


The  shows this for the Basic Links:  There are three ways to write links. Each is easier to read than the last: [Google](http://www.google.com/)Here's an inline link to . [Google][1]Here's a reference-style link to . [Yahoo!][yahoo]Here's a very readable link to .    [1]: http://www.google.com/   [yahoo]: http://www.yahoo.com/   Instead, it should look like  Here's an inline link to [Google](http://www.google.com/). Here's a reference-style link to [Google][1]. Here's a very readable link to [Yahoo!][yahoo].    [1]: http://www.google.com/   [yahoo]: http://www.yahoo.com/   Can this be updated?

In the  I see:    Is that what the help is supposed to say and look like? Because it doesn't make sense to me.  As animuson points out in a comment, all of the highlighted example text is being shifted to the very left of each line. The entire page is broken.


Given a parameter $1, I want to subtract 5 minutes from that time, and echo it (later reuse the variable).  echo $1 time5=date -d "$1 5 minutes ago" +'%H:%M' echo ${time5}   Call with: ./script.sh 16:55  Result:     prints  16:50      ./script.sh: line 2: -d: command not found   Why can't I assign the date to the variable time5?

I'm interesting in directing the output from two commands to a variable.  I don't want the output to be displayed on the screen, but instead assigned to a variable within my script so that I can use it again.  what I am doing is getting the file size from a directory using the commands seen below:  ls -l /var/spool | wc -c   This command gets me the file size in bytes and displays the output as an integer.  I am interested in getting this integer assigned to a variable of my liking so that I can compare it against another variable later  This doesn't seem to work:  size = ls -l /var/spool | wc -c   Would redirection work?   Like this....  ls -l /var/spool | wc -c > size   Either way I want this numeric output to be assigned to a variable and not displayed on the screen.  Any suggestions are very welcomed!


In need of replacing the very out dated XP sp2 on computer   downloaded the latest ISO file from down load centre -which was in a compressed file   i originally burnt onto a cd disc on basis I could then boot from CD and then have a seamless change over to Ubuntu   I don't appear to be able to boot from the disc as first option, I checked the boot sequence this was all confirmed despite hitting F12 to change boot location no luck period.  Should this ISO file be unzipped or decompressed and then boot from cd disc or am I missing something   alternative is I try and deinstall XP from computer altogether and hopefully then I can boot from disc ?

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


I'm not sure if it's actually grammatically correct at all. However, if it is, would it mean 'when help is needed' or 'when help is necessary' (the usual meaning of 'if need be'). In particular, I've had in mind a dedication "To someone, for support when it was needed", but phrased in a slightly more poetic way. However, I've been second guessing myself.   Thank you.

Recently I ran across the sentence:     "Just why the law prescribed thirty-nine lashes instead of forty or forty-one and so on, must needs remain unanswered."   How did a plural verb like "needs" wind up as an adverb?  Is it alone in this phenomenon, or are there other examples that appear to be an odd misplacement of a second verb, but are actually adverbs as well?


Could someone explain what is, from a mathematical practical point of view, PCA in data analysis and when to use it briefly ? and also when to use Eigenvalue decomposition VS Singular value decomposition ? Thanks

I am trying to prove some statements about singular value decomposition, but I am not sure what the difference between singular value and eigenvalue is.  Is "singular value" just another name for eigenvalue?


Example #1  This site contains links to books that I read. I recommend these/those books.  NOTE: The links are on this site, but not on this page. The links are external links. Should I use these or those? Why?  Example #2  This page contains links to books that I read. I recommend these/those books.  NOTE: The links are on this page, but you might have to scroll down a little to find them. The links are external links. Should I use these or those? Why?  Example #3  I read “Book Name + Link”, “Book Name + Link”, and “Book Name + Link”. I recommend these/those books.  NOTE: The links are external links. Should I use these or those? Why?  NOTE: This  and this  doesn’t help me.

First of all, I'm not a native English speaker, but in school I learned that these is used if referring to something near, and those is used when referring to something far away (temporally or locally). But now I'm sometimes watching English movies and notice sentences like "Have you seen those boots?" while the boots were only centimeters away. Is this just not correct, or have I learned the wrong rules?  Another question is, what if I'm referring to something abstract such as ideas or thoughts so that I can't say if they are far away or not. Should I use those or these?  Edit  So it can't be really wrong in any case if I use these respectively those?


I am trying to comment an API (.Net) that I am exposing to a customer. I am doing this by using XML comments, and extracting via SandCastle.  This is all fine and dandy, however I have unittesting for the API, and thought the code from these would be good to place in the example tags.  So does anyone know of a good way to extract unit test code and place in the example tags? Or does anyone have better ideas?  Of course I redistribute the unit tests with the API, but it would be good to have them in the documentation.

My team is responsible for the development of an API for a large system that we also write. We need to provide example code so that other developers using our API can learn how to use it. We have been documenting the code using the xml document comments. eg.  /// Summary here /// <example>Here is an example  example code here </example> public void SomeFunction()    We then use Sandcastle and build the help files we need (chm and an online website).  It is quite embarrassing when the example code doesnt work, and this is usually because some functionality has changed or a simple error.  Has anyone ever done something like this, but also configured unit tests to run on the example code so that they are known to work during the build?


I have a View showing a list of nodes that has a block display, with AJAX enabled. It seems that that is required when you using exposed filters on a block display in 8.  What I want to do is autosubmit the form (where did this option go?) when a filter is changed. This is the jQuery I have tried:      $('select[data-drupal-selector="edit-field-article-category"]', context).change(function() {       $('input[name="sort_by"]').attr('value', 'created');       $('form#views-exposed-form-blog-blog-listing input[data-drupal-selector="edit-submit-blog"]').trigger('click');     });      $('select[data-drupal-selector="edit-field-article-category"]', context).change(function() {       $('input[name="sort_by"]').attr('value', 'created');       $('form#views-exposed-form-blog-blog-listing').trigger('submit');     });      $('select[data-drupal-selector="edit-field-article-category"]', context).change(function() {       $('input[name="sort_by"]').attr('value', 'created');       $('form#views-exposed-form-blog-blog-listing').submit();     });   In the first case, nothing happens. In the latter cases, the page reloads with the query string attached. Nothing in the view is filtered.  What am I missing?

I have an exposed filter for one of my views and I added a drop-down select for the users to pick from.   In Views for Drupal 7 there was an Auto-Submit check box, but I can not seem to find it in Drupal 8 at all. Does anyone know where it may be hiding or how I can get the filter to auto-submit.


My 18 month old daughter already has figured out that she ought to use the potty for pee-pee and poo-poo. She also makes effort to use the potty, although she sometimes informs of her need to use it while in the middle of the business.  Recently we realised she's using the potty as an excuse to get out of bed when she shouldn't. For instance, while waiting to fall asleep at night she requests to leave the bed to go pee.  However, she sits on the potty, doesn't actually make use of it but tries to make conversations.  Is it OK to tell her she could pee in (diaper) pants at night?  I worry that asking her to do her business in her pants may adversely effect her potty training progress.

We are working on potty training our two year old girl and it is interfering with our bedtime routine.  She will often keep requesting to use the potty, knowing that we will take her out of bed to go to the bathroom, sometimes as many as four times in a night.  It became obvious pretty quickly that she was just delaying bedtime because she would just try and talk with us while on the potty and make jokes.  We have been trying to make it as boring as possible, by standing out in the hall so that she does not have someone to directly interact with while on the potty.  How can we reduce the number of times we take her to the potty after putting her to bed without giving her a complex about the toilet?  I am afraid to deny her the extra potty runs since sometimes she actually does go on the extra times (thought more often not).


I was trying to play with Java references and I got an interesting situation. This following piece of code gives unpredictable output to me. I am trying to modify an array, a string and an integer in a function.   public static void main(String[] args){      int[] arr = {1,2,3,4,5};       Integer b = 6;            String s = "ABC";       fun(arr, b,s);      for(int i : arr)          System.out.print(i + " ");      System.out.println();      System.out.println("b="+b);      System.out.println("s="+s);  }      public static void fun(int[] a, Integer b, String s){      b = b*10;             for(int i =0; i<a.length; i++)      {          a[i] = a[i]+10;      }             s=s+"PIY";  }   Now this gives following output :  11 12 13 14 15  b=6 s=ABC   I don't understand why array is getting changed but string and integers are not getting changed inside the function.

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


Today I noticed this squished spacing on the  (using the new navigation with defaults) here on MSE:    The space between the name (and optional diamond) and the reputation number is smaller than on other sites and, I think, smaller than it was a week or so ago.  I've circled a couple cases that look particularly bad with this styling.  In all my screenshots I've attempted to include both diamond and regular users, and reps with and without collapsing (up to 4 digits is given exactly; after it's, e.g., "10.7k").  I don't see this spacing problem on The Workplace, which has the new base CSS:    And I don't see it on Mi Yodeya, which is still awaiting the CSS update:    So the spacing isn't only due to new-versus-old CSS, and that might be a red herring.  MSE is the only site that has the new navigation (right?), so I'm not sure how to test that variable.  Anyway, whatever's causing it, it looks kind of weird.  If it only occurs on MSE then that's minor, but if it's caused by something that's being tested on MSE before being rolled out to the whole network, we might want to fix it.

Consider this:    We need a space there! Yikes. At first I thought the user's full handle was developingo31. Maybe if it was a different color too that might be neat? Like a slightly lighter (or darker) gray than the "asked xxx ago"?


I know that the menu can be modified editing the .xml file responsible for it, but I've did a research on the web and nothing helped me find this file. So I'm here asking, how to customize the Lubuntu menu? Where is the .xml file responsible for it?  This is the Lubuntu menu: (the image is just to illustrate the question, as I could not find a screenshot of Lubuntu 12.10 menu)

Main menu (alacarte) cannot record changes as it should. Some time it does, but randomly and rarely.  Is this a bug?  This question is not a clone of . In that case the Main menu would not open, in this case it does but changes are rarely recorded.


I want to handle refreshing this data source in a separate thread. Currently it is being updated in the main thread. DBGrid is a TDBGrid and is bound to a dataset and a TFDQuery. In the contructor for the the form i set the DB connection and call Open on the query. After that i continually call the updateview on a timer from the main thread. So my question is, can i simply put the call DBGrid.DataSource.DataSet.Refresh; into a separate thread or do i need to manually call the query Close and Open function in a separate thread and in a call to Syncronize set the dataset on the DBGrid.DataSource ? procedure TMySimpleView.UpdateView; begin    try     DBGrid.DataSource.DataSet.Refresh;   except     ON E: Exception DO begin       //Handle Exception     end;   end; end;

I'd like to be able to open a TDataSet asynchronously in its own thread so that the main VCL thread can continue until that's done, and then have the main VCL thread read from that TDataSet afterwards. I've done some experimenting and have gotten into some very weird situations, so I'm wondering if anyone has done this before.  I've seen some sample apps where a TDataSet is created in a separate thread, it's opened and then data is read from it, but that's all done in the separate thread. I'm wondering if it's safe to read from the TDataSet from the main VCL thread after the other thread opens the data source.  I'm doing Win32 programming in Delphi 7, using TmySQLQuery from  as my TDataSet descendant.


I have a table in which I have 2 Column ID Int and IsActive Bit. I want to update bit value.  If bit is true then false and if bit is flase then true.  For This I have used below query and its works fine but is there any other way to do this task.  Update  Table_1  set IsActive = Case when IsActive = 0 then 1 Else 0 End   Thanks, Hitesh Paghadal

Trying to perform a single boolean NOT operation, it appears that under MS SQL Server 2005, the following block does not work  DECLARE @MyBoolean bit; SET @MyBoolean = 0; SET @MyBoolean = NOT @MyBoolean; SELECT @MyBoolean;   Instead, I am getting more successful with  DECLARE @MyBoolean bit; SET @MyBoolean = 0; SET @MyBoolean = 1 - @MyBoolean; SELECT @MyBoolean;   Yet, this looks a bit a twisted way to express something as simple as a negation.  Am I missing something?


It seems like the two equations are identical indicates that there is something more going on that unites them both, maybe in a cool way or something. Why are these two laws so similar?

In classical mechanics, we had Newton's law of gravity $F \propto \frac{Mm}{r^2}$.  Because of this, all laws of classical electrostatics applied to classical gravity if we assumed that all charges attracted each other due to Coulomb's law being analogous.  We can "tweak" classical electrostatics to fit gravity.  In modern physics, does the reverse work?  Can we "tweak" General Relativity to accurately describe electrostatics or even electromagnetism?


I made 2 classes one is :   public class JavaApplication5 {   public static void main(String[] args) {     int y=0;     cats catobject = new cats();     catobject.ma(y);     System.out.println(y);   } }   the other is :   class cats {    public void ma(int x){     x=x+9;   } }   it's supposed to print out 9 since the method ma should have added 9 to the integer y , but instead it prints out 0. why?


I get an linker error (2001, unresolved external symbol) with the following code. It only happens with templates, i can perfectly do the same thing with void, int, etc.  //a.h  template<typename T> T foo( DWORD );    //a.cpp  #include "a.h"  template<typename T> T foo( DWORD bar ) {     return T(); }    //main.cpp  #include "a.h"  void something() {     int hello = foo<int>( 1 ); }   It does work when i put the declaration of foo inside the header file like this  //a.h  template<typename T> T foo( DWORD bar ) {     return T(); }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have a Windows forms application that I wont a console extension. I cant find a way to add a new console and also if there is a way how would i call it?

Is there a way to show the console in a Windows application?  I want to do something like this:  static class Program {     [STAThread]     static void Main(string[] args) {         bool consoleMode = Boolean.Parse(args[0]);          if (consoleMode) {             Console.WriteLine("consolemode started");             // ...         } else {             Application.EnableVisualStyles();             Application.SetCompatibleTextRenderingDefault(false);             Application.Run(new Form1());         }     } }


We can raise and lower indices of any tensor with a non-zero rank by applying the metric tensor with indices properly located. My question is: why is the metric tensor the tool we use for such operations? If we use another tensor we would perform the same raising or lowering operations but obviously with different numerical results. In different words, if I have a covariant vector $\tilde T=T_\nu\mathbf e^\nu$, why do I get its contravariant version $\vec T=T^\mu\mathbf e_\mu$ just through the metric tensor?

Any rank 2 tensor would do the same trick, right?  Then, which is the motivation for choosing the metric one?    Also, if you help me to prove that $g^{kp}g_{ip}=\delta^k_i$, I would be thankful too ^^


Let $f(x+1)=f(x)\cdot f(y)$, for all $x,y\in\mathbb{R}$. If $f(1)=8$ then find $f\left(\frac{2}{3}\right)$. I'm trying to find it as below. \begin{align} f(1)=f(0+1)=f(0)\cdot f(y)=8\\ f\left(\frac{2}{3}\right) = f\left(-\frac{1}{3}+1\right)=f\left(-\frac{1}{3}\right)\cdot f(y). \end{align} Since I can't find $f(y), f(0), f\left(-\frac{1}{3}\right)$, now I confused how to find $f\left(\frac{2}{3}\right)$. Any hint to solve that?

This is part of a homework assignment for a real analysis course taught out of "Baby Rudin."  Just looking for a push in the right direction, not a full-blown solution.  We are to suppose that $f(x)f(y)=f(x+y)$ for all real x and y, and that f is continuous and not zero.  The first part of this question let me assume differentiability as well, and I was able to compose it with the natural log and take the derivative to prove that $f(x)=e^{cx}$ where c is a real constant.  I'm having a little more trouble only assuming continuity; I'm currently trying to prove that f is differentiable at zero, and hence all real numbers.  Is this an approach worth taking?


I often see late answer to some post which already has decent number of votes which has accepted answer, and these new answers (mostly by new users) don't any any value and just eat the screen-space + the precious memory of SE hosting + the money + the maintenance cost + time of the user coming/reading the post in future (most important for me).   I thought flagging these for deletion should be good. But, I am not sure what should be the right course of action. What do the meta users have to say about these? Your views?

I was discussing this question on team chat:  This question is a high value asset on the site it was posted, it already has 150k views, 120+ total votes between questions and answers, and a very high ratio of positive anonymous feedback. I approached improving this question aggressively, too aggressively for the team's taste:  I made  to the accepted answer  I deleted 8+ "duplicate" answers in that question, including a  and  answer in that question.    (Since then I have undone my actions, except for a comment conversion and the big edit.) This raises the question: What should be done to keep this high value question in great shape so it effectively helps lots of people down the line? Specifically:  Should there be any answer deletion? No answer deletion? Some answer deletion? Should we play favorites improving the top voted answer / first answer? Will deleting answers with +17 and +13 score turn away high rep users? Has this asset become a public resource, whatever that means? What should we do when new answers trickle in and are duplicates?


Consider $\sqrt[3]{17}$. Like the famous proof that $\sqrt2$ is irrational, I also wish to prove that this number is irrational. Suppose it is rational, then we can write:  $$ 17 = \frac{p^3}{q^3}.$$ and then $$ 17q^3 = p^3$$  With the proof of $\sqrt2$ we used the fact that we got an even number at this step in the proof and that $p$ and $q$ were in lowest terms. However, 17 is a prime number, somehow we could use this fact and the fact that every number has a unique prime factorisation to arrive at a contradiction, but I don't quite see it yet.

Please correct any mistakes in this proof and, if you're feeling inclined, please provide a better one where "better" is defined by whatever criteria you prefer.    Assume $2^{1/2}$ is irrational.  $2^{1/3} * 2^{x} = 2^{1/2} \Rightarrow x = 1/6$.  $2^{1/3} * {2^{1/2}}^{1/3} = 2^{1/2}$. if $2^{1/2}$ is irrational, then ${2^{1/2}}^{1/3}$ is irrational.  $2^{1/3} = 2^{1/2} / {2^{1/2}}^{1/3}$.  $2^{1/3}$ equals an irrational number divided by an irrational number.  $2^{1/3}$ is an irrational number.


I need to take my monitors for my workstation with me.  Can I pack them in checked luggage? I have two monitors and they are 13 1/2 inches length by 16 inches width.

I am not a frequent traveler, at least not yet.  I would like to know if a 24" computer monitor in its original box the size of a large luggage would be allowed on board a plane even for an extra charge?  Moreover, I'd like to know what are the safest (and hopefully not expensive) ways I could ship the monitor.  PS: I would prefer to ship it as an extra check-in but I am afraid it gets damaged at some point due to mis-handling especially at the destination airport as I know for a fact that luggage is not well handled at the destination I will be arriving at.  This will be a one-time shipment. And it is one package.  Dimensions as provided by supplied: 53.2 x 35.1 x 4.57 cm (L x H x W)  Weight: ~ 8.5 kg  Item purchased from Amazon.fr:   PS: Original box has cardboard not foam frame.   Shipping origin: EU  Shipping destination: Middle East.  alternative idea 1: I think that taking it as hand luggage without the box would be possible as the monitor can be pivoted in landscape and portrait mode. Moreover the stand can be detached. The main weight is in the stand. Suggestions for protection and transport bag would be appreciated.  alternative idea 2: Detaching the screen and packing it in the luggage between clothes would probably keep it safe? And taking the stand as hand luggage along my backpack.


I'm creating a large ocean with the Ocean Modifier for a still render. I need the ocean to be fairly choppy but find that the only way I can get it fairly choppy is if I repeat the texture 5 time in both X and Y direction as per image below.    This makes the texture look very repetitive. Is there a way that I can create a large size ocean with lots of choppy waves that are not an exact repeat?

I want to make a scene of a missile flying over the ocean. Because I want the missile to be relatively high up, the ocean looks very repetitive.   How can I make the ocean not look tiled without scaling up the object and making the waves smaller?


In a production site, the current configuration I am using is three SQL Server 2012 servers, with some databases configured with AON High Availability. I understand that between the AON High Availability databases, data would be replicated, but I was wondering if this remains true for the table definition. By my understanding, I believe that table structures not to be handled manually. CMIIW.  Assuming that is correct, what is the best way for me to deploy changes in table structure with minimal downtime?  Update:  It seems I missed out a similar question but with different wording, but nevertheless it answers my question:   Even though it's a duplicate question, but I think I'll keep this just for those who is searching it with a different wordings.

My organization is planning to adopt SQL Server 2012 Availability Groups and I am trying to understand what impact (if any) it will have on our application upgrade process.  We release application updates on an 8 week cycle and any release could include schema changes and/or data migrations.  What I am trying to understand is whether or not the HA/DR solution handles the schema changes transparently (new columns, indexes get added to secondaries) or is manual intervention required to create the schema on each instance and then turn Always On back on.  The data migration piece I'm assuming is handled transparently but would like to confirm that as well.  I guess I am also making a blanket assumption that there is no difference in these behaviors based on the Availability Groups configuration which may be false as well.  Please let me know.  In a nutshell; In any given release of my application I may change a very large table (10s to 100s of millions of records) by adding columns to it.  Some columns may be "net new" so they can make use of the Enterprise Online schema change functionality.  Other columns may be a refactoring of an existing column (FullName gets split into FirstName and LastName) and a migration will be run for each row in the table to populate these fields. Do any of these behaviors require DBAs to change the AlwaysOn configuration or is this handled by default and all secondaries get the DDL and DML statements "for free"?  Thanks for any clarity you can provide.


This is somewhat embarrassing, but I am having some trouble figuring out how to do a strong induction question. We have to prove that $n^3 - n$ is divisible by $6$ for all $n \in \mathbb{N}$. Now I can see that this must be true, since $n^3 - n = (n+1)n(n-1)$, i.e. the product of three consecutive integers. Therefore at least one of them will be even, and one will be a multiple of $3$. Hence the product will be divisible by $6$. However, I can't figure out how to do it by induction. It's probably quite easy to do once you see one of those trick moves, like adding and subtracting the same thing, etc, but I can't figure it out. Please help!

As homework, I have to prove that     $\forall n \in \mathbb{N}: n^3-n$ is divisible by 6   I used induction  1) basis: $A(0): 0^3-0 = 6x$ , $x \in \mathbb{N}_0$ // the 6x states that the result is a multiple of 6, right?  2) requirement: $A(n):n^3-n=6x$  3) statement: $A(n+1): (n+1)^3-(n+1)=6x$  4) step: $n^3-n+(n+1)^3-n=6x+(n+1)^3-n$  So when I resolve that I do get the equation: $n^3-n=6x$ so the statement is true for $\forall n \in \mathbb{N}$  Did I do something wrong or is it that simple?


I encountered several times with the term of natural variables but I'm not sure I totally understand what does that mean. For example, in Hamiltonian mechanics we calculate the differential of the hamiltonian and see that $$d\mathcal{H}=\sum_i (\frac{\partial{\mathcal{H}}}{\partial{q_i}}\cdot dq_i+\frac{\partial{\mathcal{H}}}{\partial{p_i}}\cdot dp_i)+\frac{\partial{\mathcal{H}}}{\partial{t}}\cdot dt$$  so we say that the natural variables of the hamiltonian are $\{q_i,p_i\}$. Another example taken from thermodynamics is the helmholtz free energy. Again, the same calculation of it's differential gives: $$dF=-SdT-PdV$$  and so we say that the natural variables of the helmholtz free energy are $T$ and $V$ (disregarding the number of paricles). What exactly is the mathematical meaning of these natural variables and does it have a mathematical formal definition? does it relate to independence of these variables?

I'm struggling with the concept of "natural variables" in thermodynamics. Textbooks say that the internal energy is "naturally" expressed as $$ U = U(S,V,N)$$  For an ideal gas, I could take the  - which gives me $S(U,V,N)$ - and solve for $U$ to get $$U = \frac{3Nh^2}{4 \pi m} \left( \frac{N}{V} \left( \exp \left( \frac{S}{Nk} \right) - \frac{5}{2} \right) \right) ^{2/3} = U(S,V,N)$$  However, I have never seen this expression before. Usually, people invoke the equipartition theorem to get $$U = \frac{3}{2}N k_B T = U(T,N)$$ Or they use the ideal gas law to get $$U = \frac{3}{2}N k_B T = \frac{3}{2}pV = U(p,V)$$  So sticking with the example of the ideal gas, this motivates the following questions:   What is "natural" about $U(S,V,N)$ compared to $U(T,N)$ and $U(p,V)$? Can I derive the expressions for $U(T,N)$ and $U(p,V)$ from $U(S,V,N)$? Can I derive $U(S,V,N)$ from $U(T,N)$ and $U(p,V)$?   Note that this question is not about the Legendre transformation between different thermodynamic potentials but about expressing the same thermodynamic potential $U$ in terms of different variables.


Is given metric space $(M, d)$. Let $A\cap B = \emptyset; \,\,\text{dist}(A,B):=\inf\{d(x,y):x\in A, y\in B\}$. $A, B$ are both closed sets. Is it possible that $\text{dist}(A,B)=0$?  The first thought comes into mind is that obviously $\text{dist}(A,B)>0$, but possibly there are some tricky $d$ and $A, B$ so that it's untrue.  Thanks in advance!

Here is my problem:      Find two closed subsets or real numbers such that $d(A,B)=0$ but $A\cap B=\varnothing$.   I tried to use the definition of being close for subsets like intervals but I couldn't find any closed sets. Any hint? Thank you.


To conserve screen space while editing it would be nice to compile without margins when still working on a paper. Is there any way to accomplish that?

I am writing a document for which I need the margin to be exactly as follows: left, right, top and bottom text margin all equal to 1in, distance from bottom of the paper to page number equal to 0.75in (I don't have any footnote or header to set).  I tried to use the fullpage package in LaTeX but it does not give me the 0.75in to the page number. Is there a way to force that? I tried to set manually the margins for a 8.5x11 paper but I am not succeeding.    I tried but after writing:  \documentclass[PhD]{class_file} \usepackage[margin=1in,footskip=0.25in]{geometry}   I get the error message \paperwidth (0.0pt) too short.  I don't see the \paperwidth is set to 0.0pt anywhere though..  Also it seems to me that depending on which machine I use to compile my tex file, I get different margins, even when I set them up manually (without using geometry). Is it possible?    Using the geometry package things seem to work a bit better now (I changed machine and the problem with the paper width previously mentioned disappeared).   \usepackage[margin=1in,footskip=0.25in]{geometry}   gives me without problem upper, right and left margin of 1in. But the lower margin is 1.2in and I can't change it to be 1in even by using bottom=1in or bottom=0.8in. I really don't see how this can happen. Maybe a problem with the spacing between lines? The class files I am using can be fund at   I erased the margin settings of uclath12.clo as the margin I need are different from the ones that this file gives. Thank you.


Does  $\sum_{i,j \in \mathbb{N}} \frac{1}{(i+j)^2}$ exist? I tried with $ \frac{(i+j)}{2}\ge \sqrt{ij} $ but this seem to be of no work as for each fixed $i$, $\sum_{j} \frac{1}{ij}$ does not exist. We need a better estimate. But I can not find one. Thanks a lot for your help.

Check whether $$\sum _{m=1}^{\infty }\sum _{n=1}^{\infty }\frac{1}{\left(m+n\right)^2}$$ converges or NOT?  My Try:- $\sum _{m=1}^{\infty }\lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(m+n\right)^2}=\lim_{j\to \infty}\sum _{m=1}^{j }\lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(m+n\right)^2}=\lim_{j\to \infty}(\lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(1+n\right)^2}+ \lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(2+n\right)^2}+ \lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(3+n\right)^2}+...\lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(j+n\right)^2})\ge \lim_{j\to \infty}(j\lim_{i\to \infty} \sum _{n=1}^{i}\frac{1}{\left(j+n\right)^2})$  How do I complete the conclusion?


I could not find any official Ubuntu information on that issue.  If I check the official statement:  there is only information on Ubuntu 17.10 and earlier. Is it possible to complete the "Kernel Mitigations" table on the wiki web page mensioned above with the Ubunut 18.04 LTS?

Any questions relating to status updates, or asking if anything is going to be patched for these vulnerabilities should be closed as duplicates of this question.    are in the news right now and sound pretty severe. I don't see any security updates from Ubuntu that cover these vulnerabilities.  What is Ubuntu doing about these vulnerabilities, and what should Ubuntu users be doing?  These are CVE-2017-5753, CVE-2017-5715 and CVE-2017-5754.


I tried to install cowsay using the command:  sudo apt-get install cowsay   I received the following error message:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


Hey, this is pretty much the first time I'm using the app.   I got a notification for a question I asked. It opened the app and the feed drawer, but it did not pull the actual notification. I was able to swipe down to refresh and then it showed up.

When I receive a message on an SE post, I get a notification like this:    If I double tap this notification, the SE application opens, but my feed is empty approximately half the time. It looks like this:    If I refresh the feed (slide from the top), the feed does refresh and shows the new notification.   The notification, above, leads to  comment.  I haven't figured out the pattern yet, but this occurs roughly half the time I open a notification. It's occurred for chat messages, comments and answers - but not consistently. I have received notifications for the same post (for example, the two comments after the one linked above) that do not show an empty feed. But, a chat message barely 10 minutes later will show the empty feed again.  I am utilizing the beta app - version 1.0.72 on Android 5.0.1.


I've seen similar questions  and .  But am not getting how to left pad a String with Zero.  input: "129018" output: "0000129018"  The total output length should be TEN.

Is there some easy way to pad Strings in Java?  Seems like something that should be in some StringUtil-like API, but I can't find anything that does this.