Is it possible to decrement a variable in MySQL?

I'm wanting to decrement a variable in a MySQL table by one everytime an UPDATE query is ran.  What I have is this, which isn't working:  UPDATE forum SET replys = reply--  WHERE fid = '$id'  Is this possible in any way, or am I going to have to run a SELECT and get the value first, decrement it, and then insert the new value into the UPDATE query?


What is going on with pgfpages and page labels?

I’m using a feature of beamer that shows notes beside slides, but the page numbers that are coming out are crazy, making it impossible to extract specific slides into other documents with \includegraphics[page=n]{presentation.pdf}.  For example, in this MWE, there are two frames that are each 1 slide, and then one frame that is four slides. The PDF page labels that show up in Acrobat are, as indicated, 2, 3, 3, 3, 3, and 7. It starts at page 2 instead of 1, and then there are four page 3s, but they don’t even all belong to the same frame!  \documentclass{beamer} \usepackage{pgfpages}  \setbeameroption{show notes on second screen=left} \setbeamertemplate{note page}{frame \insertframenumber \\ \insertnote} \def\pg#1{pgfpages says this is page #1 but it is really page \arabic{page}}  \begin{document}  \setcounter{page}{0}  \frame{hi \note{\pg{2}}}  \frame{there \note{\pg{3}}}  \frame{how \pause are \pause you \pause today \note<1-3>{\pg{3}} \note<4>{\pg{7}}}  \end{document}   Here’s what the output looks like:    I know that the manual says, “pgfpages will produce wrong page numbers in the .aux file” and gives a manual workaround. But the page counter still works, so shouldn’t there be some way to pass that through to the PDF? I’d like to fix this, but don’t know where to start. Specifically, when the manual says that “TeX instantiates the page numbers when writing an .aux file only when the physical page is shipped out,” what exactly is it talking about? Where is the source code for that?


How can I prove that one of $n$, $n+2$, and $n+4$ must be divisible by three, for any $n\in\mathbb{N}$

Intuitively it's true, but I just can't think of how to say it "properly".  Take for example, my answer to the following question:     Let $p$ denote an odd prime. It is conjectured that there are infinitely many twin primes $p$, $p+2$. Prove that the only prime triple $p$, $p+2$, $p+4$ is the triple $3,\ 5,\ 7$.   And my solution:     Given an odd integer $n$, between the three integers $n$, $n+2$ and $n+4$, one of them must be divisible by $3$... Three possible cases are $n=3k$, $n+2=3k$, and $n+4=3k$. The only such possible $k$ that makes $n$ prime is $k=1$. In this case, given an odd prime $p$, either $p=3$, $p+2=3$, or $p+4=3$. This would imply that $p=3$, $p=1$, or $p=-1$. The only of these three that is prime is $p=3$, therefore the only three evenly distributed primes are $3$, $5$, and $7$.   Is there a "better" way that I can assert that one of the integers is divisible by 3? This feels too weak.


icons disappear from desktop when app updates

On KitKat when I have a shortcut on the desktop and the app updates the shortcut on the desktop disappears, is there a way to stop this from happening?


How to ask a subject(person) to photograph them?

Even if it is just a friend or family,   what are tips to help make a person comfortable being photographed. Of course, not everyone is up for being photographed, but when they agree for a photo or you are asking them, how do you make a person comfortable with being shot?  Thanks!


How many ways can I arrange the numbers $1$ to $N$ with this divisibility condition?

For the numbers $1, \ldots, N$, how many ways can I arrange them such that either:   The number at $i$ is evenly divisible by $i$, or $i$ is evenly divisible by the number at $i$.   Example: for $N = 2$, we have:   $\{1, 2\}$   number at $i = 1$ is $1$ and is evenly divisible by $i = 1$. number at $i = 2$ is $2$ and $i = 2$ is evenly divisible by $2$.  $\{2, 1\}$   number at $i = 1$ is $2$ and is evenly divisible by $i = 1$. number at $i = 2$ is $1$ and $i = 1$ is evenly divisible by $1$.    so there are two such arrangements for $N = 2$.


One can use 'except' as a preposition, as in the following sentence:     I gave everyone except Mary a present.   Changing 'Mary' for a pronoun we get:     I gave everyone except her a present.   Clearly the following is wrong:     *I gave everyone except she a present   So my question is: does except always take the objective case in English? Consider the following sentence:     All except him agreed   To me, "he" sounds more elegant here, so maybe the noun affected by 'except' keeps the same case it would otherwise have in the sentence. But then:     Except I, we all agreed   sounds definitely wrong compared to "Except me, we all agreed." Perhaps it is not a matter of case at all, but something else? I found this question very hard to google for, so that's all I've got to bring to the table.


Are certain fields of physics axiomatized?

Everything from Quantum mechanics can be derived from six (?) postulates. Similarly classical electrodynamics can be reduced to Maxwell's equations and Lorentz force law, and special relativity is based on two postulates.   Are there similar sets of postulates for Newtonian mechanics/gravity or other fields of physics, like quantum field theory or string theory?


