Mac Shows Java 6 in Terminal After Installing Java 7

I am trying to run a server that requires Java 7 using terminal.  After installing Java 7, typing java -version in terminal still shows Java 6.  Previously, I would use the Java Preferences application, but Apple has removed it.  Does anyone have any idea how to change the Java version the system uses without the Java Preferences application?  Or if anyone knows a download link for Java Preferences, that would be greatly appreciated as I am able to achieve the same results by just using that.  Thank you so much!  I am using the latest version of Mac OS X


I'll be traveling to east Europe and for that reason I had to switch to a small compact tripod so that I could carry it easily. The new tripod, when closed, will not exceed 43 cm and it weighs below 1.5 Kg. However, it will be attached to the side of my backpack. (This tripod cannot be converted into a monopod)   However, I'm not sure if carrying it on board would be a problem or not because I have never done that and I have always put my tripod in my luggage and checked it in. But this time I will be traveling with a backpack only as the trip is short.   The other question is that if I check in the tripod, like I put it in its own case (has no protection), would the airline take good care of it?    Edit:   I called the airport police and asked them, but the said they have to see it first to confirm if it can be allowed or not.


How to display a Read only ID Field on a Form?

I was faced with the doubt as to the correct way to show an ID on a form. It will be a Read only field so the user can't edit or change the Id value. So should I display this read only value in a input field or should I use another way, e.g. label, text? Thanks in advance for your answers. MM


Let's say I solved a million dollar problem [for instance P = NP] and wrote a paper describing my proof. Let's assume the conclusion starts like this:  Proposed algorithm, as far as our analysis goes, achieves polynomial time on an NP-Complete problem, showing that P = NP.  Should I add a sentence like this to the conclusion?  All the proofs in this article need to be checked by experts, to make sure that they don’t contain any logical flaws.  Given that no one can be sure about a lengthy proof, and given the importance of the P = NP problem, I feel like it should be added. But it may also weaken the conclusion. What do you think?


Need help calculating population total and average using a bash awk script

Need someone to help calculate the total population for each region and print the regions name, population, and average population. States.txt (file): State           Population   SqMi      Region  ------------------------------------------ California           39.37   163.7       West Texas                29.36   268.6      South Florida              21.73    65.7      South New_York             19.33    54.7  NorthEast Pennsylvania         12.78    46.1  NorthEast Illinois             12.59    57.9    Midwest Ohio                 11.69    44.8    Midwest Georgia              10.71    59.4      South North_Carolina       10.60    53.8      South Michigan             9.97    96.7    Midwest  **Output should look like"" Region Total Average --------------------------- South 72.40 18.10 Midwest 34.25 11.42 NorthEast 32.11 16.05 West 39.37 39.37


Let $a_1=1$ define $a_{n+1}=\frac{1}{2}(a_n+\frac{2}{a_n})$ . Show that the sequence converges to $\sqrt{2}$. The idea is to show the sequence is bounded and monotone . But how should I do it?


SVG textures for 3D game objects in Unity?

Is there a way to make textures using vector graphics and use it for 3d models so that textures would be object size independent and won't get blurry?


Is there a way to add a note/comment to an individual node?

For example: In a normal map node "Adjusting the strength of this node will effect "X" quality of the material"?


How to describe a guy who is popular with girls?

Perhaps I should make it clear:  - He naturally attracts girls.  - He doesn't chase girls and have no intention for any relationship.  - You just see him often together with girls.


Why do resistors still use color coding?

I always wondered why color coding is still used on resistors in 2014.   Here is Wikipedia's word on the original reason why :      Colorbands were commonly used (especially on resistors) because they   were easily printed on tiny components, decreasing construction costs.   However, there were drawbacks, especially for color blind people.   Overheating of a component, or dirt accumulation, may make it   impossible to distinguish brown from red from orange. Advances in   printing technology have made printed numbers practical for small   components, which are often found in modern electronics.   However, like pointed out in this quote, printing small numbers on electronic is now quite an easy thing (or so it seems) and it would, in my opinion, be much more convenient, especially for colour-blind people.   Is there reason why we still use colour coding on resistors in 2014?


Ubuntu 18.04 and 19.10 has problems with wifi and bluetooth with RTL8723DE

I have two laptops (asus and HP), in the ASUS all the tools work correctly the problem is in the HP.  On my HP Laptop 14-cm0xxx laptop, I have problems starting Wi-Fi and Bluetooth.  I don't think it's a hardware problem, since everything worked correctly with the Windows operating system before switching to Ubuntu 18.04. I have tried several solutions on the network but without any positive results, I tried to solve the problem by installing ubuntu 19.10 and the same problem follows.  Here are some information about the components of my system:   description: Notebook  Product: HP Laptop 14-cm0xxx (3PX47LA # ABM)  Manufacturer: HP  version: Chassis Version  Series: 5CG82547RX  width: 64 bits   * -network    description: Ethernet interface    Product: RTL8111 / 8168/8411 PCI Express Gigabit Ethernet Controller    Manufacturer: Realtek Semiconductor Co., Ltd.    I attach images with the problems          lspci -knn | grep Net -A3; rfkill list   Result  Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723] Subsystem: Hewlett-Packard Company Device [103c:8319] Kernel modules: rtl8723de 05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.  [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15dd] (rev c5)


Absolute latest time I should arrive at the airport to not miss my flight?

I find myself yearning to spend the last few minutes of my time in the country to be with the people I love.   Given that I'm already in the airport up to the point where non passengers are allowed, how much time should I give myself to go through the processes?  I understand that this might be a question that is very dependent on the airport, but I hope anyone can shed some light.  I notice that if the flight is 9pm, they request the passenger to be at the boarding gate on 8:40pm. How far can I push this?  It would be nice to discuss both cases with and without check in luggage. I'm also not looking for an exact answer like 1 hour. I'm looking for a comprehensive answer like "enough time to go past all checks to arrive 10 minutes before flight departure".


ND Filter not Dense enough - How do I get long exposures in very bright situations, where my ND filter isn't enough?

What is the best way to achieve very long exposures in very bright, sunlit conditions?  Right now, I have a  filter (9 stops reduction), and even with my camera set to ISO 50, and F22, my exposures are still in the range of 5-30 seconds.  Ideally I want at least 1 minute, 5 would be nice. I've had some great (night) shots that involved 800 second (14 minute) exposures.  I've tried stacking crossed polarizers on top of the ND filter, but I get a LOT of vignetting, and the entire affair is rather unwieldy.  Is there a better way to manage very long exposures during the day?  I'm mostly shooting beach scenes, which are generally very bright white. Wave motion in long exposures produces a beautiful hazy effect, that I really like.  B+H produce a 17 stop ND filter, , but I can't find anyone selling it, or find it on B+H's website, for that matter.


I have a online store with Magento, which means there are a lot of parameters to filter categories. Small example:  www.example.com/chats/distributeurs-fontaine/  www.example.com/chats/distributeurs-fontaine/?limit=12   Since it's bad for SEO, we did 2 things for the 2nd URL not to index: we blocked it via robots.txt and used a canonical.  Robots.txt line: Disallow: /*?limit*  Canonical: <link rel="canonical" href="http://www.example.com/chats/distributeurs-fontaine/" />  Still, the 2 URLs are indexed. I'll admit we didn't set proper URL parameters instructions in Webmaster tools from the start, but I would have thought we did enough.  Do you have an idea why the canonical didn't work? And do you see a potential solution to get the thousands of bad URLs out?


Screen Resolution Problem with Ubuntu 14.04 and VirtualBox

On my installation of Ubuntu 14.04 in VirtualBox, the only screen resolution available is 640 x 480. I have tried the solutions suggested in , but none of them helped. All of the answers there are about installing the Guest additions, virtualbox-guest-dkms, but that doesn't make any difference on my system (Win7).


Please consider:   \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix}  \begin{document}  \begin{tikzpicture}[     ]     \matrix (m) [nodes in empty cells,              matrix of nodes,             execute at begin cell=\strut,             execute at empty cell=\strut,         nodes = {             red,              draw,              align=right,              minimum height=1cm,              minimum width=2cm,              inner sep=0pt,         },         ]     {          A  & B    & y  \\          1  &      &    \\          2  &      &    \\          3  &      &    \\      };  \end{tikzpicture}  \end{document}   which gives:     Why the empty cells are misaligned? How can I solve this? (The \strut is necessary to avoid the same problem with descendant in "filled" cells, but why it is not working in the empty ones?)


Find the probability of finding all M unique gifts in a N group of bags

During his childhood, Utkarsh used to collect Pokemon Tazos. Pokémon Tazos were small collectible round discs that were found in bags of chips in the 1990s and 2000s. He wanted to collect all the different Pokemons Tazos.  He did some research and found out that there were a total of M distinct Pokemon Tazos. Each bag of chips contained exactly one tazo. One cannot see the tazo contained in the bag of chips before buying it. It was equally likely for any of the M distinct Pokemon Tazos to be present in a bag of chips.  In order to collect them all, he went to a shop and bought N bags of chips. Now he is worried whether he has bought enough bags of chips or not. You need to tell him the probability of getting all the M distinct Pokemon Tazos from the  N bags of chips.


Extracting road data from shapefile using ArcMap

I have a road network shapefile of a city. I want to extract those roads which have 80ft or more than that width. Is there any tool in ArcMap to extract the data?


Some time ago I encouraged by 11 year old son to watch Cosmos: A Spacetime Odyssey with Neil DeGrasse Tyson, and subsequently Cosmos: A personal Voyage with Carl Sagan, as well as other astronomy shows including History Channel's The Universe. One of these such shows inspired a question about black holes and gravity.  Can a black hole be so large that not even the effects of its own gravity can escape?  Perhaps the question rephrased might be: Why are gravitational waves immune to the effects of gravity?


$\operatorname{Hom}(X \times Z, Y) \cong \operatorname{Hom}(X, \operatorname{Map}(Z, Y))$ is not true in $\textbf{Top}$

I read that in the category of topological space it is not true that $\operatorname{Hom}(X \times Z, Y) \cong \operatorname{Hom}(X, \operatorname{Map}(Z, Y))$ for every $X, Y, Z$ topological spaces. In particular, I read that this does not work when $Z = \mathbb{R} \setminus \{ 1/n \mid n \in \mathbb{N}\}$. This was not explained, i.e. there was no example.   I am looking for an example or – maybe better – just a hint.  EDIT   $\operatorname{Map}(Z, Y)$ is endowed with the compact-open topology $\cong$ means just bijection; i.e. there is already an obvious bijection as sets, but the claim is that (I think) sometimes the "output function" is not continuous


How do I catch ec2 elastic ip pattern in url using a regex

Can anyone provide me with a c# regex for tapping an elastic ip in the request url?  Sometimes we get some strange requests with the elastic ip of our servers/load balancer within the url's. I need to put dumb redirects to my original domains/stop processing such requests.  EDIT: By elastic ip I mean, the ec2 ip for server's on amazon cloud. It has this pattern for the hostname. ec2-11-111-222-333.cd-blahblah-1.compute.amazonaws.com


