Looks like it's a common trend in apps to provide a user with user name and password boxes that are presented as two rows in a round corner box. How do they do that? Custom drawing? Seems like way too many apps and way too close look and feel to be custom drawing but...

I'm trying to do that for a couple of days now, and after reading tons of messages of people trying to do that too, I'm still unable to have a fully working UITextField in some of my UITableViewCells, just like in this example:     Either I have the form working but the text is not visible (although I set its color to blue), the keyboard goes on the field when I click on it and I haven't been able to correctly implement the keyboard events. I tried with a bunch of examples from Apple (mainly UICatalog, where there is a kinda similar control) but it's still not working correctly.  Can somebody help me (and all the people trying to realize this control) and post a simple implementation of a UITextField in a UITableViewCell, that works fine?


I'm studying abstract algebra alone as my doctor needs a doctor haha.  Ok, I'm studying about cyclic groups now. I read that:  if 2 elements $x$ and $y$ commute in a group $G$, then the order of $xy$ is a divisor of $l.c.m(o(x),o(y))$,   then I read that it's exactly equal to $l.c.m(o(x),o(y))$, so got confused.  Can anybody explain this to me? Also, can anybody advise me to read some detailed lectures about cyclic groups, as I feel like if I need much more to be strong at this lesson.

We want to show that if $a,b\in G$ where $G$ is a finite Abelian group, we have  $\operatorname{LCM}(|a|,|b|) = |ab|$ given that $ab \neq e$.   How I approached this question was by saying let $\operatorname{LCM}(|a|,|b|) = L$. Then if we show that $L$ divides $|ab|$ and $|ab|$ divides $L$ then $|ab| = L$. Showing that $|ab|$ divides $L$ was fine. But then I am having trouble with the second part that is showing $L$ divides $|ab|$. For this, so far I have:  Consider $(ab)^{|ab|} = e = a^{|ab|}b^{|ab|} $  since we know $a \neq b^{-1}$ by assumption then we can conclude that $|a|$ divides $|ab|$ and $|b|$ divides $|ab|$. We know that $L = \frac{|a||b|}{\operatorname{gcd}(|a|,|b|)}$ from here can we conclude that $L$ divides $|ab|$?


I am working on a 3V battery powered arduino project. I need to monitor the battery so that I could send a signal when battery is dying. At first it seemed tricky because the same voltage is being used by the micro-controller but later on I came to know that there is some sort of internal 1.1V reference in Arduino. However I need to use a voltage divider to reduce the voltage. This is the circuit described on the :    PIN_A1 is where the battery voltage is being read. High value resistors have been used to avoid excessive current draw.   My question is - What is the aim of using a voltage divider here?   EDIT:  It has been figured out that voltage divider is bringing the battery voltage within internal voltage reference range i.e. 1.1 V.  (Credit goes to Vladimir)

I am powering an Arduino using a 5v battery (3.7v to a step-up module), and I need to measure the voltage. Let's say the battery delivers high current, is it safe to measure the voltage via Analog In? As in this:    The reason I'm asking is that I don't know much about the Arduino's ADC architecture and limitations. So normally, I'd do so for safety:    Are the connections in the first diagram safe for the ADC? Thanks in advance!  Note: A similar question was asked here: (), but it doesn't answer the question of high current loads on the battery.


Consider $x^2+3=0$.  If we add $x$ to both sides to construct a new statement $x^2+x+3=x$, what type of reasoning / logic is this? Another example would be completing the square.  New students might say that the added term when completing the square "comes out of nowhere."  Surely it can be done because (and forgive my elementary language) "whatever is done to one side can (and must) be done to the other," but what type of logic is the action of doing so? Are there recommended ways of explaining this concept to K-12 math students?

It seems that given a statement $a = b$, that $a + c = b + c$ is assumed also to be true.  Why isn't this an axiom of arithmetic, like the commutative law or associative law?  Or is it a consequence of some other axiom of arithmetic?  Thanks!  Edit: I understand the intuitive meaning of equality. Answers that stated that $a = b$ means they are the same number or object make sense but what I'm asking is if there is an explicit law of replacement that allows us to make this intuitive truth a valid mathematical deduction. For example is there an axiom of Peano's Axioms or some other axiomatic system that allows for adding or multiplying both sides of an equation by the same number?   In all the texts I've come across I've never seen an axiom that states if $a = b$ then $a + c = b + c$. I have however seen if $a < b$ then $a + c < b + c$. In my view $<$ and $=$ are similar so the absence of a definition for equality is strange.


My brother recently gave me and iPhone 6 and he reset it before before handing it over. I turned it on and it says "Hello, Press home button to unlock and get started". But the Home button on the iPhone isn't working.  How can I get past this without replacing the Home button right now, and set it up with the Assistive Touch, until I get it fixed.

My iPhone 5s had recently been cleaned of all files and data, including iCloud so I need to activate it. It prompts me to press the home button to activate but the home button on my iPhone doesn't work. Is there a way I can activate this phone without pressing the home button?


If I want to accurately save information about the hardware I am using as a reference, what is the best way to do it? Are the contents of /proc/meminfo sufficient?

How can I check what hardware I have? (With BIOS version etc.)


I upgraded to Texlive 2014 on Unbutu 14.04 and after this I'm getting this error (for some files):     !pdfTeX error: pdflatex (file WebOMintsGD): Font WebOMintsGD not   found   I would highly appreciate if someone help me to figure out this problem. Thanks  Edited  I asked the question which is liked as duplicated. At Texlive 2014 on Unbutu 14.04, I'm not able to fix the problem      !pdfTeX error: pdflatex (file WebOMintsGD): Font WebOMintsGD not   found   even after install the required fonts. Any help will be highly appreciated. Thanks  I found this  but still struggling.  I used getnonfreefonts-l to check the installed fonts and this command shows Webomints font in this list. Even then I'm getting the same error (Might be in different directory, looked  for the same problem where fonts were in different directory). I'm not very expert and struggling with it. Any help will be highly appreciated. Thanks

I switched from Windows 7 to Ubuntu 14.04. The following code was producing this .  \documentclass[oneside,english,a4paper, 12pt]{book} \usepackage{a4wide, fullpage, color, fancyhdr, lastpage, changepage, multirow, calligra, graphicx}     \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{geometry} \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}  \makeatletter \let\ps@plain\ps@fancy% Plain page style = fancy page style \makeatother  \providecommand*{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}} \newcommand*{\cdiam}{\prec\kern-2pt\succ} \IfFileExists{upquote.sty}{\usepackage{upquote}}{}  \begin{document} \begin{titlepage} \fontfamily{pbk}\selectfont   \begin{adjustwidth*}{1.5cm}{2cm}     \vspace*{4.5\baselineskip}     \centering     \begin{picture}(600, 0)       \multiput(0, 110)(20, 0){20}{{\wb{10}{12}4}}                    % Top Line       \multiput(-5, 90)(0,-21){35}{\rotatebox{90}{{\wb{10}{12}4}}}    % Left Line       \multiput(0,-630)(20, 0){20}{{\wb{10}{12}4}}                    % Bottom Line       \multiput(400,90)(0,-21){35}{\rotatebox{90}{{\wb{10}{12}4}}}    % Right Line     \end{picture}     \end{adjustwidth*}     \end{titlepage} \end{document}   But now on Ubuntu 14.04 I'm getting output with the border shows up as a string of the number 4. I would highly appreciate if someone guide me how to install the required fonts. Thanks


I'm currently getting a panda data frame from alpaca - a stock trading platform.  The data I'm getting is for minute data and is giving me a timestamp that cant be converted to DateTime to make my functions easier. Heres an output for AMZN minute data                                 open       high        low     timestamp                                                                    2019-08-08 14:12:00-04:00  1826.8600  1826.9649  1826.1026   2019-08-08 14:13:00-04:00  1826.6500  1827.6520  1826.6500     Heres the data type:  print(type(AMZN.index[0]))  <class'pandas._libs.tslibs.timestamps.Timestamp'>   I'm trying to split this index into two columns where the day is the index and the time(minutes and hours) is the next column.  Or just getting it into all into datetime format together would work fine too.  I've tried finding a similar problem and using _datetime() but it doesn't seem to work.  I have the datetime library but it doesn't seem to register when I use the code as in other posts.  Overall Im just trying to find an easy way of iterating over a certain time on any given day and this format is giving me trouble.  If someone has a better way of dealing with time series of this type please feel free to share.

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


EDIT: Subsequent to a fascinating discussion with @Wad Cheber and @Mazura, I would have actually deleted the question, not because it's a dupe but because it moves into "unsolveable" issues regarding canonicity.   As we all know, it's canon that the Star Wars movies constitute the highest level of canon in the saga.  Using only the canonical movies, I wonder how to align one example, the issue of   Spaceship controls  with their contradictory portrayal.  Taking only entering and leaving hyperspace, there must be a several methods the Millennium Falcon uses.  Harrison Ford (a RL pilot, after all) himself one stated, when asked     “I said, ‘Just make shit up!’” Ford remembered in an interview with   Entertainment Weekly’s Anthony Breznican. “I mean, it’s a movie, man.   It’s space. You don’t fly in space the way you do in an atmosphere.”   I can recall at least 4 shown ways of how the Falcon gets into and out of hyperspace:   A handful of closely spaced levels at the top of the instrument panel. Same levers also seems to control speed in atmospheric flight. Get up out of your seat and throw a bunch of switches in a panel above the pilot to leave hyperspace. Do nothing obvious and just wait for the computer to finish calculations Have your droid undo some Imperial sabotage and get thrown into hyperspace without so much as a safety pop-up asking "are you really sure?"   If the movies are "infallible" and immovable canon, yet see a portrayal such as this, is there a canon explanation?  One would be the official declaration that "we're retelling the history of The Star Wars, but we take artistic liberties and our goal isn't to provide flight lessons for YT class feighters"?  Another would be quasi-technical canon explanation "controls have variable functions depending on flight situation and surrounds. Also there's more than one way to skin a cat."

