I've created an  init script which I intend to use to push some log files to an Amazon S3 bucket when the system is going down but it doesn't get executed.  Here is the script contents in in file /etc/init.d/push-apache-logs-to-s3.sh (I replaced with my client's branding name with XXX):  #! /bin/sh ### BEGIN INIT INFO # Provides:          push-apache-logs-to-s3 # Required-Start:     # Required-Stop:     $local_fs $network # Default-Start:     2 3 4 5 # Default-Stop:      0 1 6 # Short-Description: Push Apache log files to S3 # Description:  ### END INIT INFO  PATH=/sbin:/usr/sbin:/bin:/usr/bin  . /lib/lsb/init-functions  do_stop () {     LOG_DIR=/var/log/apache2/     BACKUP_DEST=s3://XXX-backups/api-logs     EC2_ID=`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id`      echo -n "Entering log directory..."      if cd $LOG_DIR     then       echo "OK"     else       echo       echo "Cannot change directory... BACKUP ABORTED!"       echo       exit 3     fi      echo -n "Pushing log files to S3..."      # push log files     if s3cmd put XXX-api_access.log* $BACKUP_DEST/$EC2_ID/ >/dev/null     then       echo "OK"     else       echo       echo "LOG FILES COULD NOT BE MOVED TO S3! BAKCUP NOT COMPLETE!"       echo       exit 5     fi      echo "*** Backup finished at " `date`     echo "-----------------------------------------------"      exit 0 }  case "$1" in   start)         # No-op         ;;   restart|reload|force-reload)         echo "Error: argument '$1' not supported" >&2         exit 3         ;;   stop)         do_stop         ;;   *)         echo "Usage: $0 start|stop" >&2         exit 3         ;; esac  :   Here is the command I used to install it:  sudo update-rc.d push-apache-logs-to-s3.sh start 01 2 3 4 5 . stop 01 0 1 6 .   which provided output:   Adding system startup for /etc/init.d/push-apache-logs-to-s3.sh ...    /etc/rc0.d/K01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh    /etc/rc1.d/K01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh    /etc/rc6.d/K01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh    /etc/rc2.d/S01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh    /etc/rc3.d/S01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh    /etc/rc4.d/S01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh    /etc/rc5.d/S01push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh   The script uses s3cmd which is installed and configured on the system. s3cmd is in /usr/bin/ which is defined as PATH in the script.  When I execute the script by sudo ./push-apache-logs-to-s3.sh stop, it does the job.  Any suggestions what's wrong?

I have installed a shutdown script on an Ubuntu system which doesn't get executed. It is an Amazon EC2 instance. I'm not sure it has to do with this fact just wanted to point it out.  The script should push some log files to an Amazon S3 bucket so it has to be executed while networking is up.  Here is how I installed the script:  1) Created the file in /etc/init.d/push-apache-logs-to-s3.sh with the required commands.  2) Made it executable with sudo chmod +x push-apache-logs-to-s3.sh  3) Executed sudo update-rc.d push-apache-logs-to-s3.sh start 0 0 .  Output from the above was:  update-rc.d: warning: /etc/init.d/push-apache-logs-to-s3.sh missing LSB information update-rc.d: see <http://wiki.debian.org/LSBInitScripts>  Adding system startup for /etc/init.d/push-apache-logs-to-s3.sh ...    /etc/rc0.d/S00push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh   The contents of /etc/rc0.d/ is now:  lrwxrwxrwx  1 root root   17 Jul 31  2012 K09apache2 -> ../init.d/apache2 lrwxrwxrwx  1 root root   29 Jun 16  2012 K10unattended-upgrades -> ../init.d/unattended-upgrades lrwxrwxrwx  1 root root   26 Jun 16  2012 K15landscape-client -> ../init.d/landscape-client lrwxrwxrwx  1 root root   19 Apr 10 11:11 K20memcached -> ../init.d/memcached -rw-r--r--  1 root root  353 Jul 26  2012 README lrwxrwxrwx  1 root root   35 Jul 10 12:01 S00push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh lrwxrwxrwx  1 root root   18 Jun 16  2012 S20sendsigs -> ../init.d/sendsigs lrwxrwxrwx  1 root root   17 Jun 16  2012 S30urandom -> ../init.d/urandom lrwxrwxrwx  1 root root   22 Jun 16  2012 S31umountnfs.sh -> ../init.d/umountnfs.sh lrwxrwxrwx  1 root root   20 Jun 16  2012 S35networking -> ../init.d/networking lrwxrwxrwx  1 root root   18 Jun 16  2012 S40umountfs -> ../init.d/umountfs lrwxrwxrwx  1 root root   20 Jun 16  2012 S60umountroot -> ../init.d/umountroot lrwxrwxrwx  1 root root   14 Jun 16  2012 S90halt -> ../init.d/halt   When I manually execute the script with sudo ./push-apache-logs-to-s3.sh, it does the intended job.  Are these scripts executed by root? What am I missing?


All my listings labels appear with prefix 1. in all sections, such as the following example, where the second listing of my paper in section 2 appears with the prefix 1. rather than 2.  I have already realized that \maketitle is the root of this behavior. If I remove \maketitle the labels appear correctly with 1 and 2, rather than 1.1 and 1.2.   How can we keep consistent numbering with the following llncs template:  \documentclass[runningheads]{llncs}  \usepackage{listings}  \begin{document}  \title{PetClinic Sample}  \maketitle  \section{Intro} \label{sec:alternatives}  We will use the PetClinic Spring~\ref{lst:input}  \begin{lstlisting}[language={HTML}, caption={Button}, label={lst:button} ]     <button></button> \end{lstlisting}  \section{Idioms}  \begin{lstlisting}[language={HTML},caption={Input},label={lst:input}]     <input> \end{lstlisting}   \end{document}

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


Why does maxing out my base make me able to defend against attackers better. Should I max out at every Town Hall and how to get the loot required to max out my base?

I have heard that it is best to upgrade everything to the max before upgrading your Town Hall. Is this true, or is it impractical?


I downloaded Ubuntu 18.04 and a bunch of folders are seen. What do I click on to install it after I download it?

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


Today I came across the following phrase:     He couldn't have put it better, when he said: "..."   But why does it require perfect tense? Can it be replaced with simple tense instead?     He couldn't put it better, when he said: "..."   For me it sounds like these two actions (put and said) happened at the same point in the past (i.e. simple) - why perfect then?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I have some REIT stocks in my IRA.  One of them just announced 2 weeks ago a normal dividend while their price was stable.  Within that time, it dropped 75%, then they announced they "can't cover their margins", their stock is now worth pennies.  How does that happen?  Why does it appear fine and 9 trading days later it's worthless.  There seems to be something about the REIT industry I'm missing as it's happening all over.

Being old I have/had much of my 401 K in REITS for income. I specifically avoided mall and retail.  Most imply that they are mostly residential mortgages. All are down substantially more than market averages. I am hoping they can still pay some, if not all, dividends as an offset to the capital losses. What may happen?


I suffer from anxiety, and this condition has led to some situations that hurt my relationships and reputation at my undergraduate institution. Anxiety also affects me in other ways -- for example, I fear flying. Now I want to apply to graduate school for a master's degree. At what point should I disclose my mental health conditions? It seems like my advisor would need to know about some or all of my history, and best case, they could use this knowledge to provide better advising. But it could also mean that my preferred advisors would decline to advise me at all.

I will be meeting with a professor tomorrow who I previously asked to supervise me. I believe he has the right knowledge to assess the standing of my work in the interdisciplinary field I work in and help me moving forward. He said yes and gave me some suggestions which I partly followed, but the last time we spoke was in May. I am currently struggling with issues related to mental health () and have been in the past months, although it took a while to realize the depth and take action. They are not diagnosed but they probably include a mixture of: low self-esteem, impostor syndrome, anxiety, and acts of self-sabotage. These are linked and the names I feel are not strictly important. I am currently seeing a psychoanalyst (to address the root causes) and the well being/mentoring program of the university (to get practical suggestions and coping strategies). Fighting on. I seek two things from the professor:  Relevant advice and (within reason) some mentoring whenever my cross-field preparation is weak.  An external commitment device that provides motivation for work and help me overcome some of my issues.   I think I have 1. covered, but I am looking for suggestions on how to discuss 2, especially whether I should break the information about my mental health issues with him. I see two possible ways to go:  I can simply set the pace by saying "I would like to meet every week to discuss my progress" and not mention my (alleged) conditions. This will be enough to set a weekly deadline for myself and would surely be helpful.  I could mention my issues to some extent. One of the reasons I didn't ask him to meet before is an ongoing self-sabotage/perfectionism which makes me unwilling to show my work until it has reached a satisfactory level. I now realize that, essentially, this satisfactory level is short of publication-grade material and clearly impossible without expert feedback. I am afraid of course that this could: sound like an excuse for my absence and lack of advancement; mark me as a "bad apple"; monopolize the conversation away from content; be plain awkward; as I write this answer I am also concerned about .   This is ill-timed, as the meeting is tomorrow (but I wanted to break the cycle of postponing this and I could always go with 1. right above and postpone breaking the mental health "coming out" to a more appropriate time), but any suggestions from you would be a great help. EDIT I ended up doing something midway between telling and not. I have hinted at the fact that I was somewhat stressed out and partially disclosed a concrete example (checking a computation for over three days out of a fear it might be wrong). He said he understands this kind of difficulties as well as my need to have someone to talk the fine details over. I believe he caught the implications and was overall very kind and sympathetic. Unfortunately, he will be entering a half-year sabbatical soon and might not guarantee his presence until the start of the next academic years, but said he would like to read what I am working on and pointed me to others who might be of help.