(python) How to deny code execution if same program is already running?

I am using auto-py-to-exe to convert my code to exe When a program(~~~.exe) is already executed as shown below, is there a way to prevent duplicate execution of the program? I want to prevent the .exe file from being executed again. -----code example------ import time  a = 0 while a < 10:     a += 1     time.sleep(10)     print('wait') print('cmpl')


How can I install MS Office 2013 on my ubuntu 16.04 laptop?

I am trying to install MS Office 2013 on my ubuntu 16.04 laptop. I have been searching all over the web and haven't found anything useful. Please help!


NullPointerException on reading XML node Java

I'm trying to read some XML nodes and store them into a Java object. I can read some of the elements of the object while I can't read others and I don't know why. Here is how a part of the XML looks like:  <problems>   <problem id = "1">       <quest>22-16:4</quest>       <result>18</result>       <chapter_id>1</chapter_id>       <type>text</type>   </problem>   <problem id = "2">       <quest>16+2*12</quest>       <result>30</result>       <chapter_id>1</chapter_id>              <type>text</type>     </problem>   <problem id = "3">       <quest>72:2-18</quest>       <result>18</result>       <chapter_id>1</chapter_id>             <type>text</type>      </problem>   <problem id = "4">       <quest>12*4-15:5</quest>       <result>45</result>       <chapter_id>1</chapter_id>           <type>text</type>        </problem> </problems>   And here is the XMLHandler:  try {         Configuration configuration = new Configuration().configure();         SessionFactory sessionFactory = configuration.buildSessionFactory();         Session session = sessionFactory.openSession();       File fXmlFile = new File("C:\\Users\\buciu\\workspace\\teachApp\\xml\\problems.xml");     DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();     DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();     Document doc = dBuilder.parse(fXmlFile);     doc.getDocumentElement().normalize();      NodeList nList = doc.getElementsByTagName("problem");      for (int temp = 0; temp < nList.getLength(); temp++) {          Transaction transaction = session.beginTransaction();         Node nNode = nList.item(temp);          if (nNode.getNodeType() == Node.ELEMENT_NODE) {              Element eElement = (Element) nNode;              Problem p = new Problem();             ChapterDAO chdao=new ChapterDAO();              p.setQuest(eElement.getElementsByTagName("quest").item(0).getTextContent());             p.setResult(eElement.getElementsByTagName("result").item(0).getTextContent());             Chapter c = chdao.findTChapter(eElement.getElementsByTagName("chapter_id").item(0).getTextContent());             p.setType(eElement.getElementsByTagName("type").item(0).getTextContent());             p.setChapter(c);              session.save(p);             transaction.commit();             }         }     } catch (Exception e) {     e.printStackTrace();     }   I can read the quest, result and chapter_id elements, but I cannot read the type element. I used my application without it so far, I just added it as a new element and now I want to create another object, updated.   The error it gives me is simple(pointing at the line with setting the type element):  java.lang.NullPointerException     at testsManagement.XMLHandler.readXMLProblems(XMLHandler.java:57)     at Main.main(Main.java:30)   So do you see where is the problem? Thanks!


Zero Partials imply Constant Function Theorem or Proof

Let $f(x,y)$ be a function of two variables. Given that  $$\frac{\partial f}{\partial x}=0$$ for all $y$, and  $$\frac{\partial f}{\partial y}=0$$ for all $x$, is there a theorem that states $f(x,y)=$ constant for all $x$, $y$? Or how would I prove this rigorously?


Proper use of passive and active voices?

My question is when passive voice is preferred over active voices and vice versa?   I remember that I was taught that in scientific writings, passive voice was preferred over active voice. Is it correct? If I want to describe several actions of mine, for example:     I did thing A. I did thing B. I did thing C. I did thing D. ...   If I keep using the active voice, will that make the description boring? That is why I thought juxtaposition of passive and active voice would make the description better:     I did thing A. Thing B was done by me. I did thing C. Thing D was done by me. ...   But  led me wonder whether juxtaposition of passive and active voice is good, or when it is good and when it isn't?


Proving that all entire & injective functions take the form $f = ax + b$?

I'm a little confused at both the overall logic in this proof. Are we simply using $g(z)$ to make conclusions about $f(z)$, because $g(z)$ is the reciprocal of $f$? Is the proof assuming that $f$ is injective and entire (all the while knowing that it has some sort of singularity at $z = 0$), and then trying to reach contradictions in the essential singularity and removable singularity cases? Then, once it concludes that $z = 0$ is a pole singularity, it reaches the conclusion that $f$ must be of the form $f(z) = az + b$?  Also, more specific questions about the different cases:   Removable singularity case: Why is $f$ bounded on the closed circle if $f$ is continuous? Am I missing something simple? Essential singularity case: Why exactly is $f(\{|z| > r \} \cap f(\{|z|<r\}) \neq \emptyset$? $f(\{|z| > r \})$ is dense, but how does $f(\{|z|<r\}$ being open guarantee that their union is non-empty?


How can I write underneath the equation "b+b+...+b" n-times?

I am new to LaTex, I am using a Overleaf. I'm trying to write the equation  n\times b= b+b+...+b    with 'n-times' in the bottom.


Set default folder for saving bookmarks in Firefox

I'm using Firefox 29.0.1 and would like to change the default folder a bookmark is saved to.  Currently when saving a bookmark (Ctrl + D hotkey) the folder is always "Bookmarks Menu" but I want it to be "Unsorted Bookmarks". It's really annoying and tiring to always have to select that folder when setting a bookmark.


Can we remap the keys when using an external keyboard?

I'm using my physical keyboard on my tablet with Android. The Brazilian keyboard works fine for me, there are only two problems:   The right-shift is "/" instead of shift. The "ˆ" is different and is not accepted by LaTeX. (In LaTeX, we use aˆb for exponetiation and this one doesn't work).   One possible fix is to be able to remap the keys, Is this possible? Is there some app that allows me to remap the keys?


What Canon lens would be good for shooting high school/college sports?

I take a lot of pictures of my sons playing High school baseball (and at times lacrosse and soccer). And a lot of my sons' travel baseball games.  I have a Canon Rebel EOS XSi (450D) which of course came with a Canon  EF-S 18-55mm lens.   I needed a zoom lens and my father recommended a 75-300mm lens. Which I realized too late didn’t have stabilization.  My pictures are blurry. The pictures at night are even worse. I am desperate to get a zoom lens that will work for high school baseball and travel baseball and within two years some college baseball pictures.  Help! What type of zoom lens will get me through? And is there a lens that  will work with low light or at night games?  Is my a bit older Canon Rebel EOS XSi (450D) even fast enough to handle these type of pictures with this type of lens?  I have tried to figure this out and haven’t been successful. Is there another option than the EF 70-200 f/2.8L? Would the 75-300mm with a stabilizer help at all?


Difference between Matrix formed by List comprehensions and multiplying list element?

I am trying to change diagonal elements of a null matrix to 1.  So when I formed a matrix by using multiplying list elements  [ [ 0 ] * 4 ] * 4 and changed its Diagonal elements to 1, It changed all elements to 1. But when I formed a matrix by using List comprehensions and changed its Diagonal elements to 1, It worked correctly. Below is the implementations mentioned above:   mat1 = [ [ 0 for i in range(4) ]  for j in range( 4 ) ]   #  Using List Comprehensions mat2 = [ [ 0 ] * 4 ] * 4                                              # Using multiplying list elements   print( mat1 == mat2 )                         # True  for i in range(4):     mat1[ i ][ i ]=1                             # mat1 =  [ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]     mat2[ i ][ i ]=1                             # mat2 =  [ [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1] ]     Where I am doing wrong while using matrix formed by multiplying list elements?  Or I am misleading some concepts?  Any explanation is appreciated!    Thank you.


How to prove that $\frac{(mn)!}{m!(n!)^m}$ is an integer?

$\forall m,n\in\mathbb Z$ , $m\ge1$ and $n\ge1$ how to prove that  $$\frac{(mn)!}{m!(n!)^m}$$ is an integer?  Thanks in advance.


I'm reading "Contemporary Abstract Algebra (Eighth Edition)," by Gallian.  This is Exercise 7.38 ibid. Answers that use only the tools available in the textbook so far will be preferred.     Prove that if $G$ is a finite group, then the index of $Z(G)$ cannot be prime.   Thoughts:  What I had in mind first of all was to try the contrapositive:     Let $G$ be a group. Then if $[G:Z(G)]=p$ for some prime $p$, then $G$ is infinite.   No progress worth sharing was made after a short while here.  Next, I considered when $G=Z(G)$; that is, when $G$ is abelian; with $G$ finite. Then $[G:Z(G)]=1$ is not prime. This does not seem helpful.  The section of the textbook ibid. this exercise is from is on "Cosets and Lagrange's Theorem". This gives me some indication that an argument at the "coset level/definition" of the index of a group would be most appropriate.  None of the previous exercises leap out at me as helpful.  Please help :)


I have gone through lots of posts on the internet, but couldn't find any convincing answer for the correct usage of the semicolon in sentences.   Also, I'd like to know why we can't use a full stop everywhere instead of a semicolon, or vice versa.


Missing services for Aero Glass on Windows 10?

As suggested in this thread   I tried to locate Desktop Window Manager Session Manager and also start it manual by net start uxsms. Same problem With Themes service. Seems that none of these services are pre installed on my Windows 10 version. Any chance to install them ?


Series of novels involving a galactic empire in slow decline

This is a long-shot; I only remember a few details from two novels I read as a child, by the same author. This means they were originally published in the late 1970s at the latest, but I would guess they were older than that.  Both take place in a galaxy-spanning empire that is in decline; this decline is apparently irreversible, and has been going on for a very long time, on the order of centuries or millenia, as the central government's resources diminish and as there are rebellions on the peripheries. Technology is advanced, but stagnant. The central government is referred to as "Central Command", often abbreviated to CC. Mutants, and "greenies", are discriminated against, or worse. People from many cultures are considered "barbarians" and are second-class citizens, with restrictions on their occupations; one of the few that is open to "barbarians" is that of mercenary.  In one book, the story centers on the crew of a military vessel, which crash-lands on an uninhabited but pleasant world, which turns out to be Earth. In the opening passages of the book, members of the crew reflect on their losses to attrition in a long series of conflicts. One talks about an android, who'd helped them in one crisis, and another says, "That android was great! When did we lose him?", to be reminded of another battle. At the end of the novel, the protagonists meet the crew of another ship that had crash-landed on Earth; they decide together to turn their back on Central Command and settle on Earth. It's left ambiguous whether humans had originally come from Earth and abandoned it, or whether these were the first humans to settle there.  The other book is also set on Earth; it seems to take place sometime in the near future. I don't know how it relates in a timeline to the other novel I described, whether long before or long after. At some point, there was a reference to the city of Sacramento, as an agricultural center. Earth is considered to be under the oppressive authority of Central Command, but is a "barbarian" world. The protagonist, early in the novel, sees a sunlit wall, and thinks he'd like to stretch out on it, but does not, because that would identify him as a "greenie". It isn't really explained what a "greenie" is.


