MonoGame sprites not consistently drawing

Please don't mark this as a duplicate of my previous question which was asked anonymously. this is a reattempt because i cannot edit the first attempt.  What I have so far is:  - randomly generated tile set with items on SOME tiles - one creature spawner that spawns up to 5 creatures which can be controlled by the player - the ability for creatures to pick up items and bring them back to the spawn and store them for later use  What I am noticing is when i launch the game, it doesnt always show all the sprites. Sometimes the spawner is missing, or the creatures, or the GUI. ANd when things DO appear, if i tell the creatures to pick up anything, other items on the ground randomly appear and disappear. even the spawn sometimes disappears! what I do notice is that when i have multiple creatures, some will disappear when crossing invisible lines but not all of them. i forced two creatures to go east at the same speed and time, and one vanished and the other didnt.  If you have any ideas as to what might be causing this, please let me know. if you have any questions, i'll try to edit to appease you.  thanks for reading!  I have my draw method like this:  GraphicsDevice.Clear(Color.CornflowerBlue);  // TODO: Add your drawing code here  spriteBatch.Begin(SpriteSortMode.BackToFront,           null, null, null, null, null,           camera.GetTransformation());            worldEntity.Draw(spriteBatch);  guiManager.DrawGUI(spriteBatch);  spriteBatch.End();  base.Draw(gameTime);   for the world entity...  its draw method systematically goes through each tile in the world and calls its draw method. the tile draws itself using  Vector2 topLeftOfSprite = new Vector2(this.X, this.Y); Color tintColor = Color.White; spriteBatch.Draw(tileTexture, topLeftOfSprite, tintColor);   and then proceeds to call the draw method of any items on it.  creatures and items have very similar draw methods.  the gui also draws itself in a similar fashion.  what i DO notice is that ive NEVER seen ground tiles vanish, only the items on them or creatures in the world. Could it be their Z isn't set appropriately?


How to install 4shared Desktop on Ubuntu 17.10?

How do I install  desktop apps on Ubuntu 17.10


Is "I believe I am ready enough" the wrong way to say that I am ready enough?  I wish to write it with reasonable confidence that I am ready enough to take up a certain challenge. Is there another other way to convey the same?  Conversely - is "I believe I am ready enough" wrong way to say that I am ready enough?


Returning PRODUCTION Org to Virgin Status Without DEVELOPER Tools

I have a scenario:  Previous consultants and users had initially done some work inside our Production org (we have NEVER DEPLOYED to Production - they simply started to do the setup of this company's system there, then days/weeks later, created Sandboxes to continue the effort).  They also installed managed packages that (most) will be used in the system (a couple will not).  There is no "return Production to virgin status" option built into SF.  Does anyone have information on how to properly "empty" a Production org, where Sandboxes are still attached and won't be affected?  I received a general response from SF, but it's not very helpful, especially if we're trying to keep this at an "Advanced SF Admin's" level.     After discussing this further, it is possible to use the Metadata API   to delete the metadata in your Production org (with either the   Force.com IDE, Workbench or ANT deployment tool), and this will leave   your full sandbox unaffected. However, make sure not to refresh the   sandbox after doing so until you've pushed the changes you want from   full sandbox. We would not be able to do this for you but here are   some documentation around these tools and the way to force destructive   changes:              We have one single Object that will stay in Production with associated Chatter and file attachments.  Therefore, I want to "gut" Production, excluding:   Requirements custom object and it's data Chatter (it will ONLY be on Requirements object anyway) Any files uploaded (they will ONLY be on Requirements object)   My initial thought, keeping this out of a Developer level solution, is:   Uninstall ALL packages Use Change Sets to identify anything "custom" per "area" and search-and-delete from there Check for any data in any objects (other than Requirement) and delete (DataLoader/etc)   Is there something better?  Is there a PACKAGE or UTILITY I don't know about that may do this?    UPDATE 2017-06-06: The idea is to keep this out of Developer-level solutions.  [Advanced] Administrator level at the maximum.


Why do some questions in question lists have a yellow background?

On SO, when I'm scrolling through "questions" some have a yellow background.  Is this intuitive to everyone but me?  What is the yellow background trying to tell me about this particular question?


How to put a PS3 super slim hard drive into a new console?

My PS3 Super Slim bricked beyond repair, and i really wanted to find a way to salvage all the data inside its hard drive so i could possibly use it in a new PS3 if i ever buy another one. My console doesn't even get turned on anymore, so no safe mode can be involved. I searched for some info and learned that the PS3 data is heavily encrypted, so i can't just slide the drive into a new console, it apparently demands formatting the drive beforehand. Is there any way to avoid this from happening? Maybe clone the contents of the old console into the new console's built in drive? Maybe "tricking" the console into thinking there's nothing out of the ordinary?


Doesn't Sherlock's comment to Watson during their good bye scene suggest that there is/was a third Holmes sibling and that the sibling is a woman?

Thanks to Oliver for the correct wording. I played back the stream more than once but didn't get it right. As for failing to follow the rules about comments, while I understand the need for courtesy & procedures in online forums, the rules of Stack Exchange make me feel as if I am in a Medieval court of law, and will never manage to figure out which writ I should plead.   So I will bow out, wishing you all well, with apologies for my unseemly behavior.  In the question  the questioner mentions a comment Mycroft made, saying "I'm not given to brotherly love,..." Later in the episode, when Holmes is saying good bye to John beside the airplane, Sherlock says that his brother and sister used to sing a song about the wind to him.  The comments made by Mycroft and Sherlock suggest that the series writers have a Holmes sister in mind. It'll be interesting if she shows up in the next season of the show. It would also add an interesting counterpoint to the fact that John has a sister from whom he is seriously estranged. (Sister Harry didn't accept her invitation to John and Mary's wedding.)  I would have made a comment about this where the question about a third sibling appeared, but I don't have enough reputation to comment.


What does a multimeter read when you measure unstable DC-voltage

When I have a Fluke True-RMS multimeter. Does the meter measure DC-RMS voltage or the average voltage?


I'm currently having windows 10 build 1803, and I'm interested in some features of windows 10 1809. However, Windows update indicates that my software is up to date. Microsoft provides with an updater to manually update to version 1809, however, on my computer, it fails during installation, and reverts changes.  Another solution to get these features would be to sign up for the Windows Insider Program, but that means that I would have more unstable versions of Windows.  Is there a way to indicate to windows update that you wish to get the newest upgrade, or in any way to accelerate the process of making this update available on my computer?  EDIT:  I've had several boot problems due to a clone of my system to a newest disk that I've added to my computer. The boot process seems to have been very disturbed by the presence of two identicals boot routines and GPT tables. I've repaired my windows bootmanager and wiped my oldest disk. I've been able to get the update 1809 through the semi annual channel as suggested. It is currently downloading through windows update and I will try the installation afterwards


Addition of floating point, Why the First code work

Why body of if() in 1st code Executes While the body of if() in 2nd code Doesn't Executes       Working          double num1 = 0.2; double num2 = 0.2; double num3 = num1 + num2; if (num3 == 0.4) {     MessageBox.Show("1st"); }      Not Working               double num1 = 0.1; double num2 = 0.2; double num3 = num1 + num2; if (num3 == 0.3) {     MessageBox.Show("2nd"); }


How to solve press enter for maintenance (or press Control-d to continue): problem in ubuntu 20.4 daul boot?

I restart my machine with  power button and after that I'm getting this screen and I don't  know which action to perform to solve this problem. Check the the screenshot below to see the problem. Any help would be appreciated,Thanks!


An adjective to describe a question with an ostensibly simple answer

In other words, the correct answer to the question is actually NOT the simple answer that first comes to mind.   I remember coming across the word a few years back but have forgotten it since. If memory serves, the word begins with "in-". But I could very well be wrong.   Would be grateful to have your suggestions. Thanks! :)


Why did Han Solo say "That's not how the force works"?

A certain interaction between Han Solo and Finn has really been bothering me lately. While infiltrating Star Killer Base, just before they go in to rescue Rey, Finn reveals to Han that he doesn't actually know how to lower the shields like he had promised. Han is obviously upset by this, and the dialog is as follows:  Han Solo: People are counting on us. The galaxy is counting on us. Finn: Solo, we'll figure it out. We'll use the Force. Han Solo: That's not how the Force works!  My problem is that this is exactly how the Force works, and Han Solo knows it! In fact, for the majority of the original films, it is hypothesized that Han uses the Force (whether he realizes it or not) in situations exactly like this. And in The Force Awakens, we learn that Han does believe in the Force, and he must understand that the Force has been with him in most, if not all, of his past adventures, including his most recent escape from the Guavian Death Gangs. For the sake of clarity, let me specify that I am not saying that Han actively uses the Force, like a Jedi would. Rather, I am saying that the Force is with him, and he is using it for "good luck". So why would Han say this? He has knows that the Force does, in fact, work like that.


Re: a sign on your residence: The Smiths vs. The Smiths’

I know the former is the generally accepted usage, as that’s all I’ve ever seen over the years; meaning, by extension, "The Smiths ..live here" – presumably; whilst the second example implies, "The Smiths’ Home", which seems to me an obviously superior proposition for a sign on a residence.  My bias makes me suspect the former is just a pragmatic simplification that has become standard practice (but then, so is the latter an incomplete shortcut.)  What might a pedantic English instructor think if driving by such a sign, The Smiths’, and why?


I have an old pc with 3GB of RAM and a Centrino Duo 1.66 GHz. I would like to install Linux but I don´t know which Linux distribution is the best. Any help with this is welcome.


How to delete the dot (face) in a middle 'blender guru anvil

Dont know how to delete this thing, there's a face or dot showing in the middle and I think this is the reason why my model look like ugly when I turn submesh


How do I check if I have a specific update for Ubuntu 20.04?

I recently reported a  and the fix was recently pushed as an update. One of the repo maintainers asked me to check if I have  installed or not. How do I check if a particular update package has been installed in my system or not? Is there a way to check via the command line?


How does Google test and check Android apps uploaded to Play Store?

I have found so many apps on the Google Play Store which are just useless. There are so many apps whose names are like "Useless App", "Nothing" and just rubbish, even in their app descriptions, it is written that this app does nothing, and those apps really do nothing. And the irony is that even these apps have hundreds of thousands of downloads. How does Google test the apps uploaded?


Name of this short story & anthology it appears in? From around 2000.  Two men stranded on a planet find an alien storehouse of multi rooms. There seems to be a vehicle in the first room and one man works on getting it started. When the other man searches for supplies, a door closes between them, but they can still communicate by radio. The exploring man does find what they want and calls the first man - who says he got the vehicle started and it's hungry...


Is the Openstack Cloud Installer broken?