So a matrix, A, is linearly independent if Ax = 0 has only the trivial solution (x=0) so let A = AB, then if the columns of AB are linearly independent, the equation (AB)x = 0 has only the trivial solution by the associative law of multiplication, (AB)C = A(BC), so (AB)x = A(Bx) = 0 I'm not sure where to go from here, or even if this is a proper way to go about proving that the columns of B are linearly independent

If you have an $m \times n$ matrix and the rows are linearly independent, are the columns linearly independent too?  I know that it's the case for $n \times n$ matrices. I've yet tried to think about it, and I think the answer is yes, for example the matrix: $\begin{bmatrix} 1 & 2 & 3 \\ a & 2a & 3c \end{bmatrix}$ has linearly dependent rows and columns, but I'm not sure that it works for every $m \times n$ matrix.


Let $X$ be a topological space that admits a countable open cover $\{U_i\}_i$ such that each $U_i$ is second countable in the subspace topology. Show that $X$ is second countable.    My attempted proof is as follows:  For each $i$, $U_i$ admits a countable basis $\mathcal{B}_i$. By the Axiom of Choice, $\cup_i \mathcal{B}_i$ is countable. All of the sets in $\cup_i\mathcal{B}_i$ are open in $X$ since they are of the form $B_i\cap U_i$ for some $B_i\in\mathcal{B}_i$, and both $B_i$ and $U_i$ are open. Since the $\{U_i\}$ are an open cover, for any $x\in X$, $x\in U_i$ for some $i$, so there is $B\in\mathcal{B}_i$ such that $x\in B$.   Now suppose that for any $B_1,B_2\in\cup_i\mathcal{B}_i$, $x\in B_1\cap B_2$. Then there are $i,j$ such that $B_1\in\mathcal{B}_i$ and $B_2\in\mathcal{B}_j$. But I do not understand how to show there is a $B_3\in\cup_i\mathcal{B}_i$ such that $x\in B_3\subset B_1\cap B_2$. How can we show there is such a $B_3$?  I know similar questions have been asked before but I couldn't find the answer to my question.

I'm trying to prove the following statement:     Let $X$ be a topological space with a countable open cover $C= \{U_\alpha : \alpha \in A\}$. If each $U_\alpha$ is second-countable then $X$ is second-countable.   However I'm stuck on how to proceed, so any hints on how to tackle it would be highly appreciated.


Assume $f$ is continuous over $[a,b]$ and $f$ has a local maximum value at every point in $(a,b)$. Show that $f$ is constant.   Intuitively it makes sense that the constant function should be the constant function, but maybe one strategy is to prove that it is a necessary and sufficient condition on $f$. In other words, $f$ is continuous over $[a,b]$ and $f$ has a local maximum value at every point in $(a,b)$ if and only if $f$ is constant. Alternatively we can think of it as such: at every point $A_i$ over $[a,b]$, there exists some interval $J_i$ such that $A_i$ is greater than or equal to every value in of $f$ in $J_i$.  I am unsure which route to take to solve this.

Let $f:[0,1]\to\mathbb R$ is a continuous function, and for all $x\in [0,1]$, $f(x)$ is either a local maximum or a local minimum. Then prove that $f$ is a constant.  Here is what I have tried, I don't know whether it is correct:  Assume $f$ is not a constant, by continuity, there exist $x_1$, $x_2$ such that $f(x_1)=m$ is a global minimum and $f(x_2)=M$ is a global maximum. Now if $m\ne M$, choose any $c\in(m,M)$ and define  $$x_0=\sup (x\in[x_1,x_2]:f(x)<c)$$  Then we have $f(x_0)$ NOT a local minimum nor a local maximum (since according to the definition of $x_0$, there are always some points $<c$ in the left neighborhood of $x_0$ and the points in right neighborhood are always $>c$). Contradiction arises and so $f$ must be a constant.


I believe many will agree that "Member for today" sounds just wrong.        My suggestions to replace it:   Member for less than 24 hours Joined today (instead of the whole line)   Any better ideas? Reasons to keep the existing wording?

Very new members will have this text displayed in their profile:    Should this not be changed to say "1 day" or "3 hours", etc? Especially as the "last seen" also works in this way.  Note that members who joined 24 hours ago have been members for "2 days", etc.  You'd say "x has been a member for 1 day" over "x has been a member for today"; saying "member for today" just doesn't feel right to me.


I have, on Super User, an about 96% total helpful flags rate (and a  badge). This made me rather curious when I tried to flag a post and the UI indicated that flags had been declined and I should review them before flagging further, so I went to look.  Out of my recent flags, one out of the many had been declined by a moderator (as "no evidence"). The most recent five pages of my flags history show three declined flags in total.  I'm not asking why the flag was declined; that's beside the point. I do wonder if it's really reasonable to show the warning based on a single declined flag out of a fairly large number of recent flags, all but this one of which were either found helpful or are still pending.  Is the warning a bit overzealous?

I had flagged  on Stack Overflow as spam. The flag was declined, then later  we found it was spam and got deleted as such, but the flag's still marked declined.  However, whenever I try to flag a post now I am presented with an annoying warning:    Below is a summary of my flags thus far:    It's annoying (and somewhat scary) to be presented with warnings for no fault.  Is there a way out?  Should I stop flagging altogether?


High. My name is Festus.  I'm creating a web site for a customer and would prefer not to have Google index the site while it's still being developed. The customer, on the other hand, must be able to access the unfinished site.  My solution was to give the site an unusual hostname. I used myCustomerName.domainName.com with the thought that there's no way Google would be able to guess that hostname and therefore crawl/index it.  Nevertheless, Google found and indexed the page despite my 100% certainty that there are no external sites that link to it. I found out later that someone at the customer's site had been typing myCustomerName.domainName.com into the Google search engine instead of the address bar. That's how Google found out about it. (I have no idea why someone would type the custom hostname into Google's searchbox instead of the address bar, but they did).  Now unfortunately the site shows up in Google as a search engine result. Here's what I've done so far.  (1) I researched robots.txt and disallowed access to the entire site.  (2) I went to Google's Page Remove tool and asked the page to be removed. I got a successful response saying that the page was in fact removed. The status is now set to "removed."  ...and yet the page still appears in Google search results. Any idea why? I guess I could always rename the host to `someOTHERrandomString.myDomain.com' but I'd like to know why Google Webmaster tools show the page as "Removed" as of April 3 but it's still highly ranked on the search engine page.  According to Google: "We won't index the page if it's blocked in robots.txt and there is an active URL removal request for the page." I've done both of those things, and again, there are no external sites linking to the custom hostname.  So what's up?

I have used so many things like url removal request and deleted the pages etc., but still the errors are shown in my webmaster tools.  How can I remove the urls completely from Google?


