How do I import a pre-existing Java project into Eclipse and get up and running?

Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate?  I also believe the question, detail, and response is much better than the referenced question.  I've been a C++ programmer for quite a while but I'm new to Java and new to Eclipse.  I want to use the  to visualize some data I'm working with.  This code is organized like this:  ./com ./com/touchgraph ./com/touchgraph/graphlayout ./com/touchgraph/graphlayout/Edge.java ./com/touchgraph/graphlayout/GLPanel.java ./com/touchgraph/graphlayout/graphelements ./com/touchgraph/graphlayout/graphelements/GESUtils.java ./com/touchgraph/graphlayout/graphelements/GraphEltSet.java ./com/touchgraph/graphlayout/graphelements/ImmutableGraphEltSet.java ./com/touchgraph/graphlayout/graphelements/Locality.java ./com/touchgraph/graphlayout/graphelements/TGForEachEdge.java ./com/touchgraph/graphlayout/graphelements/TGForEachNode.java ./com/touchgraph/graphlayout/graphelements/TGForEachNodePair.java ./com/touchgraph/graphlayout/graphelements/TGNodeQueue.java ./com/touchgraph/graphlayout/graphelements/VisibleLocality.java ./com/touchgraph/graphlayout/GraphLayoutApplet.java ./com/touchgraph/graphlayout/GraphListener.java ./com/touchgraph/graphlayout/interaction ./com/touchgraph/graphlayout/interaction/DragAddUI.java ./com/touchgraph/graphlayout/interaction/DragMultiselectUI.java ./com/touchgraph/graphlayout/interaction/DragNodeUI.java ./com/touchgraph/graphlayout/interaction/GLEditUI.java ./com/touchgraph/graphlayout/interaction/GLNavigateUI.java ./com/touchgraph/graphlayout/interaction/HVRotateDragUI.java ./com/touchgraph/graphlayout/interaction/HVScroll.java ./com/touchgraph/graphlayout/interaction/HyperScroll.java ./com/touchgraph/graphlayout/interaction/LocalityScroll.java ./com/touchgraph/graphlayout/interaction/RotateScroll.java ./com/touchgraph/graphlayout/interaction/TGAbstractClickUI.java ./com/touchgraph/graphlayout/interaction/TGAbstractDragUI.java ./com/touchgraph/graphlayout/interaction/TGAbstractMouseMotionUI.java ./com/touchgraph/graphlayout/interaction/TGAbstractMousePausedUI.java ./com/touchgraph/graphlayout/interaction/TGSelfDeactivatingUI.java ./com/touchgraph/graphlayout/interaction/TGUIManager.java ./com/touchgraph/graphlayout/interaction/TGUserInterface.java ./com/touchgraph/graphlayout/interaction/ZoomScroll.java ./com/touchgraph/graphlayout/LocalityUtils.java ./com/touchgraph/graphlayout/Node.java ./com/touchgraph/graphlayout/TGAbstractLens.java ./com/touchgraph/graphlayout/TGException.java ./com/touchgraph/graphlayout/TGLayout.java ./com/touchgraph/graphlayout/TGLensSet.java ./com/touchgraph/graphlayout/TGPaintListener.java ./com/touchgraph/graphlayout/TGPanel.java ./com/touchgraph/graphlayout/TGPoint2D.java ./com/touchgraph/graphlayout/TGScrollPane.java ./TG-APACHE-LICENSE.txt ./TGGL ReleaseNotes.txt ./TGGraphLayout.html ./TGGraphLayout.jar   How do I add this project in Eclipse and get it compiling and running quickly?


Should "Incorrect password" message show the password requirements of the current site?

I have a question that has been bothering me some time, let me illustrate my question with an example:   I use multiple passwords in many applications and sometimes I forget what is the password for some site. At this point, I do what anyone will do in my situation, try again, and when nothing else comes to mind, reset my password. Multiple times I've come to find that the password requirements of the current site is different from the common ones (for example, a-z A-Z 0-9 _? and 8 length) and when I input a password that matches the requirements, I come to find that was my original password all along.   If the site had told me the password requirements I might have remembered correctly my password  So my question is, Why does no one ever show these requirements? Is there any reason for these?   Edit1: I still don't see why showing the password requirements will be a security issue if the page I'm accessing has public registry on and I can see the requirements once I try to create an account  Edit2: yes, this question is a duplicate, It was originally posted in programmers.stackexchange.com and I didnt find a similar question


Real life uses of prime numbers (in physics/engineering)

Prime numbers (or coprimes) have few well-known uses but interesting ones.  The classical example is that prime numbers are used in asymmetric (or public key) cryptography. Prime numbers and coprimes are also used in engineering to avoid resonance and to ensure equal wear of cog wheels (by ensuring that all cogs fit in all depressions of the other wheel).  Are there other known real-world, and especially physical world or engineering, applications for prime numbers?  Existing questions on the Mathematics stackexchange forum revolve mostly around computation examples (see for example ). These questions do not list physics or engineering real-world examples of prime numbers. They concentrate mostly on computational examples.


Find an equation in spherical coordinates for the surface represented by the rectangular equation

The rectangular equation is $$x^2+y^2-8z^2=0$$ $$x^2+y^2=8z^2$$ Know in the relationship between rectangular and spherical coords. we can manipulate our given to fit the form: $$x^2+y^2+z^2=9z^2$$ $$\rho=x^2+y^2+z^2, \space z=\rho\cos(\phi)$$ $$\rho^2=9\rho^2\cos^2(\phi)$$ $$1=9\cos(\phi)$$ $$\frac{1}{3}=\cos(\phi)$$ $$\arccos(\frac{1}{3})=1.23 \space rads$$ And so the equation in spherical coords. is $\phi=1.23$ I know my math is correct but I have the wrong answer so I'm not sure where I went wrong.


Present Simple vs Present Continuous for future actions

I know we can use both Present Simple and Present Continuous to describe future actions. But I don't know when to use the correct form.   For example:  We fly to Paris next week.  We are flying to Paris next week.   These sentences both seem correct to me.  Can anyone explain me how to correctly use these tenses?


How to show $n^5 + 29 n$ is divisible by $30$

Show that $n^5 + 29 n$ is divisible by $30$.  Attempt:  $n^4 ≡ 1 \pmod 5$ By Fermat Little Theorem


My problem is that i can't find synaptic when I click on more programs how to set the .deb files to run with synaptic?


Why does an insert cursor only insert rows when it is followed by del statement even though the del statement is outside the loop?

My insert cursor failed in insert any rows.  After spending time trying to fix something within the main loops, I added the del inCursor after the loop and now the cursor inserts rows.  How can something outside and after a loop impact something above?  #------------THIS DIDN'T WORK:     inCursor = arcpy.da.InsertCursor(fcEmpty,["Shape@","NAME","CO_WI", "CO_NRI","A_NUMBER","LSE_NO","ORIG_LENGTH"])     with arcpy.da.SearchCursor(fcPolyline,["Shape@","NAME","ORIG_LENGTH"]) as firstCursor:         for firstRow in firstCursor: # For each feature in input1             inputFeat = firstRow[0]             with arcpy.da.SearchCursor(testingINLAND, ["Shape@","CO_WI", "CO_NRI","A_NUMBER","LSE_NO"]) as intersectCursor:                 for intersectRow in intersectCursor: # for each feature from input2                     # intersect it with the feature from input1                     intersectFeat = intersectRow[0]                     print "check"                     # dimension ==> polygon geometry (where 1 = point, 2 = polyline)                     clippedFeature = intersectFeat.intersect(inputFeat, 2)                     print clippedFeature                     # setup the insert cursor (for the input you previously created)                     inCursor.insertRow([clippedFeature,firstRow[1],intersectRow[1],intersectRow[2],intersectRow[3],intersectRow[4],firstRow[2]]) # Insert the resulting geometry from INTERSECT geometry method     del firstRow, firstCursor     del intersectRow, intersectCursor  #------------THIS DOES WORK:  inCursor = arcpy.da.InsertCursor(fcEmpty,["Shape@","NAME","CO_WI", "CO_NRI","A_NUMBER","LSE_NO","ORIG_LENGTH"]) with arcpy.da.SearchCursor(fcPolyline,["Shape@","NAME","ORIG_LENGTH"]) as firstCursor:     for firstRow in firstCursor: # For each feature in input1         inputFeat = firstRow[0]         with arcpy.da.SearchCursor(testingINLAND, ["Shape@","CO_WI", "CO_NRI","A_NUMBER","LSE_NO"]) as intersectCursor:             for intersectRow in intersectCursor: # for each feature from input2                 # intersect it with the feature from input1                 intersectFeat = intersectRow[0]                 print "check"                 # dimension ==> polygon geometry (where 1 = point, 2 = polyline)                 clippedFeature = intersectFeat.intersect(inputFeat, 2)                 print clippedFeature                 # setup the insert cursor (for the input you previously created)                 inCursor.insertRow([clippedFeature,firstRow[1],intersectRow[1],intersectRow[2],intersectRow[3],intersectRow[4],firstRow[2]]) # Insert the resulting geometry from INTERSECT geometry method del inCursor del firstRow, firstCursor del intersectRow, intersectCursor


Sorting lines in Notepad++ without the TextFX plugin

The current version of Notepad++ (at the time of this writing) is 6.6.3. Version  is the first that introduced a native (without a plugin) sorting function. At least, that's what they claim; even though we're nine releases after version 6.5.2, I have found nothing about this feature:   There is no sign of it in the menu (or I am blind), There isn't even a word in Notepad++ documentation (online help).   Everything I read around the Internet (including ) still talks about sorting lines using the TextFX plugin. There isn't anything about a native (QuickSort-based) function.  So: How do I sort lines in Notepad++ without using the TextFX plugin?


Python sort dictionary. I want to sort the below dictionary using name key.  I try this but not working.  {k: v for k, v in sorted(mydict.items(), key=lambda item: item[1])}   Sample dictionary  [         {             'id': 34,              'pid': 7,              'name': '1.1. Data Foo',              'open': 'open',             'children' : [                 {                     'id': 23,                     'pid': 89,                     'name': '1.1.1. Data 4',                     'open': 'open'                 },                 {                     'id': 23,                     'pid': 89,                     'name': '1.1.4. Data 6',                     'open': 'open'                 },                 {                     'id': 23,                     'pid': 89,                     'name': '1.1.2. Data 14',                     'open': 'open'                 },             ]         },          {             'id': 32,              'pid': 7,              'name': '1.3. Data Bar',             'open': 'open',             'children' : [                 {                     'id': 23,                     'pid': 89,                     'name': '1.2.1. Data 14',                     'open': 'open'                 },                 {                     'id': 23,                     'pid': 89,                     'name': '1.4.4. Data 86',                     'open': 'open'                 },                 {                     'id': 23,                     'pid': 89,                     'name': '1.0.2. Data 114',                     'open': 'open'                 },             ]         },          {             'id': 33,              'pid': 7,              'name': '1.2. Data Rex'              'open': 'open',             'children' : [                 {                     'id': 23,                     'pid': 89,                     'name': '2.1.1. Data 4o0',                     'open': 'open'                 },                 {                     'id': 23,                     'pid': 89,                     'name': '14.1.4. Data 676',                     'open': 'open'                 },                 {                     'id': 23,                     'pid': 89,                     'name': '1.11.2. Data 1423',                     'open': 'open'                 },             ]         },     ]