I am running Ubuntu 16.04 and am up to date.  When I follow the instructions here for a single machine installation:    Here is the sequence:   Add the PPA repo apt-add-repository ppa:cloud-installer/stable Update the local package indexes apt-get update Install the Openstack Installer apt-get install -y openstack   Incredibly (possibly part of the problem...) after only 308MB of package and component downloads this completes successfully.  Unfortunately the next step fails:  ubuntu@xenial-64-base:~$ openstack-install The program 'openstack-install' is currently not installed. You can install it by typing: sudo apt install openstack  The suggestion to apt install openstack shows that it is already installed, and the latest version.  I can't tell for sure if this is a problem with the repo, the installer, or with the current Xenial updates having issues with something older in the ppa.  I am left with an openstack executable which takes me to a prompt but the openstack-install exec seems to be missing:  ubuntu@xenial-64-base:~$ openstack (openstack) install  This is the definition of optimism...  openstack: 'install' is not an openstack command. See 'openstack --help'. Did you mean one of these?   catalog list   catalog show   console log show   console url show (openstack) catalog list Missing parameter(s):  Set a username with --os-username, OS_USERNAME, or auth.username Set an authentication URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url Set a scope, such as a project or domain, set a project scope with --os-project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with --os-domain-name, OS_DOMAIN_NAME or auth.domain_name  Since it is complaining about not having an RC file we have the python clients installed but without a working installer nothing is configured.  According to Launchpad there have not been any commits since the release 7 weeks ago:    I can try manually performing the steps that openstack-install if I can figure out what they are.   is not an option since I don't have the hardware prerequisites sitting around, and ultimately the intent of this is to provide a single image for integrating Openstack test suites (Rally, Tempest, Browbeat, Mythos) for deployment to multiple Openstack deployments around the globe and a tiny footprint is required to make it attractive.  Is anyone else aware of this issue and has anyone found a workaround?


Testing equality of coefficients from two different regressions

This seems to be a basic issue, but I just realized that I actually don't know how to test equality of coefficients from two different regressions. Can anyone shed some light on this?   More formally, suppose I ran the following two regressions:  $$ y_1 = X_1\beta_1 + \epsilon_1 $$ and  $$ y_2 = X_2\beta_2 + \epsilon_2 $$ where $X_i$ refers to the design matrix of regression $i$, and $\beta_i$ to the vector of coefficients in regression $i$. Note that $X_1$ and $X_2$ are potentially very different, with different dimensions etc. I am interested in for instance whether or not $\hat\beta_{11} \neq \hat\beta_{21}$.   If these came from the same regression, this would be trivial. But since they come from different ones, I am not quite sure how to do it. Does anyone have an idea or can give me some pointers?   My problem in detail: My first intuition was to look at the confidence intervals, and if they overlap, then I would say they are essentially the same. This procedure does not come with the correct size of the test, though (i.e. each individual confidence interval has $\alpha=0.05$, say, but looking at them jointly will not have the same probability). My "second" intuition was to conduct a normal t-test. That is, take   $$ \frac{\beta_{11}-\beta_{21}}{sd(\beta_{11})} $$  where $\beta_{21}$ is taken as the value of my null hypothesis. This does not take into account the estimation uncertainty of $\beta_{21}$, though, and the answer may depend on the order of the regressions (which one I call 1 and 2).   My third idea was to do it as in a standard test for equality of two coefficients from the same regression, that is take  $$ \frac{\beta_{11}-\beta_{21}}{sd(\beta_{11}-\beta_{21})} $$   The complication arises due to the fact that both come from different regressions. Note that   $$ Var(\beta_{11}-\beta_{21}) = Var(\beta_{11}) + Var(\beta_{21}) -2 Cov(\beta_{11},\beta_{21}) $$ but since they are from different regressions, how would I get $Cov(\beta_{11},\beta_{21})$?  This led me to ask this question here. This must be a standard procedure / standard test, but I cound not find anything that was sufficiently similar to this problem. So, if anyone can point me to the correct procedure, I would be very grateful!


sum pair of columns based on matching fields

I have a large file in the following format:  2 1019 0 12  2 1019 3 0  2 1021 0 2  2 1021 2 0  2 1022 4 5 2 1030 0 1  2 1030 5 0  2 1031 4 4   If the values in column 2 match, I want to sum the values in column 3 and 4 of both lines, else just the sum of the values in the unique line.  So the output I am hoping for would look like this:  2 1019 15  2 1021 4  2 1022 9  2 1030 6  2 1031 8   I am able to sort files according to column 2 with awk or sort and sum the last columns with awk, but only for individual lines not for two lines where column 2 matches.


Proof by induction: showing that two sums are equal

usually the tasks look like  $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$  or  $$\sum_{i=0}^n i^2 = i_1^2 + i_2^2 + i_3^2+...+i_n^2$$  But for the following task I have this form:  $$\left(\sum_{k=1}^n k\right)^2 = \sum_{k=1}^nk^3 $$  First I am a little confused by how I approach this. Do I transform them into a complete term like in the first example? Or can I do it by just using the sums themselves? And how should I treat the square of the sum best?  The first step is pretty straight forward creating the base case. But as soon as I get into doing the "Induction Step" I am getting stuck and not sure how to proceed.  I am looking to know best practice for this case.  Edit: This question is a little different, since it is expected to proove this only by using complete induction using the sum notation.


I'm using Android studio , sqlite database my code was working correctly , but when I added "posid" column to "contacts" table the program doesn't work  logcat while insert contact    ......... thanks for everybody can help me


In several episodes of Assassination Classroom (animated version), characters develop spontaneous nosebleeds seemingly in response to becoming sexually aroused.  This occurs with a number of male characters, though I can recall at least one instance where it happens to a female character as well.    Here's an example on Youtube:    Is this a common trope in anime, or something that's unique to Assassination Classroom?  And in either case, is there any rational explanation behind using this seemingly bizarre method of depicting arousal?


Is there any mechanism to deter users from unnecessarily messing with user points?

I had noticed that some users uses their right to vote up and down a question unnecessarily.   I was a victim of such some months back, had to abandon my account for a new one because of some, some, some people... really annoying.   Some of them even down vote a question just because they think it is too easy, which leaves me wondering if there were born with whatever knowledge they think they have.  As a matter of fact, being a confirmation, some people will down vote this question. (If you are one of them, please be helpful as to give a reason for your action)  I was hoping SE would implement an appeal button where more superior members would re-evaluate such cases.


Mobile: Close as Duplicate dialog won't close

If you change your mind about closing a question as a duplicate (maybe because you meant to vote to close, but for a different reason, and just clicked the wrong option in the first dialog) the mobile interface won't easily close.  When you click the big white X in a red ball in the upper right corner, the box flickers, so you know the click was registered, but it doesn't close.  I often find myself repeating this a dozen times before it finally takes.


It's been a while, but in TeXWorks I'm making a list of items. The long way:  \textbullet\hspace*{0.2cm} Jam \textbullet\hspace*{0.2cm} Custard \textbullet\hspace*{0.2cm} Beef \textbullet\hspace*{0.2cm} Good   Don't do that, make it a list! I hear you cry, so I do:  \begin{itemize}   \item Jam   \item Custard   \item Beef   \item Good \end{itemize}   However, when I create a list of the above the line spacing is not the same as ordinary lines of text. And since space is a premium in this document I'd like to know if there an easy way to keep the line spacing as normal as possible (like the first bit of .tex), but make the latex code easier on the eyes without adding a text bullet and horizontal spacing each line?


How to keep my background image settings?

is there a method to store the settings of background images? I use them often as modeling reference in the viewport, but everytime I open up the blend-file all settings are gone:   Settings during work   Settings after restart  As long as you get the modeling done without a restart or changing the files, there is no problem. However it's annoying to replace all images over and over again.  Any ideas?


How to solve an definite integral of floor valute function?

How do you prove this identity:  $$\int_0^{n^2}\lfloor\sqrt{t}\rfloor dt = \frac{1}{6}n(n-1)(4n+1)$$  I'd very much appreciate your help on this one!


Any useful personality mode for a RobCo unit?

You can find terminals where you can activate RobCo unit(s) with a selected personality mode.  Are there any useful or practical?  Because i ended up with another enemy when i protected myself from raiders and the bot with Law Enforcement saw that...


Truncating the number of authors in a citation call-out, using natbib citation management package and agsm bibliography style

Does anyone know how to make sure that citation call-outs using natbib and \bibliographystyle{agsm} always show just first author et al. whenever there are more than two authors?   I have seen other answers to this, but none of them answer my question (e.g. ).  I don't have the file  agsm.bst in my Sharelatex, so I'm not sure what to change.  In my case, it also appears that only random papers get cited like that (naming all the authors). And I don't want the Bibliography to shorten the citations, just when I generate a citation call-out in the text.


What is the difference between all and default in kernel setting?

I want to enable reversed path filtering to prevent source ip spoofing on my server. I noticed that I have the following settings at current:  net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.lo.rp_filter = 0 net.ipv4.conf.p4p1.rp_filter = 1 net.ipv4.conf.eth0.rp_filter = 1   The setting in all and the one in default are not the same. There are no explicit settings on my /etc/sysctl.conf file. I would like to what is the impact to the rest of the configurations between setting  net.ipv4.conf.all.rp_filter = 1   and  net.ipv4.conf.default.rp_filter = 1   Do I have to set both or just one of them?


I have a company that needs a basic website for the lifetime of the company being about 50 years.  Is there a service that does this because I have had domain names lapse for services like this before for non tech savvy companies.


I have made a program that prints the each date of year. Is it possible to add a counter that will allow to limit the printable dates? I would print for example every 7 days. Thanks for any advice.  The original code below.  def main():      for month in range(1, 13):         daymax = 32         if month == 2:             daymax = 29         elif month == 4:             daymax = 31         elif month == 6:             daymax = 31         elif month == 9:             daymax = 31         elif month == 11:             daymax = 31          for day in range(1, daymax):             print(day,".", month,".", sep="")   main()


Similar Matrices and their Jordan Canonical Forms

Let $A$ and $B$ be two matrices in $M_n$. Is the following ture:  $A$ and $B$ are similar $\iff$ $A$ and $B$ have the same jordan canonical form.  Could someone explain?


Can I submit a non-research "article" on ArXiv?

Can a generic article be published on arXiv? For example, can I publish an article on "Introduction to Linear Algebra," or does it have to be an innovative research paper or preprint?  If not, are there any journals (e.g., open access) that accept "articles" as papers?


Let $V$ be a vector point function. $V$ is solenoid if $\operatorname{div} V =0$ and irrotational if $\operatorname{curl} V =0$.  How can one visualize examples of solenoid or irrotational functions? Are there any functions such that they are both irrotational and solenoid? (Except constant functions)


About the mean values theorem and strictely increasing functions

I have the following question which I cannot find its proof:  Let us consider the following mean values theorem:  Theorem: Let $f:[a,b]→[a,b]$ be a continuous function on the closed interval $[a,b]$, and differentiable on the open interval $(a,b)$, where $a<b$. Then there exists some $c∈(a,b)$ such that  $$f′(c)= \frac{f(b)- f(a)}{b-a}$$  Assuming that  $f$ and $f'$  are strictely increasing functions. hence they are bijections from $[a,b]$ to itdelf.  My question is: Given any $c∈(a,b)$ can we find $u,v$ in $[a,b]$ such that   $$f′(c)= \frac{f(u)- f(v)}{u-v}$$  The same question if one fix $u$ or $v$.