Showing $\lim_{n\to \infty} \left( 1+\frac{1}{2n} \right)^n = \sqrt{e}$, intro to analysis

I am in an intro to Analysis class, and I want to show that   $$\lim_{n\to \infty} \left( 1+\frac{1}{2n}  \right)^n = \sqrt{e}$$  I already have a result that   $$\lim_{n\to \infty} \left( 1+\frac{1}{n}  \right)^n = e$$  Which was not proven rigorously but was given to us. We basically just proved that the limit was bounded between 2 and 3, and then they gave us the real limit $e$. I am not sure if I need to use that result or not.   I have also found in the text a property that says a suite of real numbers converges to $\sqrt{a}$ if $x_1>0$ and $x_n=\frac{1}{2}\left(x_{n-1}+\frac{a}{x_{n-1}}\right),n\ge2$  I am having trouble representing the first expression in this way. Any direction would be greatly appreciated.


Add input text field(using jquery) when last existing input is clicked

I have a form section that deals with text inputs named options.  By default i'm providing two options. I want to add one more option field when last one is clicked.  <input type='text' name='options[]' class='options'>

 <input type='text' name='options[]' class='options'>   i tried   $(".options:last").click(function(){     $("#options").append("

<input type='text' name='options[]' class='options'>"); })   It does work the first time. But doesn't work after that. It doesn't considers the input that were added by jquery. So it works only when i'm clicking the 2nd option. Not the last one added by jquery. How to do that?


Why doesn't the entropy increase when two similar gases mix with each other?

Entropy increases when two substances mix with each other.  For example, the entropy of mixing of two different gases are given by $$\Delta S= 2Nk\ln\frac{V_f}{V_i}\;.$$  But, the entropy doesn't increase when the two gases mixing are same.  This is pointed by Daniel V Schroeder:     It's important to note that this result applies only if the two gases are different like helium and argon. If you start with the same gas on both sides, the entropy doesn't increase at all when you remove the partition.   Now, why is this so? Both the gases, though the same, increase their individual entropies when they expand, don't they?  So, why did Schroeder say there is no entropy of mixing? What actually happens such that there is no change in entropy when the gases are the same?


Avoid duplicate while generate list of items from a set of patterns

I'm trying to create a item list with specific patterns, so far my design is like this,  patterns = [    '{column1}{column2}',    '{column1}@{column3}',    '{column2}#{column4}',    '{column3}!@#' ]  for c1 in possible_column1:    for c2 in possible_column2:      for c3 in possible_column3:         for c4 in possible_column4:           data = {               'column1': c1,              'column2': c2,              'column3': c3,              'column4': c4,           }           for pattern in patterns:               result.append(pattern.format(**data))   The design has many problems,    It create duplicate values, and I have to do a list(set(result)) to unique the list It's slow   What's the common way of writing such algorithms?  The patterns list varies and will be changed frequently, new type of columns maybe added as well  P.S In my opinion, this differs from permutations.


Anyone know if I can bring my e-cig on an international flight to Australia?  If there is no "smoke" and only vapor what's to stop me from taking a drag while in the lavatory?  The smoke detector won't go off.  What if I exhale my vapor into my shirt sleve?


Samsung S Galaxy II (i9100): possible with stock Google Android OS?

I'm in the market for a new Smartphone. Except for iPhone's, I'm new in the field and probably have some misconceptions.  My first choice was the Google Nexus S, but I was offered a great deal on the Samsung S Galaxy II (i9100). The only issue is that I read that it came with an "enhanced" version of Android. Being familiar with PC's, I know that these enhancements are almost always bloatware: I always do a clean install of Windows to get rid of it.  My question is fairly simple: is this possible to use the stock Google Android OS on the Samsung S Galaxy II (i9100)? That was the killer feature of the Nexus S for me: coming directly from Google, easily upgradable. Would that be possible and if yes, how?  Thank you for enlightening me.


What is the name for the second decade in a century?

Inspired by , we have   80's : "The Eighties" 90's : "The Nineties" 00's : "The Naughts" or "The Naughties" 10's : ???


Proof of continuity $f(x+y) = f(x) + f(y)$

I am trying to prove that if I have $f:\mathbb{R} \to \mathbb{R}$ satisfying $\forall x,y\in\mathbb{R},f(x+y) = f(x) + f(y)$. Which is assumed continuous at $0$, that $f$ is continuous on $\mathbb{R}$  I am fairly sure it is, for that property seems to be a property of polynomials, and we know polynomials are continuous where defined(all reals)  Any ideas for rigor?  $|x-a| \lt \delta \implies |f(x+a)-f(x)-f(a)| \lt \epsilon$  No idea where to go from here, this is my first time doing $\epsilon-\delta$ stuff.


What happened to Asgardian refugees in Infinity war?

In Thor: Ragnarok we see all Asgardians get into a refugee ship and meeting with a huge ship. Thanos had mandated that half of people from a conquered planet to be executed and the other half to be spared. But all Asgardians seem dead. When Thor and Loki have been defeated we see bodies and a spreading and toxic indoor fire. When the Guardians arrive, we see bodies thrown out into the cold vacuum. Did Thanos's guys use excessive force and kill everybody?


Turner syndrome is a chromosomal disorder where one of the X chromosomes is missing. For more details visit the   I don't understand why missing one X chromosome would be harmful. In normal females one of the two X chromosomes is inactivated at an early embryonic stage to a Barr body. For more details visit the .  This X chromosome inactivation can be beneficial. For example, women are less prone to sex-linked genetic disorders due to this X chromosome inactivation.  My questions are:   If only one copy of an X chromosome is active in normal human females, why would having only one copy of an X chromosome cause a disorder? What does it mean to deactivate parts of a chromosome Why would it be essential to have two copies of a gene, as only the dominant one is expressed?


Let n be a positive integer and let $\alpha$ , $\beta$ be primitive n-th roots of unity.  a) Show that $\frac{1-\alpha}{1-\beta}$ is an algebraic integer.  b) If $n\geq 6$ is divisible by at least two primes ,show that $1-\alpha$ is a unit in the ring $\mathbb Z[\alpha]$.  For a) I tried with $\alpha =\omega$ and $\beta= \omega^2$ primitive cube rots of unity and got the polynomial $x^2-x+1$. But for nth case the calculation is going tedious.Please help. b)Here we have only to show that $\alpha $ is a nilpotent element.Then we are done.But how to show $\alpha$ is nilpotent?  Thanks in advance!


Probability density and distribution function

I am new to probability course and find concepts very confusing. I am learning maximum likelihood estimation and as a starting point for that do we find the density or the distribution?   In general, do we find the distribution from density or is it vice versa and how does one find it? For example, for Gaussian distribution do we find the density of a variable or the distribution so as to estimate unknown parameter A in the case x[n] = A + w[n] where w[n] are uncorrelated gaussian noise. This may sound too trivial but I am really confused. In many contexts I have come across where pdf = prob. density function and in some areas I find pdf = prob distribution function !!


How to Recover Data from Harddisk after formating using dd command

How do I recover data from an external hard disk? I used the dd command by mistake on the disk. Specifically, I used: dd if=xyz.iso of=/dev/sdb  Please help me retrieve the lost data.


$\lim a_n = 0$ if $\left|\frac{a_{n +1}}{a_n}\right|\to L < 1$

Suppose that $a_n \neq 0$, for every n and that $L = \lim |\frac{a_{n +1}}{a_n}|$ exists. Show that if L < 1, then $\lim a_n = 0$.  What I did so far:  If L < 1 and $L = \lim |\frac{a_{n +1}}{a_n}|$, there exists $n_0$ such that for $n \geq n_0$, $0 < |a_{n+1}| < |a_n|$. That means that the sequence $(|a_n|)_{n \geq n_0}$ is decreasing.   Consider the set $S = \{ |a_0|, ..., |a_{n_0} \}$. S is finite. Let $\beta = \max_{0 \leq i \leq n_0} |a_ i|$. Thus, $(|a_n|)$ is limited (because, for every n, $0 \leq |a_n| \leq \beta).$  Now I have that $(|a_n|)$ is limited and, throwing away a finite number of terms (the $n_0$ firsts) I can assume that it is decreasing. So I know that $(|a_n|) converges.   How can I prove that it converges to $0$?   I also know that if I prove that $ \lim |a_n| = 0$, then I have that $ \lim a_n = 0$.


Are cave walls considered objects for the purpose of spells - and how much of one?

Last session, the players found a strange vein in the walls of a cavern. They wanted to see if they could break it down or tear chunks out of the wall by targeting it with a spell.  Does a cave wall count as an object for the purpose of being targeted by spells? If so, would an entire cave complex be considered a single object?


Question concerning linear combinations of vectors and linear independence in Linear Algebra.

My question concerns the definition of linear combinations and a criteria for linear independence of a Set (either finite or infinite).  Here is the following Definition and Criteria given:   A vector $v$ in vector space $V$ is a linear combination of vectors of set $S$ if there is a a finite number of vectors $x_1, \cdots , x_n$ and scalars $a_1, \cdots , a_n$ such that $$v= a_1x_1 + \cdots + a_nx_n$$  Question:  Here is finite restricted to more than $1$ vector. Or does this definition include the possibility of a vector $v$ being a linear combination of no vectors?  Also, can these finite vectors in set S be the same. That is must they all be distinct?   Criteria for Linear Independence:  My book writes the following fact:  A set is linearly independent if and only if the only representations of the zero vector as linear combinations of its vectors are trivial representations.  Question:  Taking in mind the definition of linear dependence requires a nontrivial representation of the zero vector as a linear combination of DISTINCT vectors of the set examined for linear dependence, why does this criteria for linear Independence say "as linear combinations of its vectors" as opposed to "as linear combinations of its distinct vectors" ?   Lastly, if a set is linear independent, does that imply the set contains distinct vectors?  Does it make sense to talk about linear dependence and linear independence in the context of a set of vectors with some vectors repeated. That is with a set of vectors with element all not distinct?    Thanks in Advance.


Environment var (LD_LIBRARY_PATH) weirdly hidden under bash on Mac

Here is a brief, self-explanatory bash session on Linux:  $ env | grep LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=foo $ env | grep LD_LIBRARY_PATH LD_LIBRARY_PATH=foo $ echo $LD_LIBRARY_PATH  foo   Here is the same session on a Mac:  $ env | grep LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=foo $ env | grep LD_LIBRARY_PATH $ echo $LD_LIBRARY_PATH foo   Notice that, oddly, env does not include LD_LIBRARY_PATH, even though it has been exported, and echo finds it. But it's not just an env thing. Other programs cannot find the environment variable. Here is a JVM (via the Scala REPL), after setting export LD_LIBRARY_PATH=foo:  scala> System.getenv("LD_LIBRARY_PATH") res0: String = null  scala> System.getenv("SHELL") res1: String = /bin/bash   On Linux, System.getenv("LD_LIBRARY_PATH") yields the expected foo.  I'm trying to execute an external process from Scala that needs to inherit LD_LIBRARY_PATH from the parent shell. But if the JVM can't see the parent shell's LD_LIBRARY_PATH, and doesn't inherit automatically, it's hard to get right.  On Linux everything works as expected.  Thank you for your help!