I'm looking for a probably short story (but I'm not 100% sure about it) where mankind got this huge achievement (probably immortality but might have been energy) through killing an inferior alien species.   Because of that, some kind of galactic/space alien counsel decided to punish mankind by extermination, which led to a war. What I can clearly remember (and the reason I'm looking for it) was the ending, where a bunch of humans escaped with a very fast ship, chased by an alien one. The ships were so fast that they bent time, and in the end, as the universe was crunching, the aliens sent a message by asking humans to let them catch them so that the whole thing would make sense.

Looking for the title of an old sci-fi book, pretty sure it is a Baen or Del Rey imprint. Basically, mankind has reached the stars and expanded throughout the galaxy. Suddenly, an unknown race appears and begins a war of extermination against man. Finally, the galaxy is desolate, and one man remains. He is in a starship with an AI and becomes injured in the battle.  The ship's AI takes over and speeds out into the unknown, followed by the last remaining member of the unknown alien race. As all speeds are at tremendous multiples of the speed of light, the man cannot get away, but the alien cannot catch up.  Finally, communication is opened, at which point the man asks "why?" The alien tells him that man had discovered immortality, but that it required the death of a member of a race known as the Flower People for every human who achieved immortality. The alien says that Man would have found the answer eventually, but that genocide was so intolerable that the aliens came from another dimension, to which they could never return, to stop Man, which resulted in the war of extermination.  Finally, the light speeds become so great that the two remaining living beings in the universe approach the Big Crunch. As the Man begins to dive into the singularity, with the alien hot on his heels, he says that maybe there will be room in the next universe for both races to live in peace, and the final line is "not with a whimper, but with a roar of triumph"!


My memory is unreliable. but... What I recall is a story about someone who develops life from scratch in a small contained laboratory vessel, then accelerates evolution super fast until the life forms become sentient. These creatures live in fear of him, because he maintains a consistent pattern as a god of wrath and vengeance, punishing failure and disobedience with massacres and arbitrary cruelties. He sets them progressively tougher technological challenges to solve, which they manage every time, and he is able to profit from their technological advances. Until finally he sets them the task of building an impenetrable forcefield. By this point they are way superior to humans in their capabilities, and much much faster in every way, but still confined to their flask. They have not yet discovered their terrible God is just a life form abusing them, and their known universe is a flask. Anyway, they build a force field and successfully isolate themselves from him. There is nothing on Earth  that can penetrate the sphere they have built around their habitat. After a brief interval they switch off their force field and send him a message. They say they are afraid they may have offended him because they have not heard from him (their God). They seem to be begging forgiveness, but clearly they are also starting to work things out and discover their powers. He finds he can no longer switch them off.  THE END. I read this story at least 40 years ago and would love to find it again. I've probably mis-remembered it in parts, but I think its message is more relevant today than ever. Can someone point me to the original please?

My dad has been trying to find the title of a short story for ages. According to him, the story goes like this:  A scientist who works on an island manages to create a miniature population with whom he can communicate. As time is proportional to their size, it goes way faster for them than the scientist, which allows the creatures to be able to make inventions humans can't yet.   The scientist, whom the creatures worship as a God, starts asking them to reveal how to make these inventions humans are unable to create. At one point, his miniature people end up developing the transport of wireless energy.  Because of the industrial lobby of the human world, the scientist and his people are under a death threat. He asks the creatures to develop the absolute protection, which they do, but this stops the communication between the scientist and his people. He can only see a grey dome in his microscope.   At the last moment, as missiles have been fired towards the island, a breach opens in the dome. The scientist gets a message from his creatures: they ask for forgiveness as they were not able to reach him anymore until then. He responds that if they want to be forgiven, they must amplify the action of the dome.  In the end, the whole island is covered with an indestructible grey dome that no one can see through.  Some parts might be added by my dad's imagination but if you find anything similar to this plot, we would be really grateful!


Can a unemployed student who is not working used his guardian's or parents' bank statement from his own country or the unemployed student must have his or her own bank statement? Even when the sponsor who lives in UK will sponsor the trip?

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


We are in the early stages of development of the official Stack Exchange iOS app and we need your help with testing. To set a few expectations: there will be bugs, crashes, and missing features, all of which will be fixed in .    We are initially targeting  on iPhones only.   To register for alpha testing .  After you register we will send you an e-mail with instructions on how to download the app on your iPhone. The invitations will be sent out in waves, so if you don’t get an invite immediately, be patient.  Crash reports will be automatically reported back to us using . Bugs or feature requests should be reported here on meta and tagged . (For reporting purposes, the app version number can be displayed in the app by swiping down the side-bar, above the username and profile picture)  As always, we welcome your feedback and are committed to building the best mobile app possible for browsing the Stack Exchange sites.

We're getting very close to releasing our iOS app on the App Store.  Since the , we have taken on hundreds of users, fixed a lot of bugs, and we have approached feature completion for v1.0.  We're still working on finishing touches and fixing crashes - but there aren't too many of those these days.  We believe we'll have this out in .    Current Alpha Testers:  We want to extend to you a huge thank you for using our app and giving us feedback.  We've made a ton of improvements that filtered through  here on meta.  We're pretty greedy, though, and we want more of your feedback as we get close to beta.  If you've been using the app, please leave an answer to tell us how you think we've done so far.  Don't go easy on us - we want to get this as right as we can before hitting the App Store.  You might even consider telling us how many stars you would give us if we were in the store.  Also, we created a room called  for more casual discussion about the app.  Everyone Else:  The alpha will continue in the interim, and we still .  The invitations are sent out once a week (usually), so if you don't get an invite right away, don't panic.  We'll get to you.  Bugs or feature requests should be reported here on meta and tagged .  Update, 5/1/2014    As of today, the app is submitted for review.  A great big thanks to all our alpha testers!  Your feedback has been invaluable and has truly helped us make the app much better than it would have been without you.  So what now?  Well, we intend to keep the alpha test group around, except now we're considering it the "beta channel".  It's still important to us, particularly since the update cycle through the AppStore is slow.  We'll still roll out updates in the same way that we have been.  We will also from time ask for targeted feedback on specific features.  And, lastly, if you're just now getting here and wished you had signed up for the alpha, feel free to sign up now anyway.  The form is still there, and we may still let in additional users to the beta channel depending on what our "active users" count looks like.


I just booted up my 'old' PC that's been lying around for the last two years. I have Windows 7 on it and I'm looking to format the drive and do a fresh install of W7.  I have the key for Windows 7 in a text file. However I don't have the Windows 7 DVD or image.    So is there any way of burning off a Windows 7 DVD considering that its the operating system I'm currently using? If not...well I have a W7 key, will this key work with any W7 DVD or is it particular to the W7 image that came with the key?

I just bought a serial for Windows 7 on-line from the Microsoft store (the most painful shopping experience EVER!). I selected that I wanted to download my version of Windows 7 after purchase. After payment, I have listed a Product Key but no download link in sight.   Where do I download my Windows 7 ISO to burn to disk?  Note: I'm not a Technet or MSDN subscriber.


I had figured that Minecraft had native Xbox One controller support, but found that I was wrong (at least as of January 19, 2016).   I've found resources that indicate that Minecraft can be played using the Xbox 360 controller with some help from other programs, but I'm unaware of any programs that claim to work with the Xbox One controller:

Am I able to use a controller to play the PC version of Minecraft? If so, can I just plug it in and play or do I have to do something else before being able use one?


I have faced a question regarding application for visa for traveling to Europe in order to study there. I would be grateful to receive guidance on this.  I have been admitted to a European master program. Right now I am in Iran and I should travel to the Netherlands on August to participate in an introduction program and then move to France to take part in the first semester of the program. The second semester is going to be held in Hungary starting in February. My coordinator at the French university has asked me to start the application procedure for a visa for France while I am supposed to first enter the Schengen area in the Netherlands. Is it going to be ok? I've already asked about this from the Netherlands embassy in Iran and have been told that I should apply for a visa for my main destination (France) but they didn't say whether it would ok to enter the Netherlands by flying directly from Iran and without traveling to France first (while I am issued a visa for France).

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I'm running 11.04 server, and I'm getting errors updating default repos when I run  sudo apt-get update   The repos that return a 404 error are default Ubuntu Natty repos like .  I can't update my installation since these repos keep failing. Is my only choice to reinstall my distro?

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


I need openjdk to build my Android ROM, but I can't install it. I installed Oracle JDK but it doesn't work.

I would like to upgrade my main system to 16.04, but I work on projects that require OpenJDK 7.   Apparently it is not available from a trivial apt-get install openjdk-7-jdk. Only versions 8 and 9 are listed in the repository.  Can anyone point me to instructions on how to install it?


I'm trying to trouble shoot my boot process by using bootchart. I installed using sudo apt-get install bootchart and rebooted the computer - but, though the folder /var/log/bootchart exists, it is empty.  I have seen  thread that answers a similar question as well as  that describes exactly my problem, but both posts are over a year old and I thought that I'd give it another try - maybe I have a different underlying problem than the other posters.  I'm using Ubuntu 16.04 LTS.

I already installed pybootchartgui and boot chart in Ubuntu 16.04. After running  sudo pybootchartgui   or  sudo bootchart   this is the result:  No path given, trying /var/log/bootchart.tgz   warning: path '/var/log/bootchart.tgz' does not exist, ignoring. Parse error: empty state: '/var/log/bootchart.tgz' does not contain a valid bootchar   There is a duplicate question . It is is very old and the answers provided doesn't work.


I'm making a picklist with 385-ish values. I want these values to have different API names than their label value. Is there any easier way to edit the API names rather than one at a time?

I need to dynamically add and remove values from a custom picklist using APEX code. I want this to be reflected in the picklist meta data e.g. not only appear in record details. How can I do that using my apex logic?


Question: A family has three children but you don’t know their sexes. If at least two are boys, what’s the probability one child is a girl (assuming that all outcomes are equally likely)?  My Answers  Define the events $E:="at\ least\ two\ boys"$, $F:="exactly\ one\ girl"$  Combination interpretation: Here $E=\{\mbox{BBB, BBG}\}$ (i.e. "3 boys" or "2 boys and 1 girl"). Note the combinations $\mbox{\{BBG\}}=\mbox{\{BGB\}}=\mbox{\{GBB\}}$ (are equivalent) as we are ignoring order. Thus, there is only one combination of this where there is $"at\ least\ two\ boys\ AND\ one\ girl"=E \cap F=\mbox{\{BBG\}}$, hence  $$\begin{equation}\begin{split}\mathbb{P}(F|E) & = \frac{\mathbb{P}(E \cap F)}{\mathbb{P}(E)} \\ & = \frac{|E\cap F|}{|E|}\\ & = \frac{1}{2} \end{split} \end{equation}$$  [This seems somewhat intuitive as once we know the sexes of 2 of the children, we only care about the sex of the last child (which is equally likely of being a boy or girl by assumption).]  Permutation interpretation: Since order now matters, we have $E=\{\mbox{BBB, BBG, BGB, GBB}\}$ and $E \cap F=\mbox{\{BBG,BGB,GBB\}}$, hence  $$\mathbb{P}(F|E) = \frac{3}{4}$$  My Question: Should I be using the Combination interpretation or the Permutation interpretation?  I feel regardless of which interpretation I use, the answer should be the same - but it isn't??? Is my logic correct, or have I gone wrong somewhere (am I missing possible outcomes within one of the interpretations)?

I have a problem, I'm learning probability at the moment (I'm a programmer) and starting I have this:  (Source: Minka.) My neighbor has two children. Assuming that the gender of a child is like a coin flip, it is most likely, a priori, that my neighbor has one boy and one girl, with probability 1/2. The other possibilities—two boys or two girls—have probabilities 1/4 and 1/4.  a. Suppose I ask him whether he has any boys, and he says yes. What is the probability that one child is a girl?  b. Suppose instead that I happen to see one of his children run by, and it is a boy. What is the probability that the other child is a girl?    Now my reasoning is: BB = 1/4 = 0.25 BG = 1/4 = 0.25 GB = 1/4 = 0.25 GG = 1/4 = 0.25  So for a., the probability of G I get it just by summing p(B,G) + p(G,B) = 0.5 And for b. p(G|B) = p(G,B)/p(B) = 0.5/0.5 = 1 that is wrong but I'm not getting why.


An integer $k$ is a generator of the group $\mathbb{Z_n}$ if and only if $\gcd(k, n)=1$. So $\langle k\rangle=\mathbb{Z_n}$ iff $\gcd(k,n) = 1$. Is there any general way to prove this? I see that it's so obvious but can't find a general way to prove it.