Error msg SQL command not properly ended when I try to insert values to table

I'm trying to insert values to a table, but it kept giving me error msg saying the command not properly ended. I checked again and again, I don't see I miss any comma, semicoma, and the table name is correct (I also checked again and again), all column names are correct and in right order too (I checked it again and again too), and the spell of the command is also correct. So what's wrong with my code?  insert into fruits (fid,fname,quantities) values (1,'apple',3),    (2,'orange',2),    (3,'banana',5);


Which is the best method to make the browser use cached versions of js files (from the serverside)?


Prove $f(\sum^k_{i=1} \alpha_i x_i) \leq \sum^k_{i=1} \alpha_i f(x_i) $ for a convex function f

I'm learning for an exam in calculus and have come across this question which I can't seem to prove:  Let $C \subseteq V$ be a convex set. Let there be a function >$f:C\rightarrow \mathbb{R}$ a convex function. Now let there be scalars $\alpha_1,\alpha_2 \dots \alpha_k >0$ such that >$\sum^k_{i=1} \alpha_i = 1$, and also let there be a group of points >$x_1,x_2\dots x_k \in C$. Show that the following inequality exists: $f(\sum^k_{i=1} \alpha_i x_i) \leq \sum^k_{i=1} \alpha_i f(x_i) $  I thought about using induction to show the inequality, whereby the basis k=2 is the actual definition of a convex function i.e: $f(\lambda x + (1-\lambda)y) \leq \lambda f(x) + (1-\lambda)f(y)$ I've ran into a problem using induction, since the scalars won't sum up to 1 in the induction hypothesis. I also don't really use the fact that C is convex, which I'm probably supposed to... Either there is some algebraic trick that can be done so I can use induction, or I'm doing something wrong (and induction is not the way to go with this inequality) Any help will be appreciated, thank you!


Is there a way to "interrupt" an enumerate/itemize environment?

Is there a way to have a normally indented paragraph in the middle of an enumerate/itemize environment? Something more elegant that manually numbering the \items, or a clean way to tinker with counters? Here's what I mean: \documentclass{article} \begin{document} \begin{enumerate}     \item Numbered as One      \item Numbered as Two  It would be really cool to take a break from numbering and have a normally (further left) indented paragraph here.      \item Numbered as Three \end{enumerate} \end{document}


How to get days between two dates on python without built in function

I want to get days between two dates. I got a code, but this is little bit different. Here is my code. End date is fixed by 2021/5/4. yearStart = int(input()) monthStart = int(input()) dayStart = int(input())  yearEnd = 2021 monthEnd = 5 dayEnd = 4  months = [31,28,31,30,31,30,31,31,30,31,30,31]  def isLeapYear(year):     return (year%4==0 and year%100!=0) or year%400==0  def totalDays(year,month,day):     total = year*365+day     for i in range(0,month+1):         total+=months[i]     if isLeapYear:         total+=1     return total  days = totalDays(yearEnd,monthEnd,dayEnd) - totalDays(yearStart,monthStart,dayStart) print(days)


Prove that if $X$ and $Y$ are Normal and independent random variables, $X+Y$ and $X-Y$ are independent

If $X \sim \mathrm{Normal}(\mu,\sigma^2)$ and $Y \sim \mathrm{Normal}(\mu,\sigma^2)$ are independent random variables, how do I prove that $X+Y$ and $X-Y$ are also independent?  What happens with the independence between $X+Y$ and $X-Y$ when $X \sim \mathrm{Normal}(\mu_x,\sigma_x^2)$ and $Y \sim \mathrm{Normal}(\mu_y,\sigma_y^2) $  Thank you


NullPointerException when trying to take screenshot programmatically

I need to take a screenshot which I was coding in my game result screen.  I used the following method that I found in StackOverflow:  public void TakeScreenShot(){     Date now = new Date();     android.text.format.DateFormat.format("yyyy-MM-dd_hh:mm:ss", now);      try {         String mPath = Environment.getExternalStorageDirectory().toString() + "/PICTURES/Screenshots/" + now + ".jpg";          v1 = this.findViewById(android.R.id.content).getRootView();         v1.setDrawingCacheEnabled(true);         bitmap = Bitmap.createBitmap(v1.getDrawingCache());         v1.setDrawingCacheEnabled(false);          File imageFile = new File(mPath);          FileOutputStream outputStream = new FileOutputStream(imageFile);         int quality = 100;         bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);         outputStream.flush();         outputStream.close();          Toast.makeText(this, "Screenshot OK", Toast.LENGTH_SHORT).show();      } catch (Throwable e) {         e.printStackTrace();     } }   but I'm getting NullPointerException at Bitmap.CreateBitmap.  My Bitmap and Views are global and I try to call method in OnCreate.     11-04 15:20:17.868 13569-13569/com.finger W/System.err:   java.lang.NullPointerException   How can I solve this problem?     I FOUND SOLUTION!   I try to call takeScreenshot method in onCreate and always i got same result all different variation, but i try call method in "Share Button" click event, now its working. Thank you.


Show that if $g(f(x)) $ is one-to-one and $f$ is onto, then $g$ is one-to-one

I've attempted to prove this proposition and would appreciate some critique. N.B: I've taken for granted that $g \circ f$ injective $\rightarrow f$ injective.  Specifically, for functions $f:A\rightarrow B$ and $g:B\rightarrow C$ show that ($g \circ f$ injective $\wedge $ $f$ onto) $\rightarrow g$ injective. I tried to prove the contrapositive statement $\neg$($g$ injective) $\rightarrow$ $\neg$($g \circ f$ injective $\wedge $ $f$ onto) $\leftrightarrow$ ($\neg g \circ f$ injective $\vee \neg f$ onto) $\leftrightarrow$ ($\neg g \circ f$ injective $\wedge $ $f$ onto) $\vee$ ($g \circ f$ injective $\wedge $ $\neg f$ onto).   We can have $\neg g$ injective with $g \circ f$ injective if $\neg f$ onto because then there may exist $b \in B$ s.t. $f(a) \neq b\forall a\in A$ so the case might be that there are no $a_1 \neq a_2 \in A$ s.t. $(g \circ f)(a_1) = (g \circ f)(a_2)\leftrightarrow (g \circ f)$ is injective. We can have $\neg g$ injective with $f$ onto if $\neg g \circ f$ injective because then there exists $b_1 \neq b_2 \in B$ s.t. $g(b_1) = g(b_2)$ with corresponding $a_1 \neq a_2 \in A$ s.t. $g(f(a_1)) = g(f(a_2)) \leftrightarrow \neg g \circ f$ injective. However, we cannot have $\neg g$ injective $\wedge$ $[g \circ f$ injective $\wedge f$ onto$]$ because, by the injectivity of $g$, there will exist $b_1 \neq b_2$ with corresponding $a_1 \neq a_2$, since $f$ is well-defined, s.t. $(g \circ f)(a_1) = (g \circ f)(a_2)$ rendering $g \circ f$ not injective.   Q.E.D.  A secondary question, which should perhaps be considered separately, is about how I've (correctly, I hope) manipulated the logical statement of the question. I've considered $\neg$(g injective) $\rightarrow$ $\neg$($g \circ f$ injective $\wedge $ $f$ onto) like an 'equation' with $\rightarrow$ acting like $=$. Then, intuitively, I thought I could separately operate on both sides with ($\wedge g \circ f$ injective) and ($\wedge f$ onto) to get the two separate statements $\neg g$ injective $\wedge g \circ f$ injective $\rightarrow \neg f$ onto and $\neg g$ injective $\wedge f$ onto $\rightarrow \neg g \circ f$ injective which I attempted to show in parts 1. and 2. above. Is this valid reasoning?


In Season 5 of Stargate: SG-1, team member Daniel Jackson was briefly replaced by Jonas Quinn, a human from Langara. In addition to an optimistic, almost child-like curiosity about everything, Quinn shows numerous intellectual abilities above and beyond the average human. He can read quickly, remembers everything he reads or watches on TV (photographic memory?), and is even able to learn new languages abnormally fast. He often shrugs off his abilities, simply calling himself "a quick study".  Unfortunately, we never see much of Quinn's planet or nation, with other Langarans only appearing in a couple of episodes. Quinn eventually leaves SG-1 to return there, joining the new ruling council on his planet and hoping to unite his people. However, we never really hear any more about Quinn or the Langaran people after that.  Is Jonas Quinn typical of humans on Langara, or is he unique even there?


How to index from specific point to end point in C#?

How can you index from mid point of an array to the end point without specify the exact end point. So for example I have an array of {1,2,3,4,5,6} how can I index (find values of) [3] -> [5] (4-6). Its very clear in languages like python but I can't seem to find the answer for C# if there is a short and simple way please let me know thanks! ill give you some more context, I have an array of items and want to get the items from the 2nd value too the end, however the end changes for all the lists, but it always starts from 2nd value.


Do I, an Indian citizen, need a transit visa for a short layover in Sydney?

I am flying AirAsia from Chennai to Auckland via Sydney without changing flight. The layover will be 55 minutes in Sydney.  Do I need to a transit visa for Sydney?  Chennai - Kuala Lumpur, Kuala Lumpur - Sydney, Sydney - Auckland     I am an Indian citizen with a visit visa.


I just heard the conference held in Washington due to the roit in the Congress Capitol The mayor referred to the people who live in Washington as Washingtonians and I remember people who live in New York are caller New Yorkers. Similarly in Australia, people of Melbourne are Melbournians but people of Syndey are Syndeysiders?!! What is the rule of using -ian, -er, or -siders? for the people belong to a city?


I was looking at some code golf submissions, and in one of them, I saw the header f=\. I reproduced it with the code f=\ 1 print(f)  This prints out 1. Why does this happen? Does \ escape the newline? Thanks!


I'm using Ubuntu 12.04, 64 bit. I have tried commands and installing skype directly from the internet, it does not happen.  In laymen's term with detailed description can anyone please help me install Skype on my device?


show custom post's post in two different divs