For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work?


I'm using VLC to open video files in C# form application. In my code as you see below "File.Exists" always returns false, although the file exists in the given path. But, as seen in the commanded line, when I give the path manually the file gets opened. There's no problem in string.Format processing, I have checked it in debug mode many time, I get the right path from string.Format but still File.exists returns false.  1) Code  fileName = string.Format(@"\\192.168.12.25\secRecords\{6}\{7}\{0:00}{1:00}{2:00}\CAM{5}_{0:00}{1:00}{2:00}_{3:00}{4:00}.mp4", (dateTimePicker1.Value.Year % 100),                                                                                (dateTimePicker1.Value.Month),                                                                                dateTimePicker1.Value.Day,                                                                                dateTimePicker1.Value.Hour,                                                                                (dateTimePicker1.Value.Minute / 15) * 15, myStr[1], splittedIp[2], splittedIp[3]);         //fileName = @"\\192.168.12.25\secRecords\3\4\140617\CAM1_140617_1300.mp4";          if (File.Exists(fileName))         {             id = axVLCPlugin21.playlist.add(fileName);             trackBar1.Value = 0;         }         else         {             id = -1;             MessageBox.Show("File not found!");         }   fileName value in debug mode:  "\\\\192.168.12.25\\secRecords\\3\\4\\140617\\CAM1_140617_1300.mp4"

I am trying to write a function to determine if a file exists. The two methods prove to return inconsistent results (fileExists() seems to provide accurate results, compared to isFileFound(), that returns false positives - i would have expected an exception when trying to create the instance).   protected bool isFileFound(string path, string fileName)     {         System.IO.FileInfo fi = null;          bool found = false;         try         {             fi = new System.IO.FileInfo(path + fileName);             found = true;         }         catch (Exception e)         {             baselogger.Fatal(e.Message + " " + e.StackTrace + " \n" + path + fileName);         }          return found;     }      protected bool fileExists(string path, string pattern)     {         bool success = false;          try         {             success = File.Exists(path + pattern);         }         catch (Exception e)         {             baselogger.Warn(e.Message + " " + e.StackTrace + " " + e.Source);         }          return success;     }   Neither seems to be able to resolve a UNC path of the following syntax: \\abcserver\c$\xyzfolder\foo.bar  Any idea why the unc path is failing for these methods would be greatly appreciated.


I had bought an off lease Dell with ubuntu pre-installed....whenever I try and update any updates to anything, it asks for a password, which I had never created. Nothing works...help, please? Thanks

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


Hi and many thanks in advance!  I'm working on a beamer presentation using a theme which shows the title and subsections in the headline. When clicking on the title everything works as expected and I get to the first frame of the presentation. But when clicking on a subsection title, nothing happens. I'd expect to get to the first frame of the current section (where I usually provide a TOC for the current section). What could cause that problem?  MWE:  \documentclass[]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,ngerman]{babel}  \mode<presentation> {     \usetheme{Montpellier}     \setbeamertemplate{navigation symbols}{\insertbackfindforwardnavigationsymbol}       \setbeamertemplate{caption}[numbered] } \title{Title}\author{Author}\date{Date}  \begin{document} \begin{frame}\titlepage\end{frame}  \begin{frame}{Outline} \tableofcontents[hideallsubsections] \end{frame}  \section{Section number one} \begin{frame}{}\tableofcontents[currentsection,hideothersubsections]\end{frame} \subsection{Subsection one-one}\begin{frame}{Frame content one-one}\end{frame} \subsection{Subsection one-two}\begin{frame}{Frame content one-two}\end{frame}  \section{Section number two} \begin{frame}{}\tableofcontents[currentsection,hideothersubsections]\end{frame} \subsection{Subsection two-one}\begin{frame}{Frame content two-one}\end{frame} \subsection{Subsection two-two}\begin{frame}{Frame content two-two}\end{frame}  \end{document}

Beamer infolines themes, like CambridgeUS, insert the titles of the current section and subsection in the headline. These titles appear to be clickable (the screen pointer changes as if they were so) but nothing happens when one clicks them.   Is there a way to link the headline titles to the first frame of the corresponding section or subsection? Something like this already works on the theme footline: clicking on the presentation title takes you to the title page.   Edit: MWE  \documentclass{beamer} \usetheme{CambridgeUS}  \setbeamertemplate{navigation symbols}{} \title{Click on Headline} \author{A.~U.~Thor} \institute{X-University} \date{2015} \begin{document} \begin{frame}   \titlepage \end{frame} \begin{frame}[t]{Contents}   \tableofcontents[subsectionstyle=hide]  \end{frame} \section{Section 1} \begin{frame}{Section 1}   \centering \Large Section 1 \end{frame} \begin{frame}[t]{Section 1: Contents}   \tableofcontents[currentsection,hideothersubsections] \end{frame} \subsection{Subsection 1.1} \begin{frame}{Frame 1.1.1}   A frame of subsection 1.1 \end{frame} \begin{frame}{Frame 1.1.2}   Another frame of subsection 1.1 \end{frame}   \subsection{Subsection 1.2} \begin{frame}{Frame 1.2.1}   A frame of subsection 1.2 \end{frame} \begin{frame}{Frame 1.2.2}   Another of subsection 1.2 \end{frame} \section{Section 2} \begin{frame}{Section 2}   \centering \Large Section 2 \end{frame} \begin{frame}[t]{Section 2: Contents}   \tableofcontents[currentsection,hideothersubsections] \end{frame} \subsection{Subsection 2.1} \begin{frame}{Frame 2.1.1}   A frame of subsection 2.1 \end{frame} \end{document}


The expression portfolio career meaning: the fact of having several part-time jobs at once, rather than one full-time job: •   A portfolio career is suitable for people who want to have a variety in their work life. (Cambridge Dictionary) Can anyone tell me when and where it was first used?

The expression  meaning:  the fact of having several part-time jobs at once, rather than one full-time job:    A portfolio career is suitable for people who want to have a variety in their work life.   (Cambridge Dictionary) Etymonline has no information about the origin of the above expression, can anyone tell me when and where it was first used?


Occasionally, I'll try to connect to Wifi and it'll give me the "Checking Network Requirements" screen, then finally end with a "Cannot Connect" message and an offer to use a useless troubleshooting tool:  This gives me essentially no information about the problem - could be the signal is bad, could be an authentication problem, could be anything. Is there a way to get an actually informative error message from this, or, even better, a log of what's happening? I tried their diagnostic tool, and it basically just chugs away for a bit and says, "Hey, did you know your wifi is broken?" Edit: I did see the , but when I went to Events Viewer, Applications and Services Log did not populate and gave no indication of loading (so I thought that the logs had moved or something). Eventually it did populate and the logs turned out to be in Microsoft > Windows > WLAN-AutoConfig.

I'm trying to diagnose and test some a Windows 7 domain-auth-over-wireless-network. I'd like to see what network the computer is connecting to, what auth it is using, and what DHCP data it receives prior to user login, and also what happens after user login. Does event viewer show this info? Do I need to enable it anywhere?  Cheers,  Victor


I recorded this clip at school and I'm trying to track it, but the Solve error is usually around 3 and I think its the "Solve Keyframes"    I think im getting those two keyframes wrong, so could someone provide me with advice here? Or maybe suggest where the keyframes should be? Thanks. Also my camera is a Canon Vixia HF M40  The Source Video:

What are good practices for picking good keyframes when motion tracking? How are these frames used?   What is an "ideal" keyframe?


Let $G$ a finite group and $H<G$. Let $\varphi:H\rightarrow H$ be a nontrivial automorphism of $H$. My question is: it is possible to construct a nontrivial automorphism of $G$?   I had tried to extend the isomorphism of H, leaving invariant the elements of G that were not in H. But you can take the next case: if $a,b\in G$ such that $a,b\notin H$ and $ab\in H$, so $\varphi(ab)\in H$ but not necessarily $\varphi(ab)=ab$. So my idea is wrong.  I must demonstrate this using the non-trivial automorphism of $H$.

Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|>2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center?


In , there is an  that allows you to see what portals/links/fields are where and the status of each portal. With that, I'm able to plan  my journey and know what to do so that I can efficiently plan my operations in the game.    With that said, is there any way I can do the same in Pokemon Go? Obviously, not to take down portals, but to weave my daily commute to school to pass through as many PokeStops or Gyms (and Portals) as possible for the sake of resource gathering?  Edit: Mind the BAF (Big-As Field). Feel free to edit with an area without the Big-As Field.

I'm on vacation on a pretty rural area and there is only 3 pokestops and a gym around me. I wonder how many pokestops and gyms are near my house in another city.   Is there a way to see pokestops and gyms in other places in a map (preferably online)?    There seems so be loads of websites linked. While posting your own website is allowed (as long as it answers the question properly) please keep in mind that stating your affiliation is required (Add something like "Disclaimer: I own this website" to the end of your answer) in order to avoid being spam flagged.


I'm running MAME on my Ubuntu desktop, and I'd like to pin it to my launcher. The problem is that MAME always runs in fullscreen with no option to minimize it. What can I do?

How can I add new programs to the launcher (or the dock in Ubuntu 17.10 and later) in Ubuntu?


I am fumbling my way through phpMyAdmin and mySQL.  I’m creating something where a customer can register multiple products.  The data coming in is:  Category > Type > Size > Color  So for example:  Cookware > Oven > 5 qt > Blue Bakeware > Casserole > 3qt > Blue Accessories > Textiles > N/A > Blue Etc.  I have set up one table with categories, and 4 tables to cover each product type.   Categories ID Category 1 Cookware 2 Bakeware 3 Accessories 4 Serveware  Cookware Table ID Type 1  Oven 2 Skillet 3 Roaster  Bakeware Table ID Type 1 Casserole 2 Pie Dish 3 Baker  Etc.  Then, in the registration table, I set up a foreign key to link the category to the category table.  So it would look something like this:  ID   CustID  Category  Type Size Color 1    20      2         1    11   34 1    20      1         1    9    34   (sorry the formatting is so terrible! not sure how to fix) But, I’m stuck on how to link the product type to the correct product type table since it is dependent on which category they picked.  Hopefully this makes sense. Maybe I don't even need to link them and can still request the data somehow through a query?