Let $\langle g\rangle$ be a cyclic group of order $n$. Suppose $1\leq q \leq n-1$, I want to show that $g^q$ generates $\langle g\rangle$ if and only if $\gcd(n,q)=1$.  Suppose $g^q$ generates $\langle g\rangle$, then   $$ 1,g^q,g^{2q},...,g^{(n-1)q} $$  are all distinct and $g^{nq}=1$, since $n$ is the order of the group. Note that this is the lowest multiple of $q$ for which this is the case. Therefore $\operatorname{lcm}(q,n)=qn$ and it follows that $q$ and $n$ are coprime.  On the other hand, if $\gcd(q,n)=1$, then $\operatorname{lcm}(q,n)=qn$, we have $g^{nq}=1$ and hence all of  $$ 1,g^q,g^{2q},...,g^{(n-1)q} $$  are distinct again and $g^q$ is a generator.  Is my proof correct at all and is there maybe a more elegant argument?


I'm generating a random string using:  private String generateSafeToken() {     SecureRandom random = new SecureRandom();     byte bytes[] = new byte[512];     random.nextBytes(bytes);     return bytes.toString(); }   This gives a string of length 11 such as [B@70ffc557. How can I make this above method return a string of a specified length. For example 20 characters?

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


Before question, my question article may have some incorrect content. I am a linux newbie and a newbie developer.   I have a question regarding linux tcpdump source code. As I know tcpdump is implemented using libpcap.   How tcpdump is work? My opinion is that since tcpdump binary executable file is set in PATH. right? My main question is that where is tcpdump c source code? I already knew tcpdump library code which is accessible tcpdump homepage       I want to see tcpdump real c code containing main function, variable header files. Please let me know the location.    I use Ubuntu 16.04 LTS.

I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them?   I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications?  In this case specifically, I am referring to the hellanzb package


I've heard that consuming sugars can induce many different health problems. I wouldn't really mind excluding them from my diet, but would it be safe? Or do we have a minimum sugar requirement?

What effects would removing sugars from a balanced diet have on an otherwise healthy person have? I've heard that both refined and natural sugars can have a negative impact in the body. Is it safe to stop consuming sugars all together?


I'm trying to import a GDB folder, downloaded from  into QGIS 3.8 but I get an errormessage that data source is invalid. I have tested with QGIS on MacOS and also on OpenSuse. I have also tried to use ogr2ogr to get shape files. But also here I failed. Unfortunately, I cannot find out whether this file is corrupt or what are the problems to impede the working with these data.

I'm working on a tool that converts raster layers to arrays for processing with NumPy, and ideally I would like to be able to work with rasters that come packaged in a .gdb without exporting them all (especially if this requires engaging ArcGIS or ArcPy).  Is this possible with the OpenFileGDB driver?   From what I can tell this driver seems to treat raster layers the same as vector layers, which gives you access to some data about the layer but doesn't give you the ReadAsArray functionality.


I'm looking for the title and author of a short story I read sometime between the late '70s and the '80s. It's about a young couple who are curious about a neighbor with a peculiar behavior. I don't recall the specifics of this behavior. But the neighbor ends up being an alien that is appraising the Earth as a work of art. Before leaving, the alien notes that the Earth is not a particularly inspired piece. But it is not completely worthless either and, hence, it will be spared destruction. One of the positives is the way living creatures get their energy (eating).

I read a collection of Sci-Fi short stories back in the 1970's or early 80's that had one about a couple in love who kept losing each other. The book was my dad's so the story itself could be much older than that. I am very fuzzy on the details as I was young when I read it and it was so long ago. I believe the woman/girlfriend was "taken" (by some bad guy aliens??) while she was sleeping. I think it involved time travel and the man had to search through time to find her. After he found her, when he was asleep one time, he somehow was then "taken" and I think transported through time and had to fight his way back to her again. He may have been some sort of police officer. I just remember in the end, at night when they went to bed, the couple always wore handcuffs so they were never separated when they went to sleep ever again. Does this ring a bell with anyone?  (There is a possibility it is in a short story collection that also contained " The Twonky " by Lewis Padgett (1942), as I remember reading that story around the same time)


I burned a live USB of Ubuntu on a flash drive nad I used it to install to a different flash drive which does not work fine.   Specifically, the one it's installed on is 16GB and the boot goes a little like this: I boot the computer, I get to the log in screen, I log in, and after that it goes black displaying the following errors:    Basically, I get multiple lines saying:  EXT4-fs error (device sda1): ext4_find_entry:[number]   What's going on? How do I fix this? I use an Asus CM5571.

I installed ubuntu and after a fresh restart the sysyem goes to halt.  It shows following error in the virtual terminal   [484.269470] EXT4-fs error (device sda1): ext4_find_entry:1309: inode #2093097: comm dconf-service: reading directory lblock 0


{'19': 3, '18': 7}   If I have a list like above, how do I find the max value and then print the key, value pair like:  (['18'], 7)

I have a dictionary: keys are strings, values are integers.  Example:   stats = {'a':1000, 'b':3000, 'c': 100}   I'd like to get 'b' as an answer, since it's the key with a higher value.  I did the following, using an intermediate list with reversed key-value tuples:  inverse = [(value, key) for key, value in stats.items()] print max(inverse)[1]   Is that one the better (or even more elegant) approach?


i have a samsung galaxy 3 and I dropped it and it cracked which has been fine. Just lately the top left corner has been turning blue and is spreading to the right side and lower what is it and what should i do?

My phone screen is gradually becoming dark blue and then black--see photo. Started with a single light blueish edge, and growing during the last hours to what can be seen on photo.    The only serious reason that I could think of is that the phone has recently overheated while charging: it stayed for several hours under the pillow, and it was very hot when I took it away from there. Another guess is a recent drop on the floor, but in its 2-years lifetime it dropped dozens of time, frequently much harder than today.  What could be the reason, and how it can be fixed, ideally DIY or at all?  It's Samsung Galaxy S II GT-I9100.


I have arranged a tourist visa of U.A.E. with 60 days validity and I can stay there up to 39 days as stated by the visa agent. I should leave at the 40th day.  Is it true if yes then how can i confirm it before travelling?

I'm an Indian and my brother has been working in Sharjah around ten years. It is the first time I'm travelling abroad. He arranged me a tourist visa of 60 days validity and I can stay there up to 39 days (as stated by the visa agent). I should leave on the 40th day.   But in India my travel ticket agent said that I can stay there up to 29 days and I should leave on the 30th day.  I have added my visa image below.   Could someone please clear up the confusion for me?


I currently have a Samsung NX3000 camera and a pretty decent macro lens for it. The problem is, I intend to upgrade my camera some day, but it would have to be a camera of a different brand as Samsung doesn't make NX cameras any more. However, I don't want to get a new macro lens as the current one was quite expensive. Is there any adapter / other way that I could mount my current lens on a camera of a different brand? Auto focus functionality isn't strictly necessary.

I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two.


MY screen of Micromax Yureka is broken and I can't see anything, Plus my usb debugging is off. Is there any way to recover data?

I dropped my Samsung S3. Now I cannot see anything, just a white screen with purple, black, and green lines. Before it blanked out, it wasn't recognizing my finger touch. Any idea on how or what to repair? I want to save my phone so I can backup all my data.   Screen has a small crack on the lower right part of the screen:     the colors are all messed up can't press anything can be turned on and can hear the starting sound can still receive calls and text USB debugging WAS NOT ENABLED


I have a GTX 980Ti and I'm looking for a lower end card to pair it with (like 1660 or 1070). Is this possible and what kind of AMD motherboard do you suggest for this?

I have a GTX 1060 6GB in my current build, and I also have a GTX 960 2GB in storage. I was wondering if I got , and got both of my GPUs in one build (not SLI or CrossFire, just in the same system) would I be able to use both GPUs for rendering simultaneously? I don't care if this means having them both render separate tiles in one instance of Blender, or rendering separate frames in two instances. I'm using Cycles for everything I do.


At present I'm having to do something like this to build a Type definition at runtime to pass to my IOC to resolve. Simplified:  Type t = Type.GetType( "System.Collections.Generic.List`1[[ConsoleApplication2.Program+Person");   I know the generic type argument at runtime only.   Is there something that will allow me to do something like this (fake code):  Type t = Type.GetTypeWithGenericTypeArguments(     typeof(List)     , passInType.GetType());   Or shall I just stick to my hack, passInType.GetType() convert to string, build generic type string.. feel dirty

I want to get the method System.Linq.Queryable.OrderyBy<T, TKey>(the IQueryable<T> source, Expression<Func<T,TKey>> keySelector) method, but I keep coming up with nulls.  var type = typeof(T); var propertyInfo = type.GetProperty(group.PropertyName); var propertyType = propertyInfo.PropertyType;  var sorterType = typeof(Func<,>).MakeGenericType(type, propertyType); var expressionType = typeof(Expression<>).MakeGenericType(sorterType);  var queryType = typeof(IQueryable<T>);  var orderBy = typeof(System.Linq.Queryable).GetMethod("OrderBy", new[] { queryType, expressionType }); /// is always null.   Does anyone have any insight? I would prefer to not loop through the GetMethods result.


How can I route my IP through another country? For example, right now I am in France, and I would like an IP to access URL's through a US IP.

I need to view the Google music, but that is restricted in our country. Can I access it using any other fake IP address or how to view that?


I've figured out the x potion riddle, but despite killing myself on numerous occasions I cannot see a use in it, because I get no drops. Am I doing something wrong, or is killing myself really not going to get me anywhere in life?

When I use the X Potion from any level, I get teleported to an area where I fight myself. But, I can't seem to win!  Whenever I try to heal, the other me heals as well, so I keep dying before I can kill myself! How can I win?