How can I bring back the title bar in Nautilus and Document viewer?

I've noticed that the classical title bars are missing from Nautilus and Document Viewer. It has been going for a sleeker hidden title bar. However, I prefer the older version. Is there anyway to bring back normal title bars?


Verifying birth & death details in England for the 20th century?

How do I go about verifying birth & death details in England for an individual who lived and died in the 20th century?  As starting points I have a name of the deceased individual and his place of origin is assumed to be in England.


Showing that the sample mean and variance are independent by showing two distribution are the same

Let $X_{1},X_{2},....,X_{n}$ be independent $N(0,1)$ random variables and set $\bar{X}=\frac{1}{n}\sum_{i=1}^{n}X_{i}$ show that $\bigg(\bar{X},\frac{1}{n}\sum_{i=1}^{n}(X_{i}-\bar{X})^{2}\bigg)$ and $\bigg({X}/\sqrt{n},\frac{1}{n}\sum_{i=1}^{n-1}(X_{i})^{2}\bigg)$ have the same distribution. This shows that the sample mean and sample variance are independent in this model.  Thoughts I tried showing that they have the same characteristic function but couldn't get it to work that way. I think maybe I could do something involving the CLT but I'm not sure how.


Prove that $-x\sin x<\frac{x^4}{6}-x^2$ for all $x\in(0,\pi)$.  My approach is that for similar type of problem I used two function $f(x)=y=-x\sin x$ & $g(x)=y=\frac{x^4}{6}-x^2$   $f(x)-g(x)<0$ for $x\in(0,\pi)$ After this step I am confused.


Aggregate and split layer by location into multiple layer in ArcMap?

I'm pretty new to GIS, but hope I'm moving in the right direction.  I have a layer of the county map of LA, which is divided into communities and a layer of the building coverage of the county.  The building layer contains a large amount of data, so it takes a long time to render making visual analysis difficult.  It seems to me that the way to deal with this is to break the building layer into 353 much smaller layers based on community (there are 353 communities in the attribute table).  In that way I'm thinking that if a have a community_buildings layer for each community I can make them visible as needed without bogging down ArcMap.    It seems to me that what I would want to do is a spatial join on the communities layer to the buildings layer and then break that result into a 353 different layer based on communities, but I don't know how to accomplish the second part which is splitting one layer into multiple layers based on an attribute.    Below is the graphic of the data sets to get a feel for what I'm talking about.  Hopefully I'm moving in the right direction, but if I'm not can someone reorient me?


Why do I come out of a Nether Portal other than the one that I made?

I have built a house in the sky with a Nether Portal in it. When I go into the Nether Portal everything is perfectly fine but when I go back home I don't spawn back in the portal I used to go into the Nether; I spawn in a new Nether Portal somewhere on the ground far from my original portal.  Is the problem that my Nether Portal is in the sky?


Why does a segmentation fault occur in this string manipulation program?

This is a simple string reversal part of a bigger program.  char* strRev(char* exp) {     char temp;     int n = strlen(exp);     for(int i = 0; i < n/2; i++)     {         temp = exp[i];         exp[i] = exp[n-i-1];         exp[n-i-1] = temp;     }     return exp; } int main() {     printf("%s", strRev("Harshit")); }   Putting this on a separate file and running GDB, the segmentation fault occurs at the line  exp[i] = exp[n-i-1];  Now I ran the same code using C++ and std::string and the program ran correctly.  What is the problem in the code?  Edit: Here's the C++ code that I used.  std::string strRev(std::string exp) {     char temp;     int n = exp.length();     for(int i = 0; i < n/2; i++)     {         temp = exp[i];         exp[i] = exp[n-i-1];         exp[n-i-1] = temp;     }     return exp; }


Detect a number of specific items in the inventory

I need help for detecting a number of specific items in my inventory whether it's stack or not.  This is the command I used:  execute if entity @a[nbt={Inventory:[{id:"minecraft:apple",Count:64b}]}] run command  But the command only detects a stack of items.


Hyperrefs colors and settings deactivated in some sections inside LateX template

I am using the hyperrefs LateX package inside a template defined by a .cls file. On some sections it seems like the default settings of hyperrefs are overwritten (modifying them locally using \href[]{}{} doesn't work either). I basically want them to show on PDF readers, whether it is boxed or with superscripts. Notably this template lines seem to color all texts from some of the faulty sections in gray. \newcommand{\entry}[4]{%   #1&\parbox[t]{11.8cm}{%     \textbf{#2}%     \hfill%     {\footnotesize \addfontfeature{Color=lightgray} #3}\\%     #4\vspace{\parsep}%   }\\}  It might also be related to footnotes but I couldn't make  work. Is there a way to force setting w/o modifying the template ? Or how to modify the template so that it doesn't mess with hyperrefs ?


This is what happens. I don't understand why. Could anyone help me please?


I discover that one of my partition was full.  rootfs                 20G  1,8G   17G  10% / /dev/root              20G  1,8G   17G  10% / devtmpfs              7,8G  184K  7,8G   1% /dev none                  7,8G     0  7,8G   0% /dev/shm none                  7,8G  600K  7,8G   1% /var/run none                  7,8G     0  7,8G   0% /var/lock none                  7,8G     0  7,8G   0% /lib/init/rw /dev/md3              1,8T  1,6T  177G  90% /var none                  7,8G  600K  7,8G   1% /var/run none                  7,8G     0  7,8G   0% /var/lock   With some recursive du -sh * | sort -n , I discover that my /var/tmp has 2 folders belong to www-data  root@ns384990:/var/tmp# ls -la total 76 drwxr-xr-x  2 www-data www-data 36864 2014-10-27 00:11  ..  drwxrwxrwt  4 root     root      4096 2014-10-29 06:30 . drwxr-xr-x  2 www-data www-data 32768 2014-10-01 18:40 . ..  drwxr-xr-x 21 root     root      4096 2013-07-23 11:49 ..   I go to the .. folder cd ' .. ' (yeah, 2 fcking escape ... I was mad 'cause I don't see the 2nd escape and it takes me hours to find it)  And here what I get inside... Severals films and series   root@ns384990:/var/tmp/ .. # ls -la total 1580112096 drwxr-xr-x 2 www-data www-data       36864 2014-10-27 00:11 . drwxrwxrwt 4 root     root            4096 2014-10-29 06:30 .. -rw-r--r-- 1 www-data www-data   644663385 2014-10-18 18:05 10.Things.You.Dont.Know.About.S01E02.Abraham.Lincoln.720p.HDTV.x264-DHD.mkv -rw-r--r-- 1 www-data www-data   634213806 2014-10-24 09:44 10.Things.You.Dont.Know.About.S01E05.The.OK.Corral.720p.HDTV.x264-DHD.mkv -rw-r--r-- 1 www-data www-data  4743372800 2014-09-19 01:41 21.2008.BluRay.720p.x264-WiKi.tar   ... 1,5 To of films and series sent "I don't know how" and stocked in my /var/tmp  How can I find the script allows to write this ? What are the logs files or commands I can use for tracking what happened ?  here is my OS information :  Linux ns384990.ovh.net 3.8.13-xxxx-std-ipv6-64 #3 SMP Fri May 31 13:14:59 CEST 2013 x86_64 GNU/Linux Ubuntu 10.04.2 LTS  Welcome to Ubuntu!  * Documentation:   Ubuntu 10.04.2 LTS  ** EDIT 1 : Just found the script : **  ** link removed as it contains malware** (too long for putting it here)


As you can see by the screen shot I took, when I choose the File format I want to export my animation in, Quicktime is not an option. Anyone know how to fix this? Thanks :)


What's the name of the approximation $(1+x)^n \approx 1 + xn$?

A good approximation of $(1+x)^n$ is $1+xn$ when $|x|n << 1$.  Does this approximation have a name?  Any leads on estimating the error of the approximation?


Are peoples' competencies really as flat in D&D 5e as its math suggests?

Bounded accuracy is a major feature of the new system. It promises that bonuses to rolls won't grow too much throughout a character's career. And indeed, a first-level fighter would have an apex skill of about +5 (Strength +3, proficiency +2), whereas a twentieth-level fighter would have the same skill at at most +11 (Strength +5, proficiency +6). Supposedly, such bounded accuracy allows characters to meaningfully interact with the same threats for most of their career, if they so choose. (.)  This wasn't always the case. In 3e, everything was modeled by the rules, and a level 20 character meeting a level 1 character would not require any change to the way either are represented by the system. Such interaction was unlikely to be meaningful mechanically, as level 20 characters would outclass level 1 characters thoroughly. Thus, level 20 characters in 3e were both in mechanics and flavor significantly more powerful in every respect.  In 4e, only the immediate vicinity of PCs was ever modeled, and there was no such thing as "level 1" people near them by the time they'd hit level 30. If they were to be modeled at all, "low-level" creatures would be represented as minions of higher level (For more on this particular reasoning see , though it's not that important to the question at hand). There were no conclusions of relative power level to be drawn from the mechanics, even though the numbers kept on growing, but flavor of becoming demi-gods at high levels preserved.  In 5e, it appears that the approach has moved back to modeling the whole world, as the implementation of flat math indicates. But what about the flavor? Is the world's greatest athlete at +11 really only capable of winning about 3/4ths of the time against a village strongman at +5? If that is not the case or the intention, how is this apparent disconnect reconciled? Is comparing them in such a way actually valid?  If it is, indeed, the intent of the system (please provide some quotes if possible) that even at high levels PCs do not straddle like colossi over mere mortals, it is a serious departure from the past two editions I'm familiar with. As a qualitative change, it would impact the way I treat high-level characters and the role they play in the world, much more so than different class features or spellcasting methods of a new edition.  Does the bounded accuracy approach mean that max-level characters are no longer demigods compared to starting characters in everything other than killing?


Following  I can reproduce that the first time I execute a du of a directory it takes longer than if I do it just after. Where is this caching happening? How can I clean it? I would like to perform some performance tests about the time a directory is taking on giving its size by executing time du -sh /home/user/directory


On the nature of the collapse of the wave function

The collapse of the wave function by measurements is one of the most mysterious properties of quantum mechanics.    At what scale does the wave function collapse? What are the conditions for a collapse?  Can it be made precise?  Does the collapse happen instantaneously, or is it spread out in time?  What is the precise equation for the collapse?  Why is the collapse time-asymmetric, and can this explain the arrow of time?


Is there way to enable more than 4 GB RAM in 32-bit Windows OS?

I upgraded my PC to 4 GB RAM and I get only 3 GB. Windows 7 32-Bit consider that I've 4 GB RAM but didn't use more than 3 GB.  Someone told me that MS Windows 32-bit doesn't support RAM larger than 3 GB.  So please is there any way to make my OS "Windows 7 32-Bit" support more than 3 GB RAM ?  *`Note: I can't move to 64-bit because I've many program doesn't work with a 64-bit OS.  Edit::  I tried what Mr. Wonsungi advised me but whenever I check this option:      Enable support for 4 GB of RAM   I get the following error:      'Cannot access to the registry key   HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-11d1-A9F0-00AA0060FA31}.'   There is no "CLSID" in my registry, I don't know why!.


I am not sure I understand how stack works...   Is there any performance difference between static and dynamic arrays, excluding the time needed for memory allocation?  char* data = (char*)malloc(100); char data[100];  From what I understand stack is only a few MB. Why is the stack limited? Why have stack and heap and not a single place to store memory? Should all arrays be allocated dynamically? For example, having one array with size 1KB on stack, is it a good idea?


A wife who knows and accepts her husband's infidelity

What do you call a wife or woman who knows their spouse or partner is unfaithful but pretends either to (1) not care  or (2) to not know?  In this scenario it's important that the cheating spouse or partner believes his wife or partner hasn't found out. That he is having one or more love affairs without being caught.   I did manage to unearth an archaic term wittol, which The Chambers Dictionary defines as a man who knows his wife's unfaithfulness, and accepts it.   The Collins English Dictionary online says:      (ˈwɪtəl)   a man who tolerates his wife's unfaithfulness   [C15 wetewold, from witen to know (see wit²) + -wold, perhaps from cokewold cuckold]   I'm curious if there is a modern-day female version. I can't think of any off-hand and yet I'm sure we all know someone in our lives who has knowingly accepted their partner's infidelities be it for religious convictions; a sense of loyalty; pride; love; fear of loneliness; fear of hardship or merely motivated by social status.    A modern literary example:   In Gillian Flynn's novel Gone Girl, although the beautiful  pro/antagonist Amy Elliott Dunne is fully aware her husband has been cheating for over a year, she pretends not to know and is far from being acquiescent. Only the reader is privy to that information.  (I realize it doesn't match the description perfectly, but it's important that Nick Dunne is unaware of his wife's discovery.)