Short story of an animated dead man in a world with no fear of death

I read this short story in an anthology, most likely in the 80s, possibly in the 90s.  The setting is a future in which the living no longer fear death.  One consequence of that is that they are disinterring cemeteries to recover the land and (possibly) cremating the remains.  The protagonist is a dead man who has been disturbed by being disinterred and, somehow animated, is wandering.  He has an interaction with a little girl in which he learns that people no longer fear death; he may have killed the little girl.  The protagonist is "caught" when someone offers him a ride, and a cigarette, and the lack of breathing became obvious due to the cigarette.


How can I put an angle at this specific point?

I am new to tikz and I am struggling to be precise with the placement of my figures. Specifically, I was looking to have angle EDF be labeled with $\frac{x}{2}$ and angle ADF to have the "right angle" symbol. Also, I would like the line segment AB to be labeled with $\sqrt{1+t^2}$. Any help would be greatly appreciated! If there are any other reccomendations to make the image look better, maybe fix the arbitrary bold lines, I would also appreciate that! Here is my code for the figure:  \begin{figure} \centering \begin{tikzpicture}    % Define coordinates   \def\Radius{5}   \path     (-\Radius, 0) coordinate (A)     -- coordinate (M)     (\Radius, 0) coordinate (B)     (M) +(60:\Radius) coordinate (C)     +(120:\Radius) coordinate (D)   ;    % Draw semicircle   \draw     (B) arc(0:180:\Radius) -- cycle ;   ;   \draw (0,0) -- (0,5) ;   \draw (-5,0) node[below=.333em]{$A$} node[right =4.0em, above left=0.01em]{$\frac{x}{2}$}   -- (2.96,0) node[below = .333em]{$E$}   -- (2.96,4) node[above right=.333em]{$D$}   -- cycle; \draw (0,0) node[anchor=north]{}   -- (5,0) node[anchor=north]{}   -- (2.96,4) node[above right=.05em]{}    -- cycle;    \draw (0,0) -- (0,3) node[anchor = north east]{$B$};   \draw(0,0) node[below=.333em]{$C$};   \draw (5,0) node[below=.333em]{$F$};  \draw [black, thick] (-4,0) arc[start angle=0, end angle=37, radius=0.7cm];     \draw [black, thick] (2.5,3.9) arc[start angle=270, end angle=360, radius=0.7cm];          \filldraw [black] (0,0) circle (2pt);         \filldraw [black] (-5,0) circle (2pt);         \filldraw [black] (5,0) circle (2pt);         \filldraw [black] (2.96,4) circle (2pt);         \filldraw [black] (2.96,0) circle (2pt);         \filldraw [black] (0,2.5) circle (2pt); \end{tikzpicture} \end{figure}


Do mortgage points get applied directly to the principal?

Lets say I want a $100,000 mortgage. I can get it at x%, or (x-0.25)% if I pay 1 point. If I do the 1 point option, will my first payment be on a $99,000 balance, or a $100,000 balance? In other words does the point I pay go towards my mortgage or just as a fee to the lender?


Gmail is marking my emails as SPAM. However, ISnotSPAM marks it as not-spam

I'm sending an email through my application code. The email gets into my Gmail spam folder. However, a test of the same email in ISnotSPAM is marked as non-spam. My application is using Sendgrid to send emails. Will appreciate some advice to avoid reaching the spam folder.  Below is an example of ISnotSPAM report, marking the email as non-spam. The same email has reached my gmail's spam folder.  ========================================================== Summary of Results ==========================================================  SPF Check : pass Sender-ID Check : neutral DomainKeys Check : pass DKIM Check : pass SpamAssassin Check : ham (non-spam) ========================================================== Details: ==========================================================  HELO hostname: mail-bk0-f48.google.com Source IP: 209.85.214.48 mail-from: olgaduboshin@gmail.com --------------------------------------------------------- SPF check details: ----------------------------------------------------------  Result: pass ID(s) verified: smtp.mail=myemail@gmail.com DNS record(s): gmail.com.   155    IN  TXT "v=spf1 redirect=_spf.google.com"   ---------------------------------------------------------- Sender-ID check details: ----------------------------------------------------------  Result: neutral ID(s) verified: smtp.mail=myemail@gmail.com DNS record(s): gmail.com.   155    IN  TXT "v=spf1 redirect=_spf.google.com"   ---------------------------------------------------------- DomainKeys check details: ----------------------------------------------------------  Result: pass ID(s) verified: header.From=myemail@gmail.com Selector= domain= DomainKeys DNS Record=._domainkey.  ---------------------------------------------------------- DKIM check details: ----------------------------------------------------------  Result: pass ID(s) verified: header.From=myemail@gmail.com Selector=20120113 domain=gmail.com DomainKeys DNS Record=20120113._domainkey.gmail.com  ---------------------------------------------------------- SpamAssassin check details: ---------------------------------------------------------- SpamAssassin v3.3.1 (2010-03-19)  Result: ham (non-spam) (0-1.1points, 10.0 required)  pts rule name description ---- ---------------------- -------------------------------   * 0.0 FREEMAIL_FROM Sender email is freemail (myemail[at]gmail.com) * -0.0 SPF_PASS SPF: sender matches SPF record * 0.1 HTML_MESSAGE BODY: HTML included in message * 0.0 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * -0.0 DKIM_VERIFIED DKIM_VERIFIED * 0.0 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -1.0 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.214.48 listed in list.dnswl.org] * 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL X-Spam-Status: Yes, hits=-1.1 required=-20.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VERIFIED,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 X-Spam-Score: -1.1  To learn more about the terms used in the SpamAssassin report, please search here: http://wiki.apache.org/spamassassin/


Is it possible to export shades to a texture image?

I have this shade but I want to convert it into texture images to export to any platforms like Roblox. Do you guys know if it is possible?


How to expand summations using mathematical induction

By Induction $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$ But I didn't understand how I can do this, for this function or another function, i.e how to derive the right hand side function for the summation.


What programming languages can I use in Blender?

What version of Python does Blender use and are other languages available? Also, does Python work the same in Blender as when you write console applications or when working with Pygame or are there any differences? If so, what are the main differences?


When an apt package is flagged as "automatically installed", is it possible to view which package triggered the installation?

When apt lists an automatically-installed package that I don't recognize, I'd sometimes like to know which manually-installed package originally triggered the installation. Is this possible?


"nvidia-304-updates" vs "nvidia-304" (and similar)?

What is the difference between these two modules? Whoever created them didn't seem to think of including a clear description.


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException - paint()

i'm testing another simple program for drawing a line. First problem is the error.  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at GUI$2.paint(GUI.java:57)     at javax.swing.JComponent.paintChildren(Unknown Source)     at javax.swing.JComponent.paint(Unknown Source)     at javax.swing.JComponent.paintChildren(Unknown Source)     at javax.swing.JComponent.paint(Unknown Source)   This is the code for line 57 g.drawLine(pointStart.x, pointStart.y, pointEnd.x, pointEnd.y);  panel = new JPanel(){         Point pointStart = null;         Point pointEnd = null;         int x = 1;         {                addMouseListener(new MouseAdapter(){                 public void mousePressed(MouseEvent e){                     pointStart = e.getPoint();                 }                 public void mouseReleased(MouseEvent e){                     pointEnd = e.getPoint();                 }             });             addMouseMotionListener(new MouseAdapter(){                 public void mouseMoved(MouseEvent e){                     pointEnd = e.getPoint();                 }                 public void mouseDragged(MouseEvent e){                     pointEnd = e.getPoint();                     repaint();                 }             });         }         public void paint(Graphics g){             super.paint(g);             g.setColor(a);             g.drawLine(pointStart.x, pointStart.y, pointEnd.x, pointEnd.y);         }     };   If i can ask, how do i save the lines that has been drawn? Thanks


What's usually the effective visual resolution of typical Hollywood Movies?

I'm really surprised by the quality of the visuals in some new movies this year (2018). I'm curious to know in what resolution these cameras typically record to experience this quality on a cinema screen?


The relation between copula and survival copula

There are two relations connect between copula distribution function and copula survival function I got confused between them   $¯C(u,v)= u + v -1 + C(1-u,1-v)$ $C(u,v)= 1 - ¯C(1-u) - ¯C(1-v) + ¯C(1-u,1-v)$  So if we have copula function we can find survival copula   If you provide some useful references or explanation through an example that illustrates the relation further


Trouble Viewing Whole HDR Image as cycles world

When I load an HDR image into an environment texture using Cycles Render, only a small fraction of the image appears. I have a feeling it's an easy fix, but I can not find what needs to be changed.


How to print the list of packages installed on TeX Live to a file?

OS: Ubuntu 11.10 TeX: Tex Live 2011   Using the information given at the aforementioned question, I was able to see the list of packages in my current TeX Live installation. I wanted to save the list in a file. I tried using the "Edit>>Select All" option from the terminal. But using that I am able to save only a small sub-section of it. Is there a simple addition that I can make to the "list" command with "tlmgr" to make it print the output to a file?


Null Pointer Exception when filling a 2d array

I'm building a small game in an applet. Whenever I try to run it, I get the following error on the line  buttons[i][k] = new ActiveSquare(k);   error:  java.lang.NullPointerException at com.proj3.renee.ClickAid.<init>(ClickAid.java:21) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:379) at sun.applet.AppletPanel.createApplet(AppletPanel.java:795) at sun.applet.AppletPanel.runLoader(AppletPanel.java:724) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:745)   I've read up on similar answers and newInstance0 issues and I've checked to make sure the classes within ActiveSquare are working, but I still can't place the problem. Any suggestions or further reading would be appreciated.  Here's the first bit of code and the constructor (I can post more if requested):  public class ClickAid extends Applet implements ActionListener { ActiveSquare[][] buttons; private static final long serialVersionUID = 1L;  public ClickAid() {      setLayout(new GridLayout(0, 2, 5, 5));     JPanel panel = new JPanel();     add(panel);      for (int i = 0; i < 4; ++i){//default = 4             for (int k = 0; k < 6; ++k){                     buttons[i][k] = new ActiveSquare(k); //this is where the error is                     panel.add(buttons[i][k].buttonaspect);                     buttons[i][k].buttonaspect.addActionListener(this);         }     }        }


When doing a git merge, what does the 'recursive' strategy mean?

I've seen this hundreds if not thousands of times, but what does it actually mean?  Are there other strategies that I can use, perhaps variants on mine or their?    What is the syntax for using different strategies and in what situations should I choose one over an other?


Can we use "bad" as an adverb in writing and formal speech?

Should a lecturer say      "He felt bad" or "He felt badly"?   "His tooth ached so bad he couldn't sleep" or "His tooth ached so badly he couldn't sleep"?     Are both forms acceptable in formal speech?


In my study there are only 15 subjects in the intervention group and 15 in the control group. Can I use the relevant t-test to analyze each inter group and intra group differences(pre & post). Will it be a problem with this size of small sample. If it is so, can you give me a minimum sample size.  Thank you very much