Basically I am changing layout ratios. I have to change current layout ratio to another ratio. There is a code snippet I am using in my application. import java.util.*; public class Big{   public static void main(String args[]){ float b=(new Scanner(System.in)).nextFloat(); float a=(b*((float)225/440));  //Another layout ratio height System.out.println(a);  //Back to previous layout height float c=(a*((float)440/225)); System.out.println(c);    }  }  Below are some input and their respected outputs: On input value- 50,60.0,65 and 69.9999, Code is returning same outputs-50,60.0,65 and 69.9999 respectively. But when I am trying to put 70 and 80, Code is returning approximate values as 69.99999 and 79.99999 respectively. The question is- Why am I getting these approximate value not exact values in case of 70 and 80. There can be some other cases. I am trying to get exact values in all the cases.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I don’t remember much about it but it was like a system where the children all inherit their powers from their parents. They were all guardians and had a special animal/dinosaur as a pet that determined their powers.  One was a guy who I think had rocks/lava power. He had dark hair. He eventually turned sort of evil at the end because he believed he was a monster due to permanently merging with his “animal” and couldn’t switch back to human form. One was a girl that was ice power had white hair and wore blue. Her “animal” was a flying tiny dinosaur The others were a brother and sister, the sister couldn’t walk so the brother always worried about her but she was super strong I think.

Can you please help me find this animated show? There is a four member team with two boys and two girls. The boys can summon, with their stones, a rock golem (black wearing summoner) and a robot (orange wearing summoner). The two girls can summon something like a dragonfly (green wearing summoner, little girl) and the blue girl, I don't remember what she can summon.  I don't know where the animated show comes from.  By throwing the stone, they activate the stone's power. Each stone has different characters on it. When you don't match them correctly, you get a rebound effect.


I read somewhere that   $$ \int_{0}^{\infty} \frac{x^3}{e^{x} - 1} = \frac{\pi^4}{15}$$  Does anyone see a way to prove this? My first idea was doing a contour integration and use the residue theorem, but that seems to be a lot of work so if anyone has a better idea I'd be glad to hear it.

In a certain list of exercises, contained the question     $$\int_{0}^{\infty}{\left(x^3\cdot(e^x-1)^{-1} \right)}dx$$   How do you solve?


How to show, that for every continuous $f:  X\rightarrow X$ there exists $x \in X$, such that $f(x) = x$, where X is a real projective plane $\mathbb{R}P^2$.  In other words: every continuous map of RPP to itself has a fixed point.   EDIT  Probably it's easier to proof, that existence of fixed point in map from $S^2$ to itself implies needed fact.

Let $f:S^{2n} \rightarrow S^{2n}$ be a continuous map. Show that          there exists $x \in S^{2n}$, such that $f(x) =x$ or $f(x) = -x$;   any continous map $g: \mathbb R P^{2n} \rightarrow \mathbb RP^{2n}$ has a fixed point;      I think 1 implies 2. So, how can I find an $x$ in 1?  Thanks for the help.


I am trying to get wireless Internet on this dell latitude D430.  What can I do?

As stated above, I can't connect to my home wi-fi with natty but can with Windows 7. The strange thing is I that I have gotten it to connect to other password protected networks with natty, it's just mine that it dosn't like.   I am using a WPA2 pass-code with AES Encryption and all other devises work fine on my network. Laptop used is a Dell Latitude D430.


Can anyone give me an example when an inner class is used. I started with wrapper class and found inner class is used in that but as i am all new to this i was thinking if anyone can give me an simpler example for inner class use so I understand why its used and why it helps in situations .  Thanks

I've read in the  and the  the mention of inner classes. What is their purpose?  I see in the Apex Workbook that they used private variables and setter/getter methods in the inner class, but why didn't they just do that in the outer class with a constructer, getter, and setter?


I did all the steps  DEPENDENCY AND CONFLICT RESOLUTION Running 'sudo apt-get install --assume-yes gtk2-engines-pixbuf' Please wait, this may take several minutes... Running 'sudo apt-get install --assume-yes python-pyqt5' Please wait, this may take several minutes... error: Command failed. Re-try #1... Running 'sudo apt-get install --assume-yes python-pyqt5' Please wait, this may take several minutes... error: Command failed. Re-try #2... Running 'sudo apt-get install --assume-yes python-pyqt5' Please wait, this may take several minutes... error: Command failed. Re-try #3... Running 'sudo apt-get install --assume-yes python-pyqt5' Please wait, this may take several minutes... error: Package install command failed with error code 100 Would you like to retry installing the missing package(s) (y=yes*, n=no, q=quit) ? y Running 'sudo apt-get install --assume-yes python-pyqt5' Please wait, this may take several minutes... error: Package install command failed with error code 100 Would you like to retry installing the missing package(s) (y=yes*, n=no, q=quit) ? y Running 'sudo apt-get install --assume-yes python-pyqt5' Please wait, this may take several minutes... error: Package install command failed with error code 100 Would you like to retry installing the missing package(s) (y=yes*, n=no, q=quit) ? n warning: Some HPLIP functionality might not function due to missing package(s). Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5' Please wait, this may take several minutes... error: Command failed. Re-try #1... Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5' Please wait, this may take several minutes... error: Command failed. Re-try #2... Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5' Please wait, this may take several minutes... error: Command failed. Re-try #3... Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5' Please wait, this may take several minutes... error: Package install command failed with error code 100 Would you like to retry installing the missing package(s) (y=yes*, n=no, q=quit) ?     I am very new to Ubuntu less then 6 months  and I need to print for school from chrome

Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner?


A friend of mine is a journalist, and I want to praise his new article by saying that it's not "a lot of words with a little sense", but the opposite. The ideas are solid, the wordings are precise, there are no excessive words, and there are no words or phrases that are trying to look smarter than they are. It's like an idealized Spartan warrior.

Is there a single ᴀᴅᴊᴇᴄᴛɪᴠᴇ to denote short, sweet, to the point?    I am thinking of  but I'm not sure that it connotes elegance/brevity, which is an important aspect of the meaning I would like to convey.


is it possible to have more than one ELSE in the CASE WHEN statement in the Expression builder in QGIS?  For example:  CASE WHEN "population" > 5000 THEN 'big' ELIF WHEN "population" > 1500 THEN 'medium' ELSE 'small' END   I know that this piece of code is totally wrong, but I'm not able to find an equivalent of ELIF..  Some ideas? Am I looking at the problem in the wrong way?!

I am trying to write an ELSEIF conditional statement in QGIS Field Calculator (version 1.8.0). I have used an example I found online:  CASE WHEN val < 0 THEN 'negative'   WHEN val = 0 THEN "neutral'   ELSE 'positive' END   I modified the statement as follows:  CASE WHEN  "GRID_ID"  = 1 THEN 'complete'   ELSEIF  "GRID_ID"  = 2 THEN "in progress'   ELSE 'not started' END   This statement would not run, the Output preview stated Expression is invalid.  The more info stated: Parser Error: syntax error, unexpected COLUMN_REF, expecting WHEN or ELSE or END  If anyone has had this error, what did you do to fix it?


Put our bracelet on and don't let those numbers trouble you any more!   Is this correct? I am not sure about using the phrasal verb put on together, or separated by a noun :)  And in the second part of sentence, is those used correctly?

Another murky subject arose today:  Would like to know, which one is appropriate:     I am unable to attend the mandatory meeting; I will make up some excuse.    Or:      I am unable to attend the mandatory meeting; I will make some excuse up.


Could you please help me with how to convert the string value '6/4/2020' to date?  My CSV file's timestamp column also comes in different string values, such as   4/6/2013  12/20/2019  1/17/2020.

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.


Script  $.getJSON("data.php", function(data) {     var items = [];     $.each(data, function(i, val) {         $("#" + i).html("" + val + "");     }); }); $('.hov').click(function() {     alert("Handler for .click() called."); });   data.php is :  {     "one": "yahoo",     "two": "gooogl",     "three": "bing",     "four": "ebay",     "five": "ask",     "six": "gmail",     "seven": "alexa",     "eight": "example",     "nine": "ymail" }

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 create a fiddle here:   How can I get the four white boxes which is contained within a ul to be horizontally centered within the red bar? I've tried many things to footer #social ul I just cannot figure it out. I have ready through the many posts on this topic and have tried many things which have been suggested before, none which I can get to work on my particular issue. What am I missing?     footer {   width: 100%;   position: relative;   background-color: #C5C5C5;   display: block;   overflow: hidden; }  footer section#footer-content {   max-width: 1440px;   min-height: 50px;   margin: 30px auto;   padding: 0 .694444%;   /* 10px / 1440px */   position: relative;   display: block;   overflow: hidden; }  footer #social {   height: 30px;   margin: 0 auto;   background-color: red;   width: 600px;   position: relative; }  footer #social ul {   list-style: none;   width: 100%;   margin: 0 50%; }  footer #social li {   float: left;   margin: 0 .3em;   position: relative;   display: block;   width: 30px;   height: 30px;   overflow: hidden; }  footer #social a {   text-decoration: none;   color: #CC7D29;   background: #ffffff;   display: block;   text-align: center;   height: 30px; }

How can I horizontally center a
 within another
 using CSS?

Foo foo


For the command:  apt-cache show google-chrome-stable   I get:  Package: google-chrome-stable Version: 7.0.517.44-r64615 Architecture: i386 Maintainer: Chrome Linux Team <chrome-linux-packager@google.com> Installed-Size: 76076 Pre-Depends: dpkg (>= 1.14.0) Depends: ca-certificates, libasound2, libatk1.0-0 (>= 1.13.2), libbz2-1.0, libc6 (>= 2.6-1), libcairo2 (>= 1.4.0), libfontconfig1 (>= 2.4.0), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:4.2.1), libgconf2-4, libglib2.0-0 (>= 2.14.0), libgtk2.0-0 (>= 2.12.0), libjpeg62, libnspr4-0d (>= 4.7.1), libnss3-1d (>= 3.12.3), libpango1.0-0 (>= 1.18.3), libpng12-0, libstdc++6 (>= 4.2.1), libxslt1.1, libxss1, lsb-base (>= 3.2), wget, xdg-utils (>= 1.0.1), zlib1g (>= 1:1.2.3.3.dfsg-1) Conflicts: google-chrome Replaces: google-chrome Provides: google-chrome Priority: optional Section: net Filename: pool/main/g/google-chrome-stable/google-chrome-stable_7.0.517.44-r64615_i386.deb Size: 21896322 SHA1: 2a09d457180a77a6d1472f24562feb43c2184cf5 MD5sum: eff030c9ebee87eb3abff1ce95f65796 Description: The web browser from Google  Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.  Package: google-chrome-stable Status: install ok unpacked Priority: optional Section: web Installed-Size: 108380 Maintainer: Chrome Linux Team <chromium-dev@chromium.org> Architecture: i386 Version: 17.0.963.83-r127885 Replaces: google-chrome Provides: google-chrome, www-browser Depends: libasound2 (>> 1.0.22), libbz2-1.0, libc6 (>= 2.11), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.2.14), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.3.9), libgcc1 (>= 1:4.1.1), libgconf2-4 (>= 2.27.0), libgcrypt11 (>= 1.4.2), libglib2.0-0 (>= 2.18.0), libgtk2.0-0 (>= 2.18.0), libnspr4-0d (>= 4.7.3-0ubuntu1~) | libnspr4 (>= 4.8.7-0ubuntu1), libnss3-1d (>= 3.12.3), libpango1.0-0 (>= 1.20.0), libpng12-0 (>= 1.2.13-4), libstdc++6 (>= 4.4.0), libx11-6 (>= 0), libxext6 (>= 0), libxfixes3 (>= 1:4.0.1), libxrender1, libxss1, zlib1g (>= 1:1.2.3.3.dfsg), ca-certificates, libcurl3, libatk1.0-0 (>= 1.30.0), lsb-base (>= 3.2), xdg-utils (>= 1.0.2), wget Pre-Depends: dpkg (>= 1.14.0) Conflicts: google-chrome Description: The web browser from Google  Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

