How could one write a script or programme that waits for a keypress and outputs its X-name (Return, BackSpace, etc.) including modifiers, in a format accepted by xdotool (eg. Control + Alt + b)?

I have an Asus laptop that has a special key that can be configured to launch any software (at least on Windows).        The general question is: how can I detect any key press (globally)?  Then, how can I detect when the user press this key?


This shirt is the cheaper of the two   I wonder why the comparison is cheaper and not cheapest. Aren't the sentence is referring to more than two items and so it should use -est? And cheaper will be used when comparing two items.

In his book section 176, 3rd ed., Swan says:     Elder brother/sister are used when a person has only one   brother/sister who is older; eldest is used when there are more. An   elder son/daughter is the older of  two; an eldest son/daughter is the   oldest of two or more.   That was not clear enough; I don't see that . Does that mean you can only use it if you have only one sister that is older than you (you don't have two or more sisters who are older than you ), or you can only use it when you talk about the youngest sister (out of two or more) that is older than you?


I'm a new user of LyX. I'm using it to write math lectures.  How can I make a new symbol from two existing ones? To be more precise, how can I create this:    It's a subset with a circle in it (\subset, \circ).

I'm trying to create symbols \opn for "open subset" and \cls "closed subset". I want them to look like this:      My current solution is:  \def\opn{\!\ensuremath{\subseteq\!\!\!\!\!\raisebox{1pt}{$\circ$}}\,}  \def\cls{\!\ensuremath{\subseteq\!\!\!\!\!\raisebox{1pt}{$\bullet$}}\,}   But the problem is when I use this, Latex doesn't treat \subseteq and \circ as a single symbol, so the spacing is incorrect when for example I write $U~\!\!\!\opn\!\!\!~X$:    How can I make the position of the circle be fixed in the middle, so that \opn becomes a single symbol that is resizable, i.e. responds well to \huge?  Edit: @egreg @MartinScharrer: When using your command (to define the stalk of a sheaf)   \mathcal{F}_x:=\frac{\bigsqcup\{\mathcal{F}(U);\, x\in U \opn X\}}{s\sim s'  \,\Longleftrightarrow\, s\in\mathcal{F}(U)\text{ and }s'\in\mathcal{F}(U')\text{ and } \exists x\in W \opn U\cap U'\!:s|_W=s'|_W}   I get ugly results, namely (egreg's solution)  and (Martin Scharrer's solution) .  Currently, I like this edited Martin's solution the most aesthetically appealing:  \def\opn{ \ensuremath{\mathrel{\subseteq \!\!\!\!\!\raisebox{1.63pt}{$\scriptstyle\circ$}}}}    %odprta podmnozica \def\opnn{\ensuremath{\mathrel{\subsetneq\!\!\!\!\!\raisebox{1.63pt}{$\scriptstyle\circ$}}}}    %prava odprta podmnozica \def\cls{ \ensuremath{\mathrel{\subseteq \!\!\!\!\!\raisebox{1.63pt}{$\scriptstyle\bullet$}}}}  %zaprta podmnozica \def\clsn{\ensuremath{\mathrel{\subsetneq\!\!\!\!\!\raisebox{1.63pt}{$\scriptstyle\bullet$}}}}  %prava zaprta podmnozica   but there is still a problem in the above code. Could anyone edit this last code to fix the problem with spacing?


In my custom control file:  namespace myApp {     public partial class MyStatusBar : Label {        public MyStatusBar () {           InitializeComponent ();           this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;           this.Dock = DockStyle.Bottom;       }        protected override void OnPaint (PaintEventArgs pe) {           base.OnPaint (pe);           pe.Graphics.DrawRectangle (new Pen (Color.Azure), ClientRectangle);                }     } }   In my form:  MyStatusBar mStatusBarLabel = new MyStatusBar ();  public MCADDrg() {      InitializeComponent ();       this.SetStyle (ControlStyles.OptimizedDoubleBuffer, true);      this.SetStyle (ControlStyles.AllPaintingInWmPaint, true);      this.SetStyle (ControlStyles.UserPaint, true);      this.SetStyle (ControlStyles.SupportsTransparentBackColor, false);      this.SetStyle (ControlStyles.Opaque, false);      this.SetStyle (ControlStyles.OptimizedDoubleBuffer, true);      this.SetStyle (ControlStyles.ResizeRedraw, true);       splitContainer1.Panel2.Controls.Add (mStatusBarLabel);         splitContainer1.Panel2.MouseMove += Panel2_MouseMove; }  void Panel2_MouseMove (object sender, MouseEventArgs e) {     if( splitContainer1.Panel2.ClientRectangle.Contains(e.Location))         mStatusBarLabel.Text = "X = " + e.X + " Y = " + e.Y;     } }     How can I get rid of this? I tried some other posts answer. But didn't work for me. Assume that (in fact) I'm a newbie.

I want to create a custom control in C#. But every time I have to fully redraw my control, it flickers, even if I use double buffering (drawing to an Image first, and blitting that).  How do I eliminate flicker when I have to fully redraw?


Does a 5v 3A / 2A power adapter work where a requirement is of 5v 4a/5A Kind of confused, please help

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I have a node ABC and using view where content is of type ABC. I have content title as a field in .  What is the way in which I can get a drop down for field content title in the filter criteria?

I want to create an exposed filter based on the title of a node. How do I do this? I would prefer this filter be a select list - that is, all of the node names are listed based on the criteria I list.  So let's say you have three titles for events:  A Trip to the Woods  Go to the Beach  Off to the Farm   I would like the exposed filter to be a select list of these three nodes.


I am getting the following error in the top menu bar:  An error occurred. Please run the Package Manager from the right-click menu or apt-get in a terminal to see what is wrong. The error message was:'Error:BrokenCount>0'. This usually means that your installed packages have unmet dependencies.     How do I solve this problem?

I have the message:   Error Broken count >0 Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Details: The following packages have unmet dependencies: firefox-globalmenu: Depends: firefox (= 19.0+build1-0ubuntu0.12.04.2) but 19.0+build1-0ubuntu0.12.04.1 is installed   Any suggestions?


states that you cannot know the position and the momentum of a particle at the same time (I believe this is the main idea behind it). And I have read in various places an example of that which goes something like this:  If you were to look at an electron under a microscope, you have to have a photon bouncing off of it and then travelling to your eye in order to see it. But this mere act of a photon hitting the electron changes its momentum so by the time you know about its position, the momentum is changed so you can't know them both at the same time.   But this seems like a physical problem to me. What if we could find out the position of an electron without ever interacting with it physically? Would the momentum then be unknown to us too?

From what I understand, the  states that there is a fundamental natural limit to how accurately we can measure velocity and momentum at the same time. It's not a limit on equipment but just a natural phenomenon.  However, isn't this just an observational limit? There is a definite velocity and momentum, we just don't know it. As in, we can only know so much about the universe, but the universe still has definite characteristics.  Considering this, how do a wide range of quantum mechanical phenomena work? For example, quantum tunneling - its based on the fact that the position of the object is indefinite. But the position is definite, we just don't know it definitely. Or the famous light slot experiment? The creation of more light slots due to uncertainty of the photon's positions?  What I am basically asking is why is a limit on the observer, affecting the phenomenon he is observing? Isn't that equivalent to saying  because we haven't seen Star X, it doesn't exist? It's limiting the definition of the universe to the limits of our observation!


So I was just wondering what the timeline for borderlands? Because I have borderlands 1,borderlands 2,borderlands the pre sequel,and tales from borderlands. So if you know please answer.

I recently just beat Borderlands 1. There are a couple more missions left, but now I'm left wondering which Borderlands is next?   I own Borderlands 2 but now the Pre-Sequel is out and apparently that is supposed to be set before Borderlands 2?   If that's the case, what is the canonical order to play the Borderlands series?


$3$ guys, each with $\$10$ a piece, go to a hotel hoping to get a room to stay in for the night. A room costs $\$60$. The men go in, and ask to rent a room, only having $\$30$ between them. The mater deen says he can give them a broom closet to sleep in for the night. One of the men asks if they can keep a few dollars to get coffee and breakfast in the morning. Mater deen says no, and has a bellboy take them to the closet. Downstairs, the mater deen feels bad, and gives the bell boy $\$5$ to give back to them. The bellboy pockets $2$ of the $5$, and gives each guy a dollar back. IF the men, then, spent $\$9$ each for the closet, and $3\times9 = 27$. The bell boy pocketed $2$, so $27+2=29$. what happened to the $30$th dollar?

I'm not sure how well known this "riddle" is but here it goes.  3 people go to a restaurant, each buy food worth 10.00.  When they're done, they give 30.00 to the waitress.  She gives the money to the manager, manager says they paid too much, gives 5.00 back to the waitress.  She comes back to the table, gives a dollar back to each person and then puts the remaining 2.00 in her pocket for tip.  So now, each person has paid 9.00.  9.00 x 3 = 27.00.  Plus the 2.00 in the waitresses pocket is 29.00.  What happened to the 30th dollar?  So what's the issue with this way of calculating (since if you backward it works fine), that doesn't give us the correct result?


I was curious about something. I have LUKS FDE on my Ubuntu installation and discovered that using snappy packages creates a snap loop partition. I'm not really sure why this was added or what it exactly is. Will this partition encrypt and decrypt with the rest of the HDD? Will snappy mess with my HDD encryption?

I just realized using gnome-disk-utility (3.18.3.1) that my 16.04 installation is featuring several small loop devices.  In detail:   78 MB Loop Device (/var/lib/snapd/sn_ntu-core_352.snap -> /dev/loop0) 76 MB Loop Device (/var/lib/snapd/sn_ntu-core_216.snap -> /dev/loop1) 79 MB Loop Device (/var/lib/snapd/sn_ntu-core_423.snap -> /dev/loop2) 705 KB Loop Device (/var/lib/snapd/snaps/tpad_12.snap -> /dev/loop3) 684 KB Loop Device (/var/lib/snapd/snaps/tpad_11.snap -> /dev/loop5) 705 KB Loop Device (/var/lib/snapd/snaps/tpad_13.snap -> /dev/loop6)   Image showing gnome-disk-utility    My questions are as follows:   What are those loop devices used for? Is that an expected behaviour in 16.04? Can  I remove them? And if so - how (just by unmounting)? Is there any risk in removing the 2 installed snaps mentioned below (tpad and ubuntu-core)   UPDATE  Installed snaps  According to snap list I do have   tpad (1.8.1) ubuntu-core (16.04.1)   installed. I remember I did tinker with snaps for a short time when  I realized this option - but am pretty unsure if  I  installed those 2 snaps - or if they are pre-/auto-installed.  tpad is a Terminal text editor with GUI-like user interface  I  did install manually, as  I don't use it  I removed it now via sudo snap remove tpad. As a result the 2 loop devices pointing to tpad are gone in gnome-disk-utility.  So - at the current point  I am still having 1 snap installed called ubuntu-core and I don't know what it is used for. The summary of this particular snap is   The ubuntu-core OS snap


It seems any program ran soon enough after sudo in the same terminal can run any sudo command it pleases.  Proof: Execute sudo ls in a terminal . Then run this program (compiled of course) in the same terminal:  #include <stdlib.h>  int main() {     system("sudo whoami");     return 0; }   It'll say root without asking for a password.  Isn't this a big security hole? Root and regular accounts are separated so that, apart from other things, malicious software can't run as root. Are users supposed to be careful what they execute before sudo times out?

Just installed a minimal ubuntu 12.04, then installed xfce4 and xinit from the command line after first boot.  Totally vanilla installation afaik.  I'm noticing that sudo caches the password until I issue sudo -k to clear it.  This is unexpected behavior in my mind.  I've run xfce4 before and don't recall credential caching being on, nor have I experienced it in the many previous ubuntu installs I've had over the years.  Is this a new feature of Ubuntu?  Is this something that's the result of the minimal install?  Is this an xfce default that's been added recently?


I have a weird situation with a file that sticked into my file system and apparently there is nothing I can do to remove it. There is a file in the Trash folder of my external hard drive, and it can not be deleted. Trying with mac "Empty Trash" it says the file is in use:  "The operation can’t be completed because the item “Funny Film” is in use."   I tried to remove the file/folders from command line:  $ pwd Volumes/My Book/.Trashes/501/Clip old/Funny Film  $ ls 000␀0000.␀P4  $ rm 000␀0000.␀P4 rm: 000␀0000.␀P4: No such file or directory  $ ls -i ls: 000␀0000.␀P4: No such file or directory  $ ls -l  ls: 000␀0000.␀P4: No such file or directory  $ stat ./000␀0000.␀P4 stat: ./000␀0000.␀P4: stat: No such file or directory   I had this problem for some time now. I have tried several different things without success. The external hard drive have been used over ftp, with Windows, Ubuntu and Mac operation systems. How it is possible that 'ls' finds the file while 'ls -l' failed? More importantly, how I can fix the situation and delete the file?

When I try to move, rename, or delete a file named ␀in Finder, I get this error message:     The operation can't be completed, because an unexpected error occured (error code -50).   With mv, rm or find -delete in Terminal   rm: /Library/␀: Invalid argument  mv: rename /Library/␀ to /tmp/␀: Invalid argument  find: -delete: unlink(/Library/␀): Invalid argument   Can I move or delete this file in Mac OS X or do I have to use another operating system?  I even tried creating a file with this name in /tmp and it has not gone away since 8 reboots.


I downloaded the java documentation to read on my phone but i can't use the html viewer on my phone because it cant use links.  When I tried using google chrome and going to the file location its not allowing chrome to access the location.  Does anyone know how to allow chrome to access the folder or know a folder that I could move the documents to?   It's the Zip file I'm using. Before someone says I could use the epub or mobi, they are missing some of the bits i want to read.  Im using an HTC M9 and the location im trying to access is file:///download/tutorial/tutorial.  Thanks for any help:)

There are  on this same topic, but I'm finding that on 4.0.4 with my HTC One, I can open file:/// URLs just fine with Firefox, but not with Chrome or the Android browser. Those two simply report a security error and show no content.  Is this something that changed since the 2.x era when it was apparently possible? (edit well I realize there was no Chrome for 2.x but ...)  edit — sorry; false alarm. It works fine.  All the visible directories on the phone - those you browse through with a file explorer, or when you mount the device as mass storage - are under a top-level directory called "sdcard".  Thus, if you create a folder at (apparently) the top level, then a file in it must be accessed as:  file:///sdcard/your_folder/hello_world.html   Probably most people know that already :-)


I get how an oil lamp runs until the fuel runs out, but a normal wax candle doesn't seem like it works the same way.

The wick of my tea candle was buried in wax. So I lit a piece of paper and stuck it in the wax. Now the wax is burning off the paper, as if that were the wick.  The wax itself wouldn't light on fire without a wick, yet clearly what's burning is the wax, since the paper would have long ago burned up. What's going in here?


How can I check the battery status of all my apple devices like Airpods and iPhone on Mackbook and Airpods and Macbook on iPhone on something like battery widget. I see that currently there is no battery widget for mac and iPhone battery widget does not show Macbook's battery.

My goal is to have battery status of other Apple device on my Mac (preferably on menubar). I'd like to have a glimpse of the battery status of my iPhone, iPad, Watch, and Airpods.  I'm a user of Bitbar and iStat menu, but I haven't found any widgets can wirelessly check other Apple device's battery status.  What I know is that I can click the Wi-Fi icon on menu bar and it will show my iPhone battery status. To show the percentage, I have to option + click the Wi-Fi icon and hover over my mouse on the iPhone hot spot section. It's pretty clunky, but I guess at least the API is there.  I am also open to third party apps which can let me see battery status across devices.


Is it a good or a bad practice to use R packages from CRAN for research? I'm talking about the common packages like: simple models for regression, estimation, econometrics. Most of them use function that can be written easily on your own.  My yes arguments:   Time to focus on the main part of the research The community is a good quality control R offers a lot of modern methods Some models are too complicated to write them on your own   My con arguments:   Not every package of R has been created in an academic environment There could be bugs that influence the outcome and I do not know it Most models can be written in a short time period from scratch   How can we use open source without risking failures in the outcome? Are there certain quality indicators for packages in general and for R?

I am a graduate student in economics who recently converted to R from other very well-known statistical packages (I was using SPSS mainly). My little problem at the moment is that I am the only R user in my class. My classmates use Stata and Gauss and one of my professors even said that R is perfect for engineering, but not for economics. He said that many packages are built by people who know a lot about programming, but not much about economics and therefore are not reliable. He also mentioned the fact that since no money is actually involved in building an R package, there is therefore no incentive to do it correctly (unlike in Stata for example) and that he used R for a time and got some "ridiculous" results in his attempts to estimate some stuff. Moreover, he complained about he random number generator in R which he said was "messy".  I've been using R for just a little more than a month and I must say I have fallen in love with it. All this stuff I am hearing from my professor is just discouraging me.  So my question is: "Is R reliable for the field of economics?".


I was thinking about taking the Cayley-Hamilton Theorem in the opposite direction. Does this hold : If for $F\in$ End$(V)$ $\exists P\in K[t]$ such that $P(F)=0$ then  $P$ is the characteristic polynomial of $F$ ?  If not could you give a counterexample?

The question is motivated from the following problem:     Let $I\neq A\neq -I$, where $I$ is the identity matrix and $A$ is a real $2\times 2$ matrix. If $A=A^{-1}$, then the trace of $A$ is   $$ (A) 2 \quad(B)1 \quad(C)0 \quad (D)-1 \quad (E)-2$$   Since $A=A^{-1}$, $A^2=I$. If the converse of  is true, then $\lambda^2=1$ and thus $\lambda=\pm1$. And then $\rm{trace}(A)=1+(-1)=0$.   Here are my questions:   Is  $C$ the answer to the quoted problem?  Is the converse of Cayley-Hamilton Theorem, i.e.,"for the square real matrix $A$, if $p(A)=0$, then $p(\lambda)$ is the characteristic polynomial of the matrix $A$" true? If it is not, then what's the right method to solve the problem above?


When there are many aligned equations so that they cannot fit the rest of the current page, page break is not allowed, and they always start at a new page, giving a lot of blank lines. How to allow the page break?  I found  in the mailing list, but the question was not answered, and it is old.  \starttext  Is it possible to let aligned equations break, so that the following equations do not start at new pages? \placeformula \startformula \startalign    \dorecurse{50}    {\NC E =\NC m c^2 \NR} \stopalign \stopformula  \stoptext

Consider the following code example:  \setuppapersize[A8,landscape][A8,landscape] \starttext \startformula     \startalign         \NC 1 \NC= 1\NR         \NC 2 \NC= 1\NR         \NC 3 \NC= 1\NR         \NC 4 \NC= 1\NR         \NC 5 \NC= 1\NR         \NC 6 \NC= 1\NR         \NC 7 \NC= 1\NR         \NC 8 \NC= 1\NR     \stopalign \stopformula \stoptext   Coming from a LaTeX background I would expect align to break over pages and  tells me     Somewhere between March and Arpril, \startalign lost the ability to break equations across pages. Hopefully, it will be added back soon.   So basically it is intended to have page breaks, isn't it? Question: How to enable them for align?


Suppose $\mu_n$ is a sequence of measures on $(X, \mathcal{A})$ such that $\mu_n(X) = 1$ for all $n$ and $\mu_n(A)$ converges as $n \to \infty$ for each $A \in \mathcal{A}$. Cal the limit $\mu(A)$. Does it follow that $\mu$ is a measure?

Given a sequence $(\mu_n)_{n\in \mathbb N}$ of finite measures on the measurable space $(\Omega, \mathcal A)$ such that for every $A \in \mathcal A$ the limit   $$\mu(A) = \lim_{n\to \infty} \mu_n(A)$$   exists. I want to show that $\mu$ is a measure on $\mathcal A$.   What I managed to figure out:   $\mu$ is monotone, additive and - if $\lim_n \mu_n(\Omega)$ is supposed to be taken in $\mathbb R$ - then $\mu$ is also finite (I'll assume this). Also $\mu(\varnothing) = 0$. So we can wlog assume that $\mu(\Omega) = 1$ and that $\mu_n(\Omega) \le 2$ for all $n$.   Now what remains to be shown is that $\mu$ is $\sigma$-additive, or equivalently that for $A_n\downarrow \varnothing$, we have $\mu(A_n) \to 0$ (since $\mu$ is finite).  All attempts at proving this have been futile so far. I don't seem to see the right approach.  If possible, I would like to only receive a hint rather than a full answer. But of course, I'd be quite happy with a full answer, too; if a good hint is hard to find!  Thanks a lot in advance for your help! =)


The answer to "" includes this:     In Drupal 8, you simply use the static method \Drupal::currentUser()   to get the equivalent of Drupal 7 $GLOBALS['user']   I tried to use the following code:   $user = \Drupal::currentUser();  $name = $user->get('name')->value;   But that results in an error like so:     Fatal error: Call to undefined method Drupal\Core\Session\AccountProxy::get() in /home/remindme/uhoc.org/modules/testmodule/src/Form/FruitForm.php on line 173   (Line 173 is $name = $user->get('name')->value;   Do I need to used some namespace or there is some other way to access the user object?

$account = \Drupal::currentUser() loads the user object into $account, but how do I access custom fields I've created on the user object (via the admin UI)?  With dpm($account) I can't see any of my custom fields.


Alright, so let me start off with I'm fairly new to blender, so this may just be an error on my part for not using a certain setting or something.    My problem is that my texture is semi-appearing on the walls of a box I'm making. At 500 samples:   In the 500 sample one it's not as major of an issue, but at lower samples it is. Whenever I changed the textured floor to just a plain pink diffuse bsdf, the problem still occurs.   In the first picture I used an image texture plugged into a velvet and glossy shader which is plugged into a mixed shader. In the second picture just a pink diffuse bsdf is used.  Edit: I should've asked how to stop this from happening, not why.

so I'm sorta new to Blender and stumbled upon a problem which is probably easy to fix. So I realized that the color of the ground gets reflected onto other surfaces during the render, as seen on this picture:     How can I prevent the green color from appearing on other things than the ground?


A short story, mean farmer who finds a hole/cave that has aliens/monsters who give him gold in exchange for food  Provides chickens  Ends up disappearing  Wife goes to cave/hole and receives a note asking for the more chicken like the last one - her husband

Plot Summary/Details  The basic premise of this one (as best that I can remember it) is that a farmer, who has recently dug a new well, has discovered some sort of strange beings living underground near his well.  I don't remember the details of how, but they communicate through notes lowered/raised in the well's bucket.  At one point, the farmer and his wife send down a roast turkey dinner, which the beings below enjoy.  For reasons I cannot remember, the farmer either becomes angry with, or exceptionally curious about, the beings below.  He descends the well one evening, possibly armed with a shotgun, possibly not.  The chilling twist to the story comes the next day went the wife retrieves the bucket from the well.   The beings write that they really enjoyed the live turkey she sent them, and would like more.  The live turkey, of course, was the farmer, who was eaten by the creatures below.  Other Details  I remember not only reading this one as a kid, but also seeing a tv show adaptation of it.  I thought it was the old Rod Serling show Night Gallery, but I have not been able to find that particular story yet.  I also seem to remember hearing the story told at summer camp a few times, which makes me wonder if the story has its roots in some old story/legend.  Timeframe of Publication  I'd guess no later than the 1970s, probably a lot earlier.


I am trying to run a program but the program complains that error while loading shared libraries: libQt3Support.so.4: cannot open shared object file: no such file or directory   I can see that the rest of the needed Qt libraries are there, only this one is not found.  I did find / -name libQt3Support.so.4 but this didnt return anything... most likely it is missing.

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 am fairly new to Javascript and one question dawned on me... If I ever wanted to get the string of a Javascript object key without getting the field at the same time, how would this be done? I tried searching the web, but it seems like I am using the wrong terminology as I didn't find anything about my question after the first 20 or so links. So how would this be possible? I am learning the in and outs of the language and I am genuinely curious, any help is appreciated.

I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval.


I have a chat bot that creates a corpus of messages from a GroupMe chat and generates responses using the Markovify module in Python 3. I recently started running a LAMP stack out of my dorm so that I can record these messages, store them in a MySql database, and display them on demand for people on the University wifi.  My problem as of late is that question and quotation marks, which show up fine in the python console program, appear as "�" on the web page. Here's the index.php file:      <link rel="stylesheet" type="text/css" href="style.css"/> <title> Hove and Lonor Database </title>

HOVE AND LONOR LIVE FEED Y'ALL

 user lookup

      <?php  error_reporting(E_ALL);         ini_set('display_errors', 1); $conn = mysqli_connect('localhost', 'someuser', 'somepass'); mysqli_select_db($conn, 'groupme');  $query = "SELECT * FROM msgs"; $result = mysqli_query($conn, $query) or die (mysqli_error($con));  echo "
";  while($row = mysqli_fetch_array($result)) {     echo"
" . $row['date'] . "	" . $row['user'] . "	" . $row['msg'] . "
"; }  echo "
";  mysqli_close($conn);  ?>

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have a professor that has given me some early advice on developing my thesis topic, but I have not yet formally selected a thesis advisor. I was thinking about choosing to work with a different professor whose research seems slightly more aligned with the project, but I'm curious if my professor (the one I already spoke with) will expect me to work with him, and if this would have entailed some sort of financial compensation for him. Not that this would heavily influence my decision, but it's something I'd like to be aware of.

Do professors get paid for supervising PhD students / honours student's projects?  If so, typically how much?


I have been doing olives (mixed kalamata and jumbo green/mazinilla) with a salty brine with dehydrated galic and herbs with a layer of olive oil over the top.  Now is this safe or not?? i leave it to stand to draw the flavours and usually at room temp.

I make a product I invented called Maybe It's Marinade. Cold pressed extra virgin olive olive, pressed garlic as the base in three varieties, AoliOliO, Dill and Cayenne Pepper, garlic powder, and titch of salt. I package it in a 250 ml mason jar. I also place the jar in a celephane bag as part of its packaging. Recently, a public inspector noticed the product and sunk his teeth into it concerning Botulism risks.   I've been making this for eighteen years. No one has ever gotten sick. I designed the product to be stored in the cupboard. Using cold pressed olive, extra virgin olive oil I have never found the product to become awful, discolored, smelly, and I set some aside in my house on several occassions for months and tested it on myself and found nothing wrong.   The product is not a method of storing garlic in the oil, with the other ingredients in the recipe, it becomes a bread dipping oil, cooking tool, pasta sauce accessory.  The use of the mason jar provides a secure lid but a very reusable easy to open situation. I do not fill the oil to the top, so that the product can be shaken. Its a very interactive product if that makes sense, in the way that it's spoon accessible.   Can you provide some sort of pro and con overview? I only see articles on storing garlic in oil, not as an ingredient in a recipe? If there's a chance i will make people sick afer eighteen years, I may have to stop making it.  Thanks a heap.


Taking this double-page spread for example. There are total of 8 panels, but it's divided into three different segments from the top to the bottom.  I've tried reading from the top-right, to the bottom-right, then starting with the next pane downwards. I know Japanese manga is read right-to-left, and I'm having some trouble reading this particular part.  As a rule of thumb, how do I properly read manga with multiple panels like this?


I first had Windows 8.1 already installed on my machine, and then I decided to install Ubuntu 14.04 LTS as well.  I first shrunk the size of my Windows Disk. Then I installed Ubuntu, splitting it into two partitions (One for swap and the other for the Ubuntu file system).  However, now whenever I attempt to boot via Windows Boot Manager(on /dev/sda2), I get the following error message:  /EndEntire file path: /ACPI(a0341d0,0)/PCI(2,1f)/Sata(0,0,0)/HD(2,1f4800,82000,0f6afd19c5af524e,2,2)/File(\EFI\Microsoft\Boot)/File(bootmgfw.efi)/EndEntire error: cannot load image.   How would I fix it so that Windows 8.1 can boot again as well?

I've just bought a new Toshiba laptop, on which Windows 8 is preinstalled. I've installed Ubuntu Gnome 13.10 and GRUB2 correctly detects Ubuntu and Windows. But the strange problem is that when I try to boot Windows 8, it appears the following error:  /EndEntire file path:/ACPI(a0341d0,0)/PCI(2,1f)/UnknwnMessaging(12)/HD(2,200800,82000,a8d996409dcfe211,a8,59)/File(\EFI|Microsoft\Boot)/File(bootmgfw.efi)/EndEntire error: cannot load image.   I've tried to solve using boot-repair, using the auto-correction. But never has changed. Here is the log generated by boot-repair:   How can I fix this?


Find all the integer pairs $(x,y)$ that satisfy the equation  $7x^2-40xy+7y^2=(|x-y|+2)^3$  it is clear the equation is symmetric therefore you can assume w.l.o.g that $x\ge y$ which makes the new equation equal to $(x-y+2)^3=7x^2-40xy+7y^2$  which becomes  $0=x^3+x^2(-1-3y)+x(12+28y+3y^2)+(8+y^3-y^2-12y)$ but I don't know what to do next , help, suggestions and solutions would be appreciated. I think Lagrange multipliers can be used but there is a preferred solution that doesn't use calculus. Taken from the 2019 SAIMC

The problem is what are the integer solutions to  $$7x^2 - 40xy + 7y^2 = (|(x - y)| + 2)^3$$  I only got $x - y = 4 (\mod 13)$. Also, how to solve it?


My total reputation in the league is shown as 4249, but the year reputation is shown as 4443.  How can the year reputation be greater than total reputation?  I didn't offer any bounty.

When I went to the  to see my ranking in the reputation league, I saw this. Is this an error? My total reputation is less than my monthly reputation.


I have a file pom.xml, which needs to have the version with a SNAPSHOT appended to it. At times, the SNAPSHOT is missing, which results in the build failing. I'm trying to replace it with SNAPSHOT if it doesn't exist.  Actual:  <artifactId>package1</artifactId> <version>1.0.0</version>   Desired:  <artifactId>package1</artifactId> <version>1.0.0-SNAPSHOT</version>   Since the artifactId is not going to be the same across all the projects, I tried to search for a pattern that starts from </artifactId> to </version> and replace it with the SNAPSHOT text added to it. This has resulted in replacing the text till the last version available in pom.xml.  I've tried the following:  cat pom.xml | sed ':a;N;$!ba;1,/<\/artifactId>/s/<\/artifactId><version>[0-9]*.[0-9]*.[0-9]*<\/version>/<\/artifactId><version>1.0.0-SNAPSHOT<\/version>/g'   (Not working at all as it's unable to find the end of line).  cat common-pom.xml | sed ':a;N;$!ba;0,/<\/artifactId>/s/<\/artifactId>.*<\/version>/<\/artifactId><version>0.0.0-SNAPSHOT<\/version>/g'   (Is able to do the changes, but it's replacing all the text till the last version available in pom.xml).   How do I stop the replacement to the first occurrence in a multi line replacement?

I would like to update a large number of C++ source files with an extra include directive before any existing #includes. For this sort of task, I normally use a small bash script with sed to re-write the file.   How do I get sed to replace just the first occurrence of a string in a file rather than replacing every occurrence?  If I use  sed s/#include/#include "newfile.h"\n#include/   it replaces all #includes.   Alternative suggestions to achieve the same thing are also welcome.


I was wondering if there's any way to move VLC media player to the system tray while a music/video is being played?

I'm using VLC media player which can play almost all kinds of audio and video formats. While listening to audio, I keep VLC in minimized mode and can work on other windows. But when I select to listen video songs mixing with audio songs, VLC is maximizing itself to play every video song in the playing list, which is really annoying in the middle of work.  So how can I keep always VLC player in minimized mode while playing a list of songs mixed with audio and video songs?


Prove that $ \frac{x}{y} + \frac{y}{z} + \frac{z}{x}=1 $ has no solutions in positive integers $ x,y,z  $  I got this problem on . They have no solutions about this. I tried to solve it, here my attempt. $$ \begin{split} \frac{x}{y} + \frac{y}{z} + \frac{z}{x} &= 1 \quad \text{multiply by } xyz \\ x^2z + y^2x + z^2y -xyz &= 0\\ x \left( zx+y^2 - xy \right) + z^2 y &= 0 \end{split} $$ From here i need to prove $ xz + y^2 -xz \geq 0 $  but i am failed to do so. How can i prove it further?

Are there any positive integers $x,y,z$ such that $$\frac{x}{y} + \frac{y}{z} + \frac{z}{x} = 1?$$ Prove/Disprove.   I've plugged in random positive integers for $x,y,z$ and I have not been able to get the equation to equal $1$.


I have a Windows 7 computer. How do I determine whether my Windows installation is 32-bit or 64-bit?

What is the best way to determine whether my OS is 64-bit or 32-bit ?  Assume that, I directly on some os & I am going to install a software on it. But how to determine, whether OS is 32-bit or 64-bit,  OS may be anything, like   windows xp vista windows 7 os x leopard os x snow leopard Red hat linux   What I mean is - what is the best & common way to determine whether os is 64-bit or 32-bit? I mean, I am talking in general. I haven't installed os on someone's machine & if I tell you to determine its OS base - 64 or 32 ? then what would you do ?  Thanks in advance for sharing your knowledge. Sugar.


I need to make sure input on dynamically generated input fields accept only numbers.   This jsfiddle is doing exactly what I want but it isn't allowing for dynamically generated fields: .  I've modified it to work with a function but it isn't doing anything.  Any ideas what I'm doing wrong?  HTML:  Number : <input onkeydown="test(this);" type="text" name="quantity" id="quantity" />&nbsp;   Javascript:  function test(input) {   //called when key is pressed in textbox   input.keypress(function (e) {      //if the letter is not digit then display error and don't type anything      if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {         //display error message         $("#errmsg").html("Digits Only").show().fadeOut("slow");                return false;     }    }); }   CSS:   #errmsg { color: red; }   Function version:

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.


Who created the room of requirement? I know one of the founders must have created it but do we know which one? There are theories that Helga Hufflepuff created it, is that true? Or was it added later on by someone else?

The Room of Requirement is a very useful secret feature of Hogwarts, but how did it get there in the first place?  Was it included (created or requested) by the Four Founders when they had the place built? If so, why isn't it better known, like any other special room in Hogwarts such as the library or the infirmary? Was it a secret the Founders wished to keep to themselves and perhaps some of their chosen acolytes?  Or was it made later on, by some great Headmaster or perhaps even some particularly gifted and enterprising students? This seems more likely given the apparently very small number of people aware of its existence in the present day, but would it really be feasible to create a whole new room in a pre-existing castle?  Who created the Room of Requirement, how, and when?


I want to know a few things   Has anyone tried Unity 8 on 16.04 ? How buggy is it ? What are to commands to use it on 16.04 ? My PC has Virtualbox installed. Heard Mir does not support it (?) Will I have to install something else to try Unity 8 on 16.04 ?   Thanks.

I'm using Ubuntu 14.04 and found out that we can install Unity 8 on it. Will Unity 8 replace Unity 7 once I install it? And if it does can I switch back to Unity 7 if I want? How would one go about it?


I got a PHP object which can be an array or not. I'd like to check not only that it's an array (which can be indexed by strings) but that it's an array of the form [x_1, x_2, x_3 ...]. Therefore the function is_array doesn't suit me. But what instead?

PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array contains only numeric keys? Basically, I want to be able to differentiate between this: $sequentialArray = [     'apple', 'orange', 'tomato', 'carrot' ];  and this: $assocArray = [     'fruit1' => 'apple',     'fruit2' => 'orange',     'veg1' => 'tomato',     'veg2' => 'carrot' ];


I have this function:  def generateRepetition(toR, rate):     return [toR]*rate   If I call it with toR=0.234 the function returns an array in which the number is repeated for rate parameter, however, the number changes in this way:  [0.23399999999999999, 0.23399999999999999, 0.23399999999999999,...]   I do not understand why, anybody has a solution?

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


So im getting unresolved external and im confused why its not linking properly  memory.cpp:   memory.hpp:   main.cpp:   Output Window:  1>------ Build started: Project: NAME, Configuration: Release Win32 ------ 1>main.cpp 1>memory.cpp 1>main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Memory::Write<int>(unsigned __int64,int)" (??$Write@H@Memory@@QAE_N_KH@Z) 1>main.obj : error LNK2001: unresolved external symbol "public: int __thiscall Memory::Read<int>(unsigned __int64)" (??$Read@H@Memory@@QAEH_K@Z) 1>D:\Desktop\Workbench\NAME\bin\x86_Release\NAME.exe : fatal error LNK1120: 2 unresolved externals 1>Done building project "NAME.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========   Why its giving me these errors.. Im so confused, ive done properly the class templates i think?

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


Can someone recommend a good ATM card to obtain for an American going to Europe.  Specifically, I'm going to England/Wales if that makes a difference.  To give back, I mention that I have a Amazon Prime Rewards Visa that is extremely good for credit card transactions in Europe (no fees!).  I used it exclusively in France.  However, I feel it's sometimes necessary to get cash and the ATM cards I have charge something like $10 minimum + 3-5% transaction fee PLUS whatever the local ATM machine charges.  The Amazon card also charges considerable fees if used as a debit card at an ATM.   I do plan to take some cash with me, but I don't like to carry huge amounts.  As an aside, if someone has recommendations how to get British pounds before the trip, please let me know also.  I currently use Chase Bank.  Many thanks! Dave

Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?


Provide an infinite sequence of natural numbers $x_1,x_2,x_3,\ldots$ such that  I'm not sure if I'm on the right track with that. any help would be great

Suppose that there is a prime number. Now I want to approximate the next prime number. (It does not have to be exact.) What would be the time-efficient way to do this?  Edit: what happens if we limit the case to the prime number of the form $4k+1$ where k is a natural number?   Edit: it's fine to replace approximate prime number with finding any prime number that is bigger than the given prime number in a time-efficient way.


I'm having a problem with my footnotes. The problem is that the distance between the footnote index in the main text and the following text is huge. There are several threads on this and similar topics, but none of the solutions help me. The reason is presumably that I have added something to the preamble (based on an earlier problem I had) to get arabic numerals for examples in the footnotes. In the following preamble, if I remove everything from  \makeatletter downwards, the problem disappears, but I no longer get arabic numerals in my examples in the footnote. So, I want to keep the arabic numerals in the footnotes, and reduce the spacing between the footnote index in the main text and the following text to what is normal. Any ideas?   Here is a MWE:  \documentclass[12]{article} \usepackage[english]{babel} \usepackage[backend=biber, style=authoryear-comp]{biblatex} \usepackage{gb4e} \noautomath  \let\eachwordone\itshape   \makeatletter \pretocmd{\@footnotetext}{     \@noftnotefalse\setcounter{fnx}{0}%     \renewcommand{\thexnumi}{\roman{xnumi}}     }{}{} \apptocmd{\@footnotetext}{     \@noftnotetrue     \renewcommand{\thexnumi}{\arabic{xnumi}}     }{}{} \@ifpackageloaded{bidi}{% \pretocmd{\@LTRfootnotetext}{     \@noftnotefalse\setcounter{fnx}{0}%     \renewcommand{\thexnumi}{\roman{xnumi}}     }{}{} \apptocmd{\@LTRfootnotetext}{     \@noftnotetrue     \renewcommand{\thexnumi}{\arabic{xnumi}}     }{}{} } \makeatother  \begin{document}  Some text.\footnote{Some text. \begin{exe} \ex  Arabic numerals. \end{exe}} WHY IS THIS TEXT SO FAR REMOVED?   \end{document}

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


There is a long standing ban on allowing suggested edits on per-site meta:      I would like this relaxed on beta sites to allow broader participation to help shape beta site meta posts.    I just ran into this on  where I wanted to correct the list of sites that allow software recommendations. Wouldn't it make sense to allow edit suggestions on beta sites since restricting edits to +1k users on beta sites means an extremely limited group of people can even suggest a change to a post?  Here is the problem:   Undocumented behavior. The about page says "Any user can propose edits, but not all edits are publicly visible immediately." Confusing behavior. Why are meta edits harder to moderate than site edits? Where else on SE does a control show dimmed out when you cannot even exercise that control? Shouldn't the edit text be hidden if no suggested edits are allowed? Reduces input. Anyone who reviews edits knows that some absolute gems come from anonymous and new editors. How is preventing edits making the meta site better for the users or the moderators? Restricting diversity is bad, especially if it's not for a clear and convincing reason. The only  characterizes the edit review queue as needing a 10k user to process (which isn't applicable anymore since 2k users review edits now site wide - 1k on beta sites). The argument that "yet another queue" seems out of place with the current design and this doesn't have to be another queue. Causes more work. If someone wants to edit a post on a beta meta, they have to:   (ab)use the comments like I did. (Which does discuss the question, but causes more work and noise for someone to do the edit rather than approve or deny the edit). Flag it for a moderator to help. (Which presumably would be the last flag a moderator should be handling, but really - how many flags happen on beta meta sites?) Go away and not edit a post on a site meta where you wanted to edit a post.    Proposed solution.   Document the current behavior in the help pages site wide. If meta are special, say so clearly. This is subjective, but I believe we should strive for "making things as simple as possible but not simpler" What we have may have been good when the kinks were being worked out, but it's not simple enough IMO. Roll per site meta edits for beta sites into the main edit queue :      the ideal solution would be to just add the suggested edits on the meta to the queue on the main site. That way there would be no additional queue, and the meta sites would be editable by anyone like all the main sites

Suggested edits are disabled on per-site metas, which means that only users with full edit privileges (>2k rep on graduated sites or >1000 rep on public betas) can edit posts on a site meta. This has been declared  by Jeff Atwood a while ago, .  But as already mentioned in comments there, the ideal solution would be to just add the suggested edits on the meta to the queue on the main site. That way there would be no additional queue, and the meta sites would be editable by anyone like all the main sites.  The whole SE network trains its users to expect being able to edit any post, disabling that functionality silently on the meta sites breaks the user expectations and only leads to confusion. It also drastically reduces the number of users able to edit on site metas for many sites.  I don't know if there are any technical aspects that make this solution difficult to implement, but from an external perspective just adding the suggested edits to the main queue seems like a good solution to this problem.


I have successfully made preview of blend 3D format. The /1/ below is my working script. Since customer has other formats, for example obj, Aveva made 3D format files. How could I make a conversion from obj or other format files to blend file format by python?  import bpy import math  scn = bpy.context.scene j=-1 for k in bpy.data.objects.keys():     if(k.startswith('Camera')):         j =k         break print('j is: %s ', j) cam = bpy.data.objects[j] origin = bpy.data.objects.new('Empty',None)  step_count = 2  for step in range(0, step_count):     origin.rotation_euler[2] = math.radians(step * (360.0 / step_count))      scn.render.filepath = 'e:\\temp\\happy_shot_%d_wednes_Sep_7.png' % step      bpy.context.scene.render.resolution_x = 120     bpy.context.scene.render.resolution_y = 64      bpy.ops.render.render(write_still=True)

I know python well, but I'm not familiar with blender.  Is it possible to use the blender API to do this?  Setup:  Create a scene in which the the lights and cameras are pre-arranged.  Run a python script which:   Imports a model (fbx or obj). Renders from each camera and saves output to a .png file. Returns to step 1 until all models have been rendered.


Prove that $2x^3+3x^2+x$ is always divisible by $6$ if $x$ is an integer.  I started by factoring the expression:  $x(2x^2+3x+1)=x(2x+1)(x+1)$  However I wasn’t sure how to progress from here to prove that it is always divisible by 6. Any ideas?

I have to show that this is divisible by both 2 and 3. For the next, part I have to show that it's divisible by 6 which from what I understand is the same as showing it's divisible by 2 and 3.


There are two number of length m bits. How do I prove that the complexity of modular multiplication of these two numbers is $O(m^2)$.

I am wondering what the complexities are of adding/subtracting and muliplying/dividing numbers in a finite field $\mathbb{F}_q$. I need it to understand an article I am reading.


Prove that the area of a Pythagoras triple is divisible by 2, 3 and then 6.  I know that in the Pythagoras triple (x,y,z) area is equal to 1/2(xy). But I am unsure how to prove this statement.

Show that if $x$, $y$, $z$ are integers such that $x^2 + y^2 = z^2$, then at least one of them is divisible by $2$, at least one is divisible by $3$, and at least one is divisible by $5$.  I know that $x,y,z$ are sides of a right-angled triangles. If I start putting values, then I can show, but have no clue about mathematical approach.  How do I solve it mathematically, using modular arithmetic?


As you can see the numbers of the subsection is not ordered correctly, how can I fix that.  This template is from overleaf   The problem is caused because of that line but I need it to write Arabic. \setotherlanguages{arabic}  \documentclass{article} % \usepackage[spanish]{babel} % \usepackage{lipsum} % \usepackage{natbib} % \usepackage{graphicx} \usepackage{analysis_orax} \usepackage{xunicode} %% loading this first to avoid clash with bidi/arabic \usepackage{fontspec} \usepackage{polyglossia} \usepackage{hologo} \usepackage{fontawesome} \usepackage[hyphens]{url} \setmainlanguage{english} \setotherlanguages{arabic} \newfontfamily\arabicfont[Script=Arabic]{Noto Naskh Arabic}   % \usepackage[arabic]{babel} %------------------Document----------------------------  \begin{document}  %-------------------------TitlePage------------------------ %\begin{titlepage} %\end{titlepage}  %-------------------------Content------------------------  \section{Analysis Report}  \subsection{Subtitle} \subsection{Subtitle} \subsection{Subtitle} \subsection{Subtitle} \subsection{Subtitle}   \end{document}   But I have subsection numbers flipped.

After bidi was updated to v. 19.6 (2016-05-23), using at least one RTL language with polyglossia leads to number and following dot being inverted. Cf.  \documentclass{book} \usepackage{polyglossia} \setotherlanguage{hebrew} \begin{document} 6. \end{document}   with and without \setotherlanguage{hebrew}. Note that it is not necessary to actually use that language.  I do not know whether this is a bug in bidi or an incompatible change which polyglossia needs to adapt to. Because of this I have not opened an issue on polyglossia's github page. Sadly, bidi's contact information are outdated – the sourceforge referred to on CTAN is unused and the github page that is mentioned in the package's readme and PDF does not seem to exist any more either.  The problem might be something along the lines of     Does anybody have the previous version of bidi at hand?  TIA, Dario


Hello guys i get the warning below  when i am running mysite locallyl. Do you have any idea what causes this??  Warning: Declaration of Walker_Quicklinks_Menu::start_lvl(&$output, $item, $depth = 0, $args = Array, $id = 0) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in C:\Users\User\Desktop\www.sto.dev.cc\wp-content\themes\mysite\functions.php on line 295

I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error:     ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203   It seems like some sort of PHP compatibility issue. I'm running PHP 5.3.10 on my local dev machine.  What would be the best way to remedy this problem?


Please help me understand how this particular slicing reverses the order of the series. I constantly have trouble understanding slicing using the []. Is there a page that explains it. I think I understand how slicing works with iloc and loc on pandas dataframes. Here is a working exampe  a=pd.Series(range(0,10)) a[::-1]

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I know that C uses "%x" for hexadecimal and "%d" for decimal and I already tried using "%b".   How can I write an integer in binary in C?

I can print with printf as a hex or octal number.  Is there a format tag to print as binary, or arbitrary base? I am running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" print("%b\n", 10); // prints "%b\n"


I have a set of twins.. A boy and girl who are 5 years old. I love them both equally and want to have some one one time with each of them..   My son and I go for a haircut every month (or so), and we then do a little bit of shopping.   It is a wonderful day out, that my daughter can't come on, because she doesn't get her hair cut with daddy.  But the thing is: I also really want a day with my daughter.  Something that wouldn't make sense for my boy to come to. It has to be something she will buy as "real", and something I'd have to do about once a month (or so).    This is different from the duplicate in that it cannot be games or things that a boy would do.  It has to be something that I could say "this is a daddy - katie (fake name)" thing.  I don't have even the slightest bit of trouble finding something to do with the pair. Or even one on one. But consistently with one and never the other... that one is beyond my imagination.

My daughter has an older brother (8yrs old) so when we all play together we tend to do older boy things. Does anybody (especially women) have any memorable games/activities they played with Dad?   A few I have tried: Tea Party, Doll House, Puzzle, Painting, Coloring & Gluing, Playing Ball.   Looking for other ideas...


So, I play a game and I am unable to quickly reach my 6,7,8,9,0 keys.   Is there any way that I could revamp my keyboard keys so that, for example :   z would result in the same keystroke as my 6 x results in 7 c results in 8  ` results in 9 r results in 0.   I tried using key flipper and the keyboard setting to change the shorts for text but all that allows you to do is change function keys and that didn't lead me anywhere.  Does a program exist, or can I make an AppleScript that allows me to have such a function?

I used to use  to remap Right Alt to Right Control (as an Emacs user I use Control MUCH more that Alt) but updating to Sierra broke this.  Downgrading is not an option.  How do I manually remap keys in Sierra?  I specifically would like to remap Right Alt to Right Control.


The most common method to find the inverse of a invertible square matrix is to apply row operations to the matrix and reduce it to the identity matrix.  An row operation is applied to the matrix by doing a left multiplication by an elementary matrix.   Denote the elementary matrices as $E_1, E_2, ... , E_n$ , then  $(E_1, E_2, ... , E_n)A = I$ , where $E_1, E_2, ... , E_n$ is the inverse of $A$.  However, the procedure to check whether two matrices $A$ , $B$ are the inverse of each other is to check that $AB=I$ and $BA=I$.  Why do we claim that $(E_1, E_2, ... , E_n)$ is the inverse of $A$ without checking that $A(E_1, E_2, ... , E_n) = I$ ?

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


I have a Schengen visa that expires on the 25th of June on my old passport & I have another visa on my new passport that begins on the 26th of June (one day after the expiry date  of my old visa). My arrival date at Germany is on the 25th of June . Can I enter the country without facing any issues?

I currently have a valid multiple entry Schengen visa that expires on Feb 10th (issued by the Spanish consulate). I need to visit the Czech Republic from Feb 9th to Feb 15th. For this, I am getting a visa starting Feb 11th from the Czech consulate as I was advised that I cannot have two simultaneous visas.   Is it possible for me to enter Czech republic on the current visa on Feb 9th, and stay past its expiry up to Feb 15th using the new visa without leaving the Czech Republic? Will there be any likely problem either while entering or exiting Schengen zone (I am entering Schengen in Frankfurt)?


Consider $f(x)=x^2$ Then $f'(x) = 2x$ But $f(x) = x+x+x + ...+x$ ($x$ times)      then $f'(x)=1+1+1+...+1$         i.e. $f'(x)$         $=x \ne 2x$ So this implies that if we see derivative as an operator, its proper usage needs that the term that we differentiating must NOT be variable in terms of size. The representation should be fixed wrt to the variable that we are diffrentiating i.e the ones that consist of $f(x)=\sum_{i=lo}^{hi}g(i)$ with $lo,hi$ independent of the variable $x$. Is there any better explanation?

Consider the following:   $1 = 1^2$ $2 + 2 = 2^2$ $3 + 3 + 3 = 3^2$   Therefore,   $\underbrace{x + x + x + \ldots + x}_{x \textrm{ times}}= x^2$   Take the derivative of lhs and rhs and we get:   $\underbrace{1 + 1 + 1 + \ldots + 1}_{x \textrm{ times}} = 2x$   Which simplifies to:   $x = 2x$   and hence    $1 = 2$.     Clearly something is wrong but I am unable pinpoint my mistake.


I am beginning the process of coverting all of my MySQL to MySQLi.  I have been doing much research on this but find it a bit confusing.  I have two questions at this point regarding the matter:  1) What does it exactly mean to "escape" a string and where does the code for this go? I assume it goes on my page with my database login credentials.  I found the following but find it somewhat hard to interpret:  "We'll use the mysqli_real_escape_string() function. Since it needs a database connection, we'll go ahead and wrap it in its own function. In addition, since we only need to escape strings, we might as well quote the value at the same time:"  `   function db_quote($value) {     $connection = db_connect();     return "'" . mysqli_real_escape_string($connection,$value) . "'";     }   ` "If we are not sure of the type of value we pass to the database, it's always best to treat it as a string, escape and quote it. Let's look at a common example - form submission. We'll use our previous INSERT query with user input:"  `  // Quote and escape form submitted values $name = db_quote($_POST['username']); $email = db_quote($_POST['email']); // Insert the values into the database $result = db_query("INSERT INTO `users` (`name`,`email`) VALUES (" . $name . "," . $email . ")");   ` 2) After I have this set up in my code, how do I properly test that it is indeed working (Without completly wiping out my tables, etc?)  I just really need some further explanations on this subject before I begin the process.  Any resources, advice, or pointers in the right direction would be greatly appreciated.

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


In this jars folder, I am having multiple jars. How to set classpath to all of these jars?  C:/users/jars/***

Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?


If an object A exerts a force on another object B, an equal and opposite force will be applied on object A by object B, so that means for a force to be applied on object B by object A, a force must have been applied on object A itself, so when object B exerts a reaction force on object A, the net force on object A will be "0" and object A will not move but object B will. If this is so then how will walking be possible? Because when we push the ground, it pushes back to cancel the force we are already applying on the ground.

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


I made this . Right now the game supports all iOS devices except iPhone 5.  The definition of each level of the game is kept in a plist. The creation of each level is done through a graphical level editor. Each device family has its own plists. So, right now the game has 100 levels and 200 plists; 100 plists for the iPhone family and 100 plists for the iPad family.  In order to support the iPhone 5 I need to create 100 new plists and adjust the plists accordingly, which is time consuming, not to mention the creation of new levels...  The editor for creating and editing the levels is solely based on the manipulation of UIViews that describe the game elements. So, this is the code that I wrote to save and restore the state of each UIView in one level of the game.  - (void)encodeWithCoder:(NSCoder *)aCoder {     // Save the screen size of the device that the view was saved on     [aCoder encodeCGSize:self.gameView.bounds.size forKey:@"saveDeviceGameViewSize"];      // ****************     // ALL properties are saved in normalized coords     // ****************      // Save the center of the view     CGPoint normCenter = CGPointMake(self.center.x / self.gameView.bounds.size.width, self.center.y / self.gameView.bounds.size.height);     [aCoder encodeCGPoint:normCenter forKey:@"center"];       // I rely on view bounds NOT frame     CGRect normBounds = CGRectMake(0, 0, self.bounds.size.width / self.gameView.bounds.size.width, self.bounds.size.height / self.gameView.bounds.size.height);     [aCoder encodeCGRect:normBounds forKey:@"bounds"];       // Here I save the transformation of the view, it has ONLY rotation info, not translation or scalings     [aCoder encodeCGAffineTransform:self.transform forKey:@"transform"]; }  - (id)initWithCoder:(NSCoder *)aDecoder {     self = [super initWithCoder:aDecoder];     if (self) {          // Restore the screen size of the device that the view was saved on         saveDeviceGameViewSize = [aDecoder decodeCGSizeForKey:@"saveDeviceGameViewSize"];          // Adjust the view center         CGPoint tmpCenter = [aDecoder decodeCGPointForKey:@"center"];         tmpCenter.x *= self.gameView.bounds.size.width;         tmpCenter.y *= self.gameView.bounds.size.height;         self.center = tmpCenter;          // Restore the transform         self.transform = [aDecoder decodeCGAffineTransformForKey:@"transform"];          // Restore the bounds         CGRect tmpBounds = [aDecoder decodeCGRectForKey:@"bounds"];         CGFloat ratio = self.gameView.bounds.size.height / saveDeviceGameViewSize.height;         tmpBounds.size.width *= (saveDeviceGameViewSize.width * ratio);         tmpBounds.size.height *= self.gameView.bounds.size.height;         self.bounds = tmpBounds;     }     return self; }   I am really stuck here. I cannot explain what is wrong with this code. The UIViews are correctly positioned when restored on the same device. This is not true when the level is opened on another device. There are slightly misplaced elements and distortions.  Here are two pairs of screenshots demostrating the issues:        What is the correct approach to handle the scaling of the levels on different screens? Should I rely on AutoResizingMasks (I need to support iOS 4 and later)? In any case I would like to give a solid paradigm on how to achieve this.

I'm working on a simple 2D game. I've finished the mobile phone version.  However, my boss wants the game to works on his RT. I'm doing the "conversion" but my buttons are in the wrong places, because I hard-coded the screen size, like this:   texture = game.Content.Load<Texture2D>("StartScreen");  mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);   // button definitions  startbrect = new Rectangle(300, 258, 88, 88);  startbtext = game.Content.Load<Texture2D>("bplay");   In this example, mainframe is fine, but startbrect isn't, because I defined the size to match a Windows phone's screen. How can I handle responsive design when all Windows 8 phones' screens are different? Is there a formula or macro to calculate each time the good size?


I am new to linux, and I am learning bash scripting at the moment. I was wondering how I would save my script as a command and then be able to call that command anywhere in the terminal. So i could save the command in a folder somewhere, but be able to use that command in a different folder without having to type out the path to said command.  Is there a way to do this? For example, I make a script that runs chmod +x 'file' and then takes an argument for the file to run the command on. How would i go about coding this and then saving it so i can call that script from anywhere.  Sorry if i didn't explain my question too well, and thank you for any help with my problem.

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


I've noticed that a lot of bad questions aren't even questions (have no actual question in them). They usually go something like:      I'm trying to do X. It should do A, B and C.    I realize that these "questions" can easily be be translated into      How do I do X? It should do A, B and C.   Is this something we should try to prevent? If so, what can we do?   The most simple thing would be to inform the poster of a question that their question doesn't include a question mark. I may cause them to rethink their question before even posting it. The presence of a questions mark could either be enforced (i.e. you can't post a question without it) or just encouraged (i.e. the questioner get informed about the missing question mark but can still post the question).  I could also see the possibility of a more advanced heuristic that tries to inform users that it looks like they are posting a question that probably is not a good fit for the community.

More than infrequently, opening posts on SO are not questions at all, in the very grammatical sense: They're just statements or vague musings (for instance ), and it's not clear what exactly is being asked (since nothing is technically being asked).  I always feel that it shouldn't be our job to construct a question from someone's undirected ramblings, and so this is usually a NARQ candidate for me.  I was wondering if we could add a very simple check that would count the number of literal question marks in a post and refuse to accept it if there are none. This could be accompanied by a small note on what a question should look like.  What do you think? Should we add this feature?  Update: Since people seem to get hung up on the details, I'd like to clarify that an entirely satisfactory alternative would be to pop up an overridable notice with a warning, like "Hello, you appear to be writing a question. Would you like help?", with a "No thanks" button to dismiss it and submit the post regardless.  Update 2: If you disagree that absence of a question mark is a strong signal that the question is poor, could you please provide examples of good, useful and appropriate questions that do not contain question marks? I've provided several additional examples of when the signal works in the comments, and more come up regularly, so I would appreciate to see some evidence of the contrary.


What's the best way to replace Vista with Ubuntu? Do I delete Vista first? I've never used Linux before

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


This is the rotation script for images         and this is the output to display      Testing it here to see if the script works, and it does   but on my website, it's not working.   I am using  plugin for the script and img tag placed in the page, the location of my choice, but it's not working.  This code for fixed 1 image is working without issues       I am here looking for any suggestions that could solve this problem.

I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this  This script:  jQuery(document).ready(function(){     $("ul.vimeo_desc_feed li a").click(function(){         alert($(this).attr('href'));         return false;     }) });   Produces the error $ is not a function  This script:  jQuery(document).ready(function(){     jQuery("ul.vimeo_desc_feed li a").click(function(){         alert(jQuery(this).attr('href'));         return false;     }) });   works fine.


From Wiki and from physics fundamentals lections I received info that  is scalar value. But in definition you have relation between projections of two vector values to normal axe-force and surface area with normal orientation. Are you interesting only in absolute values of this two vectors? (if so then the pressure is always positive.)   Can pressure be negative?  I don't want to discuss the averaged model of the pressure compare to tension elastic model.  At current moment from the post answers and comments I realized that pressure scalar field can be defined so:    $f$ is support force to support equilibrium in $ds$ surface under other molecules attack. pressure scalar value in some circumstances can be negative. If smth. was wrong here please let me know!

I have a final exam tomorrow for fluid mechanics and I was just looking over the practice exam questions. They do not provide solutions. But pretty much I have to define pressure at a point and also say why pressure is scalar instead of a vector.  I am thinking pressure at a point is $P=\lim_{\delta A \to 0} \frac{\delta F}{\delta A}$. Please let me know if I am wrong.   But I do not know at all why pressure is a scalar instead of a vector. I know it has something to do with $d \mathbf{F}=-Pd \mathbf{A}$


Controller  init : function(component, event, helper) {     //get record type id     var reportType = component.get("v.pageReference").state.recordTypeId;     console.log(component.get("v.pageReference").state.recordTypeId);     //save into the attribute     component.set("v.recordTypeId", reportType);     console.log('Fields');     console.log(component.find('salesProjectForm'));     console.log(event.getParam('fields')); },  formSuccess : function(component, event, helper) {     var toastEvent = $A.get("e.force:showToast");       toastEvent.setParams({         "title": "Success!",         "message": "Record is successfully created!",         "type": "success"       });       toastEvent.fire(); },  handleOnLoad : function(component, event, helper) {     console.log("handleOnLoad");     var record = event.getParam('record');     console.log(JSON.stringify(record));     // I've noticed this will fire multiple times. If you don't set some criteria  // to protect against it, this workaround will result in an infinite loop if(record !== undefined && !record.fields.Name.value){      // I did not test if setting both value and displayValue attributes are required     record.fields.Name.display = false;     event.setParam('record', record);     } },  handleSubmit : function(component, event, helper) {     event.preventDefault(); // stop form submission     var eventFields = event.getParam("fields");     console.log('handlesubmit');     eventFields["Name"] = "Test Value";     component.find('myfsalesProjectFormorm').submit(eventFields); }   HTML  <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,lightning:hasPageReference" access="global"> <aura:attribute name="recordTypeId" type="Id"/> <aura:handler name="init" value="{!this}" action="{!c.init}" /> <lightning:card iconName="custom:custom19" title="lightning:recordForm">     <div class="slds-p-left_large slds-p-right_medium">          <lightning:recordForm             aura:id="salesProjectForm"             objectApiName="Opportunity"             layoutType="Full"             columns="2"             recordTypeId="{!v.recordTypeId}"             onsubmit="{!c.handleSubmit}"             onsuccess="{!c.formSuccess}"             onload="{!c.handleOnLoad}"/>     </div> </lightning:card>

For example, my component has the following section that displays a record form:  <template if:true={showRecordForm}>     <lightning-record-form         object-api-name={sObjectApiName}         onsuccess={handleFormSuccess}         record-type-id={recordTypeId}         layout-type="Full"         columns="2"         oncancel={handleFormCancel}         onload={handleFormLoad}>     </lightning-record-form> </template>   It will load the form for the object I specify in sObjectApiName, and with the specified record type as well. The problem is that I want to assign some values to specific fields.  Let us say that it is a Case form, and I want to assign an Account ID to the AccountId field, before the case is submitted to the platform.  I tried to query the lightning-input-fields, but with no success:  const inputFields = this.template.querySelectorAll(     'lightning-input-field' ); if (inputFields) {     inputFields.forEach(field => {         console.log(field)     }); }   This is a snippet from the .  I'm starting to think that this might not be viable, or too much trouble. Is there a way to do this?


Trying to upgrade from Ubuntu 16.04 to 20.04 and I get this message: Could not calculate the upgrade An unresolvable problem occurred while calculating the upgrade. This was likely caused by:  Unofficial software packages not provided by Ubuntu Please use the tool 'ppa-purge' from the ppa-purge package to remove software from a Launchpad PPA and try the upgrade again.  Can someone tell me what I need to do, please?  Thanks Dell Latitude E6420  64-bit  8Gb  500 Gb SSD

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I modeled two planes separately for the top and bottom of the frog's mouth, but when I try to join them together by filling a face, it creates a strange seam that creases the entire face. I've tried an edge split modifier and I don't think there could be any internal faces causing it - I've tried removing doubles but to no avail.   Since the mesh is a plane, it's entirely flat. Solidifying it does not help either.

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


As I know gravitational potential energy of an object relative to $U=0$ point is defined as $U(h)=mgh$ and this came from work-energy theorem.  But In my book, there is another definition for it.  Consider that we have 2 objects that can interract with each other by gravitational force. Set the first object steady. Now, there is $\vec{r_{0}}$ distance between these two objects. Move the second object $d\vec{r}$ in direction $\vec{r_{0}}$/$\hat{r_{0}}$. Let's call $\vec{r}$ to new distance.  Work done by us (agent),  $$\vec{F}_{g}=-G\frac{M_{1}M_{2}}{r^2}\hat{r}$$  $$\vec{F}_{ag}=-\vec{F}_{g}=G\frac{M_{1}M_{2}}{r^2}\hat{r}$$  $$W(\text{done by us})=W_{ag}=\int_{r_{0}}^{r}\vec{F}_{ag}.d\vec{r}$$  $$W_{ag}=\int_{r_{0}}^{r}{G\frac{M_{1}M_{2}}{r^2}\hat{r}.dr\hat{r}}$$  $$W_{ag}=GM_{1}M_{2}\int_{r_{0}}^{r}{\frac{1}{r^2}dr}$$  $$W_{ag}=GM_{1}M_{2}(-\frac{1}{r}+\frac{1}{r_{0}})$$  $$W_{ag}=-G\frac{M_{1}M_{2}}{r}+G\frac{M_{1}M_{2}}{r_{0}}$$  $$r_{0}\to\infty\Rightarrow G\frac{M_{1}M_{2}}{r_{0}}=0$$  $$U(r)=-G\frac{M_{1}M_{2}}{r}$$  This is it. What is the difference?

Newton's Law of Universal Gravitation tells us that the potential energy of object in a gravitational field is $$U ~=~ -\frac{GMm}{r}.\tag{1}$$  The experimentally verified near-Earth gravitational potential is  $$U ~=~ mgh.\tag{2}$$  The near-Earth potential should be an approximation for the general potential energy when $r\approx r_{\text{Earth}}$, but the problem I'm having is that they scale differently with distance.  $(1)$ scales as $\frac 1r$.  So the greater the distance from the Earth, the less potential energy an object should have.  But $(2)$ scales proportionally to distance.  So the greater the distance from the Earth, the more potential energy an object should have.  How is this reconcilable?


I have always been doubtful about whether  I have to put " THAT"  when I want to give an explanation or reason for something happening or not.  " I'm so tired I can't even stand up"  or "I'm so tired THat I can't even stand up"  His  biggest problem at the interview was he didn't know to read.  His  biggest problem at the interview was THAT he didn't know to read.  My only problem was I needed money I didn't have   My only problem was THAT I needed money I didn't have.  This is so disappointing I don't even wan to say a word about it.  This is so disappointing THAT I don't even want to say a word about it.  I know I can leave out "That" when another  subject goes immediately after the first verb, but when I'm trying to explain the reason for something happening, I find THAT useful. Is that correct grammar?

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


I received a calendar with daily math problems as a Christmas gift, and so far most of the problems have been fun and challenging but not too difficult. However, I am completely stumped on the one for today, January 31. The problem reads:  What is the largest positive integer $n$ such that $n^3+89$ is divisible by $n+5$?  I struggled with it for a bit and found a few $n$'s which worked before throwing it at a computer. I tested up to $n=200,000$ and the only ones that satisfy the above condition are $\{ 1,4,7,13,31\}$. I then tried to prove that it doesn't work for $n\geq 31$ with induction for a bit before coming here. The calendar usually has the day of the month as the answer, so the answer should be 31, but I wasn't able to prove this.  Also, for all $n\geq 31$, at least up to $200,000$, the remainder on division of $n^3+89$ by $n+5$ is always $n-31$, if that is useful. Thanks for any help or tips!

When we divide $n^5+5$ by $n+5$, we get a remainder $-620$, i.e., $n^5+5=K(n+5)-620$ , now how to proceed further?


I removed traces of Virtualbox and reinstalled Virtualbox 5.1 from the website. However, I keep getting this error message.    I don't know what else I can possibly do and I already ran /sbin/vboxconfig and that ran with no problems. So I don't see why I'm still getting this error message. Can someone help?  Currently this is what I get  yann@Milvia:~$ dpkg -l *virtualbox* | grep ii ii  unity-scope-virtualbox         0.1+13.10.20130723-0ubuntu1  all          VirtualBox scope for Unity ii  virtualbox-5.1                 5.1.14-112924~Ubuntu~xenial  amd64        Oracle VM VirtualBox yann@Milvia:~$ dpkg -l *virtualbox* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name           Version      Architecture Description +++-==============-============-============-================================= ii  unity-scope-vi 0.1+13.10.20 all          VirtualBox scope for Unity un  virtualbox     <none>       <none>       (no description available) ii  virtualbox-5.1 5.1.14-11292 amd64        Oracle VM VirtualBox un  virtualbox-gue <none>       <none>       (no description available) un  virtualbox-gue <none>       <none>       (no description available) un  virtualbox-ose <none>       <none>       (no description available) rc  virtualbox-qt  5.0.32-dfsg- amd64        x86 virtualization solution - Qt  yann@Milvia:~$ dkms status bbswitch, 0.8, 4.4.0-59-generic, x86_64: installed bbswitch, 0.8, 4.4.0-62-generic, x86_64: installed (WARNING! Diff between built and installed module!) nvidia-375, 375.26, 4.4.0-59-generic, x86_64: installed nvidia-375, 375.26, 4.4.0-62-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)   Thanks.

I tried to use my Virtual Box and this is the error I received - (I just updated to the new Ubuntu also) and I am VERY new at this Linux OS.     Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or   there is a permission problem with /dev/vboxdrv. Please reinstall the   kernel module by executing      '/etc/init.d/vboxdrv setup'      as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS   package first. This package keeps track of Linux kernel changes and   recompiles the vboxdrv kernel module if necessary.


Mathematics "makes sense" at our scope of view. For example, gravity seems to obey the fact that it accelerates at a rate of 9.8 meters a second^2. However, when an object drops, the force of gravity is too weak to overcome the electrostatic force - so it never reaches 0.   Could we say then, we "discover physics"? We describe certain equations for the physical phenomena that is happening? Couloub discovered his equations that led to the above conclusion.  Also, why don't we see a bright sky at "night"? Because of physics (universe expansion, etc).  My question is, how can we depend on mathematics 100% in physics if it leads to obstacles like these? Instead, if we took it with a large grain of salt, it could work.

Suppose we view fluids classically, i.e., as a collection of molecules (with some finite size) interacting via e&m and gravitational forces. Presumably we model fluids as continuous objects that satisfy some differential equation. What mathematical result says that modeling fluids as continuous objects can accurately predict the discrete behavior of the particles? I don't know anything about fluid mechanics, so my initial assumption may in itself be wrong.


$$\frac{\ln x}{x-1} \leq \frac{1}{\sqrt{x}} \qquad x > 0,\ x \neq 1$$  From here we have that   $$0 \leq x-1-\sqrt{x}\ln x$$  So I was trying to prove that $f(x) = x-1-\sqrt{x}\ln x\ \geq\ 0,\ \forall \ x > 0,\ x \neq 1$.  By finding the first derivative we have  $$f'(x) = 1 - \frac{\ln \sqrt{x}}{\sqrt{x}} - \frac{1}{\sqrt{x}}$$  and the second  $$f''(x) = \frac{\ln x}{4x^{3/2}}$$  By analyzing both derivatives we see that in the interval $(0,1),\ f' > 0$. It reaches its minimum at $x = 1$ (not in the domain of the function) and, since $f'' > 0$ for $x > 1$, we have that $f' > 0$ for any value of $x$ in the domain, which in turn means that f is an strictly increasing function.  But, how can I show that $f \geq 0$ in the first place?  I haven't been able to do that. I graphed $f(x)$ and get that $f$ is indeed negative for values of $x$ near zero, so I don't know what to do.

I am trying to show that, for all $x>0:$  $$\frac{1}{\sqrt{x}}\geq \frac{\ln x}{x-1}$$  This inequality is closer than I expected. I have tried exponentiating, power series, and have achieved nothing. I would really appreciate some help. Below is a graph of the two functions for small $x:$


Let $\mathbb{P}$ be a poset and $M$ a ctm. It is well known that when $\mathbb{P}$ is $\kappa$-distributive (meaning that the intersection of $<\kappa$ many dense open sets is dense) for some regular $\kappa$ implies that $M^{<\kappa} \cap M[G] \subseteq M$ for any $M$-generic $G$. i.e, no new $<\kappa$ sequences are added. Apparently the converse to this is also true, if $\mathbb{P}$ is separative, meaning that $q \not \leq p \implies \exists r\le q , (r \perp p)$. How does one see this? That is, I would like to prove: If $\mathbb{P}$ is separative and $M^{<\kappa}\cap M[G] \subseteq M$, then $\mathbb{P}$ is $\kappa$-distributive.

Let $M$ be countable transitive model of ZFC, $P\in M$ be poset and $\kappa$ be a cardinal in $M$. In addition, for every $P$-generic filter $G$ over $M$, if a function from $\kappa$ to $M$ is in $M[G]$ then the function is in $M$. My problem is: $P$ satisfies $\kappa^+$-Baire property in $M$? A poset $P$ satisfies $\alpha$-Baire property if for each $\alpha<\kappa$, the intersection of $\alpha$ many collection of open dense subsets $\{D_\xi:\xi<\alpha\}$ is dense. Also, a subset $D\subset P$  is open dense if $D$ is dense and $D$ is lower set (i.e. $x\in P$ and $y\le x$ then $y\in P$.) I saw a hint of the problem from Jech, exercises 15.5. However the hint is about Boolean-valued model and I am not familiar with Boolean-valued model. I want to get a proof of above problem not mentioning about Boolean-valued model but I don't know how to start it from Jech's hint. Thanks for any help.   (Jech 15.5) . If every $f : κ → V$ in $V^B$ is in the ground model, then $B$ is $κ$-distributive. [Let $W_α$, $α<κ$, be partitions of $B$. Consider $\dot f ∈ V^B$ such that  $\|\dot f(α) = u \|= u$ for $u ∈ W_α$, and find a common refinement of the $W_α$.]


I want to search for a line in a file and then substitute that line for another. I've found this question:  In the main question the user asks for a replace function, that works like this:  f = open(file) for line in f:     if line.contains('foo'):         newline = line.replace('foo', 'bar')         # how to write this newline back to the file   , which is exactly what i need but i can't seem to get it to work. Can someone maybe explicitly use the replace function given in the answer for the problem above and write the code down? (I don't know what to put for "file_path" in the replace function. Is there some way to just tell python to use the current directory or something like that?)  Sorry if it is a trivial question but I've been strugling with it for quite some time now and i can't get it to work. Thanks in advance!

I want to loop over the contents of a text file and do a search and replace on some lines and write the result back to the file. I could first load the whole file in memory and then write it back, but that probably is not the best way to do it.  What is the best way to do this, within the following code?  f = open(file) for line in f:     if line.contains('foo'):         newline = line.replace('foo', 'bar')         # how to write this newline back to the file


I woke up happy today.   In the sentence, what is the function of the word 'happy', an adjective or adverb and is the verb 'woke up' considered as a linking verb?   I'd like to know some verbs that can be followed by adjectives although they are not linking verbs.

I came across these two sentences:  He was standing there proud." "He is growing up rich."  I think I can understand what each sentence means, but grammatically they don't make sense to me. My understanding about adjectives are that they can only be before the noun or with "be".  I see these kinds of sentences sometimes and have always wondered why. My first question is that in the first sentence, if I say, "He was standing there, being proud." is the meaning the same?  And in the second one, can I say, "He is growing up to be rich."? My second question is whether these ways of using adjectives are common or not.


I am taking analog photos, mostly on color reversal film. Sometimes, I want to locally reduce color within a frame, preferably to pure black and white.  Is there a method to drastically reduce color saturation within an otherwise color photo on film?    This question is no longer a duplicate since it has been edited to emphasize how to achieve a desired effect (desaturation of portion of image) rather than method of achieving effect (physical filter). While likely not possible with filters, it may be possible with a modified bleach bypass process or other method.

I've got a very difficult shot coming up. I'm photographing moonlight on a country meadow. I do not want to do post work. I need to do everything real time (for reasons too long to get into, there is more going on in the shot that will just complicate the question.)  My only option is to use filters during my shot, to capture the way we perceive moonlight. The camera picks up moonlight as white light. Our eyes, however, perceive it as very desaturated with a slight hint of blue. I've got a blue filter, but the shot just comes out far too blue. I need to desaturate the light coming in to the camera (almost black and white.) Is there any possible way to use lens filters to desaturate light?  I can't shoot in b&w as I'm not only exposing the moonlight, but also a girl with a glowing balloon in the scene. It's all got to be done in one exposure.   Is there any way I can desaturate the light with use of a filter or series of filters?  Thanks a heap guys.  More info: thanks so much everybody, you all are right, but here's why and what I need. I'm having the girl and the balloons to be illuminated with lights and the balloons are going to be different colors and glowing. So she is going to be in full glory color, but she's going to be sitting in dim moonlight. To get the moonlight look, I can desaturate in camera settings and use a filter. But when its time to take the cap off the lens (shutter still open after capturing moonlight) and exposing the girl and balloons, the camera is going to capture her and the balloons in those same desaturated settings. My camera will not change settings in mid exposure, and although I think it can combine two exposures, this is a messier way of getting where I'm trying to go. And post is just about impossible. To capture full color in the image, and then darken and blue and desaturate the rest of the scenery is extremely imperfect.


Is there a mechanic by which a non-ranger character can have a useful animal companion? The PHB has animals that you can buy, but how can a character make use of them if they are not a beastmaster, have the find familiar spell, or an animal friendship spell?   As an example, I would like to find a way to have a fighter use a hawk for help with survival, hunting and possibly even to harass an enemy from time-to-time.

I'm fairly new to DMing and so is my group, so we are all on a learning curve together. We're playing D&D 5e.  Last week a fighter in our group tamed a wolf with Animal Handling and then requested that he keep the wolf. I allowed this, but now I'm not sure about how to play the wolf.  Specifically, how can he train the wolf to perform certain actions such as attacking?  What other things might I need to be aware of with a PC owning a "pet"?


Is there a way to tell if the insides of my pumpkins are still okay to cook with?  Assuming the innards smell okay, is it fine to eat?  Is it possible for the pumpkin to smell fine but not actually be fine?

It's the season for pumpkins and I was wondering if there is a way to tell if a pumpkin was going to taste good enough to cook with. I guess this is a similar situation as with a watermelon - you can't really cut it open to check if it will taste good.


in general: How can I make an application automatically start when I have logged in?

Is there a 'Startup applications' app for lubuntu? Or how do I add apps to startup? I attempted a tutorial to add entries to ~/.config/autostart, but it did not work. Isn't there an easy way? Any ideas please?