How to create a new XSSFWorkbook from an existing Excel template

I've been trying to instantiate a XSSFWorkbook using a FileInputStream, based on an existing excel file (xlsx). I should use an Excel template due to some business requirements. XSSFWorkbook templateWorkbook = new XSSFWorkbook(new FileInputStream("myTemplate.xlsx")); I'm using XSSF because I want to improve the performance while creating large Excel files (~50k rows). So I've followed some examples like  that shows how to use SXSSF to increase performance. Then, after get the Excel template into a new XSSFWorkbook I do this: SXSSFWorkbook mySXSSFWorkbookFromTemplate = new SXSSFWorkbook(templateWorkbook, 100); However, I always get either the following exception (while reading the Excel file, I mean I don't even get into the SXSSFWorkbook instantiation):  java.lang.NoClassDefFoundError: org/apache/xmlbeans/impl/store/DomImpl$CdataNode  or this one:  java.lang.NoClassDefFoundError: org/apache/xmlbeans/xml/stream/XMLStreamException  I'm able to solve the last exception while re-running/re-debugging the unit test (which is weird because the code and the POM dependencies remain exactly the same). So now, I'm stuck getting the NoClassDefFoundError DomImpl$CdataNode This is how my POM file looks like.     <dependency>         <groupId>org.apache.poi</groupId>         <artifactId>poi</artifactId>         <version>5.0.0</version>     </dependency>      <dependency>         <groupId>org.apache.poi</groupId>         <artifactId>poi-ooxml</artifactId>         <version>5.0.0</version>     </dependency>      <dependency>         <groupId>javax.xml.stream</groupId>         <artifactId>stax-api</artifactId>         <version>1.0-2</version>     </dependency>      <dependency>         <groupId>org.apache.xmlbeans</groupId>         <artifactId>xmlbeans</artifactId>         <version>4.0.0</version>     </dependency>  UPDATE: I'm able to see the CdataNode.java class withing the xmlbeans jar file.


Is it possible to render a panorama in perspectives other than full 360°x180°?

Update This is now possibly natively as of 2.74. See my .  Is it possible to render a panorama in cycles that is not a full 360x180 view? E.g. 360° x 30°? How can I achieve this?


Why does current density changes but not current?

let us assume that we have a conductor with a specified resistance ( case 1 ) and a normal conductor ( case 2 ) as shown in the figure , and now we apply an external electric field with a battery on it, we know that current density will be different in both the parts ,however , both the parts of the wire have different  resistances as there is a change in its cross section area but the potential difference will be equal as the length of both the parts is equal so is it correct to say that current running through both the parts is equal ?answer for both the cases


Kruskal-Wallis test for factorial design

Is it possible to use the Kruskal-Wallis test for two factors and their interaction (i.e., two way ANOVA: Y~a*b)? And which post-hoc test is possible to use after the Kruskal-Wallis test?


How to change the fontsize of footnote's number (not the fontsize of footnote)?

I need to change the fontsize of footnote's number (not the fontsize of footnote), see attachment. I try to find the answer but failed. Give me a help! John


I use if() sentences to control some transition, but it does not work. How can I solve these problems? I use the EasyFSM library to implement the simulation based on Finite State Machine.  I attach my own code. This is only the part of my code that has the problem I want to solve.   I think that there is no syntax error, but when I run the program there is no transition (the f.ProcessFSM(~) does not work) and there are only IDLE states (it is the first state of the FSM.)  How can I solve this problem?          FSM f = new FSM("C://Users//losin//Desktop//file//PMC.xml", new FSMAction() {             @Override             public boolean action(String curState, String message, String nextState, Object args) {                 return true;             }         });          for(int j=0; j <10 ; j++) {             list.add(f.getCurrentState().toString());             if(f.getCurrentState().toString()=="IDLE") {                 double rnd1 = Math.random();                 if(list.contains("PROCESS_COMPLIETED")==true) {                     if(rnd1 < 0.05) {                         f.ProcessFSM("FAIL");                     } else if(rnd1 < 0.15) {                         f.ProcessFSM("CLEAN");                     } else {                         f.ProcessFSM("LOAD");                     }                 } else {                     if(rnd1 < 0.05) {                         f.ProcessFSM("FAIL");                     } else {                         f.ProcessFSM("LOAD");                     }                 }             } else if(f.getCurrentState().toString()=="PREPARE") {                 f.ProcessFSM("PROCESS_START");             } else if(f.getCurrentState().toString()=="PROCESS") {                 double rnd2 = Math.random();                 if(rnd2 < 0.05) {                     f.ProcessFSM("FAIL");                 } else {                     f.ProcessFSM("COMPLETE");                 }             } else if(f.getCurrentState().toString()=="PROCESS_COMPLETED") {                 f.ProcessFSM("UNLOAD");             } else if(f.getCurrentState().toString()=="FAILURE") {                 f.ProcessFSM("FIX");             } else {                 f.ProcessFSM("CLEAN_END");             }         }         CSVUtils.writeLine(writer, list);                         writer.flush();         writer.close();


Should I clean the belly button of a newborn after the "stump" falls off

My newborn's umbilical cord stump just fell off, we are wondering if it is necessary or even good to clean the newly exposed belly button with alcohol or hydrogen peroxide or anything else. The Doctor didn't really give much instruction other than "keep the stump dry".


How to identify unused databases on my sql server

I am looking for the best practices or analysis someone would have followed to identify the unused or inactive databases on my SQL Server.  I went through many articles, which say possibly to go for user connections and activating traces to find the DB usage, but implementing those created more confusion.  Kindly help me in understanding if there is a better and safer way I can take my databases offline once identified.


I've seen many people who say:     This is a HTML page.   Yet I've also seen many people who say:     This is an HTML page.   Are both usages equally correct?  Or, which is the grammatically correct one?       Possible Duplicates:


Need help understanding weird definition of pure states

So in many sources I have read that   A pure state contains only one element, since the only entry on the  density matrix will be 1.   But what about superpositions?  I mean a state like   $$\mid \psi\rangle = \alpha\mid0\rangle+\beta\mid1\rangle$$   for example is a pure state but it's corresponding density matrix can have 4 non-zero elements.  Why is it that these definitions seem to ignore superpositions?


pdf comments and insert / delete / extract pages in Evince

I use Evince / Ubuntu 12.04 at home. I use(d) all Windows up to 7 except Vista at work. PDFs are more widespread each year. Evince is a great reader. Business use needs Office and Acrobat Standard capabilities. Open Office / Libre Office work great. I use pdf mod to delte / add / combine pdfs. True comments in pdfs seems to be missing. It would be better to have a native app vs a wine app. Are there plans to add commenting and insert / extract / delete page capabilities to Evince? Seems like that a serious missing part of Ubuntu / Linux.


It seems like a minimal amount of work and it will make the server-side implementation of reliable websites much simpler. Also SRV records have been around for years...  Is there something I'm missing here?  Edit: @DJ Pon3 - what I'm talking about is:   one site served from two datacentres without needing BGP, but still working if either datacentre goes offline.  (Can also be achieved by short DNS TTLs.) multiple httpS servers on different ports on one IP address.


I am having trouble with this question:     $$\mbox{Let Y(t)}=\begin{cases} 0 & -1\le t \le 0\\ Z(t)-tZ(t) & 0 < t < 1 \\ 1-t & 1 \le t \le 2\end{cases}$$   Find the quadratic variations of $Y(t)$ over [-1,2].   Z(t) is standard brownian motion.  The solution to this question says:     $$dY(t)=\begin{cases} 0 & -1\le t \le 0\\ dZ(t)-Z(2) dt & 0 < t < 1 \\ -dt & 1 \le t \le 2\end{cases}$$   $$[dY(t)]^2=\begin{cases} 0 & -1\le t \le 0\\ [dZ(t)]^2 & 0 < t < 1 \\ 0 & 1 \le t \le 2\end{cases}$$   ...by Itô's lemma because $dZ(t)dt=(dt)^2=0$.      So, the quadratic variation is $\int_{-1}^2 [dY(t)]^2 = \int_0^1 dt = 1$$   I do not understand why $dZ(t)dt=(dt)^2=0$.  I understand how to apply Itô's lemma to stochastic differential equations, but I don't know much about it beyond that. Hopefully someone can clear this up in a relatively simple way.


Can't figure out if I'm inputting arguments incorrectly or if there's something wrong with my code