How do you install Google Chrome on Ubuntu?


I have an employee table which has index on name. I want to understand how Oracle works at high level   My understanding based on resources mentioned below:-  DB constructs the index table/map where it will keep the name in sorted fashion with memory location as the value.  Question :-   My question is will oracle bring all index table/map entries in memory from disc and then do the binary search  or is it the search at disc level without bringing all index table records in memory? If I compare this approach with Java based data structures, Oracle is maintaining the TreeMap of column where key is employee name and value is memory location of that entry. So to find any entry, look up time will be log(n). My question why not DB/oracle takes hash based approach where it keeps the hashtable where it calculate the memory location based on name value and put the entry there. So lookup time to find entry will be O(1) .   Resources I referred

This question only needs one answer: a list of great resources for getting started with Oracle, including Database Administration, PL/SQL and SQL.   You may find your question has been closed as a duplicate of this one, if so, please don't be offended: we are trying to be as helpful as we can without . Closing a question as a duplicate of this one is us saying "What you really need is to spend some time reading some of the best resources available rather than have your specific question answered right now. If you do get through these resources, you'll soon be back with more !


I know I'm not eligible to vote in the election at The Workplace. But it stuck me as odd that I wasn't warned about that when I tried to do so. Well, it turned out I was wrong, but the banner was placed rather unlucky for mobile devices:  Can we place the banner closer to the voting buttons, at least on small screen widths such as mobile devices.

Clicking on one of the buttons in  election, I saw this notice pop up:  But it showed way down here!  If my scrollbar had been any farther up the page, I wouldn't have seen that.  Can we make the notice pop out next to the button, to avoid mistakes like this?  I also don't know why this would be by design; the "voting on comments on deleted posts" notice doesn't popup near the answer icon, for instance. Or, make it like the Vote Down privilege dropdown:


I've tried to put two effect strips in the video strip, but it's only working the effect strips that stays on top. How can I make the two effects work at the same time?

I noticed that adding a second Effect Strip to a video sequence negates the effect of the former Effect Strip, eg. adding by Speed, the result does not include the Transform effect.   What is the reasoning behind such behavior? Is there any workaround other than rendering the sequence with one effect and then re-rendering is with another effect etc? That would be very cumbersome.


Please make the proof as simple as possible; I'm still a beginner. Or rather, it's fine if you make it complex, but try to explain it using layman's language.

I've noticed something while trying to prove the properties of parallel lines, and the properties that a triangle has 180 degrees. To prove the properties of parallel lines, such as alternate angles, you need to use the property that a triangle has 180 degrees. To prove a triangle has 180 degrees however, you need to use the properties of parallel lines. This really bothers me because of how circular it is. They are both reliant on each other to be true, and do not logically show, without being reliant on each other, why triangles have 180 degrees, and why parallel line properties are true.   So what I hoping for here is a way to prove parallel line properties without using the fact that a triangle has 180 degrees, or a way to prove triangles have 180 degrees without using parallel line properties. This way, things will be logical to me, and make sense.   Thanks in advance.


Referring  answer, I tried to evaluate $\int_0^\infty\frac{\sin x}{x}dx$ by using contour integral $\int_C\frac{e^{iz}-1}{z}dz$ where $C$ is a upper half circle of radius $R$ centered at $0$. By Cauchy theorem, $$0=\int_C\frac{e^{iz}-1}{z}dz = \int_{-R}^R\frac{e^{ix}-1}{x}dx-\pi i+\int_0^\pi e^{-R\sin\theta}\operatorname{exp}(iR\cos\theta)d\theta$$ and the second summand $\to 0$ as $R\to \infty$. From this, I think we conclude $$\pi i = \int_{-\infty}^\infty \frac{e^{ix}-1}{x}dx$$ but how can I conclude $\int_0^\infty\frac{\sin x}{x}dx = \frac{\pi}{2}$?

I need to calculate    $$I_0=\int_{-\infty}^\infty\frac{e^{ix}}{x}dx=\lim_{R\rightarrow\infty}\int_{-R}^R\frac{e^{ix}}{x}dx=\lim_{R\rightarrow 0}(\lim_{\varepsilon\rightarrow 0}(\int_{-R}^\varepsilon\frac{e^{ix}}{x}dx+\int_{-\varepsilon}^R\frac{e^{ix}}{x}dx))=\lim_{R\rightarrow 0}(\lim_{\varepsilon\rightarrow 0}I(R,\varepsilon))$$   I have tried to close the contour of the complex integral on the complex plain. Let $C$ be the semicircle with radius R above the real axis and $\gamma$ be the semicircle under the real axis with radius $\varepsilon$, both centered at $O$. Let $L$ be the closed contour contained $C,[-R,-\varepsilon],\gamma,[\varepsilon,R]$. Denote the $+$ direction by the $+$ direction of $L$. Then we have:  $$\int_{L^+}\frac{e^{iz}}{z}dz=I(R,\varepsilon)+\int_{C^+}\frac{e^{iz}}{z}dz+\int_{\gamma^+}\frac{e^{iz}}{z}dz$$  By Cauchy Integral Formula we have $\int_{L^+}\frac{e^{iz}}{z}dz=2\pi i$ so  $$I(R,\varepsilon)=2\pi i-\int_{C^+}\frac{e^{iz}}{z}dz-\int_{\gamma^+}\frac{e^{iz}}{z}dz$$  Take $\varepsilon\rightarrow 0$ we have:  $$I(R,0)=\pi i-\int_{C^+}\frac{e^{iz}}{z}dz=\pi i-\int_0^{\pi}\frac{e^{iRe^{i\phi}}}{Re^{i\phi}}iRe^{i\phi}d\phi$$  $$=\pi i-i\int_0^\pi\exp(iR(\cos\phi+i\sin\phi))d\phi=\pi i-i\int_0^\pi e^{iR\cos\phi}e^{-R\sin\phi}d\phi$$  Now I must take the limit $R\rightarrow\infty$. I evaluate:  $$\left|\int_0^\pi e^{iR\cos\phi}e^{-R\sin\phi}d\phi\right|\le\int_0^\pi e^{-R\sin\phi}d\phi$$  Is there anything wrong in my argument so far? How can I proceed further?  EDIT1: Looking at it for quite long I think I can write  $$\int_0^\pi e^{-R\sin\phi}d\phi=2\int_0^{\pi/2} e^{-R\sin\phi}d\phi\le 2\int_0^{\pi/2} e^{-R\frac{\phi}{2}}d\phi=\frac{4}{R}(1-e^{-R\frac{\pi}{4}})\le\frac{4}{R}$$  So in the end take $R\rightarrow\infty$ we get $I_0=i\pi$. Is it true?


My sister hates being late for work. She likes to arrive __________ time.  I know the answer is "on". What about "in"? Can we also use it in this case?

I have an appointment at 8 and I arrive there at 7:55, is it "on time" or "in time"? What about "the nick of time"?


I installed IP Messenger (GNOME 2) from Ubuntu software center but its not working. It's always showing an error message on Ubuntu 12.04.  FileName:ipmsg.c Function:create_lock_file Line:157 Can not setup lock file:/tmp/g2ipmsg.lock errno : -11 (Resource temporarily unavailable)

Do anybody got success using IP Messenger in ubuntu 14.04 LTS ?  I'm getting error while launching ip-messenger.  FileName:ipmsg.c Function:create_lock_file Line:157 Can not setup lock file:/tmp/g2ipmsg.lock errno : -11 (Resource temporarily unavailable)   Well, I can see g2ipmsg process using ps command:  ravi@dell:~$ ps -e | grep "ipmsg" 9266 ? 00:02:33 g2ipmsg   That means, after process is running its just not showing in notification area, and so If i try to re-launch Ip Messenger from dock, its showing error because .lock file is already created at /tmp/g2ipmsg.lock by previous process and its being used.  I've tried many solutions from other questions I've mentioned, but none of them worked for IP Messenger yet.  I know, there something to do with gnome notification panel for allowing ip-messenger icon to appear behind system clock. I did something for skype in past and its working now. May be I need to do same for ip-messenger too but don't remember what solution I used for skype.  Any help would be appreciated.  Thank you!