Well here's my problem I have three tables; regions, countries, states.  Countries can be inside of regions, states can be inside of regions.  Regions are the top of the food chain.  Now I'm adding a popular_areas table with two columns; region_id and popular_place_id.  Is it possible to make popular_place_id be a foreign key to either countries OR states.  I'm probably going to have to add a popular_place_type column to determine whether the id is describing a country or state either way.


It is not clear to me if we can observe matter infalling to a black hole. When it is stated that time stretch to infinite for an external observer, then we should see a kind of accretion or jam at the very border. Like two  compenetrating objects at the same place. I hope this is naive.  To be precise: think of the crash test  mannequin that divulgative science often send to a black hole. Ignore spaghettification. Do we really see that mannequin "frozen"  and never passes throughout the horizon?  If so, what happen to a second mannequin if it happens to it to fall at the same spot?  Or there is no the same spot as for the infalling matter has already shifted the horizon?   May be the mannequin is not the best testing particle. Feel free to replace mannequin with atoms or particles and so forth. I have been pictorial for sake of clarity.   Edit: the opening sentence refers to direct observation. Not to the observing of radiation due to the acceleration towards the black hole like that emitted by a hot accretion disk.

The event horizon of a black hole is where gravity is such that not even light can escape. This is also the point I understand that according to Einstein time dilation will be infinite for a far-away-observer.  If this is the case how can anything ever fall into a black hole.  In my thought experiment I am in a spaceship with a powerful telescope that can detect light at a wide range of wavelengths.  I have it focused on the black hole and watch as a large rock approaches the event horizon.  Am I correct in saying that from my far-away-position the rock would freeze outside the event horizon and would never pass it? If this is the case how can a black hole ever consume any material, let alone grow to millions of solar masses.  If I was able to train the telescope onto the black hole for millions of years would I still see the rock at the edge of the event horizon?  I am getting ready for the response of the object would slowly fade.  Why would it slowly fade and if it would how long would this fading take?  If it is going to red shift at some point would the red shifting not slow down to a standstill? This question has been bugging me for years!  OK - just an edit based on responses so far.  Again, please keep thinking from an observers point of view.  If observers see objects slowly fade and slowly disappear as they approach the event horizon would that mean that over time the event horizon would be "lumpy" with objects invisible, but not passed through?  We should be able to detect the "lumpiness" should we not through?


I installed Ubuntu 18.04 just now. I removed windows 7 and installed Ubuntu as my primary OS. And the problem is it asks root password every time when I make changes in it. Thank you!

Why does Ubuntu not allow the GUI users to login as root at the time of system start up like administrator in Windows?  Why they are restricting us to login only through the terminal?


I was recently asked by my partner about the phrase "on the spot", with the meaning of suddenly being placed in a difficult or awkward situation. Both of us assumed that the origins of the phrase comes from theatre, relating to the spot light. Is this true or are the origins of the phrase different?

What is the origin of "man on the spot" ?   defines on the spot and uses as an example man on the spot.     on the spot -  at the place in question; there; "they were on the spot when it happened"; "it had to be decided by the man on the   spot" (Emphasis added)   Some evidence suggests that the origin of the phrase refers to decisions made by officials of the past British empire and actions taken by them.


I answered a question, and noticed that the syntax highlighting was off. It was a Clojure question, but Java was being favored. I have a couple comments in the code that read poorly under Java highlighting, so I'd like to fix the highlighting.  Is there any way to fix highlighting after the fact if it infers incorrectly, besides adding explicit <!-- language-all: lang-* --> tags? The problem with just using the tag is it only effects the question it's in (from my experience). Anyone who adds an answer will need to add the tag too to get good highlighting.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


An alien race finds Earth.  Its landing party locates a museum or some such facility and one-by-one, the aliens revivify deceased humans in the museum.  Most who awaken (such as a Pharaoh) are quickly deemed to be uninteresting and inferior and destroyed. But the last such person sits up, looks around, and promptly disappears.  Does anyone recognize this story line?  I probably read this 50 years ago.

I read this about 30/40 years ago. I don't remember if it was a short story or book.  What I remember of it :   Some aliens arrive at earth; they don't find any living humans, just empty cities. They go to one museum and revive an Egyptian mummy. When it's alive, it keeps asking where his servants are. They don't get any information from the mummy so they kill him again. Later on they revive another human, who turns out to be more intelligent than the aliens.   I don't remember much of what happened from this point on, except:   In the end the human starts to revive other humans.   Some one can tell me what story, name of book.


I don't know how to use the fact that O is open. Its interior must be itself, so I guess I should take the complement of the sets in question. But I'm not sure how to proceed.

I have been stuck on this problem :   Prove :If $A$ is Open , then $A\cap \overline B \subset \overline {A \cap B}$.I have tried to use the previously proven fact that $\overline {A \cap B}\subset \overline{A} \cap \overline{B}$ , but I cannot seem to get anywhere ...In particular, I do not see how A being open is relevant here..........


I'm converting some php code to python. The php code has the following for matching a surname from a string:   preg_match("/([^ ]*) *$/",$c['name'],$r);   which appears to just match whatever the last word in the string is.  Looking to convert it, I thought the following would do it:   r = re.match('([\S]+)$', c['name'])   to my mind that should match any non-space characters before the end of the string. The logic is that $ matches the end of the string, and the ([\S]+) matches any non space character one or more times before the end of the string. However that doesn't work for me (despite a site like pythex.org suggesting it should).  I've managed to get it to work using the following, but I'd like to know why the above regex doesn't work, I suspect it has to do with back-capture but I'm not really familiar with how that works.For testing I'm just using c['name'] = 'John Doe'   r = re.match('(?:.*\s)*([\S]+)', c['name'])   (in the above regex the (?:.*\s) is a non-capture group that matches repeated characters followed by a space-like character 0 or more times. It then captures any non-space-like characters that occur one or more times.)  Thanks.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I am a PhD student writing my thesis, and desperately need some specific papers which are not accessible via our library subscription. I contacted the authors to get a copy from them but some didn't reply. There were not available in free repositories and buying the articles from the publisher is too expensive for me.  Is there any possibility for getting a few papers you need?

I’ve discovered that website like ResearchGate offer the possibility to ask the paper editor to provide his paper for free. Many are collaborating.  Are there any other ways for researchers to obtain free access to papers?


When trying to launch steam, I get   Steam needs to install these additional packages:      libgl1-mesa-dri:i386, libgl1-mesa-glx:i386   Then it tries to install the packages and gives me   E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I have never used Ubuntu or any other Linux OS before last Friday. For all I know, I might have installed Ubuntu wrong and be missing a component. I would prefer if you use simplest terminology possible, but I'm OK with doing a bit of googling if need be. I just installed Steam for Ubuntu 16.04 but it won't open when I click on it in the launcher. The icon flashes for a few seconds, stops and then nothing happens. I looked in the system monitor and steam shows up there but ending the process and trying again does nothing. I heard trying to open apps that aren't working through the terminal tells you what the error is so I tried that and I got this:  Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0) libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast   Please help I just want to play CS:GO again.


I am new to ubuntu. I want to  install java on ubuntu. i tried the code      sudo apt-get install default-jre   but i have got message like this:     E: Could not get lock /var/lib/dpkg/lock - open (11: Resource   temporarily unavailable) E: Unable to lock the administration   directory (/var/lib/dpkg/), is another process using it?   What is the problem?

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


And how long does it take?  I downvoted a question 10 minutes ago but I did not receive the critic badge. Is this is bug or am I doing anything wrong?

With  questioning why Badge X hasn't been awarded yet, would it be possible to add a line to each badge description:   This badge will be awarded within an hour of meeting the criteria This badge will be awarded within 48 hours of meeting the criteria This badge will be awarded within seven days of meeting the criteria   Or perhaps at least add a question / entry into :  The following badges are awarded within five minutes of meeting the criteria:  [badge:Nice Question] [Nice Answer]...  The following badges are awarded within 48 hours of meeting the criteria:  ...  This would be most helpful in responding to questions like  as well as the many bug requests about un-awarded badges.