So, I barely started learning about linked lists, and I made a a function that inserts a head into the linked list. The problem I'm having trouble figuring out is if I'm entering in the arguments incorrectly, or if my code has some errors.    node struct:  template<typename T> struct node { public:     node(node* next = nullptr, const T& item = T());      template<typename U>     friend ostream& operator <<(ostream& outs, const node<U> &print_me);      T _item;    //crate     node* next; //label };   insert_head function:  node<T>* insert_head(node<T> *&head, const T& insert_this) {     //create new dynamic variable     node<T>* temp = new node<T>;    //IT SHOWS THAT THE ERROR OCCURS HERE      //temp takes in the insert_this item     temp->_item = insert_this;     //temp points to the head so it doesn't lose the location     temp->next = head;     //head points back to temp     head = temp;      return head;    //returns back the head of the list }   Main:  {     node<int>* head_ptr = nullptr;      for(node<int>* nPtr = head_ptr; nPtr != nullptr; nPtr = nPtr->next)     {         insert_head(head_ptr, 7); //insert integer 5 into the head         PrintList(head_ptr);  //print the linked list     }  return 0; }   Error: undefined reference to 'node::node(node*, int const&)'


i have 8000 lines similar to this   <Flow flowId="1" timeFirstTxPacket="+0.0ns" timeFirstRxPacket="+924100.0ns" timeLastTxPacket="+199984927558.0ns" timeLastRxPacket="+199675473275.0ns" delaySum="+2287566662167.0ns" jitterSum="+65280162191.0ns" lastDelay="+3511349483.0ns" txBytes="161956" rxBytes="116536" txPackets="3125" rxPackets="2251" lostPackets="640" timesForwarded="0">   and what i need to do is summing rxPackets in each line together and txPackets too   i mean total sum of them in 8000 lines  thanks in advance  <Flow flowId="1" timeFirstTxPacket="+0.0ns" timeFirstRxPacket="+924100.0ns" timeLastTxPacket="+199984927558.0ns" timeLastRxPacket="+199675473275.0ns" delaySum="+2287566662167.0ns" jitterSum="+65280162191.0ns" lastDelay="+3511349483.0ns" txBytes="161956" rxBytes="116536" txPackets="3125" rxPackets="2251" lostPackets="640" timesForwarded="0">  <Flow flowId="2" timeFirstTxPacket="+3000000.0ns" timeFirstRxPacket="+3254190.0ns" timeLastTxPacket="+199988489445.0ns" timeLastRxPacket="+199631899307.0ns" delaySum="+12081144328484.0ns" jitterSum="+105606015634.0ns" lastDelay="+9407845452.0ns" txBytes="251896" rxBytes="124840" txPackets="4867" rxPackets="2413" lostPackets="1757" timesForwarded="0">  <Flow flowId="3" timeFirstTxPacket="+4000000.0ns" timeFirstRxPacket="+4254098.0ns" timeLastTxPacket="+199971756470.0ns" timeLastRxPacket="+198959480315.0ns" delaySum="+5150205600987.0ns" jitterSum="+74009967633.0ns" lastDelay="+9862217799.0ns" txBytes="163044" rxBytes="90532" txPackets="3150" rxPackets="1751" lostPackets="1013" timesForwarded="0">


What is the maximum likelihood for this distribution(received signal)?

Let's assume we are sending signal $\mathbf{x}$ (which is a vector $N\times 1$) through channel $\mathbf{H}$ (a $M\times N$ matrix). Our model is $\mathbf{y}=\mathbf{Hx}+\mathbf{n}$. Note that the matrix $\mathbf{H}$ is given at the receiver and $\mathbf{n}$ is a normal distribution with $\mathbf{n}\sim \mathcal{N}(\mathbf{0},\sigma^2\mathbf{I}_M)$.  We wish to estimate the vector $\mathbf{x}$ by using the maximum likelihood method. How we can do it?  My solution was to calculate $P\left(Y|X\right)$ which is a normal distribution with mean $\mathbf{Hx}$ and variance $\sigma^2\mathbf{I}_M$ and then maximize it. I don't know where to go after this.  Thanks


What is the "Event Horizon" of a black hole

Can someone please explain what the  of a black hole is? I mean is it the actual surface of the black hole or is it the point of no return where light can no longer escape?


What does the ending of the 2013 film Enemy signify?

At the end of the movie Enemy, Helen transforms into a gigantic terrified spider.  Also, there has been spider imagery throughout the film, beginning with the opening scene in the sex club, followed by two dream-sequences    spider-headed woman walking on the ceiling and  gargantuan spider crawling over the cityscape.   Is all this somehow connected?


I am trying to install torrent, so I typed some commands like:  sudo apt-get install libssl0.9.8:i386   after this command:  [sudo] password for shiddhant:   here is the problem comes, the cursor was only blinking, no input was accepted and nothing work then. So I have to close the terminal and I can't run torrent.


Using echo -e in PS1 causes line break issues in shell

The Issues:  Open command line prompt:    Enter the letter a multiple times:    Instead of wrapping to a new line the text entered wraps onto the same line:    Now, start pressing b.  The second time a line wrap is required, it will wrap to a new line:       What causes this behavior?  Using a PS1 like this causes the behavior:   ps1Color="\033[1;35m" export PS1='$(echo -en $ps1Color) Baz $'   Note the reason I want to use echo instead of the color directly is because I want to add the color conditionally based on the exit status of the previous command.  Using the color directly doesn't cause this behavior to occur.    My questions are:    How can I print color codes for use in a PS1 using echo?   If I want to make my PS1 a different color conditionally what is the best way to do this? Why am I seeing this behavior?     Update  To be clear, I really want to do this using echo because I want to change the color conditionally.  This is what I currently have right now:  function setPs1Colors_start () {      local previousExit=$?      local ps1Color="\033[1;35m"     local ps1FailBackground="\e[41m"      echo -en $ps1Color      if [[ previousExit -ne 0 ]]     then         echo -en $ps1FailBackground     fi  }  function setPs1Colors_end () {     local ps1DefaultColor="\033[0m"     echo -en $ps1DefaultColor }  export PS1='$(setPs1Colors_start)[$(date +%b\-%d\ %k:%M)][$(versionControlInfo)\W]\$$(setPs1Colors_end) '


Show only some attribute values in a table using PyQGIS

From  I know how to show a table with all the attributes using this code:   cache = QgsVectorLayerCache(layer, 10000) model = QgsAttributeTableModel(cache) model.loadLayer() table = QTableView() table.setModel(model)   Now I'm wondering how to show not all the attributes, but only the ones I want or, if it's possible, do the same thing with the classic attribute table.


In which cases is a word, or a group of words written in italics? Is italics used in specific contexts, or it is quite normal to write words in italics?


Using an alternative specification of a capacitor

I have a project that requires me to use an electrolytic-capacitor with this specification: 10 uF 16V. I want to know if its possible to use a 10 uF 50V capacitor instead. Thanks for your anticipated response guys.


Mobile phone technology has been growing rapidly. Nowadays, we have mobile phones with the same configuration as a Pentium-1,Pentium-2 processor + 1 GB Ram  20GB Hard disk as we had a few years ago for Desktops.  For eg: I have just ordered for Galaxy S-III, which as 1 GHz CPU, 1 GB RAM and 16 GB Permanent storage.  So, my question is : can we format (same thing as we do on a Desktop) such mobile devices and install whatever OS (Android only for now) we like ? If so, I would like to install latest Android version on my mobile. Similar to the CD-Rom drive that can hold the OS that we are going to install on our fresh Desktop, for mobile devices can't we use any USB storage drives that has the latest Android (installation source) ?


RAM - Improving performance on MacBook 13Inch Early 2011

What is better option to improve RAM performance eon MacBook 13Inch Early 2011:  Removing the original Apple RAM Memory slots of 2GB each (2 slots - each 2GB) and inserting brand new 2 slots of 4GB each  OR adding 2 new slots of 2GB each ?  And, what is the best Non-Apple brand for compatible Memory Slots ?  thank you in advance  Finn


I'm unable to get my Ubuntu Desktop GUI Need my data in home folder

I'm unable to get my Ubuntu Desktop GUI. I tried from recovery mode but able to accessing GRUB and file system mounting in root mode. How do I backup data?


Misplaced noalign after rowcolor in multicolumn

I want to use row coloring with \multicolumn. The MWE below works, but if I change  to the commented, colored line, I receive a "misplaced \noalign". What do I wrong?  \documentclass{article} \usepackage{booktabs,colortbl,xcolor} \begin{document}  \begin{tabular}{p{1.7cm}p{1.3cm}p{1.3cm}p{1.35cm}p{1.35cm}p{1.35cm}p{1.35cm}p{1.7cm}} % \toprule % \multicolumn{1}{>{\rowcolor{lightgray}}c}{}  &\multicolumn{7}{>{\rowcolor{lightgray}}c}{String length}\\  \multicolumn{1}{c}{}  &\multicolumn{7}{c}{String length}\\ \rowcolor{lightgray} Function & 16,384 & 32,768& 65,536 & 130,072 & 262,144 & 524,288& 1,048,576\\ \midrule lower1  & 0.19 & 0.77 & 3.08 & 12.24 & 49.39 & 198.42 & 791.22\\ lower2& 0.0000 &  0.0000 & 0.0001 & 0.0002 & 0.0004 & 0.0008 & 0.0015\\ \bottomrule \end{tabular}  \end{document}   I was experimenting with a solution like this, because I receive strange table heading, like below. The code you suggested works fine in MWE, but in my real text, with copy&paste from the answer, it produces the strange heading. Any idea, what can change the behavior?


I would like to prove the following inequalities:  $|\text{rank}A-\text{rank}B|\leq \text{rank}(A+B)$  I know that $\text{rank}(A+B)\leq \text{rank}A + \text{rank} B,$ but I can't tackle the problem.  Any help would be appreciated.  Thanks


Single command to open various applications

Usually, before beginning my coding duty I open the following:   google-chrome nautilus terminal system monitor gedit   Is there a way to open all of them with a single terminal command?  I use Ubuntu 18.04.


Is there any log file created in windows for all the USB drive last plugged in and out

There's a professor of mine who's USB hard drive was stolen from her desk plugged into her laptop.  So I was wondering if there is any way or any "log file" in windows which stores the date and time of all USB drives last "plugged in/plugged out" so that I can find at what time exactly the hard drive was plugged out and stolen.  Please tell me if it is even possible from "windows event viewer", "Device manager" or "Registry Editor" etc?   I tried a software  from Nirsoft but it only showed the last time when the USB drive was plugged in.


Can I fly back to Italy if my Italian residency card has expired and is being renewed?

I have a residence permit (permesso di soggiorno) for Italy. I am currently in the Netherlands for an exchange. My permit expired on the 30th of November and I applied for a new one but I will get the card in January. I have the documents supporting that I have applied for the renewal of the permit. In the middle I want to travel to Italy for Christmas and come back to the Netherlands.    Would this be a problem?


How do I get Windows back? I don't know how, I know Ubuntu is good and all, I really want to get Windows back?  Like I want to delete the Ubuntu partition okay?


Is there a way to capture the viewport in Blender the same way as it is on 3DS Max?

I know that by default I can render the viewport and everithing that is in the viewport to be the same as in the render. But, when comparing 3DS Max to Blender, I have certain limitations. In Blender I can render the view-port with vertices/edges/faces to be shown, to be selected, but not the reflections, shadows and such.  Is there a way to render the viewport in Blender as it is in 3DS Max?  Here's how I can do it in 3DS Max:  Viewport look    Render result of the viewport    Here is how I can do it in Blender:  Viewport look:      Render result of the viewport


Why can't we move our toes and some fingers separately?

In our feet, other than the large toe, the other toes cannot be moved separately. If we try to move them, then all the four toes move together. We cannot move each toe by itself.  Same thing occurs in the hands of some of us, where we cannot move the little finger by itself. While folding the little finger, the ring finger before that also has to be folded to some extent, and vice-versa.  An explanation to the problem with the ring finger and the little finger can be found .  The phalanges make the toes. Are the phalanges of the small toes connected, such that we cannot move them separately?


Left boundary test Text ignore in Regular expression in Jmeter

ab&2e;1652769179"/>   i did correlction using rerular expression ab&2e;(.*?)"/>  but during execution some times extra text (cd&3d;) adding to the data like  ab&2e;cd&3d;1652769179"/>  So need to ignore data "cd&3d;"  Please let me know any idea to ignore text cd&3d; and capture 1652769179 only using expresiion ab&2e;(.*?)"/>  Thanks Raghav


What do you call a person who says sweet things about person to win his favors?

Ok, I am not native English speaker. But in my language there is a word for a person who starts saying good things about you just to get you do what he wants.  It's kind of repulsive to be around such people. You know they don't mean it; they know you don't believe them. But they dare to keep stretching your qualities, and you know what they are coming to. To get you do something for them. In reality they hold no admiration for you, and disregard you as soon as they no longer need you. In fact, you are never sure if any word they speak is from heart, ever. You sometimes feel sorry for them, that their inner person is forever drowned in their lies, censored.   You would usually find these people with kings, who would be like you are the best.


Why is my max_upload_filesize being limited to 2M?

I have had to reinstall my wordpress install. In order to add the content back I need to get my max_upload_filesize increased to at least 500M. I have went to every php.ini I can find and increased the size. I have even done that in the .htaccess file. When I go to media panel to upload I still have a hard limit at 2M. Where do I need to make the change?


Concrete screws not going in all the way

I'm attempting to use tapcon 1/4in by 2.75in concrete screws to affix something to a wall of poured concrete, but it's only going about 3/5 of the way in before refusing to go any further. I used the recommended tapcon drill bit size so I don't think that's the issue, and I've also air blasted all the dust out. What else could it be? Do I just need a more powerful drill? A smaller size screw?


How do you make command block output not show up in the console?

Context: If you thought  was annoying, wait til' you see this unsurpressable mess:   Question: How do I stop command blocks outputting to the console? Also, the following command does not work: /gamerule commandBlockOutput false  It only suppresses the messages sent to the chat, as demonstrated by the screenshot in the . Therefore, it is not an acceptable answer. Unless you can prove me wrong.


var a = Date; Object.defineProperty(window, "Date", { get: function() { console.log(this); return a; } });  (new Date); Date();   How can I know, when Date is being called as a constructor(with "new"), and when it's being called as a function?  Update  answers don't work for this case. this is always equal to a window


not deceting wireless NIC card but in widows its work fine

i have ubuntu 14.04 then upgrade to 15.04 afterthat my wireless  NIC card is not detecting but in windows 10 its working fine... and ubuntu 15.04 unable to detect it to work. how to solve that problem ..please suggest.. when put command on Terminal i.e iwconfig or any thing else only eth0 and lo are there no wlan0 or wlan1 etc ...what to do ..so that my wifi works fine... Detail Description...after installing ubuntu 15.04 everything works fine except the wifi . Nither its detected nor its works to surf internet ..with LAN and Bluetooth its work fine only problem with wi-fi with Airplane mode on or off doesn't matter not working ..i have there are so many to complain about it also gave some suggesstion to the question but sorry to say its doesn't work... its my suggestion to the developer team to work for the WI-FI with advance driver to come


checking if 2 equations is bigger than 0

if((quantity1[k].getrestmass() - cold[i].getmass()) > 0     && (quantity1[k].getrestvolym() - cold[i].getvolym()) > 0)   I want to compare these arguments so that both these numbers are > 0, but I'm getting a null pointer exception.     Exception in thread "main" java.lang.NullPointerException       at Main.main(Main.java:88)


If $x^5 = x$ in a ring, is the ring commutative?

If $R$ is a ring such that $x^5=x$ for all $x\in R$, is $R$ commutative?  If the answer to the above question is yes, then what is the least positive integer $k \ge 6$, such that there exists a noncommutative ring $R$ with $x^k=x$ for all $x\in R$?


Why the eigenvalues of hamiltonian are discrete in bounded systems (only discrete energy levels)?

In one dimensional motion the general potential is given as in the figure above  When energy is between V min and V 1 the energy levels are discrete like in the potential barrier and well example or when the system is bounded like in the infinite square well potential.  Why is this so? Why they are not continuous.  The solution of these problems by applying boundary conditions give discrete energy level but I can't figure out why?


How can I label two equations within the same align environment?

How can I references equations that are on the same line? Here is an example:      \begin{align}      & a_{11} = b_{11}, & a_{12} = b_{12}, \label{eq1}      \\      & a_{21} = b_{21}, & a_{22} = b_{22}, \label{eq2}     \end{align}   If I have understood correctly, I can only reference the first or second line for this case. But I want to be able to reference each equation using \eqref.  Is this possible?


Get material and color of material on a face of an object in Python

I want to iterate over the faces of a mesh and get the diffuse color of the material that is assigned to the face. How can I get the material that is assigned to the face of the object and the diffuse color of that material?


If $a_1=1,a_{n+1}^2-2a_na_{n+1}-a_n=0$ then sum of the series $\sum {a_n\over 3^n}$

Let $\{a_n\}$ be a sequence of positive real numbers such that $a_1=1,a_{n+1}^2-2a_na_{n+1}-a_n=0\,\,\forall n\ge 1$. Then show that $$1<\sum_{n=1}^\infty {a_n\over 3^n}<2$$. I got this problem from a question paper. Though it didn't asked for exact sum of the series , if you also manage to find that then please post it.


How to prevent applications from discovering my phone as being Rooted

I have to install an application that has discovered my device to be rooted.  So this is a two part question.   How did it discover in the first place that my phone has been rooted How to prevent the application from discovering my phone as being rooted


Problem while using bibtex reference of a url

@online{senfus, title={article name},  url= {https://m**.s*/U****d/Om%20MPB/F****g/Kxyzy.pdf},  }   While citing this reference, I am getting following error because of the term "%" in the url.     Paragraph ended before \BR@@bibitem was complete.\par   Is using tinyurl/google url shortener a good idea for citing the article's url.


How to use 1. (number followed by dot) format instead of [1] format in bibliography

The editor asked me to use the following format.      Reference   1. Author, blah blah   Instead of      Reference   [1] Author, blah blah ...   Even though in the main text, [1] style has been used.   For example,        Smith [1] has proposed ...      Reference   1. Smith,      This is what I want.   Could you please advise how I can do the above?  Thanks in advance.


Jsoup parse web and splite the value from parsing data

I use Jsoup for parsing web data , my code like this:  Document document = Jsoup.connect("http://www.nt-movie.com.tw/showtime.php").get();  Elements elements=document.select("li");  for (Element elementTime : elements){                     String time=elementTime.getElementsByClass("times gray33").text();                     String spiltTime[]=time.split("");                     Log.d("time",spiltTime.toString());                 }   When i haven't split time , it show like the photo:  I try to split time , it becomes to...   I want to let it shows like:  10:00  11:00  12:10  . . .  My question is that do i split time successfully or not ? Any help would be grateful, thanks.


Showing that $\mathbb{Z}[\phi]$ is a UFD, where $\phi^2+\phi+1=0$.

I would like to show that $\mathbb{Z}[\phi]$ is a UFD, where $\phi^2+\phi+1=0$. I started with a division with remainder to determine the irreducibles, but I could not finish that, and I do not know how to approach this problem. Could you provide me with some resources or show how I can solve this? Thanks in advance.


What Percentage Makes Someone a Half-blood?

I was checking on something in the Harry Potter wiki and saw Harry listed as "Half-Blood."  Both his parents were magical, but, as we know, his grandparents on his Mother's side were muggles.  This reminds me of the racially loaded terms like octoroon.  (In the south, you still hear those terms every once in a while.)  When there was still segregation, having only 1 great-grandparent of an ethnic group was enough to classify a person of that group.  So how far down the line did it go in the Harry Potter universe?  Just how many generations removed from a muggle-born would a person have to be before they're no longer classified as half-blood or something similar?


I just upgraded to Ubuntu 17.10 but all my desktop shortcuts are gone.  There is no longer a Create Shortcut option when I right-click either.   How do I add these now?


Pseudocompactness implies Compactness in metric spaces

Let $X$ be a metrizable space. I'd like to prove that if $X$ is pseudocompact, then $X$ is compact (the converse is true by the Heine-Borel theorem). Suppose $X$ was not compact. Since $X$ is metrizable, we have that $X$ is not sequentially compact. Hence, there exists a sequence $\{x_n\}_{n\in\mathbb{N}}$ in $X$ such that $\{x_n\}_{n\in\mathbb{N}}$ doesn't have any convergent subsequences in $X$. Let $S$ be the support of the sequence $\{x_n\}_{n\in\mathbb{N}}$ and let $g: S\to\mathbb{R}$ the function defined by $g(x_n):=n$. Now I'd like to prove that $S$ is discrete. Why? Because if I will prove that $S$ is discrete, I had that $S$ contains vacuously its accumulation points, then $S$ is closed. Now the function $g:S\to\mathbb{R}$ is continuous (since $S$ is discrete). Hence, I can apply the Tietze Extension Theorem that tells me that $g$ can be extended to a continuous function $G:X\to\mathbb{R}$. But this function is not bounded since the restriction $G_{|S}=g$ is not bounded: this one is a contradiction with the hypothesis of pseudocompactness of $X$. Can anyone help me please? PS: "$X$ is pseudocompact" stands for "each continuous function $F:X\to\mathbb{R}$ is bounded".


I have this multibyte arabic text string:  فتكات اكبر تجمع عربي للنساء فقط صحبة وإسلاميات واستشارات وطبخ وزواج وميك اب وتخسيس   وفضفضة وازياء ومحجبات وهوايات ومول وكليسش مال يهم المرأةفتكات اكبر تجمع عربي للنساء فقط  صحبة وإسلاميات واستشارات وطبخ وزواج وميك اب وتخسيس وفضفضة وازياء ومحجبات وهوايات ومو   When running PHP mb_strlen function on the string, I get 255 characters which is correct.  Then I tried to insert the string into a column with VARCHAR(255) using PHP Then I selected it again from the database using PHP and the following is the output:  تكات اكبر تجمع عربي للنساء فقط صحبة وإسلاميات واستشارات وطبخ وزواج وميك اب وتخسيس وفضفضة  وازياء ومحجبات وهوايات ومول وكليسش مال يهم المرأ�   So as you see, almost half of the string has been truncated. I don't know this has to do with MYSQL or PHP output.  Here is my database specs: MYSQL 5+, ENGINE=InnoDB, DEFAULT CHARSET=utf8, utf8_general_ci  And in PHP I'm using PDO statements to connect, insert, and select from the database.  Is there any extra query I need to use when inserting or selecting from database or any PHP function that I must use during insertion or selection?


Will my laptop support Ubuntu with 2 GB RAM?

My current laptop configuration is as below: Memory - 1.9Gib Processor - Intel Pentium(R) cpu A1018@2.10Ghz x 2 Graphics -:Intel Ivy bridge Mobile x86/MMX/SSE2 Disk - 245 GB When I increase my ram memory to additional 2GB a sum of 4GB ram does it sufficient to run Ubuntu 20.04 LTS latest OS?


Problem remembering the exact name/word/term

I'm looking for a name/word for when someone asks and seeks advice for a problem but, instead of telling you the real issue or the problem, s/he attempts to seek help to make her own solution work. For example:  "I need to tie a rope around a building so it won't tip over.  How can I make it strong enough?" [Real problem is the building foundation] I'm from the computer programming background and I use to see that a lot in StackOverflow Q/A ...but I can't remember the name of it...something like A-B problem. Does anyone know the exact name?


Deleted Ubuntu partition, stuck at GRUB command line

I am having one big problem. I had dual-boot on my PC: I had Windows 7 and Ubuntu. Yesterday I upgraded to Windows 10 and I deleted the partition where Ubuntu was installed.  When I restarted my laptop it says grub rescue. I tried with these commands: ls, set, root but when I type insmod nomral it says unknown file system. Also when I try ls (hd0,msdos1,3,4 or 5).  I don't have any OS CD or USB and I only have this laptop. I need it so much today.


where to place my script tag before closing of or after it

As we many of know that we have to include external jsscript file at the end of page. for performance and usability purpose.  I want to know the correct place where to place it.  means  <boby> <!--html here -- > <script src= ""> <!--  here ???  -- > </body> <script src= ""><!--  here ???  -- >   before the closing of script tag or after the closing of script . Is there any avantage of putting inside or outisde of body tag.  Thanks in advance..


Searching planet_osm_point by longitude and latitude

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads.   I have looked at the schema for osm2pgsql and inside the planet_osm_point table there is a column 'way' of type point. I tried to query it as an array like it says in the documentation here ():     It is possible to access the two component numbers of a point as   though the point were an array with indexes 0 and 1. For example, if   t.p is a point column then SELECT p[0] FROM t retrieves the X   coordinate and UPDATE t SET p[1] = ... changes the Y coordinate. In   the same way, a value of type box or lseg can be treated as an array   of two point values.   Anyone know the correct query the planet_osm tables from osm2pgsql based on long/lat? For example if I wanted to retrieve the information for Big Ben (London) I would query along the lines of:      SELECT * FROM planet_osm_point      WHERE ST_Y(ST_Transform(way, 4326)) = '-0.12'        AND ST_X(ST_Transform(way, 4326)) = '51.5';   There is no error message, it comes out with the table names, but no data is output either. (Its an empty table). What am I doing wrong here?  Perhaps it is too precise, i.e. there are no coordinates that match it exactly? Perhaps I need to try being more general, say 51 < long < 52 and -0.5 < lat < 0. Although this would throw back multiple results so would not be quite as accurate.


How can I reduce screen brightness below the minimum without an app?

I have an Optimus Elite, and it has a minimum brightness setting. In certain apps, I can reduce the brightness below the safe minimum, but when I leave the app, the brightness is increased to the system-wide minimum.  Using , I can permanently set the brightness below the safe amount, and it will stay even after going to other apps. Or using , I can accomplish almost the same thing even without needing root (it displays a translucent 'filter' over the whole screen, reducing brightness/contrast but not actually changing the backlighting power amount).  What I want to know is where the minimum screen brightness is stored. I have a rooted phone with CyanogenMod 9, so I have permissions to edit anything and could change a config or sqlite entry, but I don't know where this value is stored. What I would like to do is use the status bar brightness slider to be able to slide to the actual minimum of the screen, rather than the OS-controlled minimum. Having an app is useful, but having the functionality without the app seems to be within reach, if only I knew where the OS is getting it's safe minimum setting.  Where is this "safe minimum brightness" setting stored? If I can change it, I can remove my apps and use native controls.


Proving a limit of a trigonometric function: $\lim_{x \to 2/\pi}\lfloor \sin \frac{1}{x} \rfloor=0$

$$\lim_{x \to \frac{2}{\pi}}\lfloor \sin \frac{1}{x} \rfloor=0$$    I need to prove the limit of this using the $\epsilon - \delta $ way but I don't know how to find $\delta$ when I'm given a trigonometric function I know only how to do it with polynomial functions


All the sudden, RTL8812AU wifi USB adapter stop working

I have a Realtek 8812AU WIFI USB adapter,and till yesterday, it was working fine on Ubuntu 18.04. But, today, all the sudden, Ubuntu stopped recognizing the adapter. I am not familiar with Linux or hardware stuff... But, I am still writing the symptom as much as I can describe.   When I installed a driver for it a month ago, I used a command, apt-get install rtl8812au-dkms, and it was recognized with no trouble. Today, Ubuntu suddenly stopped enabling the adapter. Wifi adapter list is empty on Setting menu. My Ubuntu is running on a dual boot machine. So, I restarted with Windows10, and the adapter has no issues working. So, I believe the adapter is fine physically. I typed the  apt-get install rtl8812au-dkms command again. Ubuntu replied that the newest version is installed. So, the driver is still on Ubuntu.  I researched online and found the  lsusb command. By typing it, I found the adapter's company name was on a result from the command. So, at least, Ubuntu recognizes the adapter at the USB socket. I also switched it to another USB socket, and run the command. Then, it also showed the adapter on the different port. There is a small issue with the machine; the Ubuntu machine currently doesn't have any access to a wired LAN connection. So, if you know a solution, please teach me where I can download a driver or some other required files from to the other machine, and what commands I need to type after I copy those files to the Ubuntu machine physically... After I got a request from @Jeremy31 and @abu_bua (thanks for your quick reply!), I typed dmesg | grep 8812au and I received the following message from Ubuntu:   [  19.514781] 8812au: version magic '4.15.0-34-generic SMP mod_unload ' should be '4.15.0-36-generic SMP mod_unload '


Using the rule stated below, is there a way I can plant trees on a 2D plane such that there are no trees in the first k diagonals?

This question was part of the problem set for PROMYS Europe 2020, a maths (or math, just in case I made anyone unhappy) camp held at Oxford every year. It was the one which I couldn't do, and I am still puzzled by it to this day: The Mathematical Forest is grown in a two-dimensional plane, where trees can only grow on points with integer coordinates. To start with, there are no trees at all. The foresters plant the first tree at (0, 0). Each year, they carry out tree planting according to the following rule. If there is a tree on the point (m, n) but there are no trees on the points (m + 1, n) and (m, n + 1), then they can choose to remove the tree on (m, n) and plant new trees on the points (m, n + 1) and (m + 1, n). For an integer k ≥ 1, the kth diagonal consists of all points (m, n) with m + n = k − 1. Is it possible for the foresters to arrange their planting so that eventually there are no trees on the first 2 diagonals? What about the first 3 diagonals? 4 diagonals? Can you generalize? P.S. The deadline has already passed, so please do not think that I am cheating! The camp was actually cancelled due to obvious reasons, which sucks, because I really looked forward to going.


Approximating a multinomial as $p(\xi_1,\ldots,\xi_N)\propto\exp\left(-\frac{n}{2}\sum_{i=1}^N\frac{(\xi_i-p_i)^2}{p_i}\right)$

Question  Suppose we have a multinomial distribution with $N$ possible outcomes, with probabilities $p_1,\ldots,p_N$. We sample this $n$ times, and denote the observed frequency of the $i$th outcome as $\xi_i$. In [1] the author claims that the distribution of the $\xi_i$ in the limit of large $n$ is:  $$p(\xi_1,\ldots,\xi_N)\propto\exp\left(-\frac{n}{2}\sum_{i=1}^N\frac{(\xi_i-p_i)^2}{p_i}\right).\;\;\;\;\;(1)$$  We can see immediately that this must be an approximation, as it assigns nonzero probabilities for $\xi_1+\cdots+\xi_N>1$. However we can see that these have vanishing probability in the limit $n\rightarrow\infty$. My question is how do we derive (1) from the multinomial distribution, and show that they match in the $n\rightarrow\infty$ limit?  My thoughts  My first thought would be to appeal to the central limit theorem. The multinomial distribution has mean $\mu_i=p_i$ and covariance matrix $\Sigma_{ij}=\delta_{ij}p_i-p_ip_j$, so we would expect this in the large $n$ limit to be described by a multivariate Gaussian with mean $\mu$ and covariance $\frac{1}{n}\Sigma$. However, things are complicated by the fact that the multinomial covariance is singular (since $\xi_N$ is determined by the other $\xi_i$s), and so the multivariate Gaussian is not defined.  To address this, we may try and consider only the first $\xi_1,\ldots,\xi_{N-1}$, which have a non-singular covariance matrix and hence well-defined multivariate Gaussian distribution. Let's take the Binomial distribution $N=2$. The frequency $\xi_1$, this has mean $p_1$ and variance $p_1(1-p_1)$, so this would be described the the Gaussian: $$\propto\exp\left(-\frac{n}{2}\frac{(\xi_1-p_1)^2}{p_1(1-p_1)}\right).\;\;\;\;\;(2)$$ The expression (1) gives: $$\propto\exp\left(-\frac{n}{2}\left(\frac{(\xi_1-p_1)^2}{p_1}+\frac{(\xi_2-p_2)^2}{p_2}\right)\right).\;\;\;\;\;(3)$$ If we substitute $\xi_2\rightarrow 1-\xi_1$, $p_2\rightarrow 1-p_1$ into (3), we can verify that this gives the same answer as (2). I have verified that this also works for $N=4$.   I'm sure that if I just bashed out the algebra for general $N$ we would get agreement between the central limit theorem and (1) when we restrict the latter to $\xi_1+\cdots+\xi_N=1,p_1+\cdots+p_N=1$. However, how can we start with the multinomial distribution and derive (1) as a limit which is valid everywhere? One idea would be to say that (1) goes to zero as $n\rightarrow\infty$ when you are not on that plane, however I am a bit uncomfortable with this as it goes to zero everywhere except the mean as $n\rightarrow\infty$, so I don't know if that argument is good enough.  [1] Wootters, William K. "Statistical distance and Hilbert space." Physical Review D 23.2 (1981): 357.


Getting the expectation symbol to behave like $\sum$ instead of $\Sigma$

How can I get an expectation symbol which behaves like $\sum$?  Specifically, I want the underscore to be like that of a summation.  At the moment I use   $$\mathbb{E}_{x\in A}$$    However, I do not like this.  It feels like I am writing a sum as   $$\Sigma_{x\in A}$$    Whereas the alternative  $$\sum_{x\in A}$$   is much nicer when in a centered equation.  (The underscore appears directly below the sigma, instead of slight infront and below.)  Is there a way to make an expectation symbol which behaves like $$\sum$$ rather then $$\Sigma$$?


How does electricity 'decide' on it's pathway?

I'm struggling to understand the fundamental concepts of electricity, more specifically, the way in which it 'chooses' its optimal pathway.  I appreciate electricity will always choose the path of least resistance, but how does it know which route has least resistance? Does it attempt that, potentially sub-optimal, route first before deciding not to take it?  This question comes from a discussion on the effect of electricity on the body when hanging on a charged wire, as opposed to hanging on a charged wire whilst touching the ground. I can hang on the wire all day, safely, but the minute I touch the ground the electricity all of a sudden decides that that is the best route. Did it previously try this route?


I have everything currently installed on a 120GB SSD. I've recently installed a 2nd drive (480 ssd) which I've partitioned for about 90% personal use and 10% in case I add 'other' purposes. I@ve not yet stated a mount point in fstab.  I want to shift my complete home folder to this drive (its main partition).  I know the answer is 'google it', and I've done that but can't seem to get a definitive answer and nothing directly referring to 18.04.  Can someone please point me towards a good guide for doing this? Do I need to boot into a live distro?  Many thanks.


In the beginning of The Dark Knight Rises, Bane and his minions take over the airplane in which Dr. Pavel is transported. After having the control over the airplane, and having it wired up with cables, they bring in a body bag in which a seemingly dead person lies in. Then, they start a blood transfer with Dr. Pavel. But why? I guess they want, when the bodies are found, the body-bag-person will be identified as Pavel. I am sure that this little blood would not be enough, it only took some seconds. Is there any other reason or explanation?


How do I temporarily bypass an alias in tcsh?

I am using tcsh. bash and zsh and other suggestions won't help here.  I have several aliases that are named the same thing as another command, so if I did unalias it, typing the same thing would now do something different.  Most of the time I want the aliased command, which is why I have them. However, sometimes I want the unaliased command.  Without actually unaliasing and redefining the command, is there a simple way to tell tcsh to use the unaliased command instead?  For example, vi is aliased to vim, but sometimes I want to just use vi. cd is aliased to change my window title, but sometimes I want to leave it alone.  Obviously I could type /usr/bin/vi but since cd is a shell built-in command, there is no equivalent. Is there a general solution?