Is refund possible if I cannot take a (just rebooked) flight because of coronavirus bans?

My wife had a return flight ticket from Seoul to Barcelona via Istanbul at Turkish Airlines for March 6th. We received a mail today (March 2nd) saying please call our Call Center. We called and they said the flight was cancelled. They gave us the options for a refund or change. When asking which changes were possible, they offered the same flight for the 11th of March. I asked if there could be some problem because of the novel coronavirus and they said they had no information. We changed our flight to March 11th, because they said that if the same happened again and it was cancelled again we could get the refund.  Now I've learnt in IATA's list (, update from March 1st) about Turkish ban of non-turkish nationals who have been to Korea recently. I think it isn't likely this ban will disappear soon (right?) so we're looking for alternatives like flights via Germany or direct flights to Barcelona.  Now I'm worried that if Turkish Airlines actually does their March 11th flight but they don't let any non-turkish nationals on, they may argue that no refund is possible because it's the passenger responsibility to check that they have all the rights to enter the countries for every layover, at the time they get the flight. Are we going to get a refund? I called the Call Center again but they said they had no information about this.  My wife is Korean but she is currently living in the EU. I think they should have known that because of my wife's nationality she was not allowed to travel. The ticket fare was the cheapest, no cancellations allowed. We had booked the 1st flight before the novel coronavirus was discovered.


There is a differentiable function from R to R that has a unique critical point that is a local maximum but still not have a global maximum?

You can define some discontinuities and then eliminate the global max, but there is some function that have a unique critical point, this critical point is a local max (or minimum), and this function don't have a global maximum or minimum? Can you give some examples or maybe a reason because is not possible?


There’s a lot of non-traditional ways to learn science without actually going to college. MOOC is the first thing that comes to my mind when I hear of free and certified learning. But are MOOCs worth anything? Can you even include free courses in your resume? Will you be able to pursue a graduate-level education by finishing a lot of free online courses that would give you solid foundation on a certain subject?


EasyMock: Getting NullPointerException while calling super class method