DASH formats are not supported by external downloaders like aria2, so I like to avoid them. Merging two formats is ok (so I don't want -f best). What should I use for -f?

I have installed youtube-dl in my 14.04.   I can download video by following command,  $ youtube-dl [youtube-link]   But I want to know how to select available pixel quality of youtube video(i.e 1080p, 720p, 480p, etc).   In software description they said it's possible(shown in image below), but how to do..


I am looking to add leading zeros to my_string = '01001010' to ensure that a minimum of 'length' bits string, where length >= len(my_string)

What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length?


Evaluate $$ \int_0^\infty\frac{x\log x}{(1+x^2)^2}dx $$   $$ \int\frac{x}{(1+x^2)^2}dx=\frac{-1}{2(1+x^2)}\\ \int_0^\infty\frac{x\log x}{(1+x^2)^2}dx= \bigg[\log x\frac{-1}{2(1+x^2)}\bigg]_0^\infty-\int_0^\infty\frac{1}{x}.\frac{-1}{2(1+x^2)}dx\\ =0+\int_0^\infty\frac{1}{2x(1+x^2)}dx=\frac{1}{2}\int\bigg[\frac{1}{x}-\frac{x}{1+x^2}\bigg]dx\\ =\frac{1}{2}[\log x]^\infty_0-\frac{1}{4}[\log|1+x^2|]_0^\infty=\frac{1}{4}\log\frac{x^2}{1+x^2}\\ =\bigg[\frac{1}{4}\log\frac{1}{\dfrac{1}{x^2}+1}\bigg]_0^\infty $$  Is there a better substitution that I can make to evaluate thi definite integral ?  Note: The solution given in my reference is $0$  Similar question is asked @ but that is about the convergence of the given integral, here I am looking for a better and obvious substitution that will make the above definite integral easier to solve. But, hint about the solution is found there, Thanks @lab bhattacharjee

I have been asked to prove that $$\int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx = 0$$  I tried proceeding as follows: \begin{align} \int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx &= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_1^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx \\ & = \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_{u=1}^0 \frac{u\,\log u}{(1+u^2)^2}\,du\quad (\text{where }u=1/x) \\ &= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx - \int_0^1 \frac{u\,\log u}{(1+u^2)^2}\,du \\ &=^? \int_0^1 0 \,dx \\ &= 0 \end{align}  But I think that I should first show that the improper integral $\int_0^1 {x\,\log x}/{(1+x^2)^2}\,dx$ is convergent.  Do I need to show it? If yes, how to do so?  (I have been taught basic methods such as comparison, limit comparison and Dirichlet test.)


I have a table name boards, and I'm trying to insert data using the current code  function createBoard( $name, $desc  ) {     try {         $sth = $this->getLink()->prepare( "INSERT INTO boards(id,memberid,name,desc,datecreated,isactive)              VALUES(?,?,?,?,?,?)" );          $uuid = $this->uuid();         $memberid = 1;         $date = Utils::getDate();         $isactive = 1;          $sth->bindParam( 1, $uuid );         $sth->bindParam( 2, $memberid );         $sth->bindParam( 3, $name );         $sth->bindParam( 4, $desc );         $sth->bindParam( 5, $date );         $sth->bindParam( 6, $isactive );         return $sth->execute();     } catch( PDOException $e ) {          /*          * save the error to the error log defined as @ERROR_LOG          */          file_put_contents( ERROR_LOG, ( "\n" . Utils::getDate() . " : " . $e->getMessage() ), FILE_APPEND);           die( "FATAL ERROR...Please check the error log." );     } }   However, every time I get this error "2012-05-11 14:40:50 : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc,datecreated,isactive) VALUES('d5989c7e-9b98-11e1-88cd-0026b936528c','1' at line 1"  I have tried the same function using bindValue() and just putting the array with direct values into the $sth->execute() function but I always receive the same error. Maybe an outside eye can spot something I'm missing or doing wrong?

After reading a couple of answers and comments on some SQL questions here, and also hearing that a friend of mine works at a place which has a policy which bans them, I'm wondering if there's anything wrong with using backticks around field names in MySQL.  That is:  SELECT `id`, `name`, `anotherfield` ... -- vs -- SELECT id, name, anotherfield ...


Assume like I have a #define something like   #define LOCATION /usr/lib/siara/   Now i want to touch a file in that location provided I have permissions to create. I want to do something like this.  system("touch $(LOCATION)/myfile.txt")   But it is not working. Any idea how to resolve this issue

I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that?


I have an onClick event on a button that is created using data returned from the server (via Ajax). The outline of my code is this:  $(document).on('pageinit', function() { $.ajax({     url: '/',     dataType: 'json',      type: 'POST',     contentType: 'application/x-www-form-urlencoded',     data: textInput,     success: function (response) {         if(response.error_code!=null){             alert(response.user_message);         }         else {          //code to generate button with id tag `cvResults`           $('#cvResults').click(function(e) {          // some code here, redirects to another mobile page         }         },//then remainder of ajax function   I initially tried putting the onClick function outside the Ajax call (but within the pageinit). This wouldn't trigger because the page would initiate without any #cvResults tags and hence not load the function.  I now have a different problem. When you click this button and go to the other page, if you then press back and try to click the button again, the event isn't triggered. This makes sense because there has been no response from Ajax.  How do I cater for both of these scenarios, and just permanently have the onClick event listening when the #cvResults tag is present?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I want to extend my root and home partition. When I try to resize and move the partitions, it shows that I have the maximum possible space.  Thank you for your help.

Till today I was using ubuntu 13.04 in my windows7/ubuntu dual boot. Just now I have upgraded to ubuntu 14.04. My software updater showed an updates available message. I proceeded with  Install Now . Soon I got the following window.    Then I tried sudo apt-get clean as recommended. Nothing happened! Not even a window opened. Teach me deleting the temporary packages.   Deleting temporary files may not be highly helpful in case of further updates and installs for I don't have too much space left in my /. I wanna extend my / partition with the help of the unallocated space in my HD. The following is my Gparted window.       I got an answer . But it wasn't useful for me. I had two choices. But the answer wasn't working for both my chioces.  Choice 1: I may use the 4.25 GiB unallocated space to extend my /dev/sda10. To do so, I must need to move my linux-swap partition. But my Resize/Move option is disabled for the linux-swap partition. Choice 1 failed!   Choice 2: I may use the 14.35 GiB unallocated space instead. In this case I must move more than one partition. /dev/sda4  partition is the first on the list. Even that partition has the same problem. Resize/Move option is disabled. Choice 2 failed!  I am out of choices now.  What shall I do? Help me to extend my / with Gparted.


I'm not sure if this is the right place for this kind of questions, however, I e-mailed stackexchange support and got no answer back, so here I am.  I deleted my e-mail from my bio (in my account settings). However, everytime I log into my account, I see that it's still there. So, I'd like to know who has access to that information. Everyone? Logged users? Admins only?  Regards,

I don't want to show my email address in my Stack Overflow profile. I have removed my email address by editing my profile and saving it.  After some time (time is random, sometimes a day, sometimes within couple of hours) my email address is showing up again.  How can I hide my email address?


I've got a class that uses a two-arguments template:    template<class T, class R>   When I try to declare an object in main.cpp it says: "undefined reference to FileTest<int, int>::FileTest()  Here's the code:  FileTest.h  #ifndef FILETEST_H #define FILETEST_H #include <string> #include <iostream>  ....  using namespace std;  template<class T, class R> class FileTest : public FileInput , FileOutput {      public:         FileTest();          FileTest(const string nome_file):FileInput(nome_file),FileOutput(nome_file){         };          virtual ~FileTest();          void setNewEntry(const T id_domanda,const R id_risposta);          ...        private:         ...  }; template<class T, class R> FileTest<T,R>::~FileTest() {     //dtor }   template<class T, class R>  void FileTest<T, R>::setNewEntry(const T id_domanda,const R id_risposta){   /*     sets new entry in a vector */   }  #endif // FILETEST_H   main.cpp   #include <iostream>      #include "FileTest.h"      using namespace std;  int main() {      FileTest<int, int>  object;     return 0; }   Error (in main.cpp) :     undefined reference to FileTest<int, int>::FileTest()   When I try with another class which has only one template argument, everything is working! What's the cause of this error?

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


I installed 19.04 yesterday and everything worked perfectly. Today I booted up and the dock is empty except for the "Show Applications" button. The "Show Applications" button does not work. I am unable to launch any applications. Is there a fix for this? In the meantime, Is there a way to launch firefox and thunderbird from a terminal window?

I have just upgraded from Ubuntu 18.10 to Ubuntu 19.04 on my Dell XPS-15.  The Dock seems to be minimized to a small box, when you hoover over it come up with "Show Applications". I have clicked on this box and nothing happens.  How does one view the Dock?


I can't install synaptic package manager in Ubuntu 16.04. I do this:   sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic   And I see  Package synaptic is not available, but is referred to by another package.  This may mean that the package is missing, has been obsoleted, or is only  available from another source  E: Package 'synaptic' has no installation candidate   What can I do?  The output of sudo apt update command:  Hit:1 http://archive.canonical.com xenial InRelease Hit:2 http://archive.canonical.com/ubuntu xenial InRelease Reading package lists... Done                       Building dependency tree        Reading state information... Done All packages are up to date.

How do I get to the Universe Repository in supported versions of Ubuntu?


I am planning to buy a desktop from lenovo. The desktop has windows 10 pre built. I just wanted to know if it is possible to install ubuntu alongside win 10 in lenovo desktop? Did anyone tried that? If then any link of the steps of install is appreciated.  Thanks

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


Related:   This new logo has since gone funky:

The logo of the site where the bounty question is asked appears to be distorted in comparison to the text, when reading the mail:        Same issue in landscape orientation.


I have the two following graphs representing a particles potential energy in function of its distance to another particle and another one which represents the attraction and repulsion forces between two particles with respect to their intermolecular distance.    As you can see $E_p$ is minimal when $F=0$. However potentially energy (as I know it) is given by $E_p = -\int \vec{F}.d\vec{r}$. So if F=0 this multiplication should clearly result in 0, but it doesn't. Why?  PS: follow-up question: knowing that $\frac{-dU}{dx} = F(x)$. I cannot see this relationship between the two graphs,i.e. completely on the left of the $E_p$,r - graph, you can clearly see the curve has a negative slope. Meaning the derivative should be negative, however this is not what is being shown on the lower graph. The only "correct" thing I see is that when the slope of the upper graph is 0 (at $r_0$)the derivative indicates that correctly.  Do I read the graphs incorrectly?

According to this potentialcurve and the other curve(?) the potential energy is minimal when the intermolecular forces equal zero.     Why? How should I interprete negative potential energy in this context?


From my experience, it seems that a lot of times when I scaling an object, I would want the bottom of the object stays as it is. For example, think about scaling a lamp on a desk. If I scale the lamp, I would want the lamp to stay on the desk, not going below the desk.   I know the origin decides that, so the origin needs to be at the bottom centre (that is, centre in the X and Y axes, but the lowest in the Z axis). But in the Object -> Set Origin, there is only "Origin to Centre of Mass". I have searched Google and found ways like selecting the bottom face, move the cursor there and then setting origin there, but that seems cumbersome, especially if I have to do it over and over again. Isn't there an easier way? Like "Origin to Bottom Centre of Mass" menu?

I have a lot of 3D objects of various sizes, shapes in blender 2.76b and I would like to set the origin to the bottom center of the objects bounds.  I cannot select the bottom edge and snap to cursor etc as each shapes edges are in different X/Y positions.  Is there a script or tool that will allow me to set the origin to the lowest edge z position?


How can I integrate $$\int_{\frac{\pi}{6}}^{\frac{\pi}{3}}\frac{1}{1+\sqrt{\tan x}}dx\ \ \ ?$$   I have made the integral into the form of $\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}$, but been able to go no further.

Evaluate the integral $$\int_0^{\pi/2} \frac{1}{1+\tan^\alpha{x}}\,\mathrm{d}x$$


I'm working on an email marketing tool and so far we've been recommending our customers to set up an SPF-record (Sender-ID) and a DKIM-record, we also have our own SPF-record on the mail server and a shared DKIM-record for those who do not set up their own DKIM-record.  Those that do not set up their own DKIM-records still pass the DKIM-test, but with the notice that "identity doesn't match any headers" (according to port25), i.e, it doesn't match the textual sender domain.  But does anyone know if this "discrepancy" actually has any impact on spam scoring/probability, i.e, should we continue to recommend our customers to set up a DKIM-record (as opposed to just using our shared) or is just wasted effort?

This is a  about Fighting Spam.   Also related:                    There are so many techniques and so much to know about fighting SPAM. What widely used techniques and technologies are available to Administrator, Domain Owners, and End Users to help keep the junk out of our inboxes?  We're looking for an answer that covers different tech from various angles. The accepted answer should include a variety of technologies (eg SPF/SenderID, DomainKeys/DKIM, Graylisting, DNS RBLs, Reputation Services, Filtering Software [SpamAssassin, etc]); best practices (eg mail on Port 25 should never be allowed to relay, Port 587 should be used; etc), terminology (eg, Open Relay, Backscatter, MSA/MTA/MUA, Spam/Ham), and possibly other techniques.


So, I have a simple emission texture applied to a particle system and I was wondering, is there a way to make your particle emitter emit a random variety of colors?

I am trying to do rocks and I want them to have a random base color from within the colors that look "rocky". The only method I know of is to duplicate the base objects over and over and give each a different color in the node editor, then group them all and use them as the group input for the particles. This is slow, inefficient to change, duplicates a lot of data, and comes out with a uniform distribution of the colors. Is there a way to have give particles a random color from a set or range?


The wave function (this is the wave function in mechanical waves. It is not the wave equation, which is derived from this wave function. Neither is this the wave function for quantum mechanics!) is given as:  \begin{align} y(x,t)&=A\cos(kx \pm \omega t + \phi)  \end{align} (where $k$ is the wavenumber, $x$ is the position, $A$ is the amplitude, $\omega$ is the angular frequency, $t$ is the time, and $\phi$ is the phase difference)  From my knowledge, the $\pm$ in front of $\omega t$ is to account for wave direction. However, mathematically, I am unable to intuitively understand or even picture why this $\pm$ sign in front of $\omega t$ (which accounts for the time dependency of the wave function) should account for direction. Hence, may I know the connection between this $\pm$ sign and the direction of the wave propagation? Thank you!

In the textbook, it said a wave in the form $y(x, t) = A\cos(\omega t + \beta x + \varphi)$ propagates along negative $x$ direction and $y(x, t) = A\cos(\omega t - \beta x + \varphi)$ propagates along positive $x$ direction. This statement looks really confusing because when it says the wave is propagating along $\pm$ x direction, to my understanding, we can drop the time term and ignore the initial phase $\varphi$ while analyzing the direction, i.e. $y(x, 0) = A\cos(\pm\beta x)$, however, because of the symmetry of the cosine function, $\cos(\beta x)\equiv \cos(-\beta x)$, so how can we determine the direction of propagation from that?  I know my reasoning must be incorrect but I don't know how to determine the direction. So if we don't go over the math, how to figure out the direction of propagation from the physical point of view? Why $-\beta x$ corresponding to the propagation on positive x direction but not the opposite?


Using Python 3.6.4, I am using the following code to create a list of 4 element long lists, each of which contain integers. However, rather than creating a list of all the different 4 element lists, the list simply consists of the last 4 word list to be appended to the list. Are there any bugs in this code, or is there a problem with using the append function in my code at this scale? Any help is appreciated.    attemptList = [] dataCardList = [] currentAttempt = "" alphabet = "abcdefghijklmnopqrstuvwxyz" letter = 0 digit = 0 dataCard = [-1,-1,-1,-1] while dataCard[0] <= 25:     dataCard[0] += 1     dataCard[1] = 0     dataCard[2] = 0     dataCard[3] = 0     dataCardList.append(dataCard)     print("17576 Cards Made")     while dataCard[1] <= 25:         dataCard[1] += 1         dataCard[2] = 0         dataCard[3] = 0         dataCardList.append(dataCard)         while dataCard[2] <= 25:             dataCard[2] += 1             dataCard[3] = 0             dataCardList.append(dataCard)             while dataCard[3] <= 25:                 dataCard[3] += 1                 dataCardList.append(dataCard)                 print(dataCard)                 print(dataCardList)

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I tried to create a connection from a SFTP site to export data from Marketing Cloud to there with a another Marketing Cloud account sftp server for test and the error appears. ERROR:  An undefined error occurred. Contact your account representative if the error persists. The Path: sftp://ftp.s7.exacttarget.com/reports/ What can this error be?

I configured a Data Extract (Data Extension Extract) and a File Transfer (Safe House to External FTP which is also an SFMC FTP ).  Unfortunately, File Transfer fails without giving a proper error.   ERROR:  An undefined error occurred. Contact your account representative if the error persists.  Salesforce Support is asking me to whitelist Stack 1 IP Address on my Internal Network when the operation is done within SFMC Servers. I have ask them to escalate this to Tier 2 support.    Have you come across this issue in the past? What have you done to resolve this issue?


I was reading Cell Biology by Gerald Karp and came across a section which said-     Membrane fluidity makes it possible for clusters of membrane proteins to assemble at particular sites within the membrane and for specialised structures, such as intercellular junctions, light-capturing photosynthetic complexes and synapses.   I would be obliged to know more about the topic.

How is movement of proteins and lipids between different domains of cell membrane prevented?  Why is the noncytosolic layer not able to do lateral movements between domains but cytosolic layer is able to do so?


After Palpatine declares the first Empire Day and creates the Galactic Empire, the common people seem to believe his lie that the Jedi staged a rebellion against the Republic. Based on the Senate's reaction in Ep 3 (especially the novelization), it seems like people are loving the idea of Palpatine becoming an Emperor/dictator for life.  But do they know that Palpatine is a Sith Lord? If so, do they care?  Do the common people even know what a Sith Lord is? Does this answer change based on location (i.e. Deep Core vs. Core vs. Outer Rim)?

Anakin Skywalker was known as Darth Vader (this was already his Sith name) after the creation of the Galactic Empire.  So why did Palpatine remain "Emperor Palpatine"? Why didn't he embrace his persona as Darth Sidious?  I started wondering after reading one of the answers to


I need to create new file which contains spaces in it. And it is passed through the argument. This code below creates 2 sepate files. How to create 1 file which will contains space?   touch ""$meno""

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I tried to update to ubuntu 20.04 from ubuntu 18.04, but when I ran do-release-upgrade it said there was no new version, so I entered a text file where I changed the text from lts to normal(I also don't remember the name of the file), and when i ran back do-release-upgrade I accidentaly upgraded to ubuntu 19.10 and now im stuck with ubuntu 19.10 and can't upgrade to ubuntu 20.04.

When I upgraded from 18.10 to 19.04, and again when I upgraded from 19.04 to 19.10, I had to manually reinstall all of the packages I installed through dpkg, apt, etc. (I do not recall the precise details of how I went about either upgrade.) Is there a less painful route to upgrade Ubuntu 19.10 to 20.04?  Closely related: When I was a macOS user and upgraded my system software, I could export a list of installed Mac Ports, and then reinstall after the system upgrade using that exported list. Is there a similar kind of functionality for dpkg or apt? I would find this kind of solution to be "less painful" in case there is not a simple and direct way to accomplish an upgrade to 20.04 without losing installed packages. :)


I'm cleaning up some C# code for my company and one thing I've been noticing is that the contractors that built this application keep setting object references to null.  Example:  get {   Object o = new Object(); // create a new object that is accessed by the reference 'o'   try {    // Do something with the object   }   finally {     o = null; // set the reference to null   } }   From what I understand, the object created still exists. There is a chance it can't be accessed now depending if there are any other references to it, but it will still exist until the GC comes and cleans it up.  Is there any reason to have this in a finally block? Are there any cases where this could possibly create an in-adverted memory leak?  Thanks!

Should you set all the objects to null (Nothing in VB.NET) once you have finished with them?   I understand that in .NET it is essential to dispose of any instances of objects that implement the IDisposable interface to release some resources although the object can still be something after it is disposed (hence the isDisposed property in forms), so I assume it can still reside in memory or at least in part?  I also know that when an object goes out of scope it is then marked for collection ready for the next pass of the garbage collector (although this may take time).  So with this in mind will setting it to null speed up the system releasing the memory as it does not have to work out that it is no longer in scope and are they any bad side effects?  MSDN articles never do this in examples and currently I do this as I cannot  see the harm. However I have come across a mixture of opinions so any comments are useful.


In this code, foo() is a function which takes time as an argument. I want to set the timer for multiple function instances, each of the same function but different parameter. The parameter of each function is each and every element of Time array entryTimes, and the time at which the function should run is also the same. enterLength is the length of entryTimes. Here is the code:  public void scheduler()     {         java.util.Timer[] _timer = new Timer[enterLength+1];         int i=0;         TimerTask[] tt = new TimerTask[enterLength+1];          for (i = 0; i < enterLength; i++) {             nowAt = i;             System.out.println(entryTimes[nowAt] + " : " + i +" 100");             tt[i] = new TimerTask() {                 @Override                 public void run() {                     setMissedEntries(entryTimes[i]);                 }             };             _timer[i].schedule(tt[i], entryTimes[i]);             System.out.println("Uff");         }     }  I keep getting the java.lang.NullPointerException exception. Please help.

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


I am working on a program that uses quick sort to sort an array to display the running time. This program selects the median of three random numbers as the pivot. However, I am not sure if I am doing something wrong because every time I run this program I get the following errors:   "java.lang.StackOverflowError",  at java.util.Random.nextInt(Unknown Source) at SortingItems.quickSort(SortingItems.java:31) at SortingItems.quickSort(SortingItems.java:69)   " I get this  specific message multiple times"   This is the code:  import java.util.Random;  public class SortingItems {     static int x = 1000;     static int array []  = new int[x];      public static void main(String[] args) {         long time;         input(x, array);        time = System.nanoTime();        sort(array);        System.out.println("Running time in ascending order " + (System.nanoTime() - time));     }     public static void sort(int[] array) {        quickSort(array, 0, array.length - 1);    }     public static void quickSort(int[] array, int low, int high) {        if (array == null || array.length == 0)            return;         if (low >= high)            return;         // Generating random numbers from 0 to the last element of the array        Random f = new Random();        int first = f.nextInt(array.length - 1);         Random s = new Random();        int second = s.nextInt(array.length - 1);         Random t = new Random();        int third = t.nextInt(array.length - 1);           // Selecting the pivot        int pivot = Math.max(Math.min(array[first], array[second]),                    Math.min(Math.max(array[first],array[second]), array[third]));         int i = low;        int j = high;         while (i <= j) {             while (array[i] < pivot) {                   i++;             }              while (array[j] > pivot) {                   j--;             }              if (i <= j) {                  int temp = array[i];                  array[i] = array[j];                  array[j] = temp;                  i++;                  j--;              }       }        if (low < j)           quickSort(array, low, j);        if (high > i)           quickSort(array, i, high);    }    // Input in ascending order   public static int[] input(int x, int[] array) {        for (int k = 0; k < x; k++) {             array[k] = k;        }        return array;    } }

What is a StackOverflowError, what causes it, and how should I deal with them?


Say you would open an inn primarily for people who build things.   Would that be called the "Builder's Inn" or the "Builders Inn"?

Although Children's books is what everybody says, I would like to understand why the genitive case is applied in such case.  If I write books for children, children is an adjective here; not the owners of my book! The word "children" just defines or characterizes the type of books I write. Therefore, it's an adjective.   So, I understand that genitive/possessive case ("I write children's book")  is incorrect grammar.  My question is: is the genitive case here really accepted as right? If I use "I write children books" (following the grammar principle) as as I say "I write pets books" (books about pets, and not possessions of pets) - would I be incorrect? Why?


I am having problems in understanding the logic of this distribution:  $P(\Psi_{j})=\displaystyle\frac{e^{-E_{j}/kT}}{\displaystyle\sum_{j'}e^{-E_{j'}/kT}}$  The book I am studying use the case of a sample in contact with a reservoir at thermal equilibrium to derive this distribution. I understand the derivation, but I don't understand the logic of the distribution itself. The aspect I'm having problem with is the fact that the lowest the energy of the sample, the highest the probability. What I don't understand is why this happens even thought there is an average energy given by the temperature which I thought should be more probable then any energy lower than this for a given particle. This doubt implies that I am looking at $P(\Psi)$ as the probability for a given particle, wich does not seem to be the case, but if I think of it as the probability for the hole sample, it makes even less sense for me since the energy should be totaly given by the temperature, so it wouldn't make sense to make a distribution of it if the temperature is considered constant.   Thanks in advance

I'm looking for an intuitive understanding of the factor $$e^{-E/kT}$$ so often discussed. If we interpret this as a kind of probability distribution of phase space, so that $$\rho(E) = \frac{e^{-E/kT}}{\int_{0}^{\infty}e^{-E'/kT}dE'}$$ then what, precisely, does this probability correspond to? Is its physical significance obvious? Specifically, why is it largest for energies close to zero?  Edit: I'd like to know how it is possible that for increasing $T$ the lower energy states grow more populated. The naive thing to think is "If I stick my hand in an oven and turn up the temperature, I'm assuredly more likely to be burned." This raises the question, exactly what does it mean for the lower energy states to grow more populated relative to the higher energy ones?


Right now I'm confused & urgently need some help. My website content is continuously copied by a new website. Sorry but I can't mention my site & the other site.  I searched in Google, how to hide my recent post & I found WP hide post plugin, which worked perfectly on my website & all my recent posts are hidden from the home page, in the search results of my website in tags & everywhere else. The problem is that my content is still copied by the other site.  Then, I came upon the Google results & when it typed in my url, all my recent posts are shown on the first & second page of Google results. Is there any option that the search results will not show my recent posts when I type in my URL?  I would also like to mention one more thing that I also hide the date & time from the post. But still all my recent posts are shown in the Google results, and from the clone.

I have some web pages that Google has indexed. I have now added a robots.txt file to exclude them, but should I also add a noindex tag? If so, then how do I do so?


This morning I was eating cereal which consisted of roughly spherical pieces just shy of one centimeter in diameter. By the time I was nearly finished, the cereal pieces were floating in a monolayer on surface of the milk. I noticed that the pieces of cereal tended to group together and form a surprisingly regular hexagonal lattice. Even if I manually separated one morsel from the group, it would drift aimlessly about the bowl until it came close to the main group, and then it would once again assume a position in the lattice, and remain there. Clearly, the cereal tends to this seemingly unlikely microstate because it has lower energy, but why? What sort of hydrostatic force encourages this behavior?

The Cheerios Effect is the name the scientific community has given to this phenomenon. When cornflakes or oats are mixed with milk and stirred, they tend to clump together. Why does this happen? Can physics explain this?


Are there any English onomatopoeias for disgust / loathe? What exclamations are commonly used to express repulsion?  Something that could be used like:     (___) dog shit. I loathe it! (some sound here)   … to increase the expressiveness of the sentence?

For example,  A: - Look! There is a centipede on the table!  B: - (interjection)!


Found this question in "Introduction to Linear Algebra" by Serge Lang, it says  Let $V$ be a vector space with a positive definite scalar product. Let $v_1, \ldots, v_r$ be non-zero elements of $V$ which are mutually perpendicular meaning that $\langle v_i, v_j \rangle = 0$ if $i \neq j$. Show that $v_1, \ldots, v_r$ are linearly independent  This makes intuitive sense to me, however I don't see where to start. If this was dot product in $\mathbb R^n$ I think I could work it out by using the coordinates of each vector, but as given, this problems seems like too general for me to tackle. Any hints?

I am trying to prove that $a_1$, $a_2$, $a_3$ are linearly independent.  I am asked to use vector product and prove that if $c_{1}a_{1} + c_{2}a_{2} + c_{3}a_{3} = 0$ then $c_1 = c_2 = c_3 = 0$  I am completely stuck on where to go with this problem. I would think that linearly independent then the null space of the space can only be equal to $0$. Would this prove it?


I have very little knowledge of set theory and proof writing. This is a problem from “Introduction to Topology: Pure and Applied” by Colin Adams and Robert Franzosa.   INFORMATION GIVEN  Consider the set of rational numbers ℚ in ℝ with the standard topology. We claim that int(Q)=∅. Assume it is not, and suppose that U is a nonempty open set contained in ℚ. Let x be an element in U. Then there is an open interval (a, b) such that x ∈ (a, b) ⊂ U ⊂ ℚ. But between every pair of real numbers there is an irrational number. Thus every interval contains elements of ℝ − ℚ, and therefore so does U. This is a contradiction; hence int(Q)=∅.  While the interior of ℚ contains nothing, if we take the closure we get everything; specifically, cl(Q)=R  PROBLEM  Prove that Cl(ℚ) = ℝ in the standard topology on ℝ  THOUGHTS  I think I understand the int(Q) in R, standard topology example: the open sets in the standard topology of R are real number intervals (a, b). There are irrational numbers between a and b, but they are not open in R, so Q has no open sets in R, and therefore int(Q) = ∅.  Am I on the right track?  As for the problem, I'm still trying to wrap my head around closed sets and closure points. The closure of Q is the intersection of all closed sets containing Q... alright, I admit that I'm stuck.  As always, I appreciate any help.

I am trying to show that for any real number a, there exist infinitely many rational numbers m/n with $ |a - m/n| < 1 /n^{2} $. I've tried to attempt the question by assuming there are finite rational numbers and finding a contradiction.


I'm new in c++ world, and learned that it is a good practice to make forward declarations. But is it always good?  I'm looking for guidelines for when it is a good practice to make a forward declaration and when it is not good, but I really couldn't find any. There are any objective case for when it should be used or not, or it is entirely up to the developer?

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I'm creating a rudimentary browser in Java. (just to see if I can) Right now, I have basic browsing functionality, and I'm trying to use TabPane to create a tab system. However, when I try to run the program, it stops and says a NullPointerException is triggered by the part where I set my tabs. However, I can't for the life of me figure out what to do to fix it. I am using IntelliJ-Idea. The section of code which triggers it is below:      stage.setTitle("Dodge Browser");     stage.setWidth(1024);     stage.setHeight(768);      WebView browser[] = new WebView[5];     //WebEngine webEngine = browser.getEngine();     Scene scene = new Scene(new Group());      VBox root = new VBox();     HBox url_layout = new HBox();      TabPane tabs = new TabPane();     Tab[] tab = new Tab[5];      for(int i = 0; i < tab.length; i++){         tab[i].setText("Tab"); // this is where the IDLE tells me the error stems from         tabs.getTabs().add(tab[i]);         tab[i].setContent(browser[i]);     }   The full code is below if you want it:  import javafx.application.Application; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.concurrent.Worker; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.TabPane; import javafx.scene.control.Hyperlink; import javafx.scene.layout.VBox; import javafx.scene.layout.HBox; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import javafx.stage.Stage; import javafx.scene.control.TextField; import javafx.scene.control.Button; import javafx.scene.input.MouseEvent; import javafx.scene.control.Tab; import javafx.concurrent.Worker.State;  import java.awt.*;  public class browser_tabs extends Application {      static String toGo = "http://www.google.com";     @Override     public void start(Stage stage) {         stage.setTitle("Dodge Browser");         stage.setWidth(1024);         stage.setHeight(768);         WebView browser[] = new WebView[5];         //WebEngine webEngine = browser.getEngine();         Scene scene = new Scene(new Group());         VBox root = new VBox();         HBox url_layout = new HBox();         TabPane tabs = new TabPane();         Tab[] tab = new Tab[5];         for(int i = 0; i < tab.length; i++){             tab[i].setText("Tab");             tabs.getTabs().add(tab[i]);             tab[i].setContent(browser[i]);         }           Button go = new Button("Go");         TextField url = new TextField();         url.setPrefWidth(500);         browser[currentSelection(tab)].getEngine().load(toGo);         go.setOnAction(new EventHandler<ActionEvent>() {             @Override             public void handle(ActionEvent e) {                 String newAddress = url.getText();                 browser[currentSelection(tab)].getEngine().load(newAddress);             }         });          browser[currentSelection(tab)].getEngine().getLoadWorker().stateProperty().addListener(                 new ChangeListener<State>() {                     @Override                     public void changed(ObservableValue<? extends State> observable, State oldValue, State newValue) {                         url.setText(browser[currentSelection(tab)].getEngine().getLocation());                     }                 }         );          url_layout.getChildren().addAll(url, go);         url_layout.setSpacing(10);          root.getChildren().addAll(url_layout,tabs);         scene.setRoot(root);          stage.setScene(scene);         stage.show();     }      static int currentSelection(Tab[] tab){         for(int i = 0; i < tab.length; i++){             if(tab[i].isSelected()){                 return i;             }         }         return -1;     }      public static void main(String[] args) {         launch(args);     } }

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


I know this has been discussed many times before but so far I’ve only found speculations and some blurry “experiences“ on this… Many just mix single and dual channel memory, or don't care about channels at all, they mix frequencies and so on. I just want to know which will perform better as that of today in 2015:   A: 2x2 GB 1600 MHz Dual Channel RAM on dual-channel slots.   versus   B: 1x4 GB 1600 MHz Single Channel RAM on any kind of slot.   and finally   C: 2x2GB 1600 MHz Single Channel RAM on any kind of slot.   versus   D: 1x4 GB 1600 MHz Single Channel RAM on any kind of slot.   Both on a 1600 MHz-capable motherboard, of course.  Additionally, is there any performance loss between using 1333 MHz memory on a max. 1333 Mhz-capable motherbord versus using a 1600 MHz memory downscaled to 1333 MHz on the same motherboard?

Is it better to use 2x 2GB or 1x 4GB RAM with a i7 2600k Sandy Bridge performance-wise for:   Applications? Games? Both?


I'v code  to override DefWndProc in winform      protected override void DefWndProc(ref Message m)     {         switch (m.Msg)         {             //Display image             case MESSAGE_CAPTURED_OK:                 MemoryStream ms = new MemoryStream();                 BitmapFormat.WriteBitmap(m_pImageBuffer, m_nWidth, m_nHeight);                 BitmapFormat.GetBitmap(m_pImageBuffer, m_nWidth, m_nHeight, ref ms);                 Bitmap bmp = new Bitmap(ms);                 this.pictureBox_FingerImg.Image = bmp;                 break;              default:                 base.DefWndProc(ref m);                 break;         }     }   'BitmapFormat' is my model class    However, I can't paste this code in WPF project  how to resolve it?

In Windows Forms, I'd just override WndProc, and start handling messages as they came in.  Can someone show me an example of how to achieve the same thing in WPF?


I am specifically interested in determining whether a 32-bit version of OpenJDK 8 exists in the apt/Ubuntu repos.  According to , you can install the 32-bit version of the Open JDK 7 packages via:  sudo apt-get install openjdk-7-jre:i386   How can I do the equivalent of an ls -al to see what packages exist for OpenJDK 8, and specifically, the 32-bit ones?

After doing a man apt-get and cursory Google search it's not clear how I find new programs to install (from the internet) using apt-get (which is amazingly powerful and simple coming from another Linux distro).  I'm using Ubuntu Server 8.04 LTS (an inherited system used for some random work), so no GUI.  Anyone have quick advice here?


In the schematic for the Sparkfun Arduino mini pro 3.3v  there's a 0.1uF capacitor (C3) just left of the atmega ground pins going from vcc to gnd.  In the upper left corner on the power regulator there's also a 0.1uF (C10) cap from the output vcc to gnd which should be essentially the same thing.  What is the design rationale here?  I assume they're doing this for power smoothing but why not have a 0.2uF cap or two parallel 0.1uF caps on the regulator output?  Are they trying to say that the other one should be closer to the atmega?

Lots of chips nowadays require smoothing capacitors between VCC and GND for proper function. Given that my projects run at all sorts of different voltage and current levels, I was wondering if anyone had any rules of thumb for a) how many and b) what size capacitors should be used to ensure that power supply ripple doesn't affect my circuits?


When i see the implementation of equals() method it does nothing but same as what == does. So my question is what was the need to have this as separate method when we have == operator which does the same work?

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


Related to , how did she know that Choi (boyfriend of Du Jour, the girl with the tattoo) would invite Neo to the club?                                  Neo is asleep at his computer.  All Trinity knows is that Choi and Du Jour are going to Neo's apartment to buy something on their way to a nightclub.  Choi invites Neo on a spur-of-the-moment impulse, not as part of a plan he devised ahead of time.       CHOI   Something wrong, man? You look a little whiter than usual.      NEO   My computer... it...  You ever have that feeling where you're not sure if you're awake or still dreaming?      CHOI   All the time. It's called mescaline.  It's the only way to fly.  Hey, it just sounds to me like, y'know, you need to unplug, man. Y'know? Get some R&R? What do you think, Dujour?  should we take him with us?      DUJOUR   Definitely.      NEO   I can't. I have to work tomorrow.      DUJOUR   Come on. It'll be fun. I promise.        NEO   Yeah. Sure.  I'll go.   For Neo to go with Choi, Du Jour, and , several things needed to happen:   Neo has to wake up for no apparent reason when the words "Wake up, Neo" appeared (almost silently) on his screen.  and make the mental connection to the messages he received from an anonymous hacker. The weirdos who came to buy stuff from him have randomly decide to invite him to the club where Trinity will meet him1. Neo has to accept the invitation1, despite the facts that:   It is late at night He was just sound asleep He doesn't appear to be personal friends with the weirdos He has to be at work in a few hours Instead of freaking out because someone is spying on him, knows about his felonious behavior, and has hacked into his computer, Neo has to obey his anonymous stalker and ignore the fact that this person could get him arrested2.    Let's assume that Neo is so curious about the mysterious "Matrix" that he'd accept the invitation to the club after seeing the tattoo, and that Trinity knows this.  We'll also assume that Trinity was certain that Neo would see the tattoo and make the mental connection to her message.  We're still faced with the problem of how Trinity could be sure that the weirdos would invite Neo to the club.    How did Trinity know that Choi would invite Neo to the club?    1Or alternatively, Neo has to invite himself, and the weirdos have to let him come along.  2Neo was asleep, and his computer was scanning through news stories about Morpheus, when the screen went black and a message from an unidentified person appeared - in other words, someone hacked his computer.  He regularly uses this computer to commit felonies.  The person who hacked his computer knows that a group of weirdos was about to knock on his door to buy illegal programs or code or whatever it was;  he or she also knew that one of the weirdos had a tattoo of a white rabbit on her shoulder - in other words, whoever sent the messages is spying on Neo's apartment building right now, and knows that he has just committed another crime.  If I were him, I would be destroying my computer and any other evidence of my criminal activity, not going clubbing with weirdos.

Trinity tells Neo (via his computer) to      "Follow the White Rabbit"   A few minutes later, Neo is invited to a club and although he initially refuses, he changes his mind when he sees that one of the  has a white rabbit tattoo.  How could Trinity have known that Neo would see this tattoo?


I'm writing a small script for auto-correcting interwiki translation links with . I look for the existing links and want to rewrite them in a standard format with links to all pages.  The text I'm looking for looks either somewhat like   {{Trad|EN=Under Spring|FR=Sources Interdites|DE=Verbotene Quellen}}    or multiline somewhat like   {{Trad |DE=Urwurzeln |EN=Prime Roots |ES=Raíces Primarias |FR=Primes Racines |RU =Изначальных Корней |H  =  |palette=primes }}    I manage to find these two instances in a wiki page source via   reg_strg = '{{trad([\w\s\|\=]*)}}' rex = re.search(reg_strg, text, re.IGNORECASE | re.MULTILINE)   That yields me the heart of the templates like (for the 1st case)  |EN=Under Spring|FR=Sources Interdites|DE=Verbotene Quellen   and similarily as multiline-string for the 2nd.  However, I now use the same reg_strg in a replace command, it fails to do any replacement, text remains unmodified, new_strg is created from what was read to constitute a replacement string. But the result is independent of whether new_strg is a multi-line string or just a simple "flobberigoo"  text = re.sub(reg_strg, new_strg, text, re.IGNORECASE | re.MULTILINE)   So obviously there is some difference between re.search and re.sub - however I fail to find that in the documentation (even though I am aware of the difference between re.search and re.match, I understood it such, that re.sub should behave like the first).  What do I miss? How can I replace the mentioned regex which I find in the pages with a string?  For completeness sake, this is the complete function including the debug prints:  def replace_translation_template(self, text, translations):     """     @param text The page text to look through     @param translations dictionary of translations     """     reg_strg = '{{trad([\w\s\|\=]*)}}'     rex = re.search(reg_strg, text, re.IGNORECASE | re.MULTILINE)      print("Replacing:")     try:         print(rex.group(1))         strgs = rex.group(1).split('|')         print(strgs)         new_strg = ""         for lang,pagename in translations.items():             if pagename is None:                 pagename = ""             new_strg += '|' + lang.upper() + '=' + pagename + '\n'          #print("New_strg: ", new_strg)          for lang in translations.keys():             for (n,str) in enumerate(strgs):                 if lang.upper() in str:                     strgs.pop(n)          for s in strgs:             if len(s) > 2:                 new_strg += '|' + s + '\n'         print(new_strg, '\n')         print('\n with \n \n')         text = re.sub(reg_strg, new_strg, text, re.IGNORECASE | re.MULTILINE)         print(text)      except:         print("no text matched:", rex)

The Python docs say:     re.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline)... By default, '^' matches only at the beginning of the string...   So what's going on when I get the following unexpected result?  >>> import re >>> s = """// The quick brown fox. ... // Jumped over the lazy dog.""" >>> re.sub('^//', '', s, re.MULTILINE) ' The quick brown fox.\n// Jumped over the lazy dog.'


This question has hunted me for a long time, I can only find this Medical proposal on . why don't we have SE medical? Maybe there are some histories I am not familiar with?

I think a Q&A site about medical topics would be interesting. Is there any plan to make such a site available?


Like charges repel.     What keeps an electron's charge from repelling itself?  This problem would come up if an electron was divisible and its parts had fractional charge.   A related question is, what keeps an electron from being divisible?

How can it be that, if like charges repel, they don't repel themselves? In other words, why don't charges break apart?  About the possible duplicate: I want to know about charges in general, not just that of an electron. My response to :  Thank you very much for the extensive explanation. Unfortunately it's a bit above my level (I'm a first year electrical engineering bachelor student). This is how I understand it: If the charge is the sum of multiple separate charges, there has to be an external force that keeps this charges together. However we most often think of electrons and protons as point charges. In other words, we don't think of them as if they are made up from different (smaller) parts. But the idea of electrons and protons as point charges has its own problems. I didn't know that the electric field has a mass. From the formula, I understand that $m\propto \frac{1}{r}$. This would mean that $m\rightarrow \infty$ as $r \rightarrow 0$ (or $r = 0$), which of course is physically not possible. But there is a way to calculate the radius of an electron based on the mass, the speed of light and the constant of Planck. (Unfortunately I don't know why.) You can get around this by a technique called called renormalization, which causes the integral to converge. Unfortunately, I don't understand the rest of the answer due to my level in physics. Nevertheless I am grateful for you answer. It would be awesome if you could confirm or correct my understanding.


I see there have been a lot of questions about the big bang and did it start from a singular point etc. And i agree with the answers given, that the universe is infinite and is expanding about every point within it, like a grid where the space in between the points is expanding or stretching, that is what my intuition tells me and i can picture it.  However I am at a loss as to how this expansion occurs. Einstein theories result in explanation that mass or matter interacts with space and causes the space surrounding the matter to bend and subsequently light bends travelling through the space surrounding the matter, and the change in space's structure manifests in what we observe as gravity where matter we observe attracts other matter toward it by this bent space.  So what my question is asking is what is fuelling or causing the expansion, that is if space requires work to expand it, or is it simply a fundamental property of space and matter that we are yet to have an explanation of, or at least one that I'am unaware of.

What is causing space to expand?   Is it due to some kind of innate property or is it due to some force?  I did a google search on this and found lots of articles explaining that space is expanding but nothing as to why it is expanding.


App.js contains this code:   function add(num1,num2){     let sum = num1+ num2; } let sum = add(2,2);   When I run "time node app.js" In the command line I get the response:   real    0m0.312s  user    0m0.000s  sys     0m0.015s  What does this mean? What is the time flag measuring? How is the runtime calculated? Can you point me to documentation on this flag?

I want to execute something in a linux shell under a few different conditions, and be able to output the execution time of each execution.  I know I could write a perl or python script that would do this, but is there a way I can do it in the shell? (which happens to be bash)


how get first day and last day current month in React Native to my DatePicker  constructor(props){ super(props) this.state={     modalVisible: false,     date:new Date(),     minfecha: '',     maxfecha: '',     isLoading: false, }, this.setState({     minfecha: new Date(this.state.date.getFullYear(), this.state.date.getMonth(), 1),     maxfecha: new Date(this.state.date.getFullYear(), this.state.date.getMonth() + 1, 0) }); }

If you provide 0 as the dayValue in Date.setFullYear you get the last day of the previous month:  d = new Date(); d.setFullYear(2008, 11, 0); //  Sun Nov 30 2008   There is reference to this behaviour at . Is this a reliable cross-browser feature or should I look at alternative methods?


I've seen pictures with several objects being in focus and others not in focus. How do I do that? When I focus my camera, lets say along a wall, only parts of the wall will be in focus.   Here is a picture that will help illustrate what I mean, the other picture shows how I would want the camera to focus:

I am quite new to DSLRs and one of the first things I noticed was the incredible focus points and appearance of depth that you can achieve. That is great in a lot of scenarios, but not in all. When filming a landscape as a whole, I do not want to have the focus on that single tree, but on the whole skyline.  Is there a way by which you can sort-of "disable" the focus, so that the raw image is recorded without any added blur? I suppose something as simple as this is only a small function you can turn off, but I can't seem to find it in the manual of my camera.


Not sure how to about this. Spent a while racking my brain, tried comparison didn't work. I'm thinking I need to show how its similar to a p-series test since its to the power of $n+1$ where $n+1>1$ thus it converges, but not sure how to do that.

How to test the convergence for $$\sum _{n=3}^{\infty }\:\left(-\frac{1}{\sqrt{\ln\left(n\right)}}\right)^{n+1}$$ Can I use the comparison test for this one? For example: $n≥\ln(n)$ $\sqrt{n}\ge \sqrt{\ln\left(n\right)}$ $-\sqrt{n}\le -\ln\left(n\right)$ $\frac{1}{-\sqrt{n}}\ge \frac{1}{-\sqrt{\ln\left(n\right)}}$ and then I use the the p series for p = 1 and say that this diverges? or can I only use this inequality for convergent? Thanks :)


I am trying to see if this integral converges or not, so we have $$\int_{1}^{\infty}\frac{1}{x^{1+\frac{1}{x}}}$$ Using P-Test I know if $1+\frac{1}{x}>1$, then this integral converges, but could the $x$ be negative so $1+\frac{1}{x}<1$?? then the integral diverges? Thanks

$$\int^\infty_1\frac{1}{x^{1+1/x}}dx$$  I'm preparing for exams. I would also like to know what are some commonly used methods to show an improper integral diverges?


Let $E$ be the intersection of the cylinders $x^{2}+y^{2} \leq 1, y^{2}+z^{2} \leq 1$. Compute the flux $$ \begin{align} & \iint_{\partial E} F \cdot d S \\[6pt] \text {where } & F=\left(x y^2+\cos (y z)\right) i-\left(x^2+\sin (z x) \right) j+(z+\cos (x y)) k, \text { and } \partial E \end{align} $$ is oriented outward. Any one please help me how to solve it as I totally have no idea how to go with it.

Let $E$ be the intersection of the cylinders $x^{2}+y^{2} \leq 1, y^{2}+z^{2} \leq 1$. Compute flux $ \ \iint_{\partial E} F \cdot d S$ where $\vec F = \left(x y^{2}+\cos (y z)\right) \hat i - \left(x^{2} + \sin (z x)\right) \hat j + (z + \cos (x y)) \hat k \ $ and $ \ \partial E$ is oriented outward. What I tried:  Image2:  Please guide have I got it right.


I need to be able to detect if an image is broken and replace with a default image if the image link is broken.  I know i could do this with an image proxy, but was hoping to do it on the fly with javascript.

I have a web page that includes a bunch of images. Sometimes the image isn't available, so a broken image is displayed in the client's browser.  How do I use jQuery to get the set of images, filter it to broken images then replace the src?    --I thought it would be easier to do this with jQuery, but it turned out much easier to just use a pure JavaScript solution, that is, the one provided by Prestaul.


I have a dual boot configuration (MS Windows 7, Ubuntu 12.04) and I'm using Grub2. How do I upgrade without breaking anything?  This is my work laptop and I need to make sure that nothing will break. Is it possible without doing a clean install (installing 14.04 on top of 12.04)?  Thanks.

What are the different ways I can use to upgrade Ubuntu from one release to another?


I want to start learning algebraic geometry. What introductory books do you recommend? My background in algebra includes group and basic ring theory, as well as some module theory. Do I need Galois theory?  Thanks!

I tried to learn Algbraic Geometry through some texts, but by Commutative Algebra, I left the subject; many books give definitions and theorems in Commutative algebra, but do not explain why it is needed.  Can one suggest a good reference to learn this subject geometrically, which would also give ways to translate geometric ideas in algebraic manner, possibly through examples?  Particularly, I am interested in differentials on algebraic curves, Riemann-Roch theorem, various definitions of genus and their equivalences, and mainly groups related to complex algebraic curves such as group of automorphisms, monodromy group etc.


Do  exist from our point of reference? From our point of reference nothing actually goes inside the event horizon right? So is there anything inside the event horizon from our reference? If not then no black holes actually exist  but hollow spheres that have the center of mass inside them? So no information paradox :)

The well-known fable of an astronaut sending signals out to an external observer while falling toward an event horizon states that the time lapse between such signals becomes greater even if in the astronaut sends them out periodically (as judged in his inertial frame). When viewed from earth and weighing time-dilation due to the gravitational field of the collapsing star, how is it possible that a black hole can form in finite time (for any external observer) if it takes an infinite amount of time to "see" events occurring at the event horizon?