I have created a custom post type. For that I have used this code  add_action( 'init', 'broker_post_type' ); function broker_post_type() {   register_post_type( 'new_broker',     array(       'labels' => array(         'name' => __( 'Brands' ),         'singular_name' => __( 'Brand' )       ),     'public' => true,     'has_archive' => true,     'supports' => array( 'title', 'editor', 'comments', 'excerpt', 'custom-fields', 'thumbnail' ),     )   ); }   Now to show all the featured image of the post type Brands in a single page I have used this code  function display_broker_posts() {   $args = array(     'post_type' => 'new_broker',     'orderby' => 'title',     'order' => 'ASC',     'posts_per_page'=> -1,   );    $dee_bios = new WP_Query( $args );   if( $dee_bios->have_posts() ):     $dee_output = '
';     $dee_output .= '
';     $dee_output .= '
';     $dee_output .= '
';     while ( $dee_bios->have_posts() ) : $dee_bios->the_post();       if( $dee_bios->current_post == 0 || ( $dee_bios->current_post % 2 ) == 0 ) {         $dee_output .= '
';         }       else {         $dee_output .= '
';         }        $dee_output .= get_the_post_thumbnail( $dee_bios->post->ID,'small', 'bios', array( 'class' => 'alignleft' ) );       $dee_output .= '';     //  $dee_output .= '
' . get_the_title() . ', ' . get_the_content() . '
';       $dee_output .= '
';     endwhile;     $dee_output .= '

';     $dee_output .= '
';   endif;    wp_reset_postdata();   return $dee_output; }   Now this one is giving the result. But here in result I want something different. I want that lets say I have 16 posts in the Post. So it will show first 10 posts in a different div and the rest 6 posts in a different div. So can someone kindly tell me how to do this? Any help will be really appreciable. Thanks


When I search my website on Google I get URLs like: http://example.com/article.php?movie=150  And my new url is: http://example.com/online-stuff/150/title-of-article  How do I get Google to re-crawl my website and index only my new URLs?


I'm writing a simple game. The user is given information about a crime and has to guess who the culprit is. I have long pieces of information:      "This is the story of Catherine Claythorne. When she was in college,   she was a beauty and her best friend, William Claythorne, an IT genius   fell in love with her. However, she decided to married William's   brother, Edward Claythorne.  After college Edward and his best friend,   Lawrence Wargrave, started working for MacArthur Corp and they have   been climbing the corporate ladder ever since."   I created a function to separate the pieces of information into sentences and to print sentence by sentence while waiting for the user to confirm that he has finished reading the text:   def print_waiting_for_user(txt):     by_periods = txt.split(". ")     for line in by_periods:         sys.stdout.write(line + "(PRESS C to continue)")         waiting = input()         sys.stdout.flush()   I want my function to erase all previous output before printing the next.   As you can see in the previous code sample, I've tried using sys.stdout. I've also tried using print(line, end = '\r'):   def print_waiting_for_user(txt):     by_periods = txt.split(". ")     for line in by_periods:         print(line, "(Press C to continue)", end='\r')         waiting = input()   I've also tried using flush = True:  def print_waiting_for_user(txt):     by_periods = txt.split(". ")     for line in by_periods:         print(line, "(Press C to continue)", flush=True)         waiting = input()   Nothing seems to work for me, can you help me? please thanks in advance


How to resize an encrypted LLVM volume and configure it to install another Linux distribution alongside Ubuntu?

I chose to install Ubuntu with a fully encrypted disk, using LLVM.  How can I resize my partition so that I can install a new Linux version alongside Ubuntu?  Here's my current gparted status, this is the Ubuntu default:    I have already seen the following question:      However, that is not about resizing an encrypted partition, but it only talks about the standard LLVM volume. Also, it does not talk about installing the OS after resizing partitions. Can I just use the same /boot partition? How do I configure this?


How do I strip the punctuation from this?

This is my current code in Python. From here, I need to strip the gutenberg.txt of its punctuation. How would I go about this?   import bs4 import urllib.request  #make a string to record location loc = 'http://www.gutenberg.org/files/1155/1155-h/1155-h.htm' #create page object page = urllib.request.urlopen(loc).read() #create the soup object soup = bs4.BeautifulSoup(page,'html.parser') #save into text file  print(soup.prettify()) print(soup.get_text())  string = str(soup.get_text())  f = open("gutenberg.txt","w") f.write(string); f.close()


I am trying to put two images together using java. So I tried drawing a buffered image on top of another buffered image it worked but it ruined the colors of the image the final image is somewhat green Here is my code:    try { BufferedImage source = ImageIO.read(new File("marker.png")); BufferedImage logo = ImageIO.read(new File("pic.png"));  Graphics2D g = (Graphics2D) source.getGraphics(); g.drawImage(logo, 20, 50, null); File outputfile = new File("image.jpg"); ImageIO.write(source, "jpg", outputfile); } catch (Exception e) { e.printStackTrace(); }


Most OO languages prefix their interface names with a capital I, why does Java not do this?  What was the rationale for not following this convention?  To demonstrate what I mean, if I wanted to have a User interface and a User implementation I'd have two choices in Java:        Class = User, Interface = UserInterface   Class = UserImpl, Interface = User      Where in most languages:     Class = User, Interface = IUser   Now, you might argue that you could always pick a most descriptive name for the user implementation and the problem goes away, but Java's pushing a POJO approach to things and   most IOC containers use DynamicProxies extensively.  These two things together mean that you'll have lots of interfaces with a single POJO implementation.  So, I guess my question boils down to: "Is it worth following the broader Interface naming convention especially in light of where Java Frameworks seem to be heading?"


How do I evaluate the integral $\int_0^{\infty}\frac{x^5\sin(x)}{(1+x^2)^3}dx$?

I have no idea how to start, it looks like integration by parts won't work.  $$\int_0^{\infty}\frac{x^5\sin(x)}{(1+x^2)^3}dx$$  If someone could shed some light on this I'd be very thankful.


When t<0 Components in circuit are Jt = 3 A, R1 = R2 = 2 Ω, R3 = 4 Ω ja L = 10 H      At t=0 switch K will be closed and i need to figure out what iL(t) is when t=4  So i tried to figure out iL(t) with  differential equation. First i combined R1 and R2 to get R12=1Ω  Then i transformed power supply from current to voltage Et=Jt*R12=3A*1Ω =3V Then i combined R12 and R3 to get Rz=5Ω Now i can create equation which is  $$E_t=L*\frac{di_L(t)}{dt}+R_ti(t)          $$ After adding constant i can start solving equation $$10*\frac{di_L(t)}{dt}+5i_L(t)=3          $$ $$           u(t)=e^{\int5dt}=e^{5t}    $$ $$           e^{5t}* \frac{di_L(t)}{dt}+ e^{5t}*i_L(t)=e^{5t}*3 $$ $$           \frac{di}{dt}(e^{5t}*i_L(t))=3e^{5t} $$ Then for integral in both sides $$           u=5t $$ $$           \frac{du}{5}=dt $$ $$           e^{5t}*i_L(t)=\frac{3}{5}e^{5t} +C$$ Then divide in both sides $$           i_L(t)=\frac{3}{5}+ C*e^{-5t}$$ Now i need to figure out what is iL(0) so that i can get C, but i don't know how.


Supreme error while updating to KDE on Ubuntu 16.04

So here's the problem. I've deleted LibreOffice, and installed OpenOffice instead. All good there. Then, I've installed KDE Plasma. Looks like this guy has a thing for LibreOffice and KDE-TELEPATHY.  Now, the problem is, I tried to uninstall KDE and now I can't. Because of 2 errrs:   The following packages have unmet dependencies:    kde-telepathy-minimal : Depends: kde-config-telepathy-accounts (>= 15.04.0) but it is not installed   libreoffice-core : Depends: libreoffice-common (> 1:5.1.2) but it is not installed   libreoffice-java-common : Depends: libreoffice-common (= 1:5.1.2-0ubuntu1) but it is not installed   libreoffice-style-breeze : Depends: libreoffice-common (= 1:5.1.2-0ubuntu1) but it is not installed   libreoffice-style-elementary : Depends: libreoffice-common (= 1:5.1.2-0ubuntu1) but it is not installed   libreoffice-style-galaxy : Depends: libreoffice-common (= 1:5.1.2-0ubuntu1) but it is not installed   libreoffice-style-oxygen : Depends: libreoffice-common (= 1:5.1.2-0ubuntu1) but it is not installed   libreoffice-style-tango : Depends: libreoffice-common (= 1:5.1.2-0ubuntu1) but it is not installed   And -f won't solve the issue. Says it doesn't want to uninstall anything or install it. Any clue? I'm quite new with Ubuntu.   Also, tried autoremove, install, install-f, update, upgrade, clean, none of that worked. HELP!


Get impressive pictures at night in Venice

I am going to Venice in the next weeks and specially during the night I would like to have these 2 kind of results if possible with my camera.  Can you recommend me the settings i would need to use for these kind of pictures at nigh?


Is it possible to unload JavaScript with out a page reload?  It's easy to add a file dynamically by ajaxing a file in and appending it to the DOM.  But what about the opposite.  Is there a way to unload a file?  My understanding is that if I append a script element, the JS is loaded.  However if I dynamically remove the script element, the JS remains loaded.  Is there a way to unload a JS file.  Here is an example of a dynamic load:  script_el.src = base + 'some_path' + '?_time=' + new Date().getTime(); document.head.appendChild(script_el); script_el.onload = function () {     libHasLoaded(); };


I usually use sudo apt install <program> to install software but occasionally install via Ubuntu-software application if I want an app to appear in the Applications menu. From what I gather, the snap store is similiar but allows also to download/install from terminal, snap install <program>.  Is there a difference between the Snap Store and Ubuntu software?  Is there any reason to install via Snap rather than Ubuntu Software application?  Thanks


How can I improve the effectiveness of my literature searches?

OK, I know this is a pretty basic question but I haven't been able to come up with any really satisfactory solutions. (I have searched around on this site, but none of the related questions precisely answer my problem.) I'm a first-year PhD student working mostly in evolution, phylogenomics, and conservation biology. I'm looking for basic tips on how I can become more effective at finding papers when I need to research a subject for any of the usual reasons like developing a methodology or drafting a proposal.  Right now I seem to be pretty bad at this. My search strategy pretty much consists of putting likely keywords into Web of Science and Google Scholar, and then looking at whatever papers appear that seem like they might be relevant to my query. Frequently this fails to yield satisfactory results, even when the subjects that I am researching seem like they ought to have a significant body of existing work behind them. I know I must be able to do better, because I see other people coming up with papers that I don't seem to be able to find.  What are some basic best practices for conducting a literature search? I feel like this is a big gap in my existing skillset, and something that will really hold me back if I don't get on top of it soon. Again, I realize that this is a pretty remedial-level question and I appreciate your patience and guidance here.


Can a website know about my browsing history?

When I visit a website it sometimes puts cookies on my browser. Usually cookies keep track of browsing info from that particular site. If I don't delete those cookies and browse other websites, will the cookies be able to know which site I am browsing? Also, can any website read browsing history which is saved by browsers? Can any website know about my browsing history by help of cookies, browsing histories saved by browsers, or by any scripting language e.g. javascript?


Are there infinitely many Substrimes in any base?

$\bullet \textbf{ Explanation}$  A "substrime" is a prime in which all substrings are prime. The number $373$ is an example since $3,7,37,73,$ and $373$ are each prime numbers. In decimal (base-10) the only substrimes are: $$2,3,5,7,23,37,53,73,373.$$ See:   But we can look at substrimes in any base. For example in base-5 the substrimes are $$2,3,23,32,232.$$  There are $103$ substrimes in base-24 the largest of which is  $$266003=(19)(5)(19)(11)|_{24}.$$  We computed these up to base-100 and found base-90 had the most; $1455$ in total (live code: ).  $\bullet \textbf{ Question}$  Does any base have infinitely many substrimes?  $\bullet \textbf{ Attempt}$  Every substrime of $n$ digits can be thought of as two substrimes on $n-1$ digits such that cutting off the leftmost digit of one and the rightmost digit of the other give a substrime of length $n-2$. For example, in base $28$ the substrime  $$(11)(3)(23)(3)|_{28}=244471$$  has $4$ digits. It can be viewed as the substrimes $$(11)(3)(23)|_{28}=8731\quad\text{and}\quad(3)(23)(3)|_{28}=2999$$ which share a common substrime $(3)(23)|_{28}=107$ obtained after truncation.  So let "$S_b(n)$" mean "the amount of substrimes with $n$ digits in base $b$". From the previous bit we obtain two inequalities  $$(1)\quad S_b(n)\le S_b(1)\cdot S_b(n-1)$$ $$(2)\quad S_b(n)\le S_b(n-1)^2$$ which paired with the prime number theorem gives us heuristics $$(1)\quad S_b(n) \approx \frac{S_b(1)\cdot S_b(n-1)}{n\log b}=C_b\frac{S_b(n-1)}{n}$$ $$(2)\quad S_b(n)\approx C_b'\frac{S_b(n-1)^2}{n}$$  Thus we would expect $S_b(n)$ to hit zero eventually since the numerator grows at best like O$(n^2)$ but the denominator grows like O$(n!)$.  But of course, this is hueristic. It seems also highly composite bases have more substrimes. For example, the record holder bases with the most susbstrimes are: $$3,4,5,7,8,12,18,24,30,42,48,54,60,90,...$$  Here is a chart:   I was unable to determine why composite bases have more substrimes.


How to watch Netflix on Firefox 54 in Ubuntu 16.04?

Error Code: F7355-1204   I'm aware that agent switcher add-on or whatever it's called is an option, but I thought Netflix playing was supposed to be native to Firefox at this point.  I've already enabled DRM content.  About a week ago, I was able to play Netflix on Firefox with no problem and I was running Firefox 47. I had to reinstall my OS this week and now I can't seem to get Netflix to run, even with Firefox updated.  Would like to avoid downloading Chrome if an option. Don't want it running in the background all the time like it likes to do.  This question is not a duplicate. The question states that I would like to do so without an agent-switcher add-on if possible. It has also been solved. Not sure why the solution keeps getting deleted.


What is word for "complaining without fully understanding"?

I have a situation of a co-worker who keeps complaining about process without having a deep/fully understanding  of existing processes, some of things he complains already exist and some don't but with a little reading he can get that information, what is the word or a few words to describe this?


How can I execute a LaTeX command then hide the resulting text?

I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle of the page? Normally, this would look ugly (a box text rendered on top of other text). Can we make the text invisible? That is, have a box smack dab in the middle of the page full of invisible text? Or what if we place the box of text outside of the page margins. That way, the text will be there, but not visible?


Prob 2(d) Sec 9, in Munkres' TOPOLOGY 2nd edition: Is it possible to construct a choice function?

Here's Lemma 9.2 in Topology by James R. Munkres, 2nd edition:      Given a collection  $\mathscr{B}$ of non-empty sets (not necessarily  disjoint), there exists a function $$c \colon \mathscr{B} \to \bigcup_{B \in \mathscr{B}} B$$ such that $$c(B) \in B$$ for each $B \in \mathscr{B}$.    The function $c$ is called a choice function for the collection $\mathscr{B}$.   This lemma has been derived using the Axiom of Choice, which is as follows:      Given a collection $\mathscr{A}$ of disjoint non-empty sets, there exists a set $C$ consisting of exactly one element from each element of $\mathscr{A}$; that is, a set $C$ such that $C$ is contained in the union of the elements of $\mathscr{A}$, and for each $A \in \mathscr{A}$, the set $C \cap A$ contains a single element.    The set $C$ can be thought of as having been obtained by choosing one element from each of the sets in $\mathscr{A}$.   Now let $\mathscr{B}$ be the collection of all the non-empty subsets of the set $\{0,1\}^\omega$ of all the infinite sequences of $0$s and $1$s.   Can we explicitly find a choice function for this collection without using the Axiom of Choice?   I know that this is possible for each of the collections of all the non-empty subsets of $\mathbb{N}$, $\mathbb{Z}$, and $\mathbb{Q}$, respectively.   Please note that my knowledge of mathematical logic and set theory is very very limited. So I would like to have an answer to my question using only the concepts that Munkres has talked about in the first nine sections of his book.   The suggested questions are not formulated in this particular context.


I dont like to enter password for every software to install or other thing like it.i look for a way that can login with root user as default when ubuntu started. in fact i want login with a user that have full permission .


Question on compatibility of blood groups

How come a person with blood group O can donate to a person with blood group AB? Since there are A and B antibodies in the O blood group blood surely this would cause agglutination in the blood of the recipient?  My first hypothesis was that the antibodies and red blood cells were separated through use of a centrifuge or something but blood transfusion has been used for hundreds of years before this machine was even invented? What is going on here? Or was it just that before blood types were discovered only people with identical blood groups could donate/recieve from one another?


EC2: Should I restart when I get a "*** System restart required ***"?

When I log into my machines after an apt-get upgrades, I often get this message:    System load:  0.06              Processes:           86   Usage of /:   28.3% of 7.75GB   Users logged in:     0   Memory usage: 6%                IP address for eth0: 172.31.41.38   Swap usage:   0%    Graph this data and manage this system at:     https://landscape.canonical.com/    Get cloud support with Ubuntu Advantage Cloud Guest:     http://www.ubuntu.com/business/services/cloud   *** System restart required ***   Obviously, restarting a production server is not something I'm keen to do very often.  Why is *** System restart required ***? What risks do I take if I don't restart it?


is it possible to integrate a chatter news feed from two seperate orgs?

the senario is that we want to be able to have a 3rd party supplier share post and info from their SF org with users on our internal SF org.   I woulld like to know more about the different options are to do this and the pros/cons of each.  many thanks


How to download all videos on a youtube channel?

I always use youtube for getting information I need.  What I want is a script or a command that grabs and downloads all videos from a given channel.  NOTE: I tried youtube-dl but with no success.


jQuery script in Separate file does not work

I have the following php pages main.php content.php  main.php  When the user clicks a link the content.php page is loaded in a div in main.php page.The main.php when loaded contains a separate script file that has scripts for content.php page. The script works fine when I include it in the content.php but does not work when i place it in a separate file in the head section of main.php What is the reason for this?  JS File  $(function(){     $('#new').click(function(event){         event.preventDefault();         $('#content').load('content.php');     });     $('#rank').click(function(event){         alert("This works!!");         event.preventDefault();     }); });   main.php

                New Page

     /*** Pages get loaded Here ***/

   content.php  jQuery Test


I'm using the tabularx package from within memoir for creating a table. I'm trying to set the row height and found for tabular the command  \setlength{\extrarowheight}{40pt}   However, with my tabularx table it doesn't seem to work and I can't find any way to do it (except maybe by manually setting each newline to a certain height)  Is there a better way to set the row height of all rows within a tabularx?


I have action override on New Case button which runs our custom component.  As you know, we can create a new Case from different places in org, e.g. from related lists. When creating a Case from related list on Account using standard action in Lightning we have prepopulated AccountId to the lookup field. Is it possible to do the same with custom component? I can't catch the AccountId using force:hasRecordId, because action override redirects me to the new page with custom component where I don't have a context of Account. URL also doesn't contain its Id. What can I do to grab Id of context object and populate it to my component?


Prevent pagebreak between two "tabular" tables

I have a file with two tables generated by tabular environment. But the first table is very short but the second one is very long (several pages). As a result, my typesetting automatically starts the second table from a new page. Is there a way to stop this?  \begin{center} \begin{tabular}{l l} ... \end{tabular} \end{center}  \begin{tabular}{l l} ... ... ... (many lines) \end{tabular}


Does normalizing the design matrix change predictions?

I'm trying to show that $\hat{y} = X(X^TX)^{-1}X^Ty = \tilde{X}(\tilde{X}^T\tilde{X})^{-1}\tilde{X}^Ty$, where each column in $\tilde{X}$ is normalized by subtracting the mean and dividing by standard deviation. Is this even true?


$a_n=\sum\nolimits_{i=0}^n 1/(n+i)$ I do not know how to manipulate this

$a_n=\sum\nolimits_{i=0}^n 1/(n+i)$  I have to prove that the series converges and the limit. but i dont have a clue of how to approach it. It seems familiar to $log(1+x)$ but since $n$ is in the denominator i have difficulties to manipiulate it. Thanks in advance


Why won't my YN-568EXII work with a flash trigger?

I have a Canon 5DMk2 and have just bought 2 Yongnuo YN568EXII speed lights. I have an existing Yongnuo RF-603CII trigger, but I cannot get them to work together! Does anyone have any suggestions, as the manual is no use :( Thanks Steve


Does marking the same target with Hunter's Mark end the effect of the Cavalier fighter's Unwavering Mark on that target?

I'm the DM. During one of our games the party's Cavalier used Unwavering Mark on an enemy. Then the Ranger used  (PHB, p. 251) on the same enemy.  The 's Unwavering Mark feature (Xanathar's Guide to Everything, p. 30) says:     This effect ends early if you are incapacitated or you die, or if someone else marks the creature.   I ruled it as hunter's mark being a "mark" and therefore ending the effect of Unwavering Mark. However, we still are not sure if that is how it is supposed to work.  Is the "mark" the skill refers to another Unwavering Mark from another Cavalier, or does it refer to anything that "marks" a creature?


Is there a mechanism to run a "service" by a non-root user?

Is there a way I can have a continuously running, background process that can be controlled by me (a regular, non-root user)?  All I need to be able to do is start, stop and restart the process. Monitoring by PID and sending SIGHUP or SIGINT for termination is fine. I'm okay with using a complicated bash script, it doesn't have to be something system-wide. Just for me.  I also really need it to not stop when I log off from ssh.  Is there a way I can do this in RHEL 6.4?


I'm trying to change directory in shell script to the one given by the command line argument.  #!/bin/bash chmod 755 findfn.sh dir=$1  while [ -d "${dir}" ] do     cd $HOME/"$1" done   I've looked at many other posts and tried:   cd "dir" cd ~/"$1" cd source "$1" Removing #!bin/bash Changing chmod 755 to chmod 700, etc   Where am I going wrong?  EDIT Just tried this   alias dirc="cd /home/$1"     echo $PWD   but it still doesnt change directory, it just keeps printing out  "/home"


Retaining negative meta posts from deleted accounts

The way I understand it, when a user's account is deleted, so are all his posts that have a negative score (see #8 ). This makes a lot of sense to me on a main site. But as we know on meta voting means something different than on main, and a negatively voted post can still be worth keeping around as an important part of the discussion. (I'm sure some of the longtime users can point to a number of good examples where a negatively voted meta post was accepted, implemented, or at least heavily discussed.)  My feature request is that negatively voted posts of deleted users not get deleted on meta only.