Is there a way in JPA to map a collection of Enums within the Entity class? Or the only solution is to wrap Enum with another domain class and use it to map the collection?  @Entity public class Person {     public enum InterestsEnum {Books, Sport, etc...  }     //@???     Collection<InterestsEnum> interests; }   I am using Hibernate JPA implementation, but of course would prefer implementation agnostic solution.


If I recall correctly, most of the references out there, including Wolfram Alpha, define the inverse of a square matrix $A$ to be a square matrix $B$ of the same dimension such that $AB=I$. But is this really a sufficient condition? I mean, yes, if $A$ and $B$ are over commutative ring, the commutativity of $AB=BA$ comes for free, but what if they are not? Doesn't the above definition only define the $\textit{right}$ inverse? So one needs to define the $\textit{left}$ inverse as a square matrix $C$ such that $CA=I$?  Thanks.


What are the chances of success and the consequences of sneaking into business class?

I've read some people writing that they've seen people be caught sitting in First/Business class when they have economy class tickets. This was for international flights on big planes with several hundred passengers.  Is this even possible, or is it improbable that you won't get caught? (At least when food is served)  And are there any consequences that it might entail?  There's no need for a discussion on ethics.


How to toggle or turn off text selection being sent to the clipboard

I would like to disable the default behavior that seems to happen with every Linux distribution that I've ever tried that any selected text is immediately sent to the clipboard (Mint, Ubuntu, Fedora, SuSE, etc.) and every window manager (Gnome, KDE, Cinnamon), and instead to behave more like the Windows implementation.    I know that this is a beloved behavior by many in Linux, and I'm sure many will think I'm an idiot.  The reason I want to do this, is that I'm a keyboard junky when navigating a GUI.  (e.g.  when I'm in Linux and I copy a URL and then switch to my browser and type Ctrl+L, it selects the address bar and moves my intended paste down one notch and replaces it with what I'm trying to overwrite.)  I know there are MANY workarounds, but I don't really care about that, what I'd prefer is to be able to toggle the behavior for the clipboard.


Has anyone tried automatic Java to C++ conversion for speed improvements? Is it a maintenance nightmare in the long run? Just read that is used to generate the HTML5 parsing engine in Gecko


I was working with the Arduino IDE. I tried to find out from where a MCU can be locked so that nobody can make a clone from it. I found many answers describing something about lock bit.  I realized that this lock bit can somehow stop users from cloning the chip.  My first question is with which IDE or programmer I can change the lock bit? Second question : Can it be edited with a hex editor? If it is possible, what is the position/which number of bit should be changed? Third question: Is there any way to encrypt the code?


Decompress a stream of bytes using deflatestream

I have a server and a client connecting using TCP socket. At the client (which is written in C++) I compress a string (str) using the zlib library:  uLongf compressedStringLength = compressBound(str.length()); Bytef* compressedString = new Bytef[compressedStringLength]; const Bytef* originalString = reinterpret_cast<const Bytef*>(str.c_str()); compress(compressedString, &compressedStringLength, originalString, str.length());   Then I send it to the server. This is the line of code where I write the compressed string to the socket:  int bytesWritten = write(sockfd, &compressedString, compressedStringLength);   At the server (which is written in C#) I recieve the stream of the compressed bytes from the socket and decompress it using the DeflateStream class:  NetworkStream stream = getStream(ref server); //server is a TcpListener object which is initialized to null. byte[] bytes = new byte[size]; stream.Read(bytes, 0, size); Stream decompressedStream = Decompress(bytes);   This is the Decompress function:  private static Stream Decompress(byte[] input) {         var output = new MemoryStream();          using (var compressStream = new MemoryStream(input))         using (var decompressor = new DeflateStream(compressStream, CompressionMode.Decompress))         {             decompressor.CopyTo(output);         }          output.Position = 0;         return output;  }   The compressing process and sending the compressed bytes over the socket works, but I get an exception at the line decompressor.CopyTo(output); at the Decompress function above: System.IO.InvalidDataException: Block length does not match with its complement.  Does someone know what the problem is and how can I solve it?  EDIT: I`ve already tried to skip the first two bytes brfore the start of the decompression process.


Just a thought, I see that many questions arise with 'Blockchain' and to address that can we have separate community in the Stack Exchange network?  We do have a 'Bitcoin' community, can we make a Blockchain community in general?  If no, then please point me why we should avoid it?


I'm new with this, so I'd like to know if someone can help me to solve this problem, I really don't know how to solve it, thanks!  Show that a graph $G$ is a forest if and only if every induced subgraph of $G$ contains a vertex of degree at most $1$


Fire alarm keeps going off when roasting in oven. Advice please?

The problem started recently. I cook a lot and especially love baking cakes and roasting all sorts of vegetables in the oven. Recently when roasting, I noticed smoke coming out of the oven and the fire alarm went off.   It was because a lot of grime and food drippings had accumulated (for over a year) at the bottom, and it was getting charred. The next day I cleaned up the whole oven (applying baking soda paste overnight then scrubbing with vinegar and steel wool). Except for the top of the oven which I simply can't get perfectly because that would require me to bend over backwards and clean, the rest is all squeaky clean.   However now when I try roasting above 350 F, it still causes the fire alwarm to go off. There's nothing else in the oven that's getting burnt, even the veggies I placed in the oven weren't done completely. I am really puzzled. Any suggestions?


How can I open binary Android ROM image files? (.img)

I'm a Windows/Mac/Ubuntu and Android user, so I know what I'm talking about, when I say: How do I open binary image files? (.img) They just won't open, on any OS…  I'm an Android dev… I'm currently working on a ROM, (I also program, using Windows) but I need to extract files, from .img files. I've converted them to .ext4.img but they just aren't recognized by Linux (Definitly not by Android), by Mac OS or Windows. In other words, I can't open, extract or mount them.  Can anyone help me? I'm kinda confused…


Precision of x decimal points in meters?

Is there a handy reference that corelates the number of decimal points in a coordinate to the precision in meters?  I had discussions like "4 decimal places will place you within a 500 meter radius" and "6 decimal places will place you in a house". I want a reference that can clear up such facts and requirements.


How to chose index funds, mutual funds from a plethora of options (TD Ameritrade)

I recently rolled over an IRA had to select how to divvy up my portfolio and choose securities. I largely stuck with index funds but I have to be honest I wasn't exactly sure what I was doing/choosing.   How can one navigate which fund to choose when presented with so many options? What should one look out for if they are a conservative investor wanting moderate growth without sacrificing principle.   The amount I rolled over was only a few thousand dollars but it does represent all the retirement funds I have (25 years old).  My portfolio break down looked something like this:  55% Domestic Fixed Income  24% Domestic Equity  10% International Fixed Income  10% International Equity  1% Specialty  An example of a fund I picked for each category would be (I picked multiple funds in each category):   DFI Delaware National High Yield Municipal Bond Fund Institutional Class (DVHIX)  DE 500 Index Fund Signal Shares (VIFSX)  IFI Ivy Global Bond Fund Class I (IVSIX)  IE Tax-Advantaged Global Dividend Opportunities Fund (ETO)  S PIMCO CommodityRealReturn Strategy Fund Class D (PCRDX)  I am not looking for people to tell me if these funds are bad or good (unless they are terrible and will cause me to lose everything then tell me)   But rather as you can see this is what I picked without much knowledge is there significant difference between the plethora of options offered from companies such as TDAmeritrade and how can I best navigate moving forward?  Thanks


Parametrized array - direct acess vs setter

I have a class, which contains a wrapped parametrized array:  public class CatContainer <T> {      T[] names;      public CatContainer(){         names=(T[]) new Object[10];     }      void set(int index, T value){         names[index]=value;     }  }   And have corresponding client, where i'm using two ways to access the array.  CatContainer<String> cats=new CatContainer<>(); //cats.names[0]="Murzik"; //cats.set(0, "Murzik");   Can you explain me, why when i'm using a setter the programm works fine, but when i'm using the direct access cats.names[0]="Murzik" the programm throws the Exception?     java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to   [Ljava.lang.String;   P.S. i have a solution about creating the generic array - the way with setter works fine. i'm searching for the explanation about the specified exception. i have no idea why it has been thrown when i'm using the direct access to the array. I know that generics in java have no specified type at run time and all parameters casts to Object type. But string is a subtype of object, so why the code is not working as expected?


Monotone, Bounded Local/Spline Regression in R

I'd like to perform an estimation of a probability (bounded [0, 1]) that has several input variables and success/failure results with those values. Some of these input variables have a monotone relationship with the probability, which I would like to use as a restriction.  I found the package isotone which has the routine mregnnP, which appears to at least satisfy the monotonicity + non-negativity. However, I don't see any means to enforce the upper bound (p <= 1). Furthermore, since my training data for this probability is based on events in the form of {0, 1} (success or failure), I don't see any transformation (e.g. logarithm) to guarantee the upper/lower bound while preserving my data.  I could implement the optimization by hand, but I was hoping there might be some pre-built package that would be faster to run and require less time investment.


If $3n+1$ is a perfect square where $n$ is a positive integer greater than $1$. Then how to prove that $n+1$ would be sum of $3$ perfect squares?


Is there a polynomial which vanishes at only one point

Assume $(a,b) \in \mathbb C^2$. Is there a polynomial $f(x,y)$ which vanishes only at $(a,b)$ ? Thanks.


local RAID vs server RAID with a 10GbE connection

we are trying to configure a descent size (in layman's perspective) storage at my lab. I am a skilled programmer, but my knowledge in hardware at non-consumer level is very limited at this point.  At this point, the following parts are my immediate concern: 1. workstation to analyze research data (raw microscopy data, binary data, etc. routine file sizes ranging from 50~200 GB; occasionally, up to 1~2TB/file) 2. a server to store files 3. there will be other computers connected to the server with regular 1GbE connection.  Based on research and the suggestions that I have received:  connection between the workstation and the server: 10GbE (10GBASE-T), iSCSI the server will probably be either: a Synology rack station or a custom built server from a local vendor.  Scenario 1  workstation: no RAID system. just an SSD to store OS and applications. server: RAID 5 (or RAID 0 with a back-up server), 12 disks (SATA III, "enterprise", 7200 RPM, 64 MB cache)  store all data on the server. on the workstation, read and write directly from and to the server.  Scenario 2  workstation: RAID 0, 4~6 disks (LSI MegaRAID 9260-8I is the one that the workstation vendor recommended, SATA III, "enterprise", 7200 RPM, 64 MB cache) server: RAID 5, 12 disks  store all data on the server—except copy working files(images that are being processed or analyzed) to the workstation disks to utilize the workstation's RAID0 array.  Questions   for Scenario 1, is the server's disk array speed fast enough to fully utilize the 10 Gbps connection? which scenario is going to be faster? which one would you recommend? (if you have any suggestions for modifications or a complete new set-up, I would appreciate your opinions) should we consider nearline-SAS drive(they seem to be quite expensive comparing to SATA III)? my vendor/sales-rep configured the server with nearline-SAS. we are not running any applications/databases that require a large number of input/output. we just need a fast, bulk storage.   I would greatly appreciate your help. Thank you in advance.


Carrying 2 laptops and 2 Mobiles to Chennai Airport from Sydney on return back to India

I travelled from Chennai to Sydney, Australia last year in July. I brought a smartphone and personal laptop with me while leaving to Australia and didn’t declare them as they are for my personal use. I have now purchased an iPhone and a MacBook here in Sydney as I am leaving back to India in a few days. Could someone please let me know if there will be any customs cost incurred on carrying these two laptops and two mobile phones in carriage luggage.  Please suggest if there is any way that I can manipulate this situation to get rid of the customs.


Debian 9; setting network devices for an www server

I'm trying to set up apache2 server on Debian 9. I'm using an laptop with Ralink network-card, witch was able to use eth0, at Debian 8, with looks more familiar for me. Since I update my system to 9 my network interface has changed and looks something like this:  Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg enp37s0   1500        0      0      0 0             0      0      0      0 BMU lo       65536      612      0      0 0           612      0      0      0 LRU wlo1      1500    36736      0      1 0         20492      0      0      0 BMRU   and  in the /etc/interfaces.d/setup file it's defined like:  auto lo iface lo inet loopback  auto eth0 iface eth0 inet dhcp   What is the enp37s0? And why am I connected to the router with wlo1, not eth0?   My routing table:  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         10.63.16.1      0.0.0.0         UG    600    0        0 wlo1 10.63.16.0      0.0.0.0         255.255.255.0   U     600    0        0 wlo1 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlo1   Is that a proper configuration?


Listings Package causes normal text to hyphenate at forward slashes

MWE:  \documentclass{article}  \usepackage{listings}  \begin{document}  IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII hardware/software  \end{document}   This results in this output:    If \usepackage{listings} is commented out, the hyphenation rules return to normal:    And just to note, in the actual environment I'm working in, it will also hyphenate between hard•ware, while with listings enabled, it hyphenates hardware/•software, as in the first image:    Two questions:   Why is this happening? Is there a way to disable this? I don't really want this behaviour just because I'm typing code occasionally in a document.


I'm trying to find the minimal distance between the surfaces described by $z=x^2+y^2$ and $x+y-2z=8$. I would imagine there are several approaches including the use of Lagrange multipliers. I attempted to find the spot when their normal vectors are parallel ( since i believe if these vectors are not parallel there is a direction that will bring the distance lower). So if $U(x,y,z)=x^2+y^2$ and $V(x,y,z)=x+y-2z$ are functions describing these surfaces then their normal vectors are $(2x,2y,-1)$ and $(1,1-2)$ respectively. Then I want their cross product to be zero; this is at $(1/4,1/4,z)$. But when i solve for $z$ and I cannot simultaneously satisfy both equations. What gives?! Am I along the right line of thinking?


Mac OS Mojave Terminal Resetting to Default Theme

I've recently worked out how to change my terminal theme and set the new theme as default through the GUI menu: Terminal > Preferences > Profiles > Default. This works and sets the current session to that theme but after restarting Terminal the theme resets back to basic.  I've tried deleting all other themes and setting a specific one, and although this will work for the remainder of the session it does not work after restarting the app.   I can't seem to find any specific help for this issue. Others have asked about setting a default or it not working on multiple windows/tabs, but that isn't the issue here.   Is there a config file where I can change the theme manually?  Any suggestions will be very much welcomed! Working on a 2017 MacBook Pro 15" (MacOS Mojave)


I tried several render tutorials, even using profesional textures taken from texture webs, and doing what they say, and my renders never look ok, never reflect the material I see in the properties window. Does anybody have an idea of why? I have "render cycles" on, have connected all the nodes between them, have enough light.... I´ve never managed to get a render that works yet. Thanks for the help


move and rename images and update a table

I want to give a unique name to each image in a folder and move them into another folder, and then update table posts according the new value.  $list = glob("../cardimg/*.jpg"); $x = 1; foreach ($list as $item) {   $id = uniqid();   rename ($item, "../carda/" . $id . ".jpg");   $st = $db->query("update posts set img = " . $id . " where id = " . $x);   $x++; }   Error: Unknown column '5ac7d19eb11d8'...  But I know - there is no such a column in my table - I want to update img column.  id column is from 1 to 50.  Why I'm getting this error?


Let's consider the set consisting of $8$ elements $\{\pm1, \pm i,\pm j, \pm k\}$ with the following multiplication table:     We see that $1$ commutes with any of the $\{i,j,k\}$.  For example, we want to consider the product $(-1)\cdot j$, since $i^2=-1$ then we can rewrite it as: $(-1)\cdot j=(i\cdot i)\cdot j=i\cdot(i\cdot j)=i\cdot k=-j$.   In this example and in many others in order to multiply elements we need to use associativity property. How to prove that associativity is true in this set?  In similar  I have seen approach using automorphism. However, I was not able to comprehend it. Can anyone explain it please?   Would be grateful if somebody can demonstrate some elementary approach. In my opinion it is definitely important to know.


If statement to determine whether a kernel is 32 or 64

I'm trying to know whether a kernel is 64 or 32 in #!/bin/sh.  I build this code!  krnl=$(uname -i)  # Check whether 64 or 32 bit kernel and download the correct version; if [ $krnl='i386' ] ; then # 32   # Do 32-bits stuff else   # Do 64-bits stuff fi   But it seems to return always true. What I'm doing wrong, Why this is happening and how I can fix this? What I googled always show me in bash or doesn't work.  Thanks in advance!


Does a comma always separate the nonfinite clause from the main clause?

Does a comma always separate a nonfinite clause (particularly one that contains a present participle) from the main clause of a sentence.   "I have called to heaven hoping for an answer."  vs. "I have called to heaven, hoping for an answer."  Which is the better choice? Thank you.


Determine if a set of tiles on a grid forms an enclosed shape

Given a set of tiles on a grid, I want to determine:   If the tiles make an enclosed figure If the tiles make an enclosed figure when you count the sides of the board as an edge of the figure If either of the previous two statements are true, which additional tiles fall inside the enclosed figure the initial tiles form.   The player will begin by pressing down on one tile, then dragging their finger to other tiles to create a chain of same-colored tiles. I will check as I go to see if the next tile is valid. Ex. If the player begins on a red tile, their only next valid move is to an adjacent red tile (diagonals do count). When the user lifts their finger, I need to be able to check for the 3 items above.   So my initial thought was that, since I was checking for the validity of the chain each time I went, when the player lifted their finger I could check if the first and last tiles were adjacent. (I already know they're the same color.) If they were adjacent I had a hunch that I'd made an enclosed figure, and I was going to come here to try and see if I was missing something big, and to get some kind of logical/mathematical proof that my hunch was correct (or an example proving it incorrect.)  But that's when I thought of item number 2: I also have to account for chains which use an edge of the board as a side of the enclosed figure. In that case, the first and last items in the chain would not be adjacent, but I would still have an enclosed figure. So now I'm back to square one, a bit.   What can I do with this chain of grid coordinates to figure out if they make an enclosed figure or not? And once I do know I have an enclosed figure, what's the best way to get an additional list of all tiles that fall inside its bounds?      Above I've drawn pictures of what I expect the 4 possible results of this test can be.    The chain does not make an enclosed figure. The chain does make an enclosed figure. If you count the sides of the board as an edge (or more than one edge) of the figure, the chain does make an enclosed figure. The chain does make an enclosed figure, but there are extra data points (validly selected by the user as part of the chain) which are not a part of the figure that is created.    Case 4 is the trickiest, because you'd have to extract the "extra" chain links to find the enclosed figure and the pieces that fall inside it (but not around the "unenclosed" area).  So... Anyone have an idea of a good way to solve this, or just a starting point for me? I'm kind of going in circles at this point and could use another set of eyes.


Present or Past tenses when talking about the previous studies

I am writing a research paper and found that some paper use present tense to describe the previous studies. For example,     There are several surveys which summarize the existing opinion mining   work [9, 21, 14]   But some sentences use Past tense:     Zhou and Chaovalit performed sentiment classification on reviews using domain ontology database.   When we want to talk about what has been done in the past in terms of research contribution, what is the general rule to choose between Present and Past tense?


I had applied for a visit visa (business) to appear for my PLAB 2 exam on 21 June 2019. I had to attend practice classes from an academy in Manchester for which I had attached the invitation letter; my duration was 15 days to prepare my exam in a better way. I had mentioned the cost of my trip to be £1500 and my brother sponsoring me for £3000 (my entire trip).   My rejection letter stated that I was going with my mother, when I had nowhere in my form or cover letter mentioned that I am going with my mother, because I was going alone. I had shown that my brother is my financial sponsor as I didnt have enough funds in my account. I had attested all the documents of my brother but somewhere in my form I made a mistake where I wrote the total money I have is £3000, but I had only £1200 in my account. I thought we had to write the total amount, so I put my brother's sponsor money, which was supposed to be £3000; he hadn't transferred it into my account, it was in his account only.  I made one more mistake in the form where they asked how much is the cost of travel to you personally. I wrote £1500 but I think I had to write nil there.   I don't know how to proceed now. Should I transfer £3000 into my account from my brother's account and get a bank statement proving the source of income? I don't have enough money in my account despite bring employed since Nov 2018 with a salary of £700 per month, as I had to make some big transactions such as booking my PLAB 2 exam (£830£), etc.  I have already booked the exam for £830 and I don't have much time left.


Single word to describe something that describes itself

For example orange - orange describes exactly what it is.  I thought that the word was onomatopoeia but when I looked it up — it's described as sounds; e.g. bleat for lamb or miaow for cat.  I was watching a TV cop programme, and one of the female officers was being unkind/rude about a fellow male officer who was called Dick, saying he was an onomatopoeia. I am sure I did look this up at some point and was given the nicer description of orange as an example of an onomatopoeia. So can someone clarify for me?


Does Google Map support  like Google Earth?

I am uploading kmls into Google Map (not Google Earth).     My KMLs contain polygons (county borders).  There is a different "styleurl" for each county.   Right now I can control the content of the bubble via <name> and <description> from within the polygon's <Placemark> tags.   Instead I would like to control the bubble content from within the Style definition, using   <BalloonStyle>    <text>My custom text</text> </BalloonStyle>        Q1 Does Google map support these functions (my testing so far suggests "no")  Q2 Where could I have looked up this answer on my own before posting here?  Thanks!


Is there any uncountably infinite set that does not generate the reals?

Does there exist an uncountably infinite set $X \subseteq \mathbb R$ such that $\mathbb R \neq \left<X\right>$? I can't think of any, but I'm also having trouble trying to prove that no such subset exists.  For example: $\mathbb R$ is uncountable and obviously $\mathbb R = \left<\mathbb R\right>$. The Cantor set $C$ is uncountable, and we know that $C - C = [0, 1]$, so then since $\mathbb R = \left<[0, 1]\right>$ we know that $C$ also generates $\mathbb R$. Also the set of irrationals $\mathbb R \setminus \mathbb Q$ is uncountable, but we can generate all the rational numbers by fixing one irrational number $\alpha$ and then saying the any rational number $x$ shall be $(\alpha + x) - \alpha$, since both $\alpha + x$ and $\alpha$ are irrational.  So the examples that quickly come to mind all generate the reals. Is there a simple counterexample?


I wanted to know if I buy something off the pre-installed Ubuntu Amazon App does canonical or the Ubuntu project get commission from it? 16.04 version of the app has significantly improved since the 14.04 version but it's still has a few odds and ends that make me use the web browser instead, when I am ready to make a purchase I go to the Ubuntu Amazon app to finalize it because I am hoping they get some commission from the sale. Do they or am I just wasting my time?


What to do when I have expected count <5 warning for a chi squared test?

I applied a survey consisting of 12 questions to 120 people and each questions include 4 nominal categories; I want to make comparison of people's answers according to their socio-demographic characteristics such as their educational level or socioeconomic status. All of my comparison criteria consist of nominal categories and number of categories change between 3 to 6. I cannot drop or combine comparisons; categories in other words number of categories are fixed.    My question is when I compare the frequency distribution of people's answers based on their education levels (for example) through chi-squared test, I got a warning that says (for instance) 7 cells have less than count five; minimum expected count is; 43.  I got this warning for almost my all questions - demographic characteristics comparisons.    Shall I underestimate this warning and use my test results or is there a different test I should use? If I should use a different test, which one?


How can I get vsftpd version into shell variable?

I want to get vsftpd version into shell variable. I can get it to console with ease:  # vsftpd -version vsftpd: version 2.2.2   Also I can get a lot of other info into variable:  # i=`bash --version 2>&1 | head -n1`; echo "=$i="; =GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)=   (please note output is between "=" signs). This simple way does not work with vsftpd:  # i=`vsftpd -version 2>&1`; echo "=$i="; vsftpd: version 2.2.2 ==   Please note $i is "" here.  What am I doing wrong?


How to speed up rendering of transparent areas?

This is a bit of a trick question. We know that HOLDOUT will subtract objects from renders. My question is slightly more elaborate. I had a render that I spent a fair amount of money on (render farm), only to find out that a material was set to the wrong settings. So I'm re-rendering the animation with every other object BUT the one I need using the HOLDOUT feature. However, Blender is crawling all over the rendering even though 80% of the frame is 100% transparent. I'd love a way to have Blender only render the area where the object exists. I know about setting a render area method, but the problem arises where I need the object to be in the EXACT location that its predecessor was that had the material problem, so rendering the entire 4k frame is very helpful for a clean overlay.


Generic Deep Copy in C# for user defined classes

I am facing a problem in writing generic deep copy method which copies class 1 to class 2 of same structure with different namespace. After searching in net I was able to do at one level of mapping, but problem was if the properties are referring to some other user defined class how to do recursive deep copy. Below is the sample class for better clarity: From the below example I am trying to copy Namespace1.class1 to Namespace2.Class1 (Class1, GenderType, Subject exists both in NameSpace1 and NameSpace2).  Namespace1.Student {   String Name {get;set;}  Int Age {get;set;}   List<Subject> lstSubjects {get;set;} //Here we need recursive copy.  GenderType gender {get;set;} }   Enum GenderType {   Male,   Female }  NameSpace1.Subject {    string subjectName {get;set;}    string lecturereName {get;set;} }


Prove that lim $(\sqrt{n^2+n}-n) = \frac{1}{2}$

Here's the question: Prove that $\lim_{n \to \infty} (\sqrt{n^2+n}-n) = \frac{1}{2}.$  Here's my attempt at a solution, but for some reason, the $N$ that I arrive at is incorrect (I ran a computer program to test my solution against some test cases, and it spits out an error). Can anyone spot the error for me?  $\left|\sqrt{n^2+n}-n-\frac{1}{2}\right| < \epsilon$  $\Rightarrow \left|\frac{n}{\sqrt{n^2+n}+n} - \frac{1}{2}\right| < \epsilon$  $\Rightarrow \frac{1}{2}-\frac{1}{\sqrt{1+\frac{1}{n}}+1} < \epsilon$  $\Rightarrow \frac{1}{\sqrt{1+\frac{1}{n}}+1} > \frac{1}{2} - \epsilon = \frac{1-2 \epsilon}{2}$  $\Rightarrow \frac{1}{\sqrt{1+\frac{1}{n}}} > \frac{1-2 \epsilon}{2}$  $\Rightarrow \frac{1}{\sqrt{\frac{1}{n}}} > \frac{1-2 \epsilon}{2}$  $\Rightarrow \sqrt{n} > \frac{1-2 \epsilon}{2}$  $\Rightarrow n > \frac{4 {\epsilon}^2-4 \epsilon +1}{4}$


comicbook-like material that looks like one of matcaps

how would you get the material that looks like black and white matcap. the last position on the matcaps "menu". the one that look like a comic book.


I know that <, <(), << all are used to give input and  >, >() which are used to redirect output.  But I don't know what is clear difference between them and when to use them.  Please explain in detail and along with references if possible. Thanks


Disable prompts in Microsoft Excel when saving a CSV file

I have to download multiple csv reports from the Internet throughout the day, make a tiny change to them, and save the change.  Excel adds 3 completely unnecessary dialogs to what should really be a 5-second operation.   It makes you select a file name in a "Save As..." dialog, even though you just want to save  the existing file It makes you confirm the file name, because it thinks you're overwriting the original file It asks you if you really want to save in the CSV format   Is there a way to kill at least one or two of these dialogs, but ideally all of them?  This is completely infuriating.


Do admissions care how close a TOEFL score is to the minimum?

I work with some students who will attend graduate school in the US. The schools they are applying for list minimum required TOEFL scores. Some have just reached the minimum scores required for admission to their schools of choice. Do admissions departments ever care about how close this number is to the minimum? In other words, will the students be at any greater advantage if they retake the test and get a higher score, or is the "score level met" simply a "met" or "not met" variable that goes into deciding whether or not the students are accepted?


This compares the values in both lists for common numbers.   a = [1, 2, 2, ]  b = [1, 2, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12]  c = a + b  new = []   for i in c:     if i not in new:         new.append(i)   print(new)   Why is new = [] necessary? Is there no way to figure this out with just c?


What are the consequences of running chmod 755 -R on home directory?

I accidentally executed  chmod 755 -R $HOME   For now everything works fine, but I haven't rebooted my laptop yet.   I wanted to know what are the consequences of my actions? I'm especially concerned about configuration files. Could something break?  The only important thing I can think of is to set back correct permissions on ssh keys. Is there anything else I should take care of?  I'm aware of exising question: , but it seems to address bigger issue which is running chmod on system directories.


A bigger curly bracket in the system of equations

I'm using Lyx and I need to type this system of these two questions. The problem is that I know almost nothing of TeX so I use a script a friend of mine wrote for me:  \begin{cases} \frac{y}{x+y}-0.34=\frac{y}{x+y+3}\\ \frac{y}{x+y}-0.17=\frac{y}{x+y+1} \end{cases}   Problem: what I don't like about that script and its outcome is that the equations inside the curly bracket get smaller if you compare them with the first two equations in the screenshot.     What I want: I want to have the equations inside the curly bracket to be the same size as the first two ones in the screenshot. I guess for that I need a bigger curly bracket or some other magic which I do not possess. How can I do that?


How to restrict awk math output to 2 decimal places

My Command is below and its print Free CPU and Used CPU below format.  I want to restrict awk output to 2 decimal place.  grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} {free=($5)*100/($2+$3+$4+$5)} END {print "Used Cpu:",usage "%"} {print "Free Cpu:",free "%"}'   Output :   Free Cpu: 98.9588%  Used Cpu: 1.04125%   Desired output :  Free Cpu: 98.95%  Used Cpu: 1.04%


How do I change a multiplayer world into a singleplayer world?

I'm currently on a server that's going to be shut down, I have a few things on that server I would like to save so I was wondering if there is any way to convert this world into my own singleplayer world.


Can a free electron accelerating in a gravitational field absorb photons?

An 'free' electron accelerated in an electromagnetic field can both absorb and emit a photon. What about an election accelerating in a gravitational field?  Edit: Some users have suggested that the question is a duplicate. However, my question asks about photon absorption, not radiation of photons.


Diagnosing and fixing random Ubuntu crashes without SysReq?

I have read  and tried to follow the selected answer's advice. I have also read  but the second question I believe is unrelated to my issue. (But I'm not sure.)  When Ubuntu (Or possibly just Unity) crashes everything stops working. I have to completely turn the machine on and off. I cannot do the SysReq soft-reboot because I have not been able to find a key-equivalent for my keyboard/laptop model.   I can provide logs upon request, but to be honest I don't know which ones would be of use, or how much of those logs would be of use.   My computer is a Dell Inspiron 11 3000 series. I believe  is my model, assumed after cross-checking system specs with the listing I linked. The PC is running the newest LTS release of Ubuntu 14.04 Trusty Tahr.   At first I believed this to be a problem that only occurred during video playback, but while the system doesn't crash near as often when not playing back video, it still will occasionally.   I'm a software engineer, so I HAVE to have a reliable computer. I've recently decided to open-source all of my company's non-client-specific code, and changed all of my servers to Debian, and also installed Ubuntu on my main workstation. The company now uses 100% open source software on all of its machines. However, I will be forced to return to Windows if I can't resolve this issue, and I would really be bummed about that.    What are the steps, in plain language for an Ubuntu novice, of diagnosing crashes on Ubuntu? Once discovered, what resources can I use to fix these issues? And finally, is there a chance that I will be forced to use proprietary software in order to correct these issues?    Thanks.


How do I disable volume/brightness popup?

This is the volume pop up. How do I remove it? It's highly annoying when it appears when playing a movie


How to Deserialize specific XML document

How to deserialize this kind of XML document :   <?xml version="1.0" encoding="utf-8"?> <ModelInformation Version="0.9"> <Model> <Block BlockType="SubSysteme" Name="subSysteme1">
xx

xx
    <System>
xx
       <Block BlockType="Entree" Name="Entree_1">          <p Name="coordonne"
       </Block>        <Block BlockType="Entree" Name="Entree_2">
xx
       </Block>       <Block BlockType="Entree" Name="Sortie_3">
xx
       </Block>       <Block BlockType="SubSysteme" Name="SubSysteme1.01">
xx

xx
          <System>
xx
             <Block BlockType="Entree" Name="XXX">                <p Name="coordonne"
              </Block>             <Block BlockType="Sortie" Name="XXX">
xx
             </Block>          </System>       </Block>    </System> </Block </Model> </ModelInformation>   There can be have several systems,subsystems,blocks...  I need to retrieve their attributes names.  First I tried this :   public class Block {     public Block() { }      /*[XmlAttribute("BlockType")]     public String BlockType { get; set; }*/      [XmlAttribute("Name")]     public String Name { get; set; }      [XmlArrayItem("Block")]     public List<BlockType> BlockTypes = new List<BlockType>(); }   and the main :   Block block = null;             using (var stream = new StreamReader(@"C:\Users\U503124\Desktop\BstSP_v41_01460_14_01420_v41_0\simulink\blockdiagram.xml"))             {                 var serialiser = new XmlSerializer(typeof(Block));                 subsystem = (Block)serialiser.Deserialize(stream);                 Console.WriteLine(block.Name);              }   block.Name is null, I don't know why.  There are the same tag HTLM inside tag HTLM. How to process?


Anybody have any idea why this piston is powered?

Anybody have any idea why this piston is still powered? There is not redstone power connected to directly to it, and the nearest sources are either an off torch or a repeater. If it helps I'm using minecraft version 1.16.4.


I need to make an AJAX request from a website to a REST web service hosted in another domain.  Although this is works just fine in Internet Explorer, other browsers such as Mozilla and Google Chrome impose far stricter security restrictions, which prohibit cross-site AJAX requests.  The problem is that I have no control over the domain nor the web server where the site is hosted. This means that my REST web service must run somewhere else, and I can't put in place any redirection mechanism.  Here is the JavaScript code that makes the asynchronous call:  var serviceUrl = "http://myservicedomain"; var payload = "<myRequest><content>Some content</content></myRequest>"; var request = new XMLHttpRequest(); request.open("POST", serviceUrl, true); // <-- This fails in Mozilla Firefox amongst other browsers request.setRequestHeader("Content-type", "text/xml"); request.send(payload);   How can I have this work in other browsers beside Internet Explorer?


"Your Sites" list entries are of enormous height on Android app

With the update to 1.0.85, the site icons on navigation drawer were rearranged. I can't really discover how the new order was chosen. At least it's the same for tablet and smartphone.  When I choose 'Edit', the list entries are of enormous height. This is also common for both tablet and smartphone.


Was Gandalf a regular visitor to the Shire prior to Bilbo's birthday party?

In The Fellowship of the Ring (movie), Gandalf arrives at the Shire to much fanfare.  In particular, young children chase his wagon hoping to see some magic.  This would logically imply that Gandalf was well known in the Shire, since the children would be too young to remember him if he was not a regular visitor. However, the movie and the book differ somewhat. Is there canonical evidence in the books that Gandalf was indeed a regular enough visitor, or at least had been to the Shire very recently before the party?


Does the Sun revolve around the supermassive black hole at the center of the Milky Way?

I'm curious to know, does the sun really revolve around the black hole at the center of the galaxy?


When viewing the activity tab on my profile (.../679449/freshprinceofso?tab=activity), I noticed that some nomination comments don't adhere to the same style as the rest of the comments and appear enlarged:    This happens when using the "Request Desktop Site" option in Chrome.  App: Chrome 32.0.1700.99  OS: Android 4.4.2; Nexus 5 Build/KOT49H


Looking for a book about dog rescued from scientists, then kids get superpowers with red eyes

It’s  about a dog or some kind of dog-like creature that was getting tested on in a science lab and looked like he was about to die and then a girl (maybe with friends) saves it. They learn it had some kind of disease and the kids get weird symptoms and they get red eyes sometimes. The go to school or something and they go to a party (I'm not sure, but I feel like they meet a guy named Chance or with last name Chancellor). In like the 1st or 2nd book or something, he gets the disease too on purpose with like blue eyes or something like that. Anyone know the name?


If I want to prove that a set $ \{0,1\}^{|A|} $ is finite for $ A$  finite set in a rigorous formal way, induction is innevitable? because my idea was to claim that by definition of $ |A^{B}| $, it follows that $ |\{0,1\}^{|A|}|=2^{n}\in\mathbb{N} $ and therefore $ 2^{n}<\aleph_{0} $. Is this proof wrong? I have to use induction in order to prove this claim? If someone with experience of checking exams could tell me if he would accept this proof, this would be very helpful. Thanks.


Convert a column into comma separate list

I have the task of creating a simple Excel sheet that takes an unspecified number of rows in Column A like this:  1234 123461 123151 11321   And make them into a comma-separated list in another cell that the user can easily copy and paste into another program like so:  1234,123461,123151,11321   What is the easiest way to do this?


Getting on Eurostar at the wrong station

I have bought return tickets from London to Lille Europe on Eurostar. The trains on my outward and inbound journeys both stop at Calais Frethun.  Will Eurostar let me get on in Calais on the inbound? What about getting off at Calais on the outbound leg? I suspect leaving the train early is easier than getting on the train 'late'.


Keep spending money fixing an old car or buy new car

I have a 2004 Honda Accord EX.  It has close to 200k miles but is paid off.  KBB says its worth is between 2500 for trade in or 3500 for private party sale).  I don't know much about cars but it seems to still be in good condition.  I've brought it in every 10k for servicing and have it up to date on any recall repairs required.  At the last servicing, the dealership said that my brakes needed replacing (~$800 at the dealership, probably cheaper elsewhere).  Also, the tires were old but they still had some wear left (7 yrs old but measured at 6/32).  Estimating about $600 for tires from Costco.  I was advised to look into getting new tires due to the rubber starting to break off and having a possible blow out on the freeway.  So right there is around $1400 in repairs, about 1/2 the value of the car.  Someone told me if the repairs are cheaper than a car payment, then do it.  In this case, if I keep the car about 4 months, then it's close to break even.    However, due to the car's high mileage, it's possible that something might come up within this 4 months and to break even on whatever the new repairs are, I will need to keep it longer and thus a possible endless cycle of repairing/keeping an old car to break even.  So, does it make sense to put in ~$1400 to fix now and drive for at least another 4 months or start looking for a new car and not worry about repairing a possible money pit?  UPDATE: This is a 2004 Honda Accord EX in "good" condition (good after answering the questions from KBB)  UPDATE #2: Seems like the price can change too.  I just checked on KBB again for the price and it says my vehicle is a low volume vehicle and can't give me a trade in price but gave me a private party sale price.  I guess the price can change from week to week (or in my case about 3 wks ago) depending on the market.    EDIT: I just realized I should clarify my thought process in this situation.  There were a couple times in the past where my family kept putting money into an old car b/c "they don't make them like they used to" or "it's still a good car.  Don't get rid of it", or like everyone is saying here in the answers and comments.  One car we had, an old Volvo, needed repairs and we put about 9k over 18 months into the car and it still wasn't working right.  We sold it but only got 1k from the buyer after pouring so much money into it.  Another time, we had another car that needed a 2k repair.  We calculated that to get our money's worth, we needed to drive it for about 7 months to get our money's worth and break even.  We drove it 2 months before it broke again and needed a 1k repair.  We estimated needing to drive an additional 3 months to break even.  After another 2-3 months, something else broke but we kept throwing good money after a bad problem.  I don't remember the total amt we wasted in the 2nd case but the issue was the same, we put a lot of money in but didn't get our return and didn't know when to cut our losses.  So, this is why I'm asking this question now with my current car.  The lucky thing is, I've looked up the KBB price before anything happened (we didn't look up before with the two previous cars since there was no internet or iphones at the time) and I'm more knowledgeable due to personal experience.  Hopefully this explains my thought process in this situation.  I don't want to get caught throwing good money after bad or feeling like I need to keep driving to get my money's worth from the repair.  Thank you for everyone's answers and comments thus far.  They've all been helpful.


I am doing some work with Gaussian mixture models and we want to find the standard deviation of samples from the model. Our current methodology is to run a Monte-Carlo sim, and just take a bunch of samples then evaluate the std of those samples. This method is time-consuming and kinda ugly.  I am curious if anyone knows of a closed-form solution?  I started making some headway on calculating the variance of a gaussian using a new mean. aka E((x-c)^2) | x ~ N(u,s). Then say Var(sample_gmm) = sum_i(pi_i^2 * E((x-c)^2) | x ~ N_i) and c = sum_i(pi_i * u_i). However, the resulting formula is Very ugly. I haven't been able to find any online discussion on this problem.


Automatic labeling of multiple figures in figure environment

I'm doing a project which generates 10 to 20 similar images, which I should implement in a report. Since they are all "generic" I would like to have an algorithm which autogenerates the image, caption and label, according to the image name. The following code is already implemented and partly operational. The issue is that the compiler generates all the images I need, as well as giving them the correct caption, but it fails at giving them a label, which I would find usefull when commenting each picture. I get a couple of warnings regarding labels without links, and several undefined references, so maybe there is some issue in the compile order.  Is there any easy fix to this? I'm fairly new at Latex, would appreciate any help given =)  The code I'm using today is given below:      \foreach \i in {1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000} { \lipsum [\i]   \begin{figure}[htb]     \centering    \includegraphics[width=0.8\textwidth]{Figures/Results/res_\i K.PNG}    \label{fig:res_\i}    \caption[Color temperature measurement \i K]{Color temperature measurement \i K}   %    \label{fig:res_\i}  \end{figure}  }  As \autoref{fig:res_1000} depicts


How long should a temporary notification (toast) appear?

For our intranet application we have little notification messages (toasts) that indicate successful operations like "information saved," "logged out" etc. Most of them are not important enough to require a modal operation (like Stack Exchange's "click to close" windows) so they close automatically after 2500ms and I'm trying to make them disrupt the user as little as possible. They are however important to present as users need confirmation an action was successful as it may be part of a repetitive or complex workflow.  I want to make sure they're readable and understandable within the time frame so I was wondering if there was any research on how long it takes people to read information especially in a "pop up" style context. It's not actually a pop up window, more like SE's notification bar but it automatically goes away. If I could ballpark how long to expect reading to take it would help tune the duration of the message and the length of messages.


Ubuntu Server 18.04 LTS - What kernel version does it come with?

I am currently considering installing Ubuntu Server 18.04 LTS on a new box that will be very I/O intensive (multiple Samsung 970 Pros used for a crap-ton of random R/W I/O), instead of the usual CentOs (with its ancient 3.x series stock Linux Kernel). I was wondering what stock kernel Ubuntu Server 18.04 LTS will be packaged with?  I know that Ubuntu 18.04 LTS itself has a pretty recent kernel and am wondering what the Ubuntu team chose for the Server release.


Alignment issue in the Flagging > Closing > Off-Topic section

There is a minor alignment issue in the Flagging > Closing > Off-Topic section.  The radio button's margin-top is not matching with the text content, in remaining sections the alignment is set correctly.  Screenshot for reference:    Steps to see the window:   click on the flag link in any of the question, then click on the Should be closed... radio button, then click on the off-topic because... radio button   OS: Windows 8.1 Mozilla Firefox: 50.1.0 Google chrome: 51.0.2704.103 m Zoom: 100%


Error in proof: Distribution of exponents for negative number

Here are steps of the "proof":  $1=1$  $\Rightarrow 1=\sqrt{1}$  $\Rightarrow 1=\sqrt{-1\times-1}$  $\Rightarrow 1=\sqrt{-1}\times\sqrt{-1}$  $\Rightarrow 1=i\times i$  $\Rightarrow 1=-1$  At which step did things go wrong?


Converting a 1D list into a 2D list with a given row length in python

Is there an easy way to convert a 1D list into a 2D list with a given row length?  Suppose I have a list like this:  myList =  [1, 2, 3, 4, 5, 6, 7, 8, 9]   I want to convert the above list into a 3 x 3 table like below:  myList = [[1,2,3],[4,5,6],[7,8,9]]   I know I can accomplish this by creating a new 2D list called myList2 and inserting the element into MyList2 using 2 nested for loops. Like MyList2[x][y] = myList[i] i++  I think there should be a better way to do it (without using external libraries or modules)  Thanks!


Relatively simple problem in special relativity physics

What would happen to the signal of a theorically very efficient videocall (the signal travels at the light's speed), if this was between a spaceship, which travels at half the speed of light, and the earth, which for convenience we should consider steady? What would the man on the ship see? What would the man on the earth see? Ps. I'm pretty sure it has a known and quite simple explanation, I just can't get work it out.


How to tell the version of Firefox in Software Updater

I am currently using Firefox 52esr (52.9.0). I want to keep using 52esr (I am aware of the issues in doing so and not asking about that here).   As of yesterday "Firefox Web Browser" is listed as an update item in Software Updater.  My question is how can I find out what version the update is before installing it.  In this case, the update could be a minor update within (52.9.0) (no problem) or update to the next esr which is/will be 60esr (not wanted). I don't know if it has been released by Ubuntu yet.  Also, is there any information whether 52esr will update to 60esr as routine (because 52esr support from Mozilla has ended)?


Fact Grain & Modeling Loan Approval Proccess

I'm modeling for a lending company and I'm modeling our loan approval process. I have some basic dimensions relative to our business figured out:  Time(day) Account Opportunity Channel  And I and getting to the modeling of fact table(s) around the loan approval and decisioning process. An opportunity will get one or more "Credit Reviews" which have a series of steps they go through before arriving at a "Credit Decision". My instinct is to model the fact grain at the credit review step level or maybe the credit review level (or have one fact for each).   I'm working with some analysts who are used to using a canned report that is at the opportunity level, and finds a "best credit review", and do their reporting at this granularity. I'm trying to explain my credit approval fact and how it would work and they think it's "overly complicated" and seem to want a fact table that is one-to-one with the opportunity, which is a dimension. And contains information on only the "best" credit review. In my mind that seems odd. I haven't run across a fact table that is at the same granularity (one-to-one) with a dimension. Have you ever heard of this? It feels like they are just trying to reproduce what they are used to, a non-dimensionally modeled report at the opportunity level. I'm trying to explain the utility of having a fact table that is at a higher granularity than they are used to in order to support many questions about the data rather than one, but I seem to be running into a wall getting this concept across.  My question is this. Is it every appropriate to model a fact that has the same cardinality as a dimension? What would you recommend for this situation?


Are gravitational time dilation and the time dilation in special relativity independent?

There are two kinds of time dilation:   One because the other clock moves fast relative to me (special relativity). Another one because the other clock is in a stronger gravitational field (general relativity), or accelerating rapidly (equivalence principle).   So are these two effects are totally independent? Is it possible to derive the general relativity case from the special relativity case?


Does loading metas from database affect my website SEO?

I am developing a website which is fully dynamic. If I load metas and other information of the website from database, will it affect my website's SEO?


How to add dev modules to a distribution without getting security updates warnings?

I have made a distribution, which contains some modules which are in dev state. These modules are being by drush make checked out by git. So my drupal-org.make file contains something like:  projects[ctools][type] = module projects[ctools][download][type] = git projects[ctools][download][url] = http://git.drupal.org/project/ctools.git projects[ctools][download][revision] = e720f61 projects[ctools][subdir] = "contrib"   (I need ctools' current dev version because of a batch that was commited shortly after 7.x-1.4 came out.)  This works ok but when using my distro I always get "security updates available"-warnings, which I would not get if I downloaded and used this same dev version on a standalone project.    What is the best way to handle this? Can I somehow tell drush make to download a specific dev version, as these dev versions are packaged by d.o. and are idenifiable: e.g. version = "7.x-1.4+4-dev"


Circular arrangement, probability of winning a game.

A host and 9 guests are seated at a circular table. Your host is feeling generous: she places a gold coin in front of her, and announces that one of you will be taking it home.   Whoever has the coin — beginning with the host — will flip it: if heads, they pass left; tails, they pass right. This continues until everyone has held the coin at least once — at that instant, the game ends, and the person holding the coin takes it home. In other words, the winner is last person to hold the coin for the first time.   In the example below, the coin goes from the host to A to B, then circles between A and B for a while, then goes from B to C. In that hypothetical scenario, it would be impossible for the host, A, B or C to win (but you would still have a chance).   You're sitting immediately to the host's right and the game is about to begin. What's your probability of winning?


I know we say one point or two points, how about zero? Do you say zero point or zero points? Or both are ok depending on the context?


Confidence interval for Bernoulli sampling

I have a random sample of Bernoulli random variables $X_1 ... X_N$, where $X_i$ are i.i.d. r.v. and $P(X_i = 1) = p$, and $p$ is an unknown parameter.  Obviously, one can find an estimate for $p$: $\hat{p}:=(X_1+\dots+X_N)/N$.  My question is how can I build a confidence interval for $p$?


What is parametric equations of a locus of a fixed point of a circle rolling along a ellipse in $\mathbb{R}^2$?

I have learnt about cycloids and have a related question:     What is parametric equation of a locus of a fixed point of a circle   rolling along an ellipse in $\mathbb{R}^2$?


This is a ridge regression problem. The following two problems are equivalent:  $(w_t, b_\lambda ) = argmin_{w,b}\{\sum_{i=1}^m (y_i-b-w^Tx_i)^2+\lambda w^Tw\} $  $(w_t, b_\lambda )= argmin_{w,b}\{\sum_{i=1}^m (y_i-b-w^T(x_i-\bar x))^2+\lambda w^Tw\} $  where:   $\bar x$ is the average of the input data.  $\lambda$ defines a trade-off between the error on the data and the norm of the vector $w$ (degree of regularization) I'm assuming $b$ is a bias term   I can't work out why, mathematically, centering the data, has no effect.   Not looking for the answer, just a push in the right direction. Intuitively, I understand that offsetting each data point will have no effect on the final $w$ vector, because the relationships between the data points remains unchanged. Showing this mathematically, however, I'm unsure.


How to ssh into a server running on a home network, behind a router?

Okay, so I have a PC in my home network, running Ubuntu on a VM with openssh server installed.    How can I remotely access it from another computer outside the home network, using the internet? What IP address do I use to connect to it? What kind of port-forwarding do I need to do?


How do I turn a single player minecraft server into a public one?

I made a huge house in minecraft, but it is lonely. I want people to play on it. How do I make it into a public server?


I have a feature that deploys content types, a list definition and template that uses these content types and finally a list instance. This feature is already in production.  Now we have a change request to add new views to this existing list. So I make the changes to schema.xml and upgrade the solution. But alas, the new views don't show up. If I create a new site, the list instance is created with the new views. I tried deactivating/reactivating, iisreset but still no success. Is there anything I'm missing?


I was task with implementing a background thread to do backend async processing with the twist being were certain cases where the job needed to be externally stopped.  I implemented it by wrapping everything within the Runnable in a try catch block and catch the InterruptionException, if caught the thread will simply return and exit.  Runnable task = () -> {     try {         while (true) {             // do stuff               // sleep for interval             Thread.sleep(this.checkInterval);         }     } catch (InterruptedException ex) {             // cleanup and exit             return; // exit thread     } catch (Exception ex) {             // cleanup and exit             return; // exit thread     } };   I'm using the ExecutorService SingleThreadExecutor and submitting the job like the following.  this.job = executorService.submit(task);   Then I am stopping the thread using   boolean canceled = this.job.cancel(true);   It seems to work fine since the cancel causes an InterruptionException if the thread is running.   Is this code safe, meaning when cancel is called its always guaranteed to kill the thread?


All positive integers $m_1, m_2, n$ satisfy:   $$ \sum_{k=0}^n {m_1 \choose k}{m_2 \choose n-k} = {m_1 + m_2 \choose n} $$  Prove using the binomial theorem and the fact that $(1+x)^{m_1}(1+x)^{m_2} = (1+x)^{m_1+m_2}$  To my understanding, $ (1+x)^{m_1} = \sum_{k=0}^n {m_1 \choose k}x^k $. Continuing with this, wouldn't the left side be a summation of a summation? Where does $ x^k$ go?   Using the given, I imagine that $(1+x)^{m_1+m_2}$ could be used to retrieve the right side but then I don't know where sigma goes or how it becomes "choose n"  Any hints would be appreciated.   Edit: I feel really dumb. Thanks everyone!


How to prevent certain memory location to be accessed

I have 2 corrupted RAM module, on offset: 46xx MB and 13xxx MB (from memtest on boot) How to prevent Linux to access/alloc/read/write into those offset?  Here's the result of memtester on ~1000 MB to ~1400 MB:


Why so many different types of writing main() in C

I see different people writing different statements for declaring main()  Like,  int main()  void main()  int main(void)  int main(int argc, char* argv[])   I mean when to pass arguments? what is the need of it? when to declare int as return type and when void?  I have just started practising coding when I see people writing different main() declaration I actually get puzzled.


String username;  String password;  if (username!="admin" && password!="software")          System.out.print("success");   else if (username!="admin" && password=="software")          System.out.print("failure");   guyz could you plzz explain when admin and password are both equal to their respective values i.e. admin and software than it prints success but if i say username is equal to admin and password is not equal to software it also prints success again   Moreover, i took input in username and password like this  password =  Pass_input.getText();  username = Username_input.getText();  while Username_input and Pass_input are the JtextFields in java


Use db_select with multiple conditions of which one needs to apply

My question is not a duplicate and it has complex conditions. Please let me explain. In my second condition, first I need to check if number value is correct (in first condition I checked complete opposite). If so, then check if there's a value in email column. Then show error message if there's a value in email column. My problem is I need to write first query (already done by me) and second query under the same 'db_select'  Checking for email value only activates if webform value matches a value in 'number' column.    I have a table containing two columns namely, 'number' and 'email'.  I need to run a db_select query to display same error message when a webform is submitted. My conditions are as follows:   Show error message if number value provided by webform does not matches a value in 'number' column Show error message if number value provided by webform matches a value in 'number' column but corresponding 'email' column is not empty.   So far I'm able to show error message for the first condition.  db_set_active('mydatabase');         $query = db_select('mytable', 'c');     $query->fields('c', array('number','email_address'))     ->condition('number', $phoneval, '=');     $result = $query->execute()->fetchAll();  if (empty($result)) {     form_set_error('phone_number','We have no record of that Assessment Number'); }    How can I show the same error message for condition 2? I don not want to query the database again and thinking of using for db_or this.  Thanks


I need to add the family font Droid Arabic Kufi Fonts from  into Dspace main css file. Thanks


What's the best way to validate an XML file against an XSD file?

I'm generating some xml files that needs to conform to an xsd file that was given to me.  What's the best way to verify they conform?


Prove that $\mathbf{E}^2-\mathbf{B}^2$ and $\mathbf{E}\cdot\mathbf{B}$ are the only two independent Lorentz invariant quantities

How to prove that $\mathbf{E}^2-\mathbf{B}^2$ and $\mathbf{E}\cdot\mathbf{B}$ are the only two independent Lorentz invariant quantities that are constructed by $\mathbf{E}$ and $\mathbf{B}$?  It's easy to prove they are Lorentz invariant quantities and independent from each other because they are $F_{\mu\nu}F^{\mu\nu}$ and $\epsilon_{abcd}F^{ab}F^{cd}$ up to a constant. But how to prove they are the unique two independent Lorentz invariant quantities? i.e. Any other Lorentz invariant quantities constructed by $\mathbf{E}$, $\mathbf{B}$ or $F_{\mu\nu}$ can be represented as a function of  $\mathbf{E}^2-\mathbf{B}^2$ and $\mathbf{E}\cdot\mathbf{B}$.


Question mentioned like this find out the electric field inside and outside a spherical shell of radius r which carries a uniform surface charge density sigma.  In the above question it is not mentioned that the shell is conductive or non conductive than how one can attempt  this question and what assumption required for it.


What in Mathematics cannot be described within set theory?

I have begun reading Patrick Suppes' book Axiomatic Set Theory. The first sentence in chapter 1 reads: "Among the many branches of modern mathematics set theory occupies a unique place: with a few rare exceptions the entities which are studied and analyzed in mathematics may be regarded as certain particular sets or classes of objects."  What are these rare exceptions? What in mathematics cannot be described within set theory?


Japanese anime movie, includes a sword and some gems, and a dragon-like friend

I watched this movie when I was a kid and never discovered it again.  It’s about a boy whose father left him after his divorce from the mother, the kid enters a world somehow where he has a big sword he needs to keep searching for precious stones to fill it with. it has certain holes that look like each stone shape! I also remember the kid going to eat with his mythical (dragon-like friend), and he gets stuck in the restaurant because the crazy restaurant lady won’t let him leave without finishing huge amounts of food!  The kid also gets bullied so I’m guessing the the swords journey is to teach the kid how to deal with all of this...


How can I know whether ListItemId is a Folder or a Document in SharePoint Hosted App Using JSOM?

I created SharePoint Hosted App. I Used Following Rest Call to Get File Name and Server Relative URL. But a problem is that when I get data in a result how can I know whether it is a Folder or a File and If it is a folder I need all Files List Inside a Folder.  var context = SP.ClientContext.get_current(); var user = context.get_web().get_currentUser(); var listid = decodeURIComponent(GetUrlKeyValue("SPListId")).slice(1, -1); var hostweburl = decodeURIComponent(GetUrlKeyValue("SPHostUrl")); var appweburl = decodeURIComponent(GetUrlKeyValue("SPAppWebUrl")); var itemIds = decodeURIComponent(GetUrlKeyValue("SPListItemId")).split(',');  function getListVersioningInfo(itemIdd) {  $.ajax({      url: window.location.protocol + "//" + window.location.host + _spPageContextInfo.siteServerRelativeUrl + "/_api/web/lists('"+listid+"')/items(" + itemIdd + ")?$select=*&$expand=File",       method: "GET",     async: false,       headers: {          "Accept": "application/json; odata=verbose"      },      success: function (data) {          var fileName = data.d.File.Name;         var filePath = data.d.File.ServerRelativeUrl;         filePathArray.push(filePath);         console.log(filePath);         // alert("Success" + fileName);     },      error: function (data) {          console.log(data)      }  });   }


Can a quasiclassical electron wave packet in elliptic orbit be formed from bound hydrogen-like eigenstates?

Position probability densities of eigenstates of hydrogen-like systems have axial symmetry, so that the wavefunction too much resembles the circular orbits in Bohr's model. I'd like to have a demonstration of correspondence principle, where an electron would be localized to look somewhat like a classical particle, and move in an elliptic (non-circular) orbit around a nucleus.  It seems though that if we try to make a wave packet too localized, then it'll disintegrate (get scattered by the nucleus) too fast to see anything resembling an elliptic orbit. OTOH, if we take it too spread out, it'll have to be quite far from the nucleus so as to avoid hitting it, and thus it'll have high total energy, which may appear to be above ionization threshold (at least partially), after which it'd be quite hard to analytically calculate evolution of the wave packet.  Thus my question is: is it possible to form a more or less localized wave packet, which would (on average) move in an obviously-elliptic orbit (major/minor axes ratio of 4:3 or higher), and only require bound states to fully represent it? If yes, then what properties (FWHM, apocenter, angular momentum etc.) should it have for this to be possible?


RubyMine doesn't recognize user created environment variables

TLDR: Basically RubyMine does not recognize any user created environment variable when launched from a desktop entry, but when launched from console (using $ mine) it can recognize all the environment variables. What could be wrong?    I am using Google Cloud Vision API and I've already set GOOGLE_APPLICATION_CREDENTIALS environment variable to my service account private key file path.  When I launch RubyMine from a desktop entry and run the code below.  require 'google/cloud/vision'  image_annotator = Google::Cloud::Vision::ImageAnnotator.new response = image_annotator.text_detection(     image: "path_to_image_file",     max_results: 1 )   It throws a Runtime Error:  Traceback (most recent call last):         7: from /home/burak/RubymineProjects/covid19/main.rb:17:in `<main>'         6: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision.rb:169:in `new'         5: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision/v1.rb:166:in `new'         4: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision/v1.rb:166:in `new'         3: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision/v1/image_annotator_client.rb:122:in `initialize'         2: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/googleauth-0.12.0/lib/googleauth/credentials.rb:329:in `default'         1: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/googleauth-0.12.0/lib/googleauth/credentials.rb:361:in `from_application_default'     /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/googleauth-0.12.0/lib/googleauth/application_default.rb:76:in `get_application_default': Could not load the default credentials. Browse to (RuntimeError)     https://developers.google.com/accounts/docs/application-default-credentials     for more information   But when I run the code from within IRB or when I launch RubyMine from console and run the same code, it runs successfully.


Intuitively understand why the Poisson distribution is the limiting case of the binomial distribution

In "Data Analysis" by D. S. Sivia, there is a derivation of the Poisson distribution, from the binomial distribution.   They argue that the Poisson distribution is the limiting case of the binomial distribution when $M\rightarrow\infty$, where $M$ is the number of trials.  Question 1: How can that argument intuitively be understood?  Question 2: Why is the large-$M$ limit of $\frac{M!}{N!(M-N)!}$ equal to $\frac{M^{N}}{N!}$, where $N$ is the number of successes in $M$ trials? (This step is used in the derivation.)


Is there a graceful or safe restart for mysql like for apache httpd?

I would like to restart mysql gracefully just like httpd where threads are served before restart. I would dislike queries breaking.


SQL Query to select rows based on specific condition

Below is an example of childs daily activity. I want to select the next rows after the last 'Play' activity based on user id.  id          timestamp               activity 567     1541300537817000            Play 567     1541300584959000            Games 567     1541300711884001            Play 567     1541300749548000            Study 567     1541300804865000            Movie 678     1542073550481000            Computer 678     1542073551422000            Play 678     1542073551478000            Play 678     1542073561885000            Play 678     1542073567663000            Sleep      908     1543580126943000            Tv      908     1543580212409000            Sleep      908     1543580245227000            Play  Expected output  id          timestamp               activity 567     1541300749548000            Study 567     1541300804865000            Movie  678     1542073567663000            Sleep    I tried doing this:  SELECT DISTINCT t1.* FROM `table` t1, `table` t2 WHERE t1.id = t2.id   AND t1.timestamp > t2.timestamp   AND t2.activity = 'Play';    But it is giving me events after 1st Play activity.


Is it possible to ask and answer to our question at same time ? In reading this :  It's Ok. But at the same time? I ask this because :  The askers answer his question at the same time (same date, hour, minute).


Show $S = f^{-1}(f(S))$ for all subsets $S$ iff $f$ is injective

Let $f: A \rightarrow B$ be a function. How can we show that for all subsets $S$ of $A$, $S \subseteq f^{-1}(f(S))$? I think this is a pretty simple problem but I'm new to this so I'm confused.  Also, how can we show that $S = f^{-1}(f(S))$ for all subsets $S$ iff $f$ is injective?


I hope that my question doesn't violate the posting rules. I was wondering if any of you have any resources (websites, books, etc.) for classical mechanics. My first week of classical mechanics has shown me that this class is going to be extremely challenging. The textbook for the class is John R. Taylor's 'Classical Mechanics', which is alright, but I personally don't like the way the material is presented.  This class seems to focus on two things: Classical concepts and deriving the equation that will describe physical situations. A very basic example, taking the equation a=f/m and integrating twice to get an equation that describes the position of an object. If there are any resources for learning and applying that type of problem, then please let me know! Or, if you know of another place where my question would be more appropriate, then just point the way.  Anyway, any advice, resource, ANYTHING, is greatly appreciated.


Upgrading Apache from 2.4.6 to 2.4.41 on Centos 7

I would like to seek some guidance on how to upgrade httpd 2.4.6 to 2.4.41 on centos 7. I realised there are similar questions but for RHEL7. The reason for upgrade is due to vulnerability CVE-2017-9788, CVE-2014-3523 for httpd-2.4.6.  How should I go about upgrading the versions? Do I need to build from the the source zip? And would I need to do any symlink or PATH variable or things like that? Do I need to copy the current configuration to new installation path? Sorry if I sounded a bit amateur because I have little experience in this area.   Any help would be appreciated. Thanks.


Is it correct to say  I miss doing this I miss traveling a lot  OR  I miss to do this I miss to travel?


I want to preface this by saying that I'm by no means experienced with the field of physics, but while on my commute this morning, I started thinking:  Basically, I thought about time being a fourth dimension, time dilation, and whatnot (it was very early), and I thought about how if we're moving at one second per second through that fourth dimension, that means we must have some kind of constant velocity through it.  Then I realized that if time really was a fourth dimension, then movement through the other three dimensions would alter where that "time velocity" vector lands, theoretically explaining why time dilation is experienced at higher velocities in our three dimensions. My question is: is this idea supported by physics?  I can't imagine that no one's thought of this before, so I'm mainly just wondering if I'm wrong.


Stack Overflow Timeline of added Functions

Is there a page by Stack Overflow on how it evolved? A timeline of added functions would be nice. It might be interesting to see what ideas are most straightforward (early implemented, more important/desired) to be invented.


Active Directory Administrative Center Crashes when updating object

DSAC.exe crashes every time we try to update a user object. It will crash in every system we try it on including the servers running Active Directory. It happens on Windows 7, Windows 10, and Windows 2012 R2.  I posted the event logs on  as well but no one has provided any input yet.  The event logs are too long to post here directly.  Any help will be greatly appreciated.


After ______ MA Economics he joined the London School of Economics.  I am confused about using "passing" or "having passed"?  *Edit - I did some research and from what I gathered, the answer is "passing" because using "having passed" with "after" will bring a sense of redundancy. The "having passed" form of the verb has the "after" inherent in it.


how do I install 12.04 when I am using 13.8? Is there a way to go back to 12.04 or do I have to install it over the old OS?


Different methods of evaluating $\int\sqrt{a^2-x^2}dx$:

Is there a simple and nice way to solve $\int\sqrt{a^2-x^2}dx$:  PS:I am not looking for a substitution like $x=a\sin p$,


i have this code:  >mat_equazioni[]                                      intercetta_iperpiani [1,] -0.1172197 0.3516591 -0.1562929           -0.7033182 [2,] -0.1172197 0.3516591 -0.1562929            0.5860985 > sum(berek1[8,vettvar]*mat_equazioni[1,][-4]) [1] 0.7033182 >sum(berek1[8,vettvar]*mat_equazioni[1,][-4])+mat_equazioni[1,4] intercetta_iperpiani          1.110223e-16  > sum(berek1[43,vettvar]*mat_equazioni[1,][-4]) [1] 0.7033182 > sum(berek1[43,vettvar]*mat_equazioni[1,][-4])+mat_equazioni[1,4] intercetta_iperpiani                     0    i don't understand why same result 0.7033812 sum to mat_equazioni[1,4] that is equal to -0.7033812 one time give me 0 and other time give me 1.110223e-16


How can points that have length zero result in a line segment with finite length?

I have been told that a line segment is a set of points. How can even infinitely many point, each of length zero, can make a line of positive length?  Edit: As an undergraduate I assumed it was due to having uncountably many points. But the Cantor set has uncountably many elements and it has measure $0$.  So having uncountably many points on a line is not sufficient for the measure to be positive.  My question was: what else is needed?  It appears from the answers I've seen that the additional thing needed is the topology and/or the sigma algebra within which the points are set.  My thanks to those who have helped me figure out where to look for full answers to my question.


So, I have a polygon that contains the population number. Another polygon is a zone polygon. I need to approximate population from the first polygon to zones polygon, but based on intersection percent.  Here is an example. Purple polygon contains population data. Now, how to split for example population of 64 to other polygons based on the percent of their intersection. I tried to use ratio policy on a polygon with population data, then clip it with other polygon, but with no luck.


Adjective/noun for a situation that cannot be solved?

I am writing an essay on Act 3 Scene 5 in Romeo and Juliet where the romantic play takes the turn for tragic. Indeed, Juliet loses the support of her primary family and is left deserted, with no hope to turn to except Friar Lawrence.      There is no room for workarounds around the difficult situation for poor Juliet.    Rather than using the phrase room for workarounds or between a rock and a hard place, I would have preferred to find a term that suggests this idea of an untiable knot (which is clearly not a term). Any suggestions?  This differs from another Stackexchange  since I am not looking for a situation in which there are only two possibilities, but a situation that cannot be solved.


Create one list of numbers by combining numbers from three lists of uneven length

I'm trying to create a list of id's, where the numbers are made up of three different lists: the first part of the number should be from the list pers:  pers = list(range(1,12))   The second part should be a combination of the person id, and the number 1 or 2 (not necessarily a list, as it is just two numbers), like this:  ids = [11, 12, 21, 22, 31, 32, 41, 42, 51, 52, 61, 62, 71, 72, 81, 82, 91,        92, 101, 102, 111, 112]   The third part should be a combination of the above and the values in the list reps:   reps = list(range(1,13))   like this:  ids = [111, 112, 113, 114, 115, 116, 117, 118, 119, 1110, 1111, 1112,        121, 122, 123, 124, 125, 126, 127, 128, 129, 1210, 1211, 1212 ...]   and so on, all the way up to 11212 (person 11, condition 2,  repetition 12). In total around 2250 items in the list.  I've tried various itertools functions, or nested for loops, lists of lists and tips in , but none seem to yield what I need.


Why isn't Java acting like "Pass-By-Value" here?

The output to below main is  [5,4,3,2,1] [1,2,3,4,5]  Which makes no sense to me. yes, the first time I ran "reverseArrayIteratively", I'm definitely expecting [5,4,3,2,1] so that's the correct output, but after the second function (reverseArrayRecursively), I was expecting it to also return [5,4,3,2,1] because Java is supposed to be "pass by value", so I didn't expect "reverseArrayIteratively" to actually change around the values of myIntArray. I thought that myIntArray inside the main will stay [1,2,3,4,5] no matter how many times I call reverseArrayIteratively or reverseArrayRecursively. What's going on here?   public static void main(String[] args) {         // TODO Auto-generated method stub           int[] myIntArray = {1,2,3,4,5};         System.out.println(Arrays.toString(reverseArrayIteratively(myIntArray, 0, myIntArray.length-1)));         System.out.println(Arrays.toString(reverseArrayRecursively(myIntArray, 0, myIntArray.length-1)));     }      public static int[] reverseArrayIteratively(int[] array, int first, int end) {         while (first < end) {             int temp = array[end];             array[end] = array[first];             array[first] = temp;             first++;             end--;         }         return array;        }         public static int[] reverseArrayRecursively(int[] array, int first, int end) {         int temp = array[end];         array[end] = array[first];         array[first] = temp;         first++;         end--;         if (first < end) {             reverseArrayRecursively(array, first, end);         }         else {             return array;         }         return array;     }


if the position vector of a particle is $\hat{r}=\left(4+3t\right)\hat{\imath}+\left(t^3\right)\hat{\jmath}+\left(-5t\right)\hat{k}$, i want to find at what time this particle passes through the point $\left(1,\:-1,\:5\right)$. I found that $t=-1$ for this particle to pass through that point. What does it mean by that? Why there's negative sign for $t$?


How rigorous are Amtrak in enforcing luggage rules?

Looking at Amtrak trains between NY and Boston, I found that all had "no checked luggage" save for a midnight train (less than ideal for a relaxing vacation).  Looking at , it's not really that restrictive as you can take bags on to the train.  My question is on the size restrictions of 28" x 22" x 14" (70cm x 55cm x 35cm in my parlance).  We'll be travelling with a backpack taller than this, albeit not much (maybe four to eight inches/10 to 20 cms), so I was wondering how much effort Amtrak puts into enforcing this?  Has anyone else travelled with an oversized baggage as "carry on"?


Trackpad not clicking on MacBook Air 2019

A few days ago, I opened my laptop after a night of sleep just to see my trackpad stopped clicking. Almost like the trackpad is stuck and that it won't make that clicking sound when you press onto the trackpad. Regardless, I can still click as in drag and drop. The only problem is that my trackpad wont physical click. My trackpad was working fine for the last couple of months since I bought the MacBook, but it just randomly stopped working for me. A day later this issue, my trackpad randomly started clicking again. I simply can't fiqure out why this is the case. Then frustratingly, the day later the click was fixed, my trackpad click stopped working again. I simply don't understand, if this is a dust build-up issue or swollen battery. As of now, the trackpad is still stuck and just hoping for a miraculous fix for my trackpad. Please, any response or explaination could help.


Understanding regular expression to remove HTML tags from a string

The following code is used to remove html tags from the string  s = s.replaceAll("\\<[^>]*>","");   The following code also gives the same result:  s = s.replaceAll("<[^>]*>","");   What is the difference? Why should we add double slash at the front?  What is the use of . in regex? Can you explain with an example?


How to recover a website from google cache?

My host provider told me last night their server crashed and they had restored the website from from an image they had from months ago, They told me this is the only backup they have. I also have no backup, as my backup server crashed few days ago.  Through google cache I can see all the website as it was few days ago. Is it possible to recover my website using google cache or is there any tool which help me to recover?   Thanks,


Relative sized container inside relative sized container, and so on... possible with css?

Disclaimer: I don't have any formal programming background, and I've been trying to mess with front-end design recently. Excuse me if my questions are trivial or misplaced (at least I didn't find clear answers in other posts)  I've been using Outsystems with responsive design framework to develop a web page. In order to profit from the responsive framerwork, I'm trying to make a web block that will look something like this.    Inside a container with defined dimensions, I would insert a container (which will fit perfectly this parent container), containing other containers of its own. These 3 containers will always fill the parent horizontally, but will have heights according to the proportions I draw there (merely illustrative).  In order to fill the fixed-size parent, the main container would have to be set with height and width equal to 100% (at least I think so). However, the last child container (60%) may have its contents bigger than the appointed size (I put search results in there), so I tried setting 'overflow-y: auto'. However, that doesn't seem to work. From what I understood, that doesn't work because its parent has its height set to 100%, which isn't a defined size, so it ends up being considered as an undefined size when calculating the child containers size, and it ends up setting its height to 'auto' by default, which leads to visible overflow. I ended up changing the first two containers to have fixed sizes at the end (since they're inputs and they need to be at least visible for typing), however I just can't manage to make the last one fill the rest of the parent's container, while creating a scroll when necessary if its content overflow. What works is setting the parent container with 'overflow-y: auto', but I don't want it to work like this.  Is it possible to set chains of relative sized elements within another with .css or does it need to be alternated between fixed-size/relative-size to work? Would I need to use javascript to make calculations and set their heights at runtime?


Converting (normalizing) very small likelihood values to probability

I am writing an algorithm where, given a model, I compute likelihoods for a list of datasets and then need to normalize (to probability) each one of the likelihood. So something like [0.00043, 0.00004, 0.00321] might be converted to may be like [0.2, 0.03, 0.77].   My problem is that the log likelihoods, I am working with, are quite small (for instance, in log space, the values are like -269647.432, -231444.981 etc). In my C++ code, when I try to add two of them (by taking their exponent) I get an answer of "Inf". I tried to add them in log-space , but again stumbled upon the same problem.  Can anybody share his/her expert opinion on this?


Changing the orientation of your device within the tag selection view while asking a question removes all selected tags and clears the textbox.     Steps to reproduce:     Ask a question (does not happen when editing) Edit tags Enter some text in the box  Select a tag from the suggestion list Repeat the previous two steps as many times as you care to Rotate the device (source / target orientation doesn't matter, just need to change it) All selected tags and text typed in the textbox are gone and must be re-entered   I've reproduced this using version 1.0.63 of the SE app on two devices:     HTC One E8 m2ss (the Hong Kong version) rooted and running stock 5.0.2 ATT Galaxy S3 i747, rooted and sim unlocked, running Slimkat 4.4.2.build.4.1.official ROM on Android 4.4.2


Using setenv in Apache (Windows) DocumentRoot

Stack trying to migrate a configuration from Linux to Windows Apache 2.2 (via WAMP)  We are trying to set an ENV Apache variable to be used as DocumentRoot and rest of directives thereafter so we can use the same set of confs on server and local working copies of developers.  In Debian Linux Apache we have an envvars file that is loaded with "EXPORT" directives. This does not work on Windows but   Setenv ROOT_TO_FILES "C:/wamp/www/test"   Seems to work as displayed by a phpinfo()  But when we use it inside a DocumentRoot directive of an vhost:  DocumentRoot ${ROOT_TO_FILES}    Apache looks for that literal text under its own root.  This is the way we use it in Linux but we've also tried the syntax of env=ROOT_TO_FILES  The apache doc seems clear about how to "define" but not how to use. Also I see Apache 2.4 includes a new "Define" directive that seems to do exactly this which makes me think that it might not possible in previous versions.  Any samples of use under Windows Apache would be appreciated.


How does extended slicing in python works?

The slice syntax is a handy way to refer to sub-parts of sequences – typically strings and lists. The slice s[start:end] is the elements beginning at start and extending up to but not including end.   E.g  letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] print(letters[2:5])   This will give Output : ['c', 'd', 'e']  But how does extended slicing work.  print(letters[2:4:5])   The above print statement will give ['c'] as output. I can't understand how?


If my opponent makes me discard a card and I choose a creature card with the Bloodrush ability, can I pay the cost during the forced discard in order to activate the ability?


Expose single filter of combination of two fields in views

I have two user profile fields "Last Name" and "First Name". I also have a user list views. I want to expose "Name" as filter which can search for both Last Name and First Name. How can I do single filter of combination of those two fields? Can I create it from views UI?  One possible way is to create another profile field "Name" which will be hidden in the form. On user save, I would combine the two field values into the "Name" field and then expose it as filter in the views. But this solution is hard coding and it needs to write hooks.


Travel from Peru to Mexico connecting in US

Can a Peru passport holder flying from Peru to Cancun, Mexico take a flight with a plane change in the US.? International travel