I am using EasyMock, after debug, I found that the issue is in A.java > while calling getResults(val) from dbconnection object.  dbconnection object is null, my question is how to Mock the objects in super class ?  Here is the simple code:  A.java  public class A {      @Autowired     DataBaseConnection dbconnection;      public Result methodInA(String val)() {         result = new Result();         result = dbconnection.getResults(val);           return result;     }; }   B.java  public class B extends A {      public Fresult getfinalResult(String value) {          // Fresult class contains 'Result' class object and some other variables         Fresult fresult = new Fresult();         // some logic here...and I was able to exeduted this by creating mocks in my test class...             Result result = methodInA(val);          fresult.setResult(result);         return fresult;     }    }   BTest.java  @Before public void setUp(){    A objectA = new A();    dbconnection = createMock( DataBaseConnection.class );    setField( objectA, "dbconnection", dbconnection );    expect( dbconnection.getResults( EasyMock.anyObject( String.class ) ) ).andReturn( 'Dummy Result object' ).anyTimes(); }  @Test public void methodName() {     B classBobject = new B();     replayAll();     Fresult fresult  = classBobject.getfinalResult("some value");     verifyAll();     assertEquals("Somthing", "Somtthing"); }


Why have a bulk terminal at all? (MOSFET)

I must be overlooking something but I really don't see the need to have a bulk terminal. I am studying the body effect whereby it somehow interferes with the threshold voltage. I don't fully understand it because I'm finding creating the terminal in itself counter intuitive.    I am told that it must be connected to the lowest or highest voltage in a circuit, depending on n or p channel. First of all, if this interferes with the threshold voltage, wouldn't my supply rails directly interfere with the mosfet since they could be 1V or 15V. Not to mention if there was noise in the power supply, it would directly transmit through, no?  What would happen if there was no body terminal?   Why does a BJT not need one?  Do enlighten me.


I want to sort a list of dictionaries based on its value: dict_list=[{"a":2},{"b":3},{"c":4},{"d":1},{"f":0}]  I want answer as: [{"f":0},{"d":1},{"a":2},{"b":3},{"c":4}]  I tried this code:      dict_list=[{"a":2},{"b":3},{"c":4},{"d":1},{"f":0}]    y=sorted(dict_list,key=lambda x:dict_list.values()[0])   print(y)   But it is showing this output:  AttributeError: 'list' object has no attribute 'values'


Prove that for odd $n > 1$ , $3^{n} + 1$ is not divisible by $n$.  There's a hint but I can't find any use for that.  hint: If $a$ and $b$ are coprime with $m$ and $a^{x} \equiv b^{x}$ (mod $m$) and $a^{y} \equiv b^{y}$ (mod $m$) then $a^{\gcd(x,y)} \equiv b^{\gcd(x,y)}$ (mod $m$).  I don't know if you can find any use for this but this is my thoughts : $3$ and $n-1$ are coprime with $n$ and $3^{n} \equiv (n-1)^{n} \equiv -1$ (mod $n$).


How to list directories with particular depth?

I want to list only those directories which are a particular depth from current directory. Let's say depth=2  The directories listed can be:  ./abc/abc ./xyz/xyz   If depth is 3  ./mvd/123/abc   etc.


Link between Warhammer Fantasy and Warhammer 40k

Is the 40k just Fantasy in the future? They exists in parallel worlds or Fantasy is an enclosed space quadrant of universe in 40k?


bash-command not found; for every command == fear i could screwed up the path

here is the output of echo $PATH  /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin   and when I gave cat /etc/paths this is the output  /usr/bin /bin /usr/sbin /sbin /usr/local/bin   I am not sure whether that /usr/local/bin is creating the error (command not found)  Thank u for your suggestions


Complex polynomial mapping the closed unit disc to the closed unit disc

The polynomial $p(z)= z^n +a_{n-1}z^{n-1}+a_{n-2}z^{n-2}+...+a_0$ maps the closed unit disc to the closed unit disc. Then prove that all coefficients of $p(z)$ except the leading coefficient are zero. I have no idea because Schwartz lemma cannot be applied unless $p(0)=0$. Help please.


Change color of individual print line in Python 3.2?

I'm working on a little text-based adventure in Python 3.2 as I learn it in order to practise and become more familiar with the language. Anyway, I want to make it so that when certain actions happen, the color of the print text changes. How do I do this.  For example, the first text I want this to occur for is:  if 'strength' in uniqueskill.lower(): time.sleep(3) print('As you are a Warrior, I shall supply you with the most basic tools every Warrior needs.') time.sleep(3) print('A sword and shield.') time.sleep(1) print('You have gained A SWORD AND SHIELD!')


How do I make custom grass using particles?

I've looked everywhere and all I can find is how to make realistic grass using hair particles. What I'm trying to do is create a sort of low poly scene using grass that I modelled myself. I put it into the particle system, but it's all just lying on it's side even though the Initial Orientation is set to Object Z, in fact, non of the orientation settings will make the grass go right side up. The grass models that the particles are referencing are right side up. Some of them are even floating in the air.  How do I make them face right side up? How do I stop them from floating? It would also be good to have them be angled towards the direction that the ground faces are facing.  EDIT  Okay, I figured out how to get them the right direction... sort of. However, now they are appearing on the wrong side of the mesh. I checked the Normals and they are the right direction, and when I flip them to the wrong direction, the grass appears on top, but upside down.


Download packages (different architecture) different Ubuntu version

Ideally, I would like to specify architecture and Ubuntu version and download all dependencies for that package, then take them to another computer.    I know about apt-get download.... and that would work fine if the architectures and versions matched.  I do see an architecture modifier, but not a version modifier.  Any help, or pointing me toward how to accomplish this with aptitude or another package tool would be appreciated.  even if I could take one .deb to the target computer and list all concrete dependencies... that would really solve the problem.


Why has Unanswered link disappeared in my profile

Today morning when I saw my profile in SO I just noticed that Unanswered link has been disappeared! Why this has happened! I can see the same in my friend's desktop when logged in with his profile but not mine. I don't find what has just happened! Attached images to show what I am trying to say! I do not even find this in other profiles of SE like Meta StackExchange, Stackoverflow meta etc., below are 2 images of the same issue for different sites. Stackoverflow Image  Stackoverflow meta


Monotone/ desaturated reflection material in Blender/ Cycles

Does anybody know how to get desaturated reflection (monotone) made from colorful object? Blue object, white plane beneath. With standard settings the reflection is blue. I would like to have it black and white. I tried adding HUE/SATURNATION node to diffuse or glossy shader (connected into mix shader) but this doesn't seem to work… I know it's possible with compositing but it's a bit tedious…. Any idea?


How to secure recommendations and apply for PhD after having worked outside of academia for two years?

I have been working in a big-shot multi-national corporation as a developer for two years now, with a possible future as a software architect in some eight to ten years.  Now I want to enroll in a PhD program. I am planning to quit my job and join some university for PhD programs. Now most of the universities needs some research papers, of which I have none. They also require recommendations from professors, however I have already quit college two years back and don't have a working relationship with those professors.   How should I secure letters of recommendation? Will a letter of recommendation from my manager help? Does academia really care about professionals wanting to enter back into the world of higher education again? Will I be able to apply to competitive universities with my profile?


I've seen other questions on the usage of "few", but I'm wondering if there is an official definition on the numerical value of the word. The common rule seems to be a couple is two, a few is three or more, and several is something bigger. So is there an official number assigned to the word from some reputable source?


Would it be OK to paste content from Wikipedia into a popular empty tag-wiki?

Assuming that you could make a nice tag-wiki simply by pasting and editing content from Wikipedia, is there any problem with doing something like that?  There are a lot of empty tag wikis that would be better off with default content from Wikipedia rather than an empty wall.  This would at least give people a starting point, I think it's easy to be intimated by the task of creating a new wiki page.  But there could be some social or legal issues with this.


Resizing image resolution in ArcGIS Desktop?

I have NDVI images (250 m) and Soil map (1000 m).   How can I change the resolution from 1000 m to 250 m, so I can compare/work with them?


I am trying to figure out why for two variant variables that are identical, vba says it's not.  Public netw, netw_c As Variant  netw = Range("C2").Value netw_c = Range("C1").Value * Range("B2").Value  If netw <> netw_c Then     StrUoM = StrUoM + "Error on net weight, net weight of CS is different to the net weight ZCU times their number in it." & Chr(10) End If  Why this if loop returns me a true statement ? I noticed also, by looking a lot into this issue that if I declared my two variables netw, netw_c as Single. So, the problem is not about making it functionnal, it works with this declaration but, I don't understand why. Here are how are defined the variable in VBA:  Thank you !


How many cores does a Mid 2012 Macbook Air have?

I checked the specs, and the i5-3427U CPU has 2 cores.  But the Activity Monitor shows 4 little charts for the CPU, so it looks like 4 cores.   Which is correct? Why does the Activity Monitor have 4 charts?


As I see that the noun 'motivation' is both -countable and uncountable, I'm confused whether or not I should use an article before it.  For example, which sentence seems correct?     Hussein has strong motivation.   Or     Hussein has a strong motivation.


How would I prevent from spattering oil everywhere when pan frying? I was shallow-frying breaded chicken breasts for a General Tso's and got boiling hot oil EVERYWHERE in my kitchen, even burning myself multiple times. I would definitely prefer avoiding this in the future.


Executing command for each newline separated

I have this:   chmod u+x $(find scripts -name "*.sh")   But I believe it's only running chmod u+x for the first item in the list from find, since the results are newline separated.  How can I run chmod u+x for each item returned from the find call?  My guess is that xargs is the best way? something like this:   find scripts -name "*.sh" | xargs chmod u+x


account banned on Meta.SO. the automatic banning logic should be changed

I get  Sorry, we are no longer accepting questions from this account. See the Help Center to learn more.  on  on Meta.SO. As you can see, I am an active Stackexchange user, mostly on SO. I always try to contribute to the value of all Stackexchange sites. Of course I have read  and  about the automatic ban system. Improving my bad-voted questions on Meta.SO would not really help because downvotes were not because of the quality of the questions but because people were often/mostly disagreeing with my suggestion. I understand that this is automatic and my ban cannot be undone by request. So I want to request that the logic behind the autoban on Meta.SO to be changed because downvotes mostly never mean that the question is bad.


How can I send SMS from Ubuntu to cell phones?

I'm tired of paying for my cell phone. It's just a small glorified computer and anyone wanting to contact me can contact me when I'm home.  I would, however, be willing to pay small fee for the ability to use sms text messaging using my internet on my computer.  Is this possible in Ubuntu?


Is inverse use of mean value theorem right?

If we have $f$ is differentiable on $(a,b)$, and continuous on $[a,b]$, then  for any $x\in (a,b)$, exists $y, z \in [a,b]$, such that  $f '(x)=\dfrac{f(z)-f(y)}{z-y}$  Is this right?


If we try to create a page which contains tons of data about each employee. These data are categorized in tabs and every tab opens nested tabs!  The tabs appearance looks overwhelming especially after adding the styles and they appear in multi-lines!   Could I ask how to handle all these data in easy way for the end user ?


What does "apt-get install !!" do and how to make it work?

I have seen someone typing  apt-get install !!   He did that a few times and every time, a different program was installed. It seems like it automatically figured out what is needed next.  However, when I tried it on my Ubuntu 14.04.1 LTS virtual machine, it just showed some usage instructions. Googling for apt-get install !! doesn't seem to work very well. Many search results do not contain the double exclamation mark.  What does apt-get install !! do and what could be missing on my machine that it did not work?


Combination of Mix shader and transmissions node leaves behind black artifacts

I'm trying to make an object transparent but when I use a mix shader and transparent BSDF node and turn the transparency to the maximum value it still leaves behind these weird artifacts. Why is that?  Here is how it looks without transparency   Here is how it looks when transmission is turned on (maximum value) with the mix shader. The leaves should look invisible    Here is the node setup for that material. The mix shader at the top right is what I switch from 0 to 1 to get the two previous images. Any ideas on how to get an evenly transparent material without the black shapes being left over would be a great help. Thanks!


Why is de Rham cohomology invariant under deformation retraction, or, more generally, homotopy equivalence?

For example, I know that $H^k(S^n \times I^m) = H^k(S^n)$ (where $I$ is an open interval) because there is a deformation retraction from $S^n \times I^m$ to $S^n$.   Why are the cohomology groups invariant under deformation retractions?


Multiple entry Schengen Visa query for Portugal

We recently visited the Netherlands in November 2019, my wife applied for a Schengen visa and was given a multple entry visa which stated schengenstaten. This visa was from November 2019 to November 2020. We were in Netherlands for 3 days  We are planning on visiting Lisbon towards the end of next month, but we are unsure whether my wife will need to apply for schengen visa again. We are planning on staying in Portugal for 6 days. VFS Global are saying it should be fine but are also saying as a precaution I should contact the Portuguese consulate to confirm however, I am having an extremely difficult time contacting them and I live 3 hours away from their location in the UK.   Would anyone happen to know if this will be okay?  Thanks


Noob question, but I'm not seeing how an SR latch such as the one in the image can "get started". If each input depends on the output from the other, how can there be two inputs to each gate to set the thing in motion?  In a rudimentary circuit consisting of exactly one NOR-based SR latch, what happens when the power is switched on (e.g. battery connected)?


is it better to use DDR4 Ram Instead of the Old DDR3 to Prevent data Corruption?

I have my Gaming PC which has DDR4 Memory RAM with i7 6700k and my Server Which has DDR3 ram with i5 3570k both running Windows 10 Pro without any kind of RAID now I transferred 4 TB of data from my gaming PC to my Windows 10 Server which has an old 16gb DDR3 RAM using my local network. I read on the Internet that DDR3 does not has any kind of protection of data corruption unlike the DDR4 which has CRC feature that ensures that data is written properly to memory without corruption   So my Question is the chance of data corruption bigger when moving a lot of data to a PC Which has an old DDR3 memory? Is it time to upgrade my server to DDR4?


How to get a new answer for an old question

Seems like this question should have already been asked on Meta, but I could not find it.     is similar, but my question more has to do with requesting an update on a question that is not mine, rather than what to do once it is updated.  My question is how to get an update on an old question. I found  and the question itself (and the updated comment) is outdated and now useless. I would like to ask the question again however I know it will be tagged as duplicate.   How should I go about getting a completely new set of answers for a question like this?


Kinetic energy of an object rotating about an axis not through the center of mass

I am a bit confused about the kinetic energy of a rotating object when the axis of rotation does not pass through the center of mass. For example, consider a thin hoop of mass $m$ and radius $R$ that is hanging from a pivot and is free to rotate about that pivot. If the hoop were rotating about it's center of mass, the kinetic energy would just be  $$K = \frac{1}{2}I\omega^2 = \frac{1}{2} m R^2 \omega^2,$$ because the center of mass of the hoop is not moving (i.e. the translational kinetic energy is zero). However, when the hoop is rotating about the pivot, the center of mass is no longer stationary. Is this compensated for in the change in the moment of inertia, or does this translational piece need to be added? In other words, do we have $$ K_{tot}= K_{trans}+K_{rot}=\frac{1}{2} m v^2+\frac{1}{2}I\omega^2=\frac{1}{2}m(R\omega)^2+\frac{1}{2}(2mR^2)\omega^2 = \frac{3}{2} m R^2 \omega^2 $$ or $$ K_{tot}= K_{trans}+K_{rot}=0+\frac{1}{2}I\omega^2=\frac{1}{2}(2mR^2)\omega^2 = m R^2 \omega^2 $$ I am fairly certain that the latter is the correct answer but I just wanted to make sure I am thinking about this correctly.


How do dedicated light meters account for light transmittance?

seem to be well-regarded for their versatility and accuracy of metering.  What puzzles me about them is how can they account for the different light transmittance of different lenses? It's easy for an in-camera metering system that meters  so any peculiarity in transmittance is already applied to light when it reaches the metering sensor. But a standalone meter does not have the privilege of looking at the world through the lens it meters for. I tried looking it up in  and , but this issue was not touched upon at all.  This leaves several variants how it could be handled -   light meter uses  for aperture display/input, and photographer is expected to perform the adjustments to and from  (which are used by cameras); light meter assumes some median transmittance of lenses of its era, and automatically accounts for that; photographers simply ignore the matter - even a 75% transmitting lens will be off only by about half a stop, no big deal; each light meter used is expected to know that you have to dial in some exposure compensation to account for the light loss; ...   So how does it work in real world?


What is the number of the solution of the following equation a+b+c+d+e = 18?

What is the number of integral solutions to the following equation?  $$ a+b+c+d+e = 18 $$  Here, $a,b,c,d,e$ all are variables and can take zero and positive integers values. That means $a,b,c,d,e$ are all positive integers and can take zero values .


Review overview shows two suggested edits for a long time, but the review queue is empty

When I went to the review overview on Meta on 08.01.2015, 19:16, it listed two open items in the suggested-edits queue, however when I clicked on the queue, I was told that the queue had been cleared. When I went back to the review overview, however, the edits were there again.  Since the icons for recent reviews had not moved, I suppose that these were still the same two items waiting for review, and since phenomenon lasted for half an hour now, I would rule out  or  to be the reason for this.  After a while, the phenomenon ceased, with one new reviewer popping up in the icon list of recent reviewers.  I had not performed or skipped any suggested-edit review from the queue at that point.    A similar phenomenon occurred for several hours up to 11.04.2015, 11:05: The review overview showed two suggested edits and when I went to the suggested-edits queue, it was cleared. Sometimes, edits that I could review appeared, but two phantom edits remained.


Number of non-decreasing functions between two finite sets

Let $I_j={\{1,2,\ldots,j}\}$ for $j \in \mathbb{N}$. For $m,n \in \mathbb{N}$, how many non-decreasing functions $f:I_m \to I_n$ exist?


How do I change the runlevel on systemd?

Pretty simple, I am trying to change the runlevel. Everything I find online points me to the file located in:  /etc/init/rc-sysinit.conf   Here I have tried changing the "DEFAULT_RUNLEVEL" to 3 or anything else and it makes no difference (the original value was 2 which didn't make much sense either). No matter what, my machine boots fully and when I check the runlevel command, I see "N 5" as the result every time.  How do I change the runlevel? I would rather not override it through grub or some other workaround mechanism. And I am not looking for how to disable X specifically.  All the instructions I was finding online were a bit old, did something change with 16.04?


How do I run PHP file in Ubuntu and fix the permission denied?

When I try to save the file of PHP in Ubuntu I get that error: unable to save /var/www/html/script.php  Error permission denied  How can I fix this error and save/run the PHP file?


"The number of residents has grown" vs. "the number of residents have grown"

Duplicate:                      The number of residents has grown.    The number of residents have grown.      Which of the above sentences is grammatical? Since has should stick with singular nouns and have with plural ones, I guess (2) should be correct, but I'm not sure.


Suppose $p$ is prime and $G$ is a group and $|G| = p(p + 1)$. Prove $G$ has normal subgroup of order $p$ or a normal subgroup of order $p + 1$.

I am having a huge issue that I can't fix in my argument. I will present my argument first then I will mention why I am having troubles fixing it.  Let $p$ be a sylow $p$-subgroup of $G$. Then $n_p \mid (p + 1)$ and $n_p = 1 \pmod p$. If $n_p = 1$, then $p$ is normal and we are done. Otherwise we have $n_p = kp + 1$. Since $(kp + 1) \mid (p + 1)$ so this imply that $n_p = p + 1$.  Therefore there are $p + 1$ sylow $p$ each having size $p$, so that means each distinct $p$ subgroups have intersection $\{e\}$. Therefore the union of all $p$ subgroups gives $(p + 1)(p - 1) + 1 = p^2$ elements. Therefore this leave $|G| - p^2 = p$ elements remaining outside all $p$-sylows.   Let $A$ be the set of elements that don't lie in any $p$-subgroup of $G$. $|A| = p$. Let $q$ be any prime that divides $p + 1$. Then A must contain some element $g$ of order $q$. Since $n_p = p + 1$, so this means that $N_G(P) = P$, therefore $g$ isn't in $N_G(P)$.   Let $x$ be a generator of $P$. Then all powers $x^i$ for $i \in \{1,\ldots,p - 1\}$ are generators of $P$. Since $g$ isn't in $N_G(P)$ so none of the $x^{i}$ centralizes $g$. Therefore $\{g,\ldots,x^{p - 1}gx^{-(p - 1)}\}$ are all distinict. All of those elements have order $q$. Since each of them must lie in $A$, so $A = \{g,\ldots,x^{p - 1}gx^{-(p - 1)}\}$. I can't really now deduce that $p + 1$ is a power of $q$ (for example consider $|G| = (5)(6)$). Any suggestions would be nice.


Hi I am a newbie to development.I have been assigned a task of adding validations on email and password.With the help of google and stackoverflow,I have done that task.But I could not understand the real way of writing or making regex.Can anybody help me to understand the way regex should be written,following is the code I have implemented in my task .Thanks in advance!  func checkEmailValidations(testStr:String) -> Bool {         // print("validate calendar: \(testStr)")         let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"          let emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)         return emailTest.evaluate(with: testStr)     }


Show that f is discontinuous at every rational and continuous at every irrational.

Let $f(x)=0$ if x is irrational and $f(\frac{p}{q})=\frac{1}{q}$ if $p$ and $q$ are positive integers with no common factors. Show that f is discontinuous at every rational and continuous at every irrational on $(0, \infty)$   If $x$ is irrational, then $f(x^-)=f(x^+)=f(x)=0$. It follows the function is continuous $\forall x \in \mathbb{Q}'$     An addition I did here as the statement right above was not sufficient. Any feedback on that part is much appreciated.      let $x$ be irrational and $a,b \in \mathbb{Z}$ such that $$a+ \frac{1}{b} < x$$   By using the density theorem on the real number there exists an infinite number of rational numbers in between such as:    $$a+ \frac{1}{b}< a+ \sum_{1}^{n} \frac{1}{nb}< x$$   As the rational number approaches the irrational number $x$ from the left,   $$\lim\limits_{n \rightarrow \infty} f(a+ \sum_{1}^{n} \frac{1}{nb})=\lim\limits_{n \rightarrow \infty} \frac{1}{nb}=0=f(x)$$   We can proceed similarly to the right of $x$ with $x<a-\frac{1}{b}$      As we approach from the left or right of an irrational number, the function $f$ approaches $0$.       Therefore $f$ is continuous at every irrational number.   If $x \in \mathbb{Q}$, we have $x_n= \frac{p}{q}+ \frac{1}{n}$  approaching from the right $x$ such that  $$\lim\limits_{n \rightarrow \infty} x_n =x $$ It follows that: $$ \lim\limits_{n \rightarrow \infty} f(x_n) = \lim\limits_{n \rightarrow \infty} \frac{pn+q}{qn}=\frac{p}{q} \neq f(x)=\frac{1}{q} $$ It shows that $f$ is not continuous from the right at any rational point of the domain.  Similarly, given $x$ is rational, and $x_m = x - \frac{1}{n}$ approaching $x$ from the left such that : $$\lim\limits_{n \rightarrow \infty} x_m =x $$  $$\lim\limits_{m \rightarrow \infty} f(x_m) = \lim\limits_{m \rightarrow \infty} \frac{pm-q}{qm}=\frac{p}{q} \neq f(x)=\frac{1}{q} $$  It shows that $f$ is not continuous from the left at any rational point of the domain.  any input is much appreciated.


I see more and more titles with backticks in the title (like mine here)... For example:      Is this a good practice? I guess not because I find this ugly, so there are three suggestions possible for me:   Avoid them in titles, and put a warning if the user try to use it (not an error, some user could need it some day) Format titles to set a monospace font for words surronded by backticks (without changing the background-color) Edit manually posts and remove backticks (see current accepted answer)   ... or any other ideas if someone has a better one :)


Area 51 discussion site shows as "unknown site discussion" in Android app

I noticed that a question on the Area 51 discussion site shows up as "Unknown Site" in the Android app:    This should say "Area 51 Discussion Zone".


As a capacitor is charging in a circuit with a battery as the power source where is the source of electrons coming from?

I have edited my explanation.  I hope this helps.  When a capacitor is charging where is the source of or where are the electrons coming from that deposit themselves on the capacitor surface on the positive end.  Do they come from the battery or are inside the wire?


Some of rules can be the same for most websites.   vs.     Some rules can be the same for most websites.   I think I want to say     Some of these rules can be the same for most websites.


To check whether $\langle 3+i\rangle$ is a maximal ideal or not in the ring of Gaussian integers $\Bbb Z[i]$

To check whether $\langle 3+i\rangle$ is a maximal ideal or not in the ring of Gaussian integers $\mathbb{Z}[i]$.  Attempt: $\mathbb{Z}[i]/\langle 3+i\rangle$ is isomorphic to $10 \mathbb{Z}$ which is not a prime ideal $\implies 10 \mathbb{Z}$ is not a maximal ideal. Hence $\langle 3+i\rangle$ is not a maximal ideal in the ring of Gaussian integers $\mathbb{Z}[i]$. Is this correct?


About apparent circularity in logic and set theory

This is more of a question about philosophy of mathematics. There is an apparent circularity in set theory and logic, in the means that we use set theory to define model theory, and we use results from model theory for proofs in set theory. And, analogously, we use set theory to prove facts from logic (unique readability, for example) and we define set theory using logic. I feel that we can reduce all this notions to a single syntactical idea of logical consequence, and from there we can define things in a non-circular way. However, I can't seem to make this notions all fit together in a logical, foundational manner. Does anyone know of an article or book that addresses this issue?


Let $a,b,c,d\geq0$, $a^2+b^2+c^2+d^2=1$ Prove $\displaystyle (1-a)(1-b)(1-c)(1-d)\geq abcd$ I mutiplied both with $\displaystyle (1+a)(1+b)(1+c)(1+d)$ to use $1-a^2=b^2+c^2+d^2$ and try using the cauchy-schwarz and holder but it is doesn't work.


How to prevent from line breaking in \cite?

I have multiple \cite{ref1, ref2,..} commands in my document and I spotted that in some places LaTeX put a line break or even a page break. See the attached image. I am using biblatex package to handle the bibliography. Is there any option to solve this issue in the whole book? Without playing with \mbox{\cite{ref1...}} ().    Edit 24.10.2017  It is hard to give running MWE. However, I use biblatex  \usepackage[ hyperref=auto, mincrossrefs=999, backend=biber, style=numeric-comp, sorting=none, sortcites=true, natbib=true, urldate=short, giveninits=true ]{biblatex}   so I cannot use package cite.


Why is Google not indexing my thumbnails?

Hello Webmaster community!  I recently began a new job and have been making some adjustments to a very old and very cluttered website. The idea is to eventually rebuild from the ground up, however, for the time being I have to make this current site as SEO friendly as I can.  My site seems to be indexing fine after I submitted fresh site maps, and a lot of the images on the site's product pages are showing up, but I noticed today that none of the thumbnails are being picked up by Google at all.  I am very new to SEO and web design and I need help understanding why my images are not being indexed into google correctly? My only thought is that it something to do with the thumbnail images being in a folder, while the full size images reside in the same folder as the .htm file they are associated with.   Overall I need some guidance on what the issue is, how to fix it and measures I can take to prevent it in the future.  I hope I explained this well enough, please help me out!  Thank you to all!  I hope this makes


I have tried to change displayed text and it didn't work. How do i change it? I have tried to do variables that change. Here is my code. It is super messy, but i hope that you know how to help. import pygame import os pygame.font.init()  FONT = pygame.font.SysFont('comicsans', 100)  SCREENX = 1700 SCREENY = 900  WHITE = (255, 255, 255)  x = 0 TEXT = FONT.render(str(x), 1, (255, 255, 255))  WIN = pygame.display.set_mode((SCREENX, SCREENY)) BACKGROUND = pygame.transform.scale(pygame.image.load(     os.path.join('Assets', 'space.png')), (SCREENX, SCREENY))   def draw_window():     WIN.blit(BACKGROUND, (0, 0))     TEXT = FONT.render(str(x), 1, (255, 255, 255))     WIN.blit(TEXT, ((SCREENX - TEXT.get_width()) /          2, (SCREENY - TEXT.get_height()) / 2))     pygame.display.update()   def main():     run = True     while run:         for event in pygame.event.get():             if event.type == pygame.QUIT:                 run = False             if event.type == pygame.KEYDOWN:                 if event.key == pygame.K_SPACE:                     x += 1                          draw_window()     pygame.quit   if __name__ == '__main__':     main()  So when i press space it says: UnboundLocalError: local variable 'x' referenced before assignment. Can you please help? I have looked from google, but i haven't seen problem like mine. I use VS Code.


How can I prevent firefox from updating?

I have firefox 56, but it keeps updating to firefox 57. Firefox 57 has severe performance related issues, and breaks my add-ons, and therefore I do not want it. Firefox 56 however seems to update against my will, and I want that to stop. How can I tell Firefox 56 to not update, not update without asking, or never look for updates.   I have not run sudo apt-get update, or sudo apt-get upgrade, but the NEW firefox keeps showing up.   Perhaps as a separate question, how can I tell apt-get to ignore new packages for firefox?  I have removed firefox and installed FF56 from source several times now, and it's getting obnoxious.   why is this thread different from the listed duplicates? well, firefox has an integrated updater, in the software that pushes new versions, independently of the Ubuntu OS package management system.   as an update, I figured out that by changing the "updater" executable in the source folder's name to "_updater", functionally prevents the unwanted update from occurring, although unwanted messages regarding an available update still occur.


Ubuntu 14.04.5 LTS doesn't shut down in a MSI PX60 6QE laptop

I have dual boot Windows 10 and Ubuntu 14.04.5 LTS in two partitions in a ssd.  Everything works fine, GRUB appears and I can decide which OS to boot.  However, I have an error when shut downing Ubuntu. It proceeds to shut down the laptop, but it freezes in the shutdown screen. And finally being forced to shut it down the hard way.  I have tried some options like the nomodeset or the acpi force in the /etc/default/grub file. Nevertheless it doesn't shut down.  What more can I try to solve it?  Edit:  I have this output. It freezes in # Will now halt, but it doesn't.    Sorry for bad quality.


Java - getting a random number from 100 to 999

Please tell me whether I am correct or not with the following line.  int x = ((int)(Math.random() * 100000)) % 1000;   This line always give me a 3 digit number 100 to 999 ?  Is there an easier way to type this out? Did I over complicate this code?


Getting priority after putting a spell on the stack

I have a two questions connected with priority and stack:   It's my turn, during the combat phase, after the declaring blockers step. Blockers are declared. At the Combat Damage step, I get priority and I pass. My opponent gets priority and decides to put a spell on the stack. Can I respond to him, adding my spell to the stack? And generally, do I always get a chance to respond after spell is put on a stack, independently from the situation? Can I hold priority during opponent's turn? By hold i mean for example when my opponent in his turn cast an instant, i decide to respond, and now basically he would get priority again, and my question is can i hold it by telling that i hold and cast second instant after first one. I know that there is possibility to do it.


If $f$ is a unit in a polynomial ring then $a_0$ is unit and all other coeficients are nilpotent.

I'm trying to prove the converse of the following theorem. I think suggestion available at this website are mistaken or I didn't understand them correctly.  Theorem. Let $R$ be a commutative ring with $1$. Then $f(X)=a_0+a_1X+a_2X^2+ \cdots +a_nX^n$ is a unit in $R[X]$ if and only if $a_0$ is a unit in $R$ and $a_1,a_2, \ldots, a_n$ are all nilpotent in $R$.  Let $f,g$ be two polynomials of degree $n$ and $m$. Then the coefficients of their product will be given by the following relation: $c_k = \sum_{i=0}^k a_i b_{k-i}$. Here we don't get $a_n b_m = 0$ because it is not yet the coefficient of $x^{m+n}$. If I would prove that $a_n$ is nilpotent, the proof will be followed... Any comment where I'm confused?  Why this question isn't duplicate? This question is answered but all argue that coefficient of $x^{m+n}$ are $a_n b_m$ which I believe is wrong. $c_{m+n} = \sum_{i=0}^{m+n} a_i b_{m+n-i}$. If you expand this, it will be sum of product of those coefficients such that $X^iX^j$, where $i+j = m $


Integral that makes square root of $\frac{\pi}{2}$

My question is regarding a integral that´s giving me a huge headache.   I want to show $$\int_{0}^{\infty}y^2e^{-\frac{y^2}{2}}dy=\sqrt{\frac{\pi}{2}}$$  I'm studying for an exam. I'm suppose to find the integral of $(x^2/c^2)\, e^{-x^2/(2c^2)}$ between $0$ and $\infty$.   So first i substituted $x/c = y$ which makes the integral simpler. Then I'm stuck, I'm guessing that the equation that appears when substituting like this, is well know(a standard integral used a lot) which is equal to integral of pi/2.


Empty automatically linked to object when created

I have a problem: when I create an empty and move it close to an object, it automatically sticks to it and I can't move or deform any of them independantly from each other. No parenting is defined, I don't understand... do I make a mistake? (I use Blender 2.78)


According to the Monty Hall Problem, I select a door, say door number $1$. Monty then opens $3$ of the remaining $6$ doors that do not contain the prize. The question is should I switch.  Note that all the doors are said to have equal chance of containing the prize.  My attempt: $$P(1) = \frac{1}{7}$$  Once Monty opens three doors, we know that none of them contain the prize, so, we update our beliefs $$P(i|j, k, m) = \frac{1}{4}$$  Thus any of the closed doors has probability $\frac{1}{4}$ of containing the prize, so switching is pointless.  What am I doing wrong here?


About SVM cost and gamma parameters tuning

I am using R and e1071 package to tune a C-classification SVM.  My question is: regardless of the kernel type (linear, polynomial, radial basis or sigmoidal), is there any good criterion to choose the range in which cost and $\gamma$ parameters should range over and/or to choose what the granularity should be (that is, as an example, gamma = 10 ^ (1:2) or gamma = 1:2 or gamma = 100 ^ (1:2))?  I add a second question: can tune.svm() return the best kernel type, too?  Thanks,


Let $a,b,c,x,y,z>0$ and $x+ y+ z= 1$. Show that $$ax+ by+ cz\geq  a^{x}.b^{y}.c^{z}$$ I have found the generalization of this inequality: For 2 sets of numbers $\left \{ a_{i} \right \}, \left \{ b_{i} \right \}> 0$ and $\sum_{1}^{n}b_{i}= 1$, we have: $$\sum_{1}^{n}\left ( a_{i}b_{i} \right )\geq  \prod_{1}^{n}\left ( a_{i}^{b_{i}} \right )$$ First solution Simply compare the logs: as the natural logarithm is a concave function, one has $$\ln\bigl(a^x b^y c^z)=x\ln a+y\ln b+z\ln c\le \ln(ax+by+cz)$$ for all non-negative $x,y,z$ such that $x+y+z=1$. How about another solution? I really hope to see that. Thanks!


"I and John" vs. "John and myself" vs. "John and I" -- Which is the acceptable way to refer to myself and my friend?

I need to find out which one of these ways to refer to me and a friend in one sentence is correct?      I and John...     John and myself...     John and I...


Why RegEx Matching is NOT Working in My Bash Script?

I am learning Regular expression for bash scripting. However, when I was testing string match, the lines always can't pass. Here is what I am testing:  I have a txt file contains a list of "songs":  $ cat soundtrack.txt Ludwig Van Beethoven - 01 - Allero.oog Ludwig Van Beethoven - 02 - Adag.mp3 Ludwig Van Beethoven - 03 - Beach.oog Ludwig Van Beethoven - 04 - Caven Adven.wmv   I would like to use Regex to get the "track number" which are the numerical ones.  Here's the script:  $ cat soundtrack.sh #!/bin/bash IFS=$'\n' for CD in `cat soundtrack.txt` do     if [[ "$CD" =~ "([[:alpha:][:blank:]]*)- ([[:digit:]]*) - (.*)$" ]]     then         echo "Found ${BASH_REMATCH[2]}"     fi done    However, the bash debug shows the string was unable to match the regex:  $ bash -x soundtrack.sh + IFS=' ' ++ cat soundtrack.txt + for CD in '`cat soundtrack.txt`' + [[ Ludwig Van Beethoven - 01 - Allero.oog =~ \(\[\[:alpha:]\[:blank:]]\*\)- \(\[\[:digit:]]\*\) - \(\.\*\)\$ ]] + for CD in '`cat soundtrack.txt`' + [[ Ludwig Van Beethoven - 02 - Adag.mp3 =~ \(\[\[:alpha:]\[:blank:]]\*\)- \(\[\[:digit:]]\*\) - \(\.\*\)\$ ]] + for CD in '`cat soundtrack.txt`' + [[ Ludwig Van Beethoven - 03 - Beach.oog =~ \(\[\[:alpha:]\[:blank:]]\*\)- \(\[\[:digit:]]\*\) - \(\.\*\)\$ ]] + for CD in '`cat soundtrack.txt`' + [[ Ludwig Van Beethoven - 04 - Caven Adven.wmv =~ \(\[\[:alpha:]\[:blank:]]\*\)- \(\[\[:digit:]]\*\) - \(\.\*\)\$ ]]   But, if I test directly in the shell with the same expression, it works:  $ if [[ "Ludwig Van Beethoven - 01 - Allero.oog" =~ ([[:alpha:][:blank:]]*)-\ ([[:digit:]]*)\ -\ (.*)$ ]]; then echo yes; else echo no; fi yes   What's wrong with my script? Do I have to add extra quotas or backslashes? Just doesn't make sense to me.  P.S.  $ bash --version GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)


What is the first chmod octal digit in a four-digit value for?

Sometimes I see chmod commands that use four octal digits instead of three -- what is the optional first digit for? For example, chmod 777 is equivalent to chmod a+rwx; what's the same command for chmod 2777?


I want to show that these two forms of $AC$ are equivalent:  $(1)$ For each collection of nonempty sets $X$ there is a choice function. $(2)$ For each collection of pairwise disjoint nonempty sets $X$ there is a choice function     $(1) \Rightarrow (2)$ is trivial. $(2) \Rightarrow (1)$: Let $X=\{X_i: i\in I\}$ be a collection of nonempty sets with index set $I$. Then $X':=\{X_i \times \{i\}:i\in I\}$ is a collection of pairwise disjoint sets. But how can I get a choice function from here? I've read that a set which has exactly one element in common with each element of the collection would be a choice function, but I kinda don't understand why this set can be seen as a function.


Single word request: of/at that phase/time/period/care/management

I am writing a study aim and needs to be really concise. For background, "post-acute care" is the next/second step care in these patients' management. In other words, their care/management has two phases, post-acute is the second phase. The aim should carry the two meanings: (1) to evaluate post-acute management of these patients and (2) to evaluate these patients' physical therapy use during post-acute management/in the post-acute phase. However, repeating post-acute makes the aim wordy. What words would be suitable for replacing the question marks?  To evaluate post-acute management of brain trauma patients and assess their ??? physical therapy use.  My own not so good ideas:  of that time of that phase of that place


What type of flour is "wheat flour" in the UK?

I want to replicate an American recipe of . It requires 1 cup of wheat flour.  What type of flour would that be in the UK shops?


How to prove $\Bbb Z[i]/(1+2i)\cong \Bbb Z_5$?   My method is   $$(1+2i)=\big\{a+bi丨a+2b≡0\pmod 5\big\},$$  So any $a+bi$ in $\Bbb Z(i)$,we got  $$a+bi=(b-2a)i+a(1+2i).$$  So $\Bbb Z[i]/(1+2i)=\big\{0,[i],[2i],[3i],[4i]\big\}$.  I know how to prove this ring is isomorphic to $\Bbb Z_5$, but how can I prove that $\Bbb Z[i]/(1+2i)$ equals to  $\Bbb Z_5$ directly? Any suggestion ia appreciated.


"Save to all networks" (for profile) didn't apply to Stack Exchange

I updated my profile a bit ago. At the time I saved with the option to apply it to all communities.  However I just noticed it doesn't appear to have applied to Stack Exchange.  I'd rather not toot my horn too much, but the URL schemes where it worked are:   https://stackoverflow.com/users/{user_id}/{username}?tab=profile  https://math.stackexchange.com/users/{user_id}/{username}?tab=profile https://stats.stackexchange.com/users/{user_id}/{username}?tab=profile   Compared to SE:   https://stackexchange.com/users/{user_id}/{username}?tab=profile   Any reason this would have failed? It seems like a bug to me.


Could the intraclass correlation coefficient be negative?

I'm a little confused regarding the intraclass correlation coefficient   I am now reading  "Face to Face interviews " by loosveldt 2008 . He pointed out on page 218 that the  intraclass correlation coefficient could be negative .  Screenshot of the page    .  Could someone explain  how the intraclass correlation coefficient could be negative ?


How can I style many layers of vector grid once in QGIS?

After I created many of vector grid layers, I now need to style them in a batch system. Is there any way to do this?  If that is not possible, how can I use the layer duplicate option to inherit the style from the original grid; and then change the extents of the duplicated layer?


How to recover the data that has possibly overwriten by the installation of another system?

I had Linux mint installed in my computer in one partition and had another partition for Data.  I just installed Ubuntu Kylin 14.04 and during the installation there was an option like "install Ubuntu replacing Linux Mint", which was the one I chose, thinking it would just mess with the partition of Linux mint.  Now I boot in Ubuntu, and I have a huge partition with Linux (bootable), including the space that was before of the data partition...  Do I still have a chance to recover some stuff that was in my previous Data partition?  If so how can I do that?


use of undefined type in forward declaration

I have the following:      class A; // forward declaration of class A void A::foo(int, int); // forward declaration of member function foo of A  class Functor { public:     Functor(const A* in_a):m_a(in_a){}     virtual ~Functor(){m_a= 0;};      virtual void Do(int,int) = 0;  protected:     const A* m_a; };  class FunctorDerived: public Functor {     FunctorDerived(const A* in_a):Functor(in_a){}      void Do(int in_source, int in_target)     {         m_a->foo(in_source, in_target);     } };   class A {     ....     void foo(int, int);     .... }   When compiling compiler tells me:  error C2027: use of undefined type 'A' see declaration of 'A'   It seems that A is not recognized by the compiler though I forward declared it and also forward declared the member function I need to use (A::foo).  I want to clarify that everything is written in a single file.  Can you please help me to understand what I did wrong?


Factor Analysis on binary data (dimensionality check before IRT)

I'm trying to do a factorial analysis of binary data (hit / miss) related to the results of a test that consisted of two types of items. My intention is to confirm the number of dimensions to later choose an IRT model to be applied. What is the best strategy to apply? Do I do a factor analysis with both types of items at the same time or by type of items? The plan is to run these analyzes on R. I have already done several with the data, but I am never sure of the number of dimensions to hold. I don't find much information on how to assess the dimensionality of assessment tests. Thanks


NullPointer exception when adding ObjectInputStream to a HashMap

I'm trying to write a basic chat server which will forward messages from one client to another.  I have my client running on another laptop and the server gets the user name which I send so surely the ObjectInputStream isn't null and the user name isn't null?   Here is the HashMap and ObjectInputStream:  private Socket[] clientSocket = new Socket[100]; private ObjectInputStream[] fromClient = new ObjectInputStream[100]; private ObjectOutputStream[] toClient = new ObjectOutputStream[100]; private HashMap<String, ObjectInputStream> clientInputs= new HashMap<String, ObjectInputStream>(); private HashMap<String, ObjectOutputStream> clientOutputs= new HashMap<String, ObjectOutputStream>();;   Here's the bit where I get the null pointer exception:  //This is just for testing: System.out.println("User name is :" +userName); System.out.println("fromClient[i] is " +fromClient[i].toString()); Thread.sleep(1000);  //Add this user to all lists. clientInputs.put(userName , (ObjectInputStream)fromClient[i]);* clientOutputs.put(userName, (ObjectOutputStream)toClient[i]); onlineUsers[i] = userName;   I get: [Line 105 is the line clientInputs.put(...,...); where I marked with a *.]      User name is :hulo     fromClient[i] is java.io.ObjectInputStream@147c5fc     Exception in thread "Thread-0" java.lang.NullPointerException         at AcceptConnections.addNextUser(AcceptConnections.java:105)         at AcceptConnections.run(AcceptConnections.java:53)   I don't know if this has anything to do with it but without the line Thread.sleep(1000); the NullPointerException comes out after the "user name is" line but before the "fromClient[i]" line.    Edit: I'm not sure if I made it clear, but these lines of code are after my client program has connected to the server so the user name is the one taken from the client during a test run and so the ObjectInputStream is definitely working.


How to fix cucumber step does not have matching glue code?

The cucumber feature file has all steps highlighted in yellow and warning is shown as step does not have matching glue code, When I try to run the project as maven test, I am getting null pointer exception for all steps. [Feature[Steps  Test Runner class: package com.vtiger.CucumberFramework.testRunner;  import org.junit.runner.RunWith;  import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions;  @RunWith(Cucumber.class) @CucumberOptions(                 features = "classpath:features",                 glue = {"com.vtiger.CucumberFramework.stepDefinitions","com.vtiger.CucumberFramework.testRunner"},                  plugin = { "pretty","html:target/cucumber-reports/cucumber-pretty",                             "json:target/cucumber-reports/CucumberTestReport.json",                            "rerun:target/cucumber-reports/rerun.txt" },                 monochrome = true)  public class TestRunner {  }


Is it possible to have an enumerate- or description-like environment, with \item redefined in such a way so that each \item puts its content inside a minipage? Ideally, including the item number/title within the minipage?  Failing this, is the same possible with \parbox{} instead of minipage?  For background, I'd use this in conjunction with , so that I could have paragraph-like items that are stuffed into boxes that are say for example, (1/3-epsilon)\textwidth wide, and could then progress the items horizontally, 3 to a row. And then the next row would begin low enough to clear the tallest of the previous row's items.


After Hogwarts, Harry and Ginny have children, but from what I remember, it doesn't mention what he does for a living, nor does it mention what Ron and Hermione do.   At one point, I distinctly remember Harry wanting to be an Auror, but what exactly does he do there, and do Hermione and Ron do the same thing?  EDIT: The question was answered, and not a duplicate. The question marked as duplicate asks for Ginny's profession, and is answered by the person with Harry's profession. I mentioned Ron and Hermione and wanted to know the specifics on the main 3's jobs.


Is publishing work based on post hoc analysis problematic?

Nowadays, in the scientific domain, increasingly, people in the top position argue against doing post-hoc analysis and they advise against collecting a bunch of data and just make up a story after data collection and report the significant findings. In psychology, which is my field, recently some journals accept pre-registration of research proposals and those journals allow those studies to be published regardless of the results (see )  Yes, I understand people's conceptualisation of how science is done is that:   I have some competing (maybe mutually exclusive) hypotheses I design a study (maybe an experiment) and collect data I look at the data and see if it supports my hypotheses I publish my findings   However, is there really a problem of some people's "post hoc" way of doing research? If there is a hidden pattern in reality and researchers couldn't really have a grasp of it at the moment, what's wrong with doing a exploratory study and collect a bunch of data and examine their relationships in a post hoc way? And why is making up a story to cover up a study a problem?


intermediate value theorem to show $|x-a_1|+...+|x-a_n|=\frac{n}{2}$

I'm studying calculus 1 before the semester starts and I got stuck on this question , i tried something that came up to my mind but not so sure if it works or considered a solution. the question: $a_1,a_2,...,a_n$ are constants , i=$1,...,n$  , $0≤a_i≤1$ and $a_1+...+a_n=1$ prove that there is an $X$ that $|x-a_1|+...+|x-a_n|=\frac{n}{2}$ hint this question deals with the intermediate value theorem my attempt: so i could not see a way with this being with the intermediate value theorem but what i tried is say that 0≤X so since X is positive i thought it is possible to let go of the absolute value and after reorganizing the equation we can get something like $x-a_1+...+x-a_n=\frac{n}{2}$ and then we have $nX$-($a_1+a_2+...+a_n$)=$\frac{n}{2}$ so according to given information we will have $nX-1=$$\frac{n}{2}$ that's all I could do , I don't even know if it is right.. much appreciation for any type of help , hints and tips.


How to read all recurring events from share point calendar list using javascript

am using below caml query which returns only events not reccuring event  query.set_viewXml("<Query><Where>"+ "<DateRangesOverlap>" + "<FieldRef Name='EventDate' />" + "<FieldRef Name='EndDate' />" + "<FieldRef Name='RecurrenceID' />" + "<FieldRef Name='fRecurrence'/>" + "<Value  Type='DateTime'><Now /></Value>" + "</DateRangesOverlap>" + "</Where>" + "<queryOptions>" + " <QueryOptions>" +   "<ExpandRecurrence>TRUE</ExpandRecurrence>" + "</QueryOptions>" + " <QueryOptions>" +   "<CalendarDate><Now /></CalendarDate>" +   + "<RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>" + "</QueryOptions>" +  "</queryOptions>" + "<OrderBy>" + "<FieldRef Name='EventDate' Ascending='True' />" + "</OrderBy></Query>"+"<ViewFields>"  + "<FieldRef Name='Title' LinkToItem='TRUE'/>"     + "<FieldRef Name='EventDate' />"      + "<FieldRef Name='EndDate' />"          + "<FieldRef Name='RecurrenceData' />"      + "<FieldRef Name='fRecurrence' />");


Copy current terminal prompt to clipboard

Is there a way to copy the currently written content of the bash prompt? Say I wrote:  ping www.google.com   so that the lines in terminal looks like:  petr@sova:~$ ping www.google.com   and didn't hit return yet. I want to copy that text to clipboard. Is that possible?  The usual usecase would be hitting up several times and finding a command which I want to copy.


I'd like to extract the img src and using preg_match_all I have this:  $tag = ''; preg_match_all('/(width|height|src)=("[^"]*")/i',$tag, $img[$tag]);   which returns:  Array ( [] => Array     (         [0] => Array             (                 [0] => src="path/to/image.png"             )          [1] => Array             (                 [0] => src             )          [2] => Array             (                 [0] => "path/to/image.png"             )      )  )   How can I write the regex to return a similar result regardless of double or single quotes used in tag?  I can write:  $tag = ""; preg_match_all('/(width|height|src)=(\'[^\']*\')/i',$tag, $img[$tag]);   Which works, but I'm not familiar enough with regex to write one expression to handle either.  I did try:  preg_match_all('/(width|height|src)=((\'[^\']*\')|("[^"]*"))/i',$tag, $img[$tag]);   But this seems to return extra matches in the array which I don't want.