Having non-English Text in the addon code of blender

I wanna have Persian text in the addon code of blender.For example I want to use this code: layout.label(text="سلام"). What should I've done?  Please help me. Thanks in advance.


Why did Biff come back to the same timeline in the future?

When old Biff takes the DeLorean and goes back to the future, he comes back exactly to the same time and place he left, but according to Dr. Brown's explanation on the blackboard, he should have gone back to the new future he created, in which he has been rich all his life.  Why doesn't he appear in that new alternate future?


How do some Ws on transcripts affect PhD admissions in mathematics?

I am a senior who is graduating in December with a Bachelor's Degree in Pure math. I would really love to apply to the PhD program. However, I have been really depressed because even though I have a good GPA (3.85), and I have gotten mostly A's in all of my math classes (I have taken math classes up to Topology, measure theory, and Algebra), I feel like this is not good enough since I have 8 W's [withdrawals--no grade given] on my transcript. The horrible part is that 6 of these W's are on math courses. All those W's occurred during my first year at my university. The second year up to now I haven't gotten any W's.  My question is: How horrible (by the Committee who selects candidates for the program) is a W seen on a transcript? Is there anything I can do about it?  I feel like I have a big hole on my transcript, and it has been chasing me throughout my undergrad years even though I managed to hide myself from this monster and continued to take a lot of math courses, earning A's (and two B's) in all of them.


I want to install Firefox, so I copy and pasted this command in terminal:  echo -e “\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main” | tee -a /etc/apt/sources.list > /dev/null   But I got an error:  E: Type '“ndeb' is not known on line 7 in source list /etc/apt/sources.list   How can I fix this?


If I replace my main panel, will I need to fit AFCIs?

This question is about whether "circuits" can be grandfathered if the breaker or panel is changed but the circuit is otherwise not disturbed.   Code is NEC 2017.  My existing main panel has plenty of ampacity but few spaces, and thus, is totally full.  I have several potential paths for an upgrade.    One involves fitting a subpanel and moving 4 circuits (2 double-stuff breakers) there, and adding circuits there.    The other involves outright replacing the main with a very fine 60 space main panel.  No more space problems!  But what happens with AFCI and GFCI requirements? If this were a new house,  nearly all my circuits would require it, but I am grandfathered.  Will the  "new main" scenario void the grandfathering and require that nearly all circuits be upgraded to that protection?   Or can I just move over my old breakers and call it good?


How can we get Pythagoras from the Parallelogram law?

When using the definition and properties of the inner product, we get the parallelogram law: $$\:\,\|x+y\|^2 =\: \langle x+y, x+y\rangle= \langle x, x\rangle + \langle x, y\rangle +\langle y, x\rangle +\langle y, y\rangle\,,\\ \|x-y\|^2 =\:\langle x-y, x-y\rangle= \langle x, x\rangle - \langle x, y\rangle -\langle y, x\rangle +\langle y, y\rangle $$ Adding these two expressions: $$\|x+y\|^2+\|x-y\|^2 \:=\: 2\langle x, x\rangle + 2\langle y, y\rangle \:=\: 2\|x\|^2+2\|y\|^2$$ as required. But the above does not simplify to Pythagoras' theorem $\|x+y\|^2=\|x\|^2+\|y\|^2$ if $x$ and $y$ are orthogonal. How can we get Pythagoras from the parallelogram law?


Can't install Updates by Software Updater

I have installed Ubuntu 14.04 some days ago. Now I am trying to update software using Software Updater, but it stops at:   Reading Database   I ran some commands on reading some websites, this is what I get as errors, please help:  $ sudo apt-get update && sudo apt-get upgrade 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?  $ ps -ef | grep apt root      2206     1  0 17:56 ?        00:00:05 /usr/bin/python3 /usr/sbin/aptd root      2347  2206  2 17:56 pts/12   00:00:16 /usr/bin/python3 /usr/sbin/aptd root      2583  2347  0 17:57 pts/22   00:00:00 /usr/bin/dpkg --status-fd 52 --unpack --auto-deconfigure /var/cache/apt/archives/dpkg_1.17.5ubuntu5.1_i386.deb sp        2948  2899  0 18:06 pts/24   00:00:00 grep --color=auto apt


How to restart Windows service by itself C#

I have created a service, where I am sending commands to the service via MSMQ.   Now I need to restart the service but when it reaches to the stop command it just throws error or it is not able to read the next line as the service performing this task stops.  The code I am using is :  ServiceController service = new ServiceController(serviceName);             try             {                 int millisec1 = Environment.TickCount;                 TimeSpan timeout = TimeSpan.FromMilliseconds(timeoutMilliseconds);                 ShutdownService(serviceName, timeoutMilliseconds);                  // count the rest of the timeout                 int millisec2 = Environment.TickCount;                 timeout = TimeSpan.FromMilliseconds(timeoutMilliseconds - (millisec2 - millisec1));                  service.Start();                 service.WaitForStatus(ServiceControllerStatus.Running, timeout);             }             catch (Exception ex)             {                 s_log.Error(ex);             }   How can I restart service by itself as logically when the service will stop, it will not execute next line of code.


Does someone have a beginning to end example of how to take data from a SQL Server geography type field and pass it to the Google Maps API to display the shape on a map?  The geography data I'm storing is either a polygon or multipolygon, some of which have holes in them.  I would like to do this using .NET code and JavaScript on the fly with whatever data is stored.


Using a regex to parse text from a text scrape

I'm trying to write a regex to scrape text for a jobs site I'm building. I'm relatively new to scraping (and coding) and have been using Parsehub to assist with the former. That's useful for scraping where a job element consistently matches an html element (eg job_title matches , same position, on a page). I can use Parsehub to scrape a relevant block of text but I'll need to use a regex to give Parsehub more direction when the info I need can only be distinguished in relation to other text. I've spent hours trying to figure out the following. For example, I want to extract the deadline date from the following text:  To Apply Deadline for applications is the 10th January 2021. Interviews will take place in the third week of January 2021.  I've written the regex: /Deadline for applications is the\s([0-9a-zA-Z]\w*)\s([0-9a-zA-Z]\w*)\s([0-9a-zA-Z]\w*)  But how do I pull just the groups 1-3? If I add \1 or $1 for example, at the end, I get an error "regular expression does not match the subject string." I have some way to go in learning here but if anyone has some pointers, they'd be much appreciated. Once I get the basic principles of the above, I'll be in a much better place.


How can we find the set of all automorphisms of a group?

Is there any general method by which we can find the set of all automorphisms of a group? if not then find all automorphisms of a group with the help of an example.


Biblatex APA-style special issue code shows up in the in-text citation

When my citation is from a special issue of a journal, the issue field of my citation contains letters (for example issue = {S1}).   The problem is that the issue code shows up in the in-text citation like this:    How can I make the special issue codes behave like normal issue numbers, only showing up in the bibliography?   Here is the MWE, with the same options I used in my thesis.  \documentclass[12pt, a4paper]{book}  \usepackage[backend=biber,refsegment=chapter,defernumbers=true,style=apa,url=false,isbn=false,maxbibnames=99]{biblatex} %   \DeclareLanguageMapping{american}{american-apa} %For utilizing apa style and avoid error in labelmonth and labelday \AtEveryBibitem{     \clearfield{labelmonth} } \AtEveryBibitem{     \clearfield{labelday} }  \usepackage{filecontents} \begin{filecontents}{ref.bib} @article{fogliano_vitro_2011,     langid = {english},     title = {In Vitro Bioaccessibility and Gut Biotransformation of Polyphenols Present in the Water-Insoluble Cocoa Fraction},     volume = {55},     issn = {1613-4133},     doi = {10.1002/mnfr.201000360},     issue = {S1},     journaltitle = {Molecular Nutrition \& Food Research},     shortjournal = {Mol. Nutr. Food Res.},     date = {2011-05-01},     pages = {S44--S55},     keywords = {Digestion,Flavanols,Phloroglucinolysis,Prebiotic,SCFA},     author = {Fogliano, Vincenzo and Corollaro, Maria Laura and Vitaglione, Paola and Napolitano, Aurora and Ferracane, Rosalia and Travaglia, Fabiano and Arlorio, Marco and Costabile, Adele and Klinder, Annett and Gibson, Glenn}, } \end{filecontents} \addbibresource{ref.bib}  \begin{document}      \parencite{fogliano_vitro_2011}      \printbibliography   \end{document}


duel boot problem windows 8 Ubuntu 12.04

I successfully installed UBUNTU 12.04 on a pre installed windows 8 laptop, but when I try to boot windows 8 I receive next problem:   Error: Secure Boot forbids loading module from (hd0, gpt6)/boot/grup/ntfs.mod  Error: no such device: FEBE18858BE186605,  Error: unknown command 'drivemap'  Error: invalid EFI file path.  Press any key to continue...  I can only boot windows 8 properly when I use F12 and choose the special windows 8 boot manager.   Can somebody help me to solve this problem  Thanks


After all "Is the gravity a force or not?"

I see in some gifted physical texts great discovery that "The gravity is not a force, its manifest of spacetime curvature"  And in others i see "the major problem of unifying the extra weak force of gravity by other three forces"  Some words are a little misleading...


Is this a circular proof of Pythagorean Theorem? If not, are there better ones?

I found this proof of Pythagorean Theorem from  what 3Blue1Brown shows in his Lockdown math lecture  "": In the following right triangle, project $\cos\alpha$ and $\sin\alpha$ back to the hypotenuse of length $1$, they become $\cos^2\alpha$ and $\sin^2\alpha$: $\to\cos^2\alpha+\sin^2\alpha =1 $.  I thought this is what a simple, visual, and elegant proof!  My questions:  Is it a circular proof, why? If not, are there better ones?  I want clarity about whether or not this proof is circular.  The argument only depends on the definition of the sine and cosine functions and nothing more (please correct me if I am wrong).  This is why I love it.  Many other geometry solutions involve more than three shapes.


Today I saw a post with abusive words.   I flagged the post, waited for 10 mins, and after that I did an edit.   I am right in doing such an edit?


What is the shortcut key for object opacity in Illustrator?

I am changing object opacity in Illustrator manually. Is there a keyboard shortcut to make an object's opacity 90%?


win10 utility file copy multiple directories from search result

My computer has been infested with a redirect a string in 100s of files. Using file locator string search shows many many directories with files in various path. I intend to move these invested files - using copy-all inside the search result window -  to an empty external hard disk with the full structure intact, except the drive letter. If after this process the computer screams "file not found / missing" I know where to look and eliminate the redirect part - I hope, then place the cleaned file to the needed location on C: . At a later date I intend to erase the external data. The following information should help to avoid duplication of ideas what else to do, I did: Browser: Clear cache, history. Install No Redirect extension to FF 83.0. Add cybercriminal's internet address to Win10 HOSTS. TOOLS: CCleaner, Search & Destroy (not used $$$), Malwarebytes, MS Defender. SYSTEM: sfc /verifyonly , Dism /Online /Cleanup-Image /CheckHealth , Dism /Online /Cleanup-Image /ScanHealth , DISM /Online /Cleanup-Image /RestoreHealth (error free)


Without solving the equation, show that all nine roots of $(𝑧 − 1)^{10} = 𝑧^{10}$ lie on the line $Re (𝑧) = \frac{1}{2}$

Problem: Without solving the equation, show that all nine roots of $(𝑧 − 1)^{10} = 𝑧^{10}$ lie on the line $Re(𝑧) = \frac{1}{2}$. I would like to say I tried something but I am actually clueless. I was thinking maybe I could use De Moivre's theorem but I am not sure how. Any hint would be appreciated.


I have watched the series of Two and a Half Men two times now till the latest episode, but can't understand why either Charlie or Walden just don't kick Alan out? I mean it is a bit cruel but they are shown to put up with him even though he gets up on their nerves (even got on my nerves).    Some examples off the top of my head:   He became the reason of his first engagement with Mia to be broken up.   He once set up his curtains on fire after ruining his day.   He invited his girlfriend/assistant to move in without his permission and started acting like he owned part of the house when he didn't even pay rent. He acted sickly and dying (Walden's time) and tricked him out of money for his care and comfort.   He deliberately tried to break his relations (Walden's) just so he can keep sponging off.   I know not the best examples, but if not in every episode then in every alternate episode he is shown to getting up on their nerves and they just keep on telling him to leave. Why don't they just kick him out? Why put up with such a leach?


I have a text file which contains an asterisk as the first character in every line, when I try to process the file in a script like this:  while read line; do   out=$(echo $line | awk '{ print $3 }')   echo $out done < file_with_asterisks   It is printing the files in the current working directory, not the 3rd column as I want.  Removing the asterisk solves the problem, so I figured out it was doing globbing.  How do I make bash take the asterisk as text and not a wildcard?


I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?


Dual boot Windows and Ubuntu on separate drives

I have two HDDs, one with my Windows 8.1 install on it. I installed Ubuntu 15.04 on the second HDD by creating a UEFI bootable USB and installing it that way. There was no option to Install alongside Windows etc, so I just did a clean install on the second HDD. To try and create a dual boot system I downloaded EasyBCD and followed a tutorial about adding a Linux boot loader, now when I select load into Linux it comes up with terminal with  GRUB >    Any suggestions as to how I can run both Win 8.1 and Ubuntu on separate HDDs?


After searching through many posts I have come up with the code below to handle updating 200,000 to 2 million records daily. The problem is its still takes hours to complete, I have tried to narrow down the records that are updated to only those I need. I'm really new to this but it seems like updating 200,000 records should go pretty fast. Please review the code below and see if I am doing something wrong? Thanks in Advance  P.S. Why is my code not going in a code box?  IF OBJECT_ID('tempdb.dbo.#MinDate') IS NOT NULL     DROP TABLE #MinDate  GO  SELECT * INTO #MinDate  FROM      (       SELECT  n1.TR_SerNum, Min(n1.TR_Scan_Date) As MinDate     FROM IMB_TBO_Data.dbo.TBO_Trace_Data as t1           INNER JOIN Trace_Return_Updates as n1          ON t1.TR_SerNum = n1.TR_SerNum     WHERE (n1.TR_Scan_Date < t1.First_Scan_Date)         OR (IsDate(n1.TR_Scan_Date) = 1) AND (t1.First_Scan_Date Is Null)     GROUP BY n1.TR_SerNum     ) as n  GO   CREATE INDEX IDX_SerNum ON #MinDate(TR_SerNum) GO  DECLARE  @UPDATES TABLE (PK_ID int NOT NULL Primary KEY)  DECLARE @x INT  SET @x = 0  WHILE @@ROWCOUNT > 0     BEGIN         UPDATE TOP (10000) IMB_TBO_Data.dbo.TBO_Trace_Data              SET First_Scan_Date = n.MinDate         OUTPUT inserted.TR_SerNum INTO @Updates         FROM IMB_TBO_Data.dbo.TBO_Trace_Data t             INNER JOIN #MinDate n             ON t.TR_SerNum = n.TR_SerNum         WHERE NOT EXISTS              (SELECT * FROM @UPDATES AS Updates             WHERE UPDates.PK_ID = t.TR_SerNum)         WAITFOR DELAY '00:00:02'     END SET ROWCOUNT  0 IF OBJECT_ID('tempdb.dbo.#MinDate') IS NOT NULL     DROP TABLE #MinDate; GO  PRINT N'Update First Scan Date'"


Book/Story with life forms playing an evolution game that gets mistaken for aggression

I'm looking for a book or short story where the protagonists are two life forms of a species that spends its time playing a game. The game involves them setting evolution parameters to create simulated civilizations, and compete into which one evolves the most. These "games" are broadcast, the signals picked up by a much more advanced civilization which mistakes these games as real involvement, and (maybe) eliminates the protagonist's civilization as a response?  I don't remember exactly when I've read the book, but it isn't the Culture book (The Player of Games). What made it memorable was the premise of running simulations in a VR environment, which are broadcast, and can be seen by another civilization as a report on the destruction of another world. Many levels of existence in the same book. Or it could be a short story, not sure...


I just passed the 10k threshold on SO.  Unfortunately though, I can't view deleted questions in the app! I get the standard "... this question make have been deleted" popup.  Even if it's not considered worth it to allow actually viewing the questions in the app, it would be nice if it instead opened the link in a browser or something, or gave a more appropriate error message.


Are the predictions from Random Forest Regression bounded by the max and min in the data set?

Since the expected value that minimises the error at each leaf is used for prediction does this mean that the forecasted values can never be smaller than the smallest value in the dataset or bigger than the largest?


Is it possible to convert Hello.World to ["Hello"]["World"]?

I was wondering if there is a way to convert example: 'Hello.World' into '["Hello"]["World"]' or 'This.is.a.string' into ["This"]["is"]["a"]["string"] I'm kinda new to C# and I was wondering if that's even possible using string formatting or something like that.


How to check if a matrix is diagonalizable?

So I have this matrix  $$     \begin{pmatrix}     -2 & 0 & 0 \\     3 & 1 & -6 \\     0 & 0 & -2 \\     \end{pmatrix} $$  Finding Nul(A+2Id) gives me  $$     \begin{pmatrix}     0 & 0 & 0 \\     3 & 3 & -6 \\     0 & 0 & 0 \\     \end{pmatrix} $$  On the answers sheet it says to solve the homogeneous system associated with A + 2Id which gives us   Nul(A+2Id)=Span $$     \begin{pmatrix}     1 & -1  \\     1 & 1  \\     1 & 0  \\     \end{pmatrix} $$  I am completely lost on how to find the Span Nul(A+2Id)=Span $$     \begin{pmatrix}     1 & -1  \\     1 & 1  \\     1 & 0  \\     \end{pmatrix} $$  Can somebody please help me with the steps in order to get to this solution ?  Moreover, on the answers sheet is states  Since the dimension of the eigenspace E(λ1) is equal to 2 we observe that the ma- trix A is diagonalizable.  How do i know from this solution that the eigenspace E(λ1) is equal to 2?  Thanks!


I bought a company and my friend join but his wage is at 0% how can i change it so he can get money? We have been playing together for awhile and i have been getting all the cash, and i cant share it with him. Please help.


looking for some professional guidance here. I am unable to get an IOS image from the original source but the file I did get matches the SHA512 and MD5 checksums from the verified source. Is it safe to say that this file is unaltered and otherwise safe? I checked this using the Get-FileHash function in PowerShell. Thank you, Joseph


How to fix the problem for the color schemes differences for the mac and windows screens

I am a product designer, I use MacBook Pro for my design work. Whenever I design an app/website/web pages after it went live the big problems comes up as color differences in the Apple screen and other windows/Linus etc screens. So how should I resolve this? Is there any method/codes libraries available for this to use or if there any method available to use while at the time of designing the screens.  Thanks in the advance.


What method can be used to detect seasonality in data?

I want to detect seasonality in data that I receive. There are some methods that I have found like the seasonal subseries plot and the autocorrelation plot but the thing is I don't understand how to read the graph, could anyone help?  The other thing is, are there other methods to detect seasonality with or without the final result in graph?


I'm reading a book about proofs and I'm currently stuck in this problem.  Prove that for all real numbers $x$ and $y$ we have that: $$\lfloor x\rfloor \lfloor y\rfloor \leq \lfloor xy\rfloor \leq \lfloor x\rfloor \lfloor y \rfloor + \lfloor x \rfloor + \lfloor y \rfloor$$  I though I could do it by cases, considering when the number is a pure integer and when is an integer plus some real number. But by doing this I end up with having a lot of cases to show. Is there any better, simpler and clever approach? Thank you!  PS: I end up with a lot of cases because there is a point where I will have to consider "subcases" of cases specifically when the integer part is multiplying with the positive "rest" less than one


Which header do you set to prevent Outlook from forwarding an email (literally)?

I've been tasked with creating a script to send announcement emails to clients using outlook to read their emails and they must not be able to forward them. Is there a header we can set to prevent forwarding that outlook recognizes?  This is a business requirement that has nothing to do with the actual security of the information in the email. What is required is that pressing the forward button in outlook will not work so our clients do not accidentally send forwards and are made aware it is intended that they do not forward the email.


Construction of conditionally convergent series with certain property

Question: It is given that the series $\sum_{n=1}^\infty a_n$ is convergent, but not absolutely convergent and $\sum_{n=1}^\infty a_n=0$. Denote by $s_k$ the partial sum $\sum_{n=1}^k a_n$, $k=1,2,... $     then " it is possible"  that $s_k>0$ for all but a finite number of values of k ?    My attempt:   Define $$ s_k=\left\{\begin{array}{} 0&\text{if $k=2,3$ }\\[4pt] \frac1{k}&\text{otherwise} \end{array}\right. $$  Then clearly $s_k>0$ for all but a finite number of values of k (as required)  Further, $s_k$ converges to $0$ and  hence $\sum_{n=1}^\infty a_n=0$.   But $\sum_{n=1}^\infty a_n$ is not absolutely convergent (how can i prove it?)  Am i correct? Please help me


(Python3)Tic-tac-toe: IndexError: tuple index out of range

Hello, I've been programming for 3 weeks and this is my first milestone project.  I was trying out a template for an interactive tic-tac-toe game. What I want to do is format the empty board with X's and O's from a list that is filled by user input.  emptyboard = """     {1} | {2} | {3}     ____|_____|____     {4} | {5} | {6}     ____|_____|____     {7} | {8} | {9}         |     |""" print(emptyboard) print(emptyboard.format(["#","X","O","O","O","O","X","X","X","X"]))   And I get an IndexError, yet I think that I have enough values in both my table and string formatting method. Output:      {1} | {2} | {3}     ____|_____|____     {4} | {5} | {6}     ____|_____|____     {7} | {8} | {9}         |     | --------------------------------------------------------------------------- IndexError                                Traceback (most recent call last) <ipython-input-22-4c3674aa4a8b> in <module>       7         |     |"""       8 print(emptyboard) ----> 9 print(emptyboard.format(["#","X","O","O","O","O","X","X","X","X"]))  IndexError: tuple index out of range   Thanks in advance to everyone who tries to help! I will look up other ways of coding the game, but I'm just curious what my mistake is!


I have set up a documentclass like this  \documentclass[     11pt,                  % Font size     final,     cleardoublepage = plain, % just for page numbers on cleardoublepages     parskip=half,          % Half a line skipped between paragraphs     twoside,               % Two-sided document     openright,             % Chapters start on right pages     bibliography=totoc,    % Bibliography in ToC     listof=totoc,          % LoF and LoT in ToC     footsepline=0.4pt, ]{scrreprt}[2015/09/15]    % Use current version of KOMA-Script % Author and title of document  % Header and footer \usepackage[automark,headwidth=textwithmarginpar,footwidth=text,footsepline=0.4pt, headsepline=0.4pt:textwithmarginpar]{scrlayer-scrpage}  % Custom header and footer \usepackage{lastpage} %needed for page number \pagestyle{scrheadings} %\setfootsepline{.4pt} THAT DIDNT WORK__________________________________________ \renewcommand{\headfont}{\normalfont\sffamily} \makeatletter \renewcommand{\chaptermark}[1]{\markboth{\@chapapp~\thechapter~--~#1}{}} \makeatother \rohead{\rightmark} \lehead{\leftmark}   The footsepline appears, but only on pages wich a) contains text and b) arent the first page of a new chapter. How do I change that, so that footseplines appear on every page with a footer?


What's the difference between FQDNs and Hostnames

First of all, I wanna say that I know how DNS Servers work and also I know about the records in a DNS Zone File!  I'm not an expert but I have some knowledge about them. I'm confused! why?! because I don't know what's the exact difference between hostnames and FQDNs.  I know that some thing like my.example.com. is a FQDN. somebody told me it's a FQDN because of the existance of "dot" at the end of it.  I think the final dot at the end of it reffers to the root dns servers in the world, right?  Is my.example.com a hostname? (note that it's doesn't have any final dots!)  maybe "my" is the hostname?!  Actually i'm confused!   What's the difference between a hostname and a FQDN, guys?!  Sorry, My english isn't very good. excuse me if I made a mistake.  Thanks in advance.


Why can't I call a template base class constructor with a const_iterator?

For some reason, the following code gives the error Symbol 'TemplateBase' could not be resolved.:  template <typename T> class TemplateBase {     TemplateBase(std::map<std::string, T>::const_iterator anIterator)     { } };  class SubClass : public TemplateBase<int> {     SubClass(std::map<std::string, int>::const_iterator anIterator) :         TemplateBase<int>(anIterator) //Error: Symbol 'TemplateBase' could not be resolved.     { } };   Strangely, no error appears when I remove the ::const_iterator and only std::map<std::string, int> remains:  template <typename T> class TemplateBase {     TemplateBase(std::map<std::string, T> aMap)     { } };  class SubClass : public TemplateBase<int> {     SubClass(std::map<std::string, int> aMap) :         TemplateBase<int>(aMap) //No error.     { } };   Additionally, the following function gives no error either, so it really seems related to the combination of a template base class call with a const_iterator:  void function() {     std::map<std::string, int>::const_iterator anIterator;     TemplateBase<int> aTemplateBase(anIterator); //No error }   Is there some rule against using const_iterator as an argument for base class template constructors that I'm unaware of? Or is this a compiler bug?  I'm compiling with MinGW 64bit 4.9.0 on Windows 7, using C++11.


Screen tearing on rotated screen in 14.04

With up-to-date Intel drivers (HD4000) on Ubuntu 14.04 with Unity, rotating the screen xrandr -o leftbreaks the vsync and induces a lot of tearing (mostly vertical one when dragging a window), I get no tearing on a non-rotated screen.  The tear-free option seems disabled:  $ cat /var/log/Xorg.0.log | grep Tear [    18.316] (**) intel(0): "Tear free" disabled   But in 14.04, I can't find a xorg.conf with the intel device configuration to pass the TearFree option.


How can I change levels in Theme Hospital

Between levels six and seven, I clicked the wrong part of the level select screen and got dropped back onto the first level. No matter what I do, I can't get back to where I was -- if I quit back to the main menu, the 'continue previous game' option drops me back to level 1.   How do you go back to the level select screen? Do I need to fully replay the first level? Or am I now stuck replaying back to where I was?


In the "Programming: Principles and Practice Using C++", "Section 8.5.7 Argument checking and conversion" the following example is given as evidence on how to properly convert types, but never clearly explains why you would use int() vs static_cast<int>() to convert from a double to an int. However, I'm still unclear on the benefits of static_cast<int>() vs int().  void ff(int x);  void gg(double y) {     ff(y); // how would you know if this makes sense?     int x=y; //how would you know if this makes sense? } void ggg(double x) {     int x1 = x; // truncate x     int x2 = int(x);     int x3 = static_cast<int>(x); // very explicit conversion (17.8)      ff(x1);     ff(x2);     ff(x3);      ff(x); // truncate x     ff(int(x));     ff(static_cast<int>(x)); // very explicit conversion (17.8) }   I checked section 17.8, but still didn't find clarity on this topic. Can someone help? I'm looking for a solution that compares static_cast with function-style cast.


Easy way of memorizing values of sine, cosine, and tangent

My math professor recently told us that she wanted us to be able to answer $\sin\left(\frac{\pi }{2}\right)$ in our head on the snap. I know I can simply memorize the table for the test by this Friday, but I may likely forget them after the test. So is there a trick or pattern you guys usually use to remember it? For example, SOHCAHTOA tells us what sine, cosine, and tangent really mean.   If not, I will just memorize the table. But just wanted to know what memorization techniques you guys use. I feel this is the perfect place to ask, because I bet a bunch of people in the math stackexchange, also had to go through the same thing freshman year of college.  Oh here is a picture of the unit circle:


Filtered Questions Asked By Accepted Answer/ No Accepted Answer

I think it's helpful if we can go to a page and view all our own questions that   Does not have an accepted answer, and/or Does not have an answer yet.   The reason I asked for them is because, I sometimes need to review through all the questions, and pick those that don't have proper answers so that I can perform further operations on them ( such as offering a bounty, or accept an existing answer).


I need to draw the following game tree on tikz. It's a bayesian game. Sorry for the pic, I made it on Paint.   So basically there are 2 players G and T, N is the nature that gives a chance for each type of player. The action of G is continuous, that's why I put the curve line.    So, my main doubr is to put the continuous set of action for player G and to put the same set of information for players of the same type. As it can be seen in the following pic:     \documentclass[tikz,border=10pt,multi]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usetikzlibrary{trees} \usetikzlibrary{calc} \tikzset{ % Two node styles for game trees: solid and hollow solid node/.style={circle,draw,inner sep=1.5,fill=black}, hollow node/.style={circle,draw,inner sep=1.5} } \begin{document} \begin{tikzpicture}[font=\footnotesize,edge from parent/.style={draw,thick}] % Two node styles: solid and hollow \tikzstyle{solid node}=[circle,draw,inner sep=1.2,fill=black]; \tikzstyle{hollow node}=[circle,draw,inner sep=1.2]; % Specify spacing for each level of the tree \tikzstyle{level 1}=[level distance=15mm,sibling distance=50mm] \tikzstyle{level 2}=[level distance=15mm,sibling distance=25mm] \tikzstyle{level 3}=[level distance=15mm,sibling distance=15mm] \tikzstyle{level 4}=[level distance=15mm,sibling distance=10mm] % The Tree \node(0)[hollow node]{} child{node[solid node]{} child{node[solid node]{} child{node[below]{$1,0$} edge from parent node[left]{$\gamma$} child{node[below]{$2,3$} edge from parent node[right]{$\tal$} edge from parent node[above left]{$P$} } %I need to put for options in the node child{node[solid node]{} edge from parent node[above right]{$N$} } edge from parent node[above left]{$\theta$} } child{node[solid node]{} child{node[solid node]{} child{node[below]{$1,0$} edge from parent node(m)[left]{$\gamma$} child{node[below]{$2,3$} edge from parent node(n)[right]{$\tal$} edge from parent node[above left]{$c$} } child{node[solid node]{} edge from parent node[above right]{$N$} } edge from parent node[above right]{$1-\theta$} } % information sets \drawloosely dotted,very thicktoout=-15,in=195; % movers \node[above,yshift=2]at(0){}; \foreach \x in {1,2} \node[above,yshift=2]at(0-\x){}; \node at($.5(m)+.5(n)$){1}; \end{tikzpicture} \end{document}   I tried using this code here:  \begin{tikzpicture} \tikzstyle{hollow node}=[circle,draw,inner sep=1.5] \tikzstyle{solid node}=[circle,draw,inner sep=1.5,fill=black] \tikzset{ red node/.style={circle,draw=red,fill=red,inner sep=1.2}, blue node/.style={rectangle,draw=blue,inner sep=2.5} } % Specify spacing for each level of the tree \tikzstyle{level 1}=[level distance=15mm,sibling distance=40mm] \tikzstyle{level 2}=[level distance=15mm,sibling distance=30mm] \tikzstyle{level 3}=[level distance=15mm,sibling distance=15mm] \tikzstyle{level 4}=[level distance=15mm,sibling distance=12mm]  \node[hollow node,label=above:{Natureza}]{} child{node(1)[solid node]{} child{node[solid node]{} edge from parent node[left]{$P$}} child{node[solid node]{} edge from parent node[right]{$N$}} edge from parent node[left,xshift=-3]{$\theta$} } child{node(2)[solid node]{} child{node[solid node]{} edge from parent node[left]{$P$}} child{node[solid node]{} edge from parent node[right]{$N$}} edge from parent node[right,xshift=3]{$1-\theta$} }; \node at ($(1)!.5!(2)$) {$Governo$}; \end{tikzpicture}   If anyone could help me, I would be glad.


Since ice is less dense than water, it floats on it, we all know this. Now suppose, if ice is floating in a glass cup, when the ice melts there should be some change at water level in the glass cup. But when I found this on the internet, it states that the water level will be same. Can someone justify/explain this?  In my way, water level will decrease because ice has greater volume than water, so when it floats, it will displace some water equal to its volume for floating. But when it melts, its volume decreases and hence water level will also decrease.  Is it right or wrong what I am thinking?


List of user icons on logon screen has disappeared

The list of users one can click to log in from the login screen has disappeared. This is what I have done so far:  My C:\Users folder was in reality a NTFS Junction that pointed to D:\Users, so when D:\ was unavailable due to a temporary hardware problem, I got into some problems with my setup.  After    removing the junction pointing to the other volume copying all the profiles back into C:\Users mucking around in the Registry in the HKLM.../Windows NT/CurrentVersion/ProfileList and reverting any profiles that had gotten a .bak postfix setting the "Flags", "RefCount" and "State" values to 0 in the same key (I only did this on my own user accounts - not all)   logging in finally worked as before.   With one difference.   The login screen no longer showed the list of available users! Previously I could just select an icon, but now there is only an icon for the last logged in user, as well as "Other user". I have tried many tips so far, most of which involve fiddling with config settings available through gpedit.msc. Any tips on how I could restore the easy login that is the standard?  I wonder if I could delete any of the other register keys in ProfileList. Any clues?


Number of subsets of A that contain B where B is a subset of A

Let A be a finite set and let B be a subset of A with |A| = n, |B| = m and 0 < m < n. Find a formula for the number of subsets of A that contain B and prove your statement.  I am confused. Is this just m ^ n? Thank you in advance.


I'm trying to retrieve a list of Account objects from Salesforce using SOQL. Originally my query was this:  var result = service.query("SELECT Id, Name, RecordTypeId FROM Account"); return result.records.Select(record => record as Account).ToList();   However this only returns a maximum of 2,000 records and I have over that which I need to be returned by this query. After some digging around I found an example in Java which loops over the SOQL query which will allow a maximum of 10,000 records to be returned. I tried to replicate this in C# but it differs slightly, here is what I have now:  var accounts = new List<Account>(); foreach (Account account in service.query("SELECT Id, Name, Composer_ID__c, RecordTypeId FROM Account").records)     accounts.Add(account);  return accounts;   However this still only returns a maximum of 2,000 records. How can I return more than 2,000 records by querying Account?


Can you give a proof for bounds of  $S(r)$? Please suggest me articles to have better idea of Schur's theorem (Ramsey theory).


driver print brother DCP-195C ubuntu 13.04 32 bits

I have a Brother DCP-195C printer ubuntu 13.04 32-bit scanner works but the printer does not print works but there is nothing on the paper out of the printer


Formatting characters should be ignored when considering minimum comment length

I've found that comments have a restriction for minimum comment length. I.e. it's impossible to post too short comments.  Yet in the same time this can be overcome with using formatting. For example, simple Question fail comment is too short while _Question fail_ is not (added 2 symbols - actual length increased while comment have same content when it is displayed).    is a question about @username in comments and  - about "overcoming" minimum length, but they still aren't focused on formatting issue.  Is it a bug? Should comment length be counted without paying attention to formatting? (since we're able to show them properly, why do not count real, meaningful comment length - note, this has nothing to do with other special characters, like single _ or similar, only formatting)


Attacks for toothy half-orc bear shaman druid

Taking the half-orc alternate racial feature Toothy grants me 1d3 primary natural bite attack.   At level 2 a bear shaman can take a totem transformation granting the character a 1d6 bite attack and two 1d4 claw attacks.   Would I replace the bite from toothy half-orc with the totem transformation, or would I get to use both bite attacks? (For four total natural attacks)


How to find $\int_0^1 \int_x^1 \arctan(\frac{y}{x})dxdy$?

How to find $$\int_0^1 \int_x^1 \arctan \left( \frac{y}{x}\right)~dxdy$$ I am not looking for any full solutions just some small hints to get me started would be great.


Why do newer versions of GNU `ls` have different output in command substitution when dealing with newlines?

The folder "/tmp/folder" contains one file, whose filename consists only of a single newline.  The output of ls -A /tmp/folder, even inside a non-interactive script, is:  ''$'\n'   Here are the contents of script.sh:  #!/bin/sh --  var="$(ls -A /tmp/folder; printf x)"  var="${var%x}"  printf '%s' "$var"   The output of script.sh is two empty lines.  Maybe GNU ls can detect if it is being run inside of a command substitution or is being redirected to file?


Why are springs shaped the way they are?

Why are springs coiled the way they are? Why not some other shape? Is the shape due to its elasticity or something?


Why is $\gcd(x^4+1,x^2-1) = 1$ but I get $2$? [unit normalization of gcds]

I need to find the gcd of two polynomials: $f(x) = x^4+1$ and $g(x)=x^2-1$ using the Euclidean algorithm.  Wolfram shows that the gcd is equal to $1$, but for some reason I don't get the same answer.   First I divided $f(x)$ by $g(x)$ and got that the remainder is $2$. Then, I divided $g(x)$ by the remainder, $2$, and got a remainder of zero, hence concluding that the gcd is $2$.   What am I doing wrong?


How to force text to appear after a table?

\begin{table}[!htbp]     \begin{tabular}{|l|l|l|l|}     \hline     ~                 & Horns rev 1 & Horns rev 2 & Anholt \\ \hline     Antal møller      & 80   & 90 & 111    \\ \hline     Effekt pr. mølle  & 2 MW   & 2.3 MW  & 3.6 MW \\ \hline     Areal             & 20km$^2$ & 33km$^2$  & 88km$^2$      \\ \hline     Samlede effekt    & 160MW  & 209MW & 400MW \\ \hline     Effekt pr. areal  & 0.008 MW/m$^2$ & 0,0063 MW/m$^2$ & 0,0045 MW/m$^2$ \\ \hline     Km kabel          & 55  & 72  & 185 \\ \hline     kWh-pris          & 48 øre & 51.8 øre  & 105.1 øre\\ \hline     Pris (mia. kr.)   & 2  & 3.5 & 9     \\ \hline     Rotordiameter     & 80 meter & 93 meter  & 120 meter \\ \hline     \setlength{\unitlength}{1mm}         \makebox (16,40)[t]{Formation} & \raisebox{0mm}[42mm][1mm] {\includegraphics[width=0.3\textwidth, height=40mm]{Horns_rev_1.png}}     & {\includegraphics[width=0.3\textwidth, height=40mm]{Horns_rev_2.png}}  &     {\includegraphics[width=0.3\textwidth, height=40mm]{Anholt.png}}  \\ \hline     \end{tabular}   \end{table}  "I want my text to appear down here"


What should be examined when feedforward neural network does not fit the training set well?

In theory, feed forward neural network should be able to approximate any smooth functions given enough nodes in the hidden layer. In other words, it could significantly overfit the training data set. I was expecting feed forward NNets to fit the training set with a sign accuracy close to 100% without any penalization, but for some reason, the accuracy gets quite low from time to time. Can anyone provide some guidance why training accuracy can be very low, even when there are enough hidden layers?  Edit: As @ThomasW pointed out, one of the possible causes is local minima. what are some other causes? Is there a way to tell whether a specific cause is indeed the problem?


What exactly is the definition of "plural"?

I used to think plural meant 2+, but what about "0.5 hours"?  Is it more accurate to say "0.5 hour"? I don't think that's right, so my definition of "plural" must be inaccurate.  Even "0 days" seems more accurate than "0 day".  Google's definition shows denoting more than one, or more than two. That seems clearly inaccurate.  Does plural mean any amount other than exactly 1? Or what is a more accurate definition?


TypeScript: I can't get the Float/Decimal Math working correctly. (82.80000000000001, but should be 82.8)

Issue: I'm having an issue with the decimal/floating point math in JavaScript/Typescript. , but I'm having no luck. Desired Result: 82.8 Result: 82.80000000000001 What's Working: total += (array[i] * weight[i] * 100) / 100; line is correctly working, but that same logic isn't working with the total. What I've Tried:  In another function, I've multiplied and divided the value by 10 or 100. This works, but I can't get it to work in my case.  const remainder: number = ((1 - Math.sqrt(value)) * 10) / 10;   People have suggested using toFixed(2);, but that changes the typecast of the number to a string, which is what I don't want.  calulateWeightedAverage.tsx: // Calculate Weighted Average export const calculateAverageWeighted = (array: Array<number>, weight: Array<number>) => {   // Check If Data Exists   if (array.length >= 1) {     // Weight Length: Must Equal Array Length     if (weight.length == array.length) {       // Weight Sum: Must Equal 1 Or 100       if (weight.reduce((total: number, value: number) => { return total + value }) === 1 || weight.reduce((total: number, value: number) => { return total + value }) === 100) {         // Total         let total: number = 0;          // Iterate Over Array         let i: number = 0;         while (i < array.length) {           // Add To Total           total += (array[i] * weight[i] * 100) / 100;            // Increase I           i++;         }          // IMPORTANT: FLOAT MATH (NOT WORKING HERE)         return (total * 100) / 100;       }       else {         // Error         throw new Error('Error: Values of Weight Array must be equal to 1 or 100 (calculateAverageWeighted)');       }     }     // Array Length Is Less Than Weight Length     else if (array.length < weight.length || array.length > weight.length) {       // Error       throw new Error('Error: Length of weight must be equal to input Array (calculateAverageWeighted)');     }   }   else {     // Error     throw new Error('Error: Empty Array (calculateAverageWeighted)');   } };


app crash by the error shown in logcat in android studio

i am facing the app crash error in android studio when app try to run and the error which logcat is showing is below: **   com.google.android.apps.nexuslauncher E/System: Uncaught exception thrown by finalizer 06-29 18:19:05.002 2840-2849/com.google.android.apps.nexuslauncher E/System: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.concurrent.BlockingQueue.isEmpty()' on a null object reference   ** the home activity and welcome activity is written below  this is the welcome activity  void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_welcome);      Thread th = new Thread() {         @Override         public void run() {             try {                 sleep(5000);              } catch (Exception e) {                 e.printStackTrace();             } finally {                 Intent home = new Intent(WelcomeActivity.this, HomeActivity.class);                 startActivity(home);             }         }     }; }  @Override protected void onPause() {     super.onPause();     finish(); }   }  and now this is home activity  public class HomeActivity extends AppCompatActivity {  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_home); }   } in here home activity is not ready yet because i am working on the welcome activity. please help me to solve my issue thank you


I am a java beginner. Why the main in java starts with Static keyword

class Student{     public **static** void main (String[]arg){     }     }   Here why we are using static keyword to start a main method. From my knowledge I can say      Static will get memory and it can retain its value   Is that only reason for using Static key work in main.   Explain in detail thanks   .


I want to negate the symbol whose code is \models (this would be specific to Formal Logic). How can I do that? I tried a number of combination, but didn't find how this could be done. I tried \neqmodels, \nemodels, \notmodels, \nmodels  but all of them are wrong.  Is there a general way to negate symbols?


Let $S$ be the collection of closed intervals in the real line whose lengths are positive rational numbers. Determine the cardinality of $S$. Justify your answer  As I understand, $S$ will be an infinite set of positive rationals. Would that mean that its cardinality will be equal to $c$?


public static void getSolve(Scanner s) {     boolean validInput = false;     while(validInput == false) {         System.out.println("Would you like to try to solve the word? (yes or no)");         String input = s.nextLine();         if(input == "yes" || input == "Yes") {             validInput = true;             System.out.println("Enter your full guess: ");             String guess = s.nextLine();             if (guess == secretWord) {                 System.out.println("You guessed the word!");                 displayString = secretWord;             }             else {                 System.out.println("Sorry, that is not the word");                 NUM_LIVES --;             }         }         else if (input == "no" || input == "No") {             validInput = true;         }         else {             System.out.println("Sorry, that is not a valid input");         }     } }  This is the code that I am using for a solve method for a java project for my class in which I am coding a hangman game. I am trying to add a feature that asks the user if they would like to try to solve the word and then checks to see if they got that guess correct. Right now what is happening is that no matter what the user puts in, even if it is "yes" or "no", the program thinks that it is an invalid input and asks the question again, putting the code into an infinite loop. I'm not quite sure how to fix this and I'm not sure what I am doing wrong. Any help is greatly appreciated!


Possible Duplicate:          I have a question of the form "what companies provide service X?"  I checked meta, and apparently such questions are highly discouraged on all Stack Exchange sites. Which is fine, but it obviously raises the meta-question: Where can I ask my question?  (In particular, I know that there are people hanging out on Stack Overflow who have probably needed the same service, so if an answer exists, they possess it...)  Edit: I should perhaps point out that the service I'm looking for is rather specific and slightly obscure. Otherwise, yeah, this would be a 10-second exercise with Google.


Coordinative ellipsis with not and unparellel structure

I worked and did not play. I worked and not played. ?  For some reason, when the ellipsis is used after the simple past form of the verb with no "to be" used before it, it just sounds weird to me. Is there something wrong with it, or is it just that it is not idiomatical? Or am I the one who's wrong?  I had to control myself and not cry in front of her.  I always thought that second part has been used independently and not connected to the "had to" part, for I thought there should be additional "to" like this I had to control myself and had to not cry. Or at least this: I had to control myself and to not cry in front of her. (It doesn't sound very idiomatic... is it acceptable?) Is the "to" deleted? If it is, why is that? And also, when I was trying to find the answer for this question, it was clear that everybody was asserting only the parallel form should be allowed for the ellipsis after the coordinating conjunction. For example:  Sarah is [a CEO] and [proud of her job]. - NP + AP Is Jim [conservative] and [a closet Republican]? - A + NP He is a crazy man and may drink a lot. -NP+V  These (only the three sentences directly above it) are from Wikipedia, and not regarded as being incorrect. But looking up at the other websites, I find that they say that it is wrong, even though many people, including me, use it this way. They say that it should be parallel like this:  Sarah is [a CEO] and [a person proud of her job]. - NP + NP  Is it supposed to be always parallel?