I've spent too long thinking on this, so I apologies ahead of time.... but I'm just curious which to use when listing items or occupations.   For instance, I am a writer, anthropologist, and teacher.   I realize the first item makes sense, I am a writer... but what about the next item? Should it not be I am an anthropologist? How would I make this sentence/ list make sense? Or am I overthinking it?   Thank you ahead of time for the information and suggestions.

In the following example, is it appropriate to use a or an as the indefinite article, and why?     He ate __ green apple.   I know that in the case of just "apple", it would be "an apple," but I've heard conflicting answers for "green apple," where the noun is separated from the article by an adjective.  Also, which is more appropriate in this case:     He ate  __ enormous Pop-Tart.


I found the attached image on the website, .  How can I generate this nice image in latex? How can I generate it with specific values? based on an internal calculation?

I am trying to get these plots:    and    Code:  \documentclass{article} \usepackage{pgfplots} \begin{document}  \pgfmathdeclarefunction{gauss}{2}{%   \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}% }  \begin{tikzpicture} \begin{axis}[   no markers, domain=0:10, samples=100,   axis lines*=left, xlabel=$score$, ylabel=$freq$,   every axis y label/.style={at=(current axis.above origin),anchor=south},   every axis x label/.style={at=(current axis.right of origin),anchor=west},   height=5cm, width=12cm,   xtick=\empty,    ytick=\empty,   enlargelimits=false,    clip=false,    axis on top,   grid = major   ]   \addplot [fill=blue!50,very thick,cyan!40!black] {gauss(6.5,1)} \closedcycle;  \end{axis}  \end{tikzpicture} \end{document}   I would like some help to add the annotations and 2nd curves on each plots.  Thanks for your help and time.


Wifi signal is very low in ubuntu and if i connect it will automatically disconnects after a few minutes please help me to solve this problem.  $ lspci -knn | grep 0280 -A3 – 0d:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]      Subsystem: Hewlett-Packard Company Device [103c:804c]      Kernel driver in use: rtl8723be

I have searched through the internet and in AskUbuntu, but I could not find a working solution for my little problem.  The RTL8723ae WLAN is behaving strangely on Ubuntu 14.04 and drops the WLAN connection constantly. I am using the notebook MSI GE40 and have already seen on the web that there are other people having the same problem but there was no permanent solution. The problem did not exists on the original Windows 8 on the device and the router is a TP-Link, which I can control (channel change and so on, I use WPA2-PSK WLAN security).


I have the question:  $$1 + 8 + 27 + \dots + n^3 = \frac {n^2(n+1)^2}n$$  But doesn't this fail the base case? If we plug in a $1$ on both sides of the problem we get $1 = 4$. Which is not true. Does that mean we can't prove this further?  Any help would be extremely appreciated!

How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks


Some days ago in Reputation Tab of some users profile I saw some strange reputation changes like:  +1 Upvote:   +3 Upvote:   For upvotes usually one will get +10. If they get down-votes it's also included in the reputation tab. But what is this +1 upvote and +3 upvote? Is that a bug?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


if i write 4 charcters to a file its size is 4 bytes but what about the title and the meta data like my pc and stuff where are they stored?

(I'm using Windows XP but I guess it's similar in all the recent versions of Windows.)  When you create for example a new empty text document, you'll find in its properties that it has size of 0 bytes. Zero bytes means no information. No data. But still, the file has some name, it can still carry the dates of last access, modification and creation. It carries the information whether it's hidden file or not, whether it's read-only or not...  So where are all the metadata stored?


I have always used autoIt for windows for this but i need to do it on ubuntu or centOS now. Basicly what i want is to send an mouseclick or button after an randomized time example:  ~  HotKeySet("{ESC}", "Terminate") ; hotkey for stopping script  While 1  Sleep(Random(120000, 180000)) ;waits random between 2 and 3 minutes before sending a left mouse click   MouseClick("Left")  Sleep(Random(60000, 120000)) ; wait random between 1 and 2 minutes to send O  Send("O")  Sleep(Random(10000, 20000)) ; waits random between 10 and 20 seconds to send a left mouse click  MouseClick("Left") WEnd  Func Terminate()  Exit EndFunc   ~  is there an program wich can do this? i have looked around but i couldn't find something i can understand. Thanks in advance

I want to click on something for hours. How can I make a script or use an application so the mouse will auto-click every 5 seconds or less?


I was studying for the OCA exam and I found a conflicting point while  solving topics about Java exceptions. Here is the code causing my confusion:  public class StringOps {     public static void main(String[] args) {         System.out.print("a");         try {             System.out.print("b");             throw new IllegalArgumentException();         } catch (IllegalArgumentException e) {             System.out.print("c");             throw new RuntimeException("1");         } catch (RuntimeException e) {             System.out.print("d");             throw new RuntimeException("2");         } finally {             System.out.print("e");             throw new RuntimeException("3");         }     } }   This code outputs:  a-> b -> c -> e.   But I don't understand why? I thought it would output:   a-> b -> c -> d -> e.   Any help would be greatly appreciated!

This may seem like a programming 101 question and I had thought I knew the answer but now find myself needing to double check. In this piece of code below, will the exception thrown in the first catch block then be caught by the general Exception catch block below?  try {   // Do something } catch(IOException e) {   throw new ApplicationException("Problem connecting to server"); } catch(Exception e) {   // Will the ApplicationException be caught here? }   I always thought the answer would be no, but now I have some odd behaviour that could be caused by this. The answer is probably the same for most languages but I'm working in Java.


Hi I am trying to loop through an arraylist but get an error message. So my very specific question is, where am I doing something wrong?  Error message:     Exception in thread "main" java.util.ConcurrentModificationException     at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)     at java.util.ArrayList$Itr.next(ArrayList.java:851)     at main.numberOfNeighbours(main.java:130)     at main.calculateNextGen(main.java:95)     at main.main(main.java:30)   Code:  public static int numberOfNeighbours(boolean[][] arena, int x, int y){     //Calculates a given cells number of neighbours.      int height = arena[0].length;     int width = arena.length;      ArrayList<int[]> cors = new ArrayList<int[]>();     for(int i = -1; i < 2; i++){         for(int e = -1; e < 2; e++){             int[] xy = {x+i, y+e};             cors.add(xy);         }     }  //This is where I get the error     for(int[] xy : cors){         //Exclude cors that are out of range or the cell itself.         if(xy[0] == -1 || xy[1] == -1 || xy[0] == width || xy[0] == height || (xy[0] == x && xy[1] == y)){             int index = cors.indexOf(xy);             cors.remove(index);         }     }      int neighbours = 0;     for(int[] xy : cors){         if(arena[xy[0]][xy[1]]){             neighbours++;         }     }      return neighbours; }   I have been googling but can't find a solution. I think my main problem is that I don't understand the error message so any help explaining that would be great.

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I have a Microsoft wireless mouse and it has a scrolling issue in Ubuntu. The scrolling is too sensitive. I've read in other threads that the solution to this is unplugging the USB receiver of the mouse and then plugging it back. This indeed works but is a very uncomfortable solutions.  My question is: Is there a script I could run on startup to unmount the USB and mount it back, and if so how would I do something like that?  Thanks in advance!

Is it possible to reset the connection of a USB device, without physically disconnecting/connecting from the PC?   Specifically, my device is a digital camera. I'm using gphoto2, but lately I get "device read errors", so I'd like to try to do a software-reset of the connection.   From what I can tell, there are no kernel modules being loaded for the camera. The only one that looks related is usbhid.


I was wondering was __ main__ does in Python. Also, is there a difference between __ main__ and __ name__? If so what is the difference? Thanks!

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


If a step-grandfather is the step-father of your father, what would the father of your step-father be? What about the step-father of your step-father?

Here at the Genealogy and Family History Stack Exchange we see many questions about relationship mapping which is also known as:   relationship calculation kinship terminology etc   If you are just trying to understand how to calculate "cousins and removes" then  provides an excellent guide.  However, if you are seeking an English term for a more complicated relationship between two members of an extended family, rather than asking a question like:          site users are encouraged to first review the answers below.    Note: This Q&A arises from  and is set to  to help make it canonical.


I have a text string in which I'd like to replace a pattern that occurs multiple times with a tag, like this:  <?php $str = 'A *word* is a *word*, and this is another *word*.'; preg_replace('/\*([^$]+)\*/', '<b>$1</b>', $str); ?>   However, the function is replacing the whole range from the first asterisk to the last asterisk, i.e. it doesn't separately enclose each pattern with the tag, which is what I'm trying to accomplish.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I'm Polish-Canadian, living in Canada. I'm planning to travel to Australia for 6 weeks and I'm about to apply for a visitor visa. I found out holders of Polish passports are not required to pay the visa fee. Here is my question: I need to enter the US using my Canadian passport, as I don't have a visa on the Polish one. Then I'm planning to use my Polish passport to enter Australia. I have no idea which passport to show when leaving the USA.  If I show the Canadian one, they will ask for the Australian visa. If I show my Polish one they will ask me how I got in, since there is no record of me arriving into the USA. Do you have any clues what I should do?

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


I just purchased a root server from a web hosting provider, where I installed Ubuntu 18.04 LTS.   My server has an HDD of 320 GB SAS and 8 GB of RAM, and would host a Twitter-like web application. What size would you suggest for a swap file? Would a swap file as big as the amount of RAM be too much? A more than one year old  from Digital Ocean says that "Generally, an amount equal to or double the amount of RAM on your system is a good starting point. Another good rule of thumb is that anything over 4G of swap is probably unnecessary if you are just using it as a RAM fallback". Of course, 16 GB seem too much. What is your opinion?

I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM?


I created a Twig file for a field of a content type and made some changes in the Twig for that field. Now I want to reuse the same field  in different content type with the same Twig effect.   Is it possible if yes then how we can achieve that?

Drupal 7 you can style down to the fields on the page will we have this type of control with twig? I have reviewed a lot of documents about twig and didn't see anything that lets you have that same inheritance as the Drupal 7 template engine. If this is not built in to twig, is Drupal 8 going to be building it in?


I just learned on Wikipedia that the Baer-Specker group, that is, the group of all integer sequences, is not free abelian. I'm hoping I could be helped to understand why this is true by someone knowledgeable here. It interests me to contrast the uncountable but nonfree-abelian Baer-Specker group with the uncountable free abelian group generated by an uncountable set. Thanks. Although this question had been asked before, and got a good answer(but it didn't give mereal intuition for "why", at least not yet), I think this perhaps shouldn't be closed as a duplicate, because if more intuition were possible(maybe it's not) then this could be usefully continued. The reason I mentioned the uncountable free group generated by an uncountable set was because I thought comparisons and relationships with Baer-Specker could give intuition.

Why isn't an infinite direct product of copies of $\Bbb Z$ a free module?   Actually I was asked to show that it's not projective, but as $\Bbb{Z}$ is a PID, so it suffices to show it's not free.   I am stuck here. I saw some questions in SE, but there is no satisfactory answer at all.


enter code here   #include<stdio.h>  int main()  {      char i;        i='t','f','b','a';                                        printf("\ni = %c",i);      return 0;  }   in the above code when i assign value to i the first value(t) is assigned to the variable i but if i provide parenthesis around the values ie write i=('t','f','b','a') instead of the one written in the above code the last value ie 'a' gets assigned to the variable i. Can anyone please explain why this happens??


I have accepted the answer to this question by @dtanabe Here is my code  def abc(): pass x = abc class label:     def __init__(self,fnname):         self.lbl = fnname     def __repr__(self):         repr(self.lbl)     def __str__(self):         # how should this be defined?         # I have no objection if other class functions         # or variables need to be defined  u = label(x)   I would like print(u) to respond with abc (three characters) on the screen and print([u]) to respond with [abc] (five characters). In each of these two cases, I do not want to see on screen any single or double quote mark anywhere near the strings of length 3 or 5.  Of course, I would like the analogous behaviour for a function abcdefg, with print(u) giving rise to abcdefg on the screen and print([u]) giving rise to [abcdefg] on the screen.  Your answer is allowed to change the definition of the class, but it is not allowed to change anything outside the class definition.

In Python, how do I get a function name as a string, without calling the function?  def my_function():     pass  print get_function_name_as_string(my_function) # my_function is not in quotes   should output "my_function".  Is such function available in Python? If not, any ideas on how to implement get_function_name_as_string, in Python?


I have created the Bottom sheet dialogue model and its getting crash only in Oreo devices. Hereby I attached my code along with log error which throwing only in Oreo oriented devices. Kindly suggest some possible solutions solve this problem.   private void socialBottomMenu() {     // TODO Auto-generated method stub      sheet = new BottomSheet.Builder(Mica.this).sheet(             R.menu.create_account_bottom_sheet).show();      menu = sheet.getMenu();       for (int i = 0; i < menu.size(); i++) {         MenuItem item = menu.getItem(i);         SpannableString s = new SpannableString(item.getTitle());         s.setSpan(                 new ForegroundColorSpan(getResources().getColor(                         R.color.poptextcolor)), 0, s.length(), 0);         item.setTitle(s);     }     menu.getItem(0).setOnMenuItemClickListener(             new MenuItem.OnMenuItemClickListener() {                  @Override                 public boolean onMenuItemClick(MenuItem item) {                     // TODO Auto-generated method stub                       return true;                 }             });     menu.getItem(1).setOnMenuItemClickListener(             new MenuItem.OnMenuItemClickListener() {                  @Override                 public boolean onMenuItemClick(MenuItem item) {                     // TODO Auto-generated method stub                      return true;                 }             }); }   //Log error directed me here ActionMenuItem.java      @Override  public MenuItem setNumericShortcut(char numericChar, int numericModifiers) {       return null;  }   //Log error  java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setNumericShortcut(char, int)' on a null object reference     at android.view.MenuInflater$MenuState.setItem(MenuInflater.java:477)     at android.view.MenuInflater$MenuState.addItem(MenuInflater.java:541)     at android.view.MenuInflater.parseMenu(MenuInflater.java:193)     at android.view.MenuInflater.inflate(MenuInflater.java:114)     at com.paytronix.client.android.app.bottomsheet.BottomSheet$Builder.sheet(BottomSheet.java:704)

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'd like to cut extra spaces from "ps aux" output and replace them with one space. What I do is:  ps axu | sed 's/[ ]+/ /g'   But output seems to be unchanged, I still get too much spaces between tokens.  username    4876 ... <the rest of columns ommitted>   Why this regular expression doesn't match empty space between username and pid?

I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?


I have an Ubuntu system with a large project, many small projects, and (of course) loads of packages and libraries.  If I buy a new computer and want to replicate all of this, how do I do it?  I presume installing Ubuntu on the new machine and then copying the file tree from some point down will fail since the new machine will have it's own way of viewing things, understanding of how things are tied together, etc., and just replacing the new file tree starting with root with a copy from the old machine is an idiotic idea.

I am running an Ubuntu 14.04 LTS and I experienced some issues with my hard drive. I bought a new HDD of the same size (1TB), and I intend to move all my data (softs, work, pics, etc.) on the new HDD.  What is the easiest way to do that?


I am looking for books that are on general set theory. So open sets, closed sets, Boundarys complements etc. I sort of understand most of the logic but I would love to go deeper into it.

Though there are several posts discussing the reference books for topology, for example . But as far as I looked up to, all of them are for the purpose of learning topology or rather on introductory level.  I am wondering if there is a book or a set of books on topology like Rudin's analysis books, S.Lang's algebra, Halmos' measure (or to be more updated, Bogachev's measure theory), etc, serving as standard references.  Probably, such a book should hold characteristics such as being self-contained, covering the most of classical results, and other good properties you can name.  In the end, I only have the interest on general-topology (topological space, metrization, compactification...), and optionally differential topology (manifolds). So please don't divert into algebraic context.  Cheers.  ---------------------update-----------------------  Thanks for all the delightful replies. I will try to quickly check the books mentioned beneath. And I may accept the answer which is most closed to my personal flavor.  Sorry for others. It's a pity no multiple acceptance can be made for such a ref-request question.  Greetings.


I've a MacBook Pro and recently my hard drive kicked the bucket. I bought a new ssd drive and installed it in my MacBook.  Now I have to create a bootable usb to install latest MacOS. I've spare a windows pc. Researching, I found that I could use Transmac software to create one.  However, the official ".dmg" file of latest macos (i.e., high sierra) can't be downloaded from PC.  Is there a way to download this file from a PC?

My MBA 2012 with OS X 10.9.4 Mavericks won't boot anymore - it simply freezes after the initial jingle. I already tried resetting NVRAM and SMC, but to no avail. I don't have any time machine backups.  However, I still have a disc image of Mavericks sitting on an external hard drive, a USB stick and access to a notebook with Windows 7.   I haven't yet found any tutorial on how to create a bootable USB drive on Windows in order to reinstall OS X on my beloved Macbook Air.  Any help would be greatly appreciated!


Is there a way to blacklist sites containing specific keywords? like for example "porn, xxx.. sex". My cheap router can only block 5 specific domains but not sites containing some keywords.    Do you know a software (windows) which runs in the background and does not show any "SITE BLOCKED!" errors in the browser? It should not load the site at all or at least show only blank page.    It can also be a plugin for chrome. (I tried some already)

I have a WinXP PC that my children (4-14 years old) use but want to restrict some internet activity to prevent them from being exposed to some of the questionable and adult content that is available.  We have to PC in the living room so we can monitor them as much as possible but when unattended I want a second check.  What are my options and is there free software that works?


When I charge me cell phone or notebook or whatever what should I plug in first? Should I at first plug in usb charger  to the AC wall outlet and only then to the cell phone or vice versa ? What are the precise physical arguments for this?  I think it is safer to plug in wall outlet first because of peak charge. What is safer for the cell phone circuits?  Thanks in advance.

I asked this question on Physics StackExchange but was advised to ask it here. When I charge me cell phone or notebook or whatever device what should I plug in first? Should I at first plug in usb charger to the AC wall outlet and only then to the cell phone or vice versa? What are the precise physical arguments for this? And are there any differencies at all? I think it is safer to plug in wall outlet first because of peak charge. Can someone give me a technical explanation? Thanks in advance.


How to show $D_3\oplus D_4$ is not isomorphic to $D_{24}$?  Here $D_n$ is the dihedral group of order $2n$.  I am not sure how to prove this. I am not very good with the dihedreal groups.

We need to prove that $D_{3} \oplus D_{4}$ is not isomorphic to $D_{24}$ .  The way in which I approach such type of questions is to count the number of elements of order $x$ in one group and then in the other group, and then conclude that they aren't equal and hence there can't be any isomorphism between them.  But this approach here doesn't look easy, with $D_{24}$ involved.  Could anyone suggest another way of solving this ?


I am a bit confused about overriding vs. hiding a method in C#. Practical uses of each would also be appreciated, as well as an explanation for when one would use each.  I am confused about overriding - why do we override? What I have learnt so far is that by overring we can provide desired implementation to a method of a derived class, without changing the signature.  If I don't override the method of the superclass and I make changes to the method in the sub class, will that make changes to the super class method ?  I am also confused about the following - what does this demonstrate?  class A {     virtual m1()     {         console.writeline("Bye to all");     } }  class B : A {     override m1()     {         console.writeLine("Hi to all");     } }  class C {     A a = new A();     B b = new B();     a = b; (what is this)     a.m1(); // what this will print and why?      b = a; // what happens here? }

What's difference between shadowing and overriding a method in C#?