How do I start Chrome using a specified "user profile"?

I use the new built-in "Users" feature of Chrome to switch between Home/Work accounts easily. However, Chrome remembers the "last" user profile you had selected when launching new windows. This is a problem if I close down my "Home" profile last, because when I then click the Email shortcut on my taskbar, because it goes to mail.mycompany.com using my Home profile, and I'm not logged in.  I'd like to change the shortcut to the company webmail to pass a switch that tells Chrome to always start as the "Default" user, regardless of the last one used.  Note: I have tried the command-line parameter --user-data-dir=…, and this seems to do something very different, completely isolated from the Users functionality built in to Chrome. It's possible I'm using it wrong, but please test this before assuming it does the same thing and posting an answer ;-)


Show that $\gcd(a,bc)=1$ if and only if $\gcd(a,b)=1$ and $\gcd(a,c)=1$.  I am new at proofs and I think I should use Euclid's Lemma which states "If $p$ is a prime that divides $ab$, then $p$ divides $a$ or $p$ divides $b$. However, I am not sure how to create a concrete proof or argument.  Any hints or help would be greatly appreciated. Thanks!


How to select element without children in Jquery?

     ImageDescription
   I would like to extract the "Image" text from the above DOM. If I try to get $("span").text(), it returns "ImageDescription" text. How can i get only "Image" text from the kind of structure in Jquery?


I have a routing.yml file which has the following path:  path: '/downloads/{path_dir}'  it works fine when the url is /downloads/diana for example.  but when the url is /downloads/diana/cast then it says "page not found"  . How can i make this work an unlimited amount of subdirectories?


Do physical laws require 2nd derivatives

Is it a happy coincidence that second degree differential equations approximate reality or a necessity?  They describe how a system will evolve from one state to the next, but surely the ultimate laws of nature will not depend on two prior initial conditions. Surely reality can compute its next state from the current state alone.


How do I know an open-sourced app is running the open source code it claims to be running?

You can argue that you can check the checksum of the application's package, but you are then trusting the developer to have compiled the right code and provided the right signature.  Is there a way to verify this trustlessly, or is it impossible?  Thanks!


Vertically center align content of floated, dynamically heighted dv

I don't want to set any fixed heights to any element, is this possible?

text


Travelling holiday and back to UK within a month before UK spouse visa expires

I have a UK visa as the spouse visa of a British citizen and it is expiring in mid-September. I have plans to visit India exactly a month before the expiry date of this visa. Will it cause any issues at Immigration when I enter the UK a month before my visa expires?


What conditions do I need if I want to prove a relation which is both symmetric and transitive is also reflexive?

Consider a relation R: A → A which is both symmetric and transitive.  The following proof shows that the relation is also reflexive: Take a ∈ A. If a ∼ b then b ∼ a by symmetry, and hence a ∼ a by transitivity. Therefore, the relation is reflexive."  Is the proof correct or not?  I think it is incorrect. I think it should be "For every a ∈ A, there exists b ∈ A that a ~ b and b ~ a.", not just "Take a ∈ A". After that we can use symmetry and transitivity to prove it is reflexive. That is what I think.  Am I right? Or what is the correct answer and the reason? THANKS!


To remove email address of sent messages from Mail

I have tried to find how to remove the email addresses to which you have sent emails in Mail.  They are not in Contacts -application.  Not in Settings.   I type masi.mathiasen... and I all the time get the contact which I removed from Contacts, just because I sent there one message before.  Then, when he has got new email address it is annoying because I am writing his name there first and get the old one as autocomplete.  How can you remove an old email-address which Mail -application uses in OSX, which is not found in Contacts?


No ground wire in any recepts in my home 2 wire only

No ground wire for the 3 prong recept. Tester says open ground. I need to ground all the recepts in my house to pass inspection. What is the best and low cost fix? Thanks


What is the purpose of /usr/share/applications/bamf-2.index ?   I have noticed the applications it contains are installed in my computer. But I don't think it contains the complete list. Because the following commands give different values  more /usr/share/applications/bamf-2.index| wc -l   dpkg-query -l | wc -l`   Please Explain.


I have downloaded 3 new games: Idle Slayer, Shadow Hunter and Archero. They are all small games that don't require that much space or graphic processing. I was able to play them for 3 days with no issues whatsoever but out of nowhere they started to crash. I open them, it shows the title screen for a second and it closes entirely on it's own. This problem doesn't happen with any other games or apps I previously had installed. I have a Huawei Mate 20 Lite, it has 25,40 GB of free space out of 64 GB and 4 GB of RAM. I clean up space weekly. I cleared the caches of all the previously mentioned games and it still kept happenning. So I uninstalled Archero and Idle Slayer because I knew I had them connected to Google Games so I wouldn't lose progress. When I reinstalled them they worked but when I closed them and tried to open them up again, they had the same problem of crashing and it's been that way ever since. My phone's not old, it's been 1 and a half years since I've bought it and I haven't installed from nor visited sketchy websites. My software is up to date and it's not a problem of internet, I've checked that angle too. Can someone please shed light on what I can do to resolve this issue? I quite enjoy these games and I worry it'll affect future installments to my phone. Thank you from advance.


Can we have a feature to turn off display of "medals"?

Many of use comes here to share knowledge, not to glimmer with "goldies". Some of us doesn't care for them at all, but some of us has more emotional point of view and are tired with seeing own badges and points below each post.  Can we / should we have a feature, that will allow user to disable displaying of badges and points and display nothing or for example number of questions and answers instead?  I have the feeling, that there are many people here, who value those asking and answering good quality stuff than those having a lot of "goldies" from for example review work, madness of visiting site each of 100 following days and sharing link among thousands of other kind of maniac.  This feature request / question covers only disabling displaying of own points and badges and only under posts. User profile and other users info below posts should remain unchanged.


In the realm of kinetic theory of gases, the internal energy of gas is solely due to the sum of kinetic energies of all particles, since kinetic energy is frame dependent I was thinking whether a container having gas will heat up if I put it in a moving train, which is accelerating?


New! Smarter profile creation and syncing

We've made some changes to profile editing. The TL;DR is:        We now encourage users to set a name and picture during signup. If you sign up with Google or Facebook, we pull them in and let you edit them before you create an account.   We've made  across multiple Stack Exchange sites easier:       a. Profile editing now defaults to saving everywhere, and syncs much   faster (<5 seconds, where before it would take up to 5 minutes)      b. If you've customized your profile on different sites, you can now   sync only your changes to all sites (so you can avoid overwriting   customizations if you need to e.g. change your email address)      Now, a bit more detail and a quick word on why.  New User Signup  As part of our efforts to , we noticed that a large percentage (~60%) of new users had no name or avatar -- the ubiquitous "user1859302". While this can be used as a signal of a low quality post, in general it's bad for the site because it makes it look like nobody cares, the opposite of an expert community. When they're common on the homepage or in search results, it becomes something of a broken window.  So, we now encourage users to set their username and avatar during signup. To make it even easier, if you sign up with Google or Facebook we'll pull in your name and picture and let you edit them before you create an account. Since we've turned them on, these changes have reduced the number of nameless users from about 60% to less than 3%.  Here's what it looks like, for the curious:    Note that we don't store your image unless you confirm that you want it, and you're free to change both the image and display name and go back to being "user19580329" if you really want.  Profile Editing  The old profile edit page gave you two options: save your profile for this site (the default) or copy all your changes everywhere in the network. This caused two problems:   Most users didn't want to customize their profile on every site. The default was wrong, and the thing they wanted to do (just update it everywhere) was a big scary "Copy changes to all Stack Exchange sites" button. The users who did want to customize their profile, often didn't want to customize all of it, just one or two fields. If they ever accidentally clicked that "Copy changes..." button, it would blow away all their customizations.   So, we made it a bit more intelligent. Here's the original spec which basically outlines how it works:    Basically, the system now assumes that most users just want to have one profile everywhere and makes that the default. If you want to customize, it's now a bit easier to find and when you make changes only those changes will be copied everywhere so you don't have to worry about losing all your other customizations.  To make this even work, we fixed up the syncing process so that it happens nearly instantly across all the sites. This gets rid of the 5 minute delay when you save changes on one site before they show up across the network.  That's it!  and let us know what you think.  Credit:  on the profile editing and  on the signup changes.


Automatically adding a BCC email address to all email sent with Gmail

I want to automatically archive email in Evernote.  Is there a way in Gmail web-interface to automatically send all outgoing emails to BCC address?


A uniformly continuous function such that the derivative is not bounded and is not defined on a compact?

Is there a uniformly continuous function values in $f: \mathbb{R}{\to}\mathbb{R}$ such that its first derivative is not bounded and is defined on a non-compact set? And if $f: X_{1}{\to}\mathbb{R}$? (let $(X_{1},d{1})$ metric space ). And if $f: X_{1}{\to}X_{2}$? (let $(X_{2},d{2})$ metric space ).  I know that the first derivative is bounded f:I-->R (let I interval) iff f is a lipschitz function; If X1 is a compact thanks to the Heine-Cantor theorem f is uniformly continuous.


How can I run ssh-add automatically, without a password prompt?

I want to communicate between several computers on my network (static Ethernet), through SSH. In order to do that I need to run ssh-add every time I log in on a specific machine, how can I do it so that it's set up once and it doesn't ask me for the passphrase every time I log in or reboot my machine?  I know that there is a way that you should add some lines to the bash_profile file, but I still need to type the password every time I reboot/log in to a specific machine.  if [ -z "$SSH_AUTH_SOCK" ] ; then     eval `ssh-agent -s`     ssh-add fi


NullPointerException while trying to parse an xml file

I have the following:    public static void main(String args[]) {       // upload config' data for program - param' are path and Xml's Root node/ where to get data from      confLoader conf = new confLoader("conf.xml", "config");        System.out.println(conf.getDbElement("dataSource") );      System.out.println(conf.getDbElement("dataSource") );      System.out.println(conf.getDbElement("dataSource") );  // Fails  ...     The code that's responsible to build the DOM and parse from ('getDbElement()'):  public class confLoader{   DocumentBuilderFactory docBuilderFactory;  DocumentBuilder docBuilder;  Document doc;  NodeList nList;   public confLoader(String path, String XmlRoot){      try {             docBuilderFactory = DocumentBuilderFactory.newInstance();             docBuilder = docBuilderFactory.newDocumentBuilder();             doc = docBuilder.parse(new File(path));             // normalize text representation             doc.getDocumentElement().normalize();                     nList = doc.getElementsByTagName(XmlRoot);    } catch (Exception e) {     e.printStackTrace();   }  }  public String getDbElement(String element) {      Node nNode = nList.item(0); //  1st item/node - sql     try {         if (nNode.getNodeType() == Node.ELEMENT_NODE) {     /////  Line 36 - Problematic              Element eElement = (Element) nNode;             return (((Node) eElement.getElementsByTagName(element).item(0).getChildNodes().item(0)).getNodeValue());         }     } catch (Exception ex) {         System.out.println("Error retrieving " + element + " :" + ex.getMessage());//Thread.dumpStack();          ex.printStackTrace();       }     return "not available";  }  }     stacktrace  for given code:    jdbc:mysql://localhost:...   java.lang.NullPointerException   jdbc:mysql://localhost:...   Error retrieving dataSource :null   not available   at exercise.confLoader.getDbElement(confLoader.java:36)   at exercise.Exercise.main(Exercise.java:22)        Line 36 : if (nNode.getNodeType() == Node.ELEMENT_NODE)   The xml parsing is done twice, and for the 3rd time I try to parse from Xml, I get the NullPointerException.


Bounty completed notification comes too early

Today I logged in to SO and found a notification saying that my bounty was completed 58 minutes before it would actually complete.    At that time, the question was listed on top of the featured questions, confirming that the bounty was still active and not in grace period.  Not sure if this was the wrong message at the right time or the right message an hour too early.  Update  I received an email from StackOverflow about an hour before my bounty would expire with this text:     Reminder: Your Bounty Ended!      Your bounty on the question … Why does Chrome produce 1099 digits   after the dot for (.1).toString(3)?      … ended and will be auto-closed after the 24-hour grace period   expires.


Algebraic proof that collection of all subsets of a set (power set) of $N$ elements has $2^N$ elements

In other words, is there an algebraic proof showing that $\sum_{k=0}^{N} {N\choose k} = 2^N$? I've been trying to do it some some time now, but I can't seem to figure it out.


Is it posssible to let ls -l automatically use --time-style=long-iso?

I prefer formatting date and time in long iso format and I don't like at all the formatting of the time stamp which ls and ll produce unless one calls them with the option --time-style=long-iso.  I want that ls and ll and possibly other commands which provide time stamp information use long-iso as default.  Is that possible?  How can I achieve this?


Why we use not symbol in  declaration in html? And what happened when we are not declared it?

I m fresher in web technologies.my question is what is use of not(!) In doctype declaration.


Collapsing a series of comma separated numbers in a sequence to Beginning-End

Problem I am trying to solve/enhance a BASH script that provides a number sequence: I am using a topologically aware tool (lstopo-no-graphics) to extract physical processor numbers to use for input to numactl for processor binding. Example output for L3 L#4 shared cache physical core lstopo-no-graphics --no-io|sed -n "/L3 L#3/,/L3/p"|grep -v "L3\|L2"|tr -s '[:space:]'|cut -d " " -f4|grep -o "[0-9]*"|sort -g|tr '\n' ','|sed '$s/,$//'  results in the number series string: 32,33,34,35,36,37,38,39,96,97,98,99,100,101,102,103  All well and good, I use this series for the numactl --physcpubin=32,33,34,35,36,37,38,39,96,97,98,99,100,101,102,103، I would would like to be able to collapse the sequence down to numactl --physcpubin=32-39,96-103, looking to collapse multiple comma separated number sequences to an "a-n" series when sequential, with each sequence comma separated. I don't have a problem with the existing bash script, just looking for a cleaner implementation if anyone has any ideas?


Two volumes in Disk Utility? (macOS Catalina 10.15)

My 2014 MacBook Air just recently updated to macOS Catalina 10.15 today. After the update I did a routine check on what's new & in the Disk Utility app something caught my eye for the volumes... there are now have two instead of the usual one. Usually I would only see "Macintosh HD", but now there's "Macintosh HD - data" as well:    Why exactly do I have a "Macintosh HD" & a "Macintosh HD - Data" as volumes in Disk Utility?


Why Oracle discontinued Oracle Java (JDK) Installer PPA?

I tried to install OracleJDK 8 using   sudo add-apt-repository ppa:webupd8team/java   But it's not working.   I searched the problem and found that      "The Oracle JDK License has changed for releases starting April 16, 2019." And  "Oracle Java (JDK) 8 Installer PPA (DISCONTINUED)"   So I installed the OpenJDK8 .   But why oracle cancelled the license of oracle 8 installer?


Logging in to the Area 51 Discussion Zone will successfully log you into the main Area 51 site, but not the Discussion Zone itself

In the Area 51 Discussion Zone (DZ), the log in link is for area51.stackexchange.com, not area51.meta.stackexchange.com.  Because of domain restrictions, etc., after successfully logging in you get redirected back to the Discussion Zone, and although you are logged into the main Area 51 site, you aren't logged into the DZ. If you come to meta.stackexchange.com then you can log in and the single sign in will carry across to the DZ.


It's an old argue on forums, still cant get it. What is the (real, that worth the money and time for ordering from abroad, in my case) difference, let's say between  shoes and some kind of old school skate shoes (the fat ones, like )?  P.S as far as I know most dirt BMXers are quite happy with regular skate shoes.


Getting a ton of decimal places for the sum of a list. None of the list items have more than 2 decimal places. What am I doing wrong?


Can anyone tell me if I should use inspire or inspires in this phrase?     An extraordinary leader whose vision, values, integrity and boundless curiosity inspires all who follow in his footsteps.


Should I invest ~18k being 19 years old?

I am currently thinking about investing my money in various things. I have a monthly income of 900€ and only 40€ regular expenses including food, spotify premium and a web domain. From what I can observe I have quiete a lot of money for a person of my age and I can deal with it pretty wisely. I also have some one-time expenses which stretched to something around 300€ per month in 2019. I do think that it will be much lower in 2020 though. At least I hope, huh? Some people on the internet were asking if they should buy an expensive car at my age and basically everyone said it was a bad idea which I would agree with but at the same time concerns me a little bit about investing at my age.  My first investment I am looking for is buying some shares I have very deep knowledge about. But I don't want to pull out everything at once so I would estimate that something around 10k would be a good start. This would equal a little bit more than 20% of my money.  The second thing would be a 5k investment into a small business I would like to start  which I hope to be profitable in one and a half years.  The last thing I am currently planing to do is building a small laboratory of technology for myself where I can learn new skills and test some ideas which I could be using in a business I am eyeing for in a more distant future but which would require a lot more money. I really enjoy learning new things from scratch by myself and figured that this is the most efficient way for me to learn. This laboratory would cost roughly 2-3k but I am not entirely sure yet how much I actually need this.  Please let me know what you think and feel free to make some modifications or give me advice. What would you do? Would you keep the money and have a large and safe backup or would you use it now? Thanks in advance.


I have 500 page I want to restore it digitally, they are a set of pages from a very old book I already have and want to reprint it again with my digital restoration. all the pages have no page numbers.  After scanning all the pages, I was wondering if there is any way to renumber those pages without open the 500 page in Photoshop and type the page number!?   I am asking of a batch, a software (or a smart way) that could render numbers in a certain position to all my 500 page, just like the way we watermark photos.


Evaluating the limit $\lim_{x \to 0+}\left(\frac{1}{x}-\frac{1}{\arctan(x)}\right)$

I think you might have to use Squeeze Theorem here? I've confused myself.      $$\lim_{x \to 0+}\frac{1}{x}-\frac{1}{\arctan(x)}$$


I want to know if this is grammatically correct " How long would the conference be for?".


Is there any way to skip the Helgen prologue on consoles?  It's boring. Sure, I can exploit a glitch during it to level up faster but I'd rather get to the open world faster.


Can you add extra animations for the Compiz manager animations editor?

I started playing around with the compiz manager animations bit, but they're quite boring. I wondered if there are any I can download and if so where from?  I'm using Ubuntu 12.04 LTS


I would like to add a subscript to my equation. For example the following one: W(P_{r}, P_{q}) = \min_{G} \max_{D \in \mathcal{D}} \mathbb{E}_{x \sim P_{r}}[D(x)]  - \mathbb{E}_{\hat{x} \sim P_{g}}[log(1 - D(\hat{x}))]  However, as it is the subscript to \mathbb{E} does not work beneath, but in the right down corner. I would like to achieve sth like:  How can I do so?


Placement of the asterisk in pointer declarations

I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.  How about these examples:   int* test; int *test; int * test; int* test,test2; int *test,test2; int * test,test2;   Now, to my understanding, the first three cases are all doing the same: Test is not an int, but a pointer to one.  The second set of examples is a bit more tricky. In case 4, both test and test2 will be pointers to an int, whereas in case 5, only test is a pointer, whereas test2 is a "real" int. What about case 6? Same as case 5?


tan additions formula expressions only representing with tan

This is expression for $\tan(a+b+y)$  $$\frac{\tan(a)+\tan(b)+\tan(y)−\tan(a)\tan(b)\tan(y)}{1− \tan(a)\tan(b)−\tan(a)\tan(y)−\tan(b)\tan(y)}$$  I want to represent this with only $\tan(a)$, $\tan(b)$ and $\tan(y)$.  Clearly,I want to replace $1$ with tan functions of these three variables.  I need this answer because thie is from GelfAndSaul Trigonometry Book questions.Pg-145


I added an HDRI image (or also I tried, with Jpeg) but when I apply it, it only appears a single color. I think it could be from the image, but it doesn't appear completely as it should be.


I downloaded tor but can't start it. This is what I keep getting   ~$ start-tor-browser start-tor-browser: command not found   I did download it, but just can't open it.


Using arcpy.mapping to make changes to an open mxd

I want to use arcpy.mapping to make some changes to a mxd.  I am using the Spyder environment for python.  To change the title I can use the following code:  import arcpy  myMap = r'C:\path_to_mxd\myfile.mxd' mxd = arcpy.mapping.MapDocument(myMap) mxd.relativePaths = True mxd.title = 'Title' arcpy.RefreshActiveView() mxd.save()   I can't execute mxd.save() on an open mxd file though.  Is there a way to make changes to an open file and view any code I execute on the fly?


So how would one go about retrieving the options from a multi picklist?  I have a custom picklist field which has several options to choose from. Just to be clear, I'm talking about the options of that field, not the values chooses by a user.     Choose fav. car brand:         audi   bmw   vw   mercedes      The brands (bmw, vw, etc.) are the options I'm talking about.  I'm using PHP so the answer im looking for should be a SOQL syntax.


I have a currently unfinished basement in a rather new home.  There are a few places that have bay windows, or cantilevers that currently have only a bit of pink insulation thrown in fro the basement.  From what I can tell, the wall up there, plus the floor (sill box) are the part that is outside the house exposed to the elements.  At first, I was thinking of putting some XPS foam along the top, bottom, and the inside wall and stuffing it with some insulation and sealing it.  But then I read this article:   which seems to indicate that I don't want to completely seal it, but instead just insulate the bottom and wall area.  What do you think?  Also, I plan on eventually finishing the basement and using spray foam as insulation.  So anything I do now, I'd want to be able to know that I could remove if needed.


Cross out suggested words automatically in beamer

I would like to to use beamer a bit like this:   have some words replaced by a red underline in the main text; those words should appear one by one, slide by slide; a randomized list of those hidden words should appear at the bottom of those frames and one the corresponding word was uncovered in the main text this element of the list should be crossed out;   Of course the whole process should be automated. Below is a proof of concept where slide numbers are inserted by hand...  \documentclass[xcolor=dvipsnames]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{soulutf8} \usepackage[normalem]{ulem} \usepackage{color} \usepackage{transparent}  \newcommand\myul{\bgroup\markoverwith   {\textcolor{red}{\rule[-0.6ex]{.1pt}{0.3ex}}}\ULon} % \newcommand\myul{\bgroup\markoverwith % {\textcolor{white}{\rule[-0.3ex]{2pt}{1.0pt}}}\ULon} \newcommand<>{\myvisible}[1]{%   \alt#2{%     #1%   }{%     \myul{\textcolor{bg}{#1}}%   }} \newcommand<>{\myterm}[1]{%   \alt#2{\st{#1}%   }{%     {#1}%   }}  \begin{document} \begin{frame}[<+->]   \only<+->{}%   \myvisible<+->{François Mitterrand} was President of France from   1981 to 1995. While \myvisible<+->{Jacques Chirac} was President of   France from 1995 to 2007.   \vfill   Termes: \myterm<2->{François Mitterrand}, \myterm<3->{Jacques Chirac}. \end{frame} \end{document}   Of course the line Termes:  \myterm<2->{François Mitterrand}, \myterm<3->{Jacques Chirac}   should be added automatically.


Questions deleted by authors who happen to be moderators should show as "removed for reasons of moderation" if the author can't normally delete

When regular users delete their questions, users with less than 10,000 reputation that stumble across the link are shown the following message:  Page not found This question was voluntarily removed by its author.   When other users vote to delete someone's question (or delete it unilaterally with moderator abilities) a different message is shown:  Page not found This question was removed from Meta Stack Exchange for reasons of moderation. Please refer to the help center for .   Generally speaking, regular users do not have the ability to delete their own questions if there are already upvoted answers posted thereto. Now what happens when users with moderation powers delete their own posts that already have upvoted answers? While the question was still technically voluntarily removed by its author, I would expect the 404 page to display the other message. This is because the question was not deleted by the moderator in their mere capacity as the author of the post, but in their official capacity as a moderator. The real reason such a post was deleted would indeed be for reasons of moderation, as it was only possible to delete it because of special moderator powers. However, the opposite is apparently true.  was posted by a Community Manager (i.e. someone with full moderation powers), and deleted by the same Community Manager. Had he not been a Community Manager (or moderator) he would not have been able to delete his question. Thus, the question was indeed deleted for reasons of moderation (), and it is apparently merely a coincidence that the one who actually clicked the delete button also happened to be the one who had posted it. When I (as a less-than-10,000-reputation-user) view that question, it tells me that it was voluntarily removed by its author:  Can this be fixed so that the other explanation, which seems to be more accurate, will be displayed instead?


How many zeros are at the end of the number $236!$? Are there any special formulas or ways to solve this that would work for the factorial of any number?  Thanks,  |-(<>)-| Tie Fighter


Fix permissions of server after accidental chmod

While trying to debug a mail server, I typed:  chmod -R 777 /   instead of:  chmod -R 777 .   and the icing on the cake, due to me forgetting I had changed a script I use to sign in to fix something, I did all this as root. I do not have backups of most of the system (poor choice I know).  Unlike in the questions "Recovering from chmod -R -777 /" and "What to do after 'chmod -R 777 /'?" i am still signed in as root, and not the whole system was changed, so I do have some control over the system. I also ^C d out of the command within one second to minimize damage. Since then I have physically disconnected the server from the internet.  I believe a script could fix it if it restored the permissions of the filesystem based on data from the package manager, but i do not know how I would go about doing this. If this is not possible, how would I save the data from the server to reinstall the OS?   I am aware of the potential risks of missing a file, but would prefer recovery to reinstall despite them.  this is the current output of ls -la /:  drwxrwxrwx  22 root root  4096 Sep  7  2016 . drwxrwxrwx  22 root root  4096 Sep  7  2016 .. drwxr-xr-x   2 root root  4096 May 18 07:55 bin drwxr-xr-x   3 root root  4096 Sep 21 07:53 boot drwxr-xr-x  19 root root  3180 Sep 11 20:54 dev drwxrwxrwx  92 root root  4096 Aug 23 07:50 etc drwxr-xr-x   4 root root  4096 May 23  2016 home lrwxrwxrwx   1 root root    31 Feb 24  2016 initrd.img -> /boot/initrd.img-3.16.0-4-amd64 drwxrwxrwx  18 root root  4096 Feb 24  2016 lib drwxr-xr-x   2 root root  4096 Jun 20 07:00 lib64 drwx------   2 root root 16384 May 19  2016 lost+found drwxrwxrwx   2 root root  4096 May  5  2015 media drwxr-xr-x   2 root root  4096 May  5  2015 mnt drwxr-xr-x   3 root root  4096 May 28  2016 opt dr-xr-xr-x 148 root root     0 Sep  3 21:55 proc drwxrwxrwx  10 root root  4096 Aug 19 17:58 root drwxr-xr-x  22 root root   800 Sep 21 17:09 run drwxrwxrwx   3 root root  4096 Jun 20 07:00 sbin drwxr-xr-x   4 root root  4096 Sep 20 23:18 sftp dr-xr-xr-x  13 root root     0 Sep  3 21:55 sys drwxrwxrwx   8 root root  4096 Sep 21 17:17 tmp drwxrwxrwx  11 root root  4096 Feb 24  2016 usr drwxr-xr-x  14 root root  4096 Jun 25 06:21 var lrwxrwxrwx   1 root root    27 Feb 24  2016 vmlinuz -> boot/vmlinuz-3.16.0-4-amd64   just noticed in my panic i clicked ubuntu forum not debian... im aware thats not how you fix a mail server. it was a hacky sloppy fix to see what broke  iv reposted this in the correct forum now


Hi I am using a mixed notation labelling system (scientific+non-scientific). Due to this the exponent of the scientific notation is causing certain labels to be misaligned. Here is the MWE  \documentclass{standalone} \usepackage{pgfplots} \usepackage{filecontents} \usepackage{tikz} \pgfplotsset{compat=1.9, every tick label/.append style={font=\normalsize}}      \begin{filecontents}{data.dat} Keff    PCCR 48.49  1000  38.52  300   25     100 19     50 7.4    10 0.844  2 \end{filecontents}  \begin{document}  \pgfplotstableread{data.dat}{\2}  \begin{tikzpicture} \begin{axis}[ title={Some title}, enlarge x limits=-1, symbolic x coords={1000,300,100,50,10,2}, xlabel={X-axis}, xtick={1000,300,100,50,10,2}, xticklabels={$\mathrm{1\times10^3}$,$\mathrm{3\times10^2}$,$100$,$50$,$10$,$2$}, scaled ticks=true, ymin=0.5, ymax=50, ylabel={Y-axis}, ] \addplot  table [x={PCCR}, y={Keff}] {\2}; \end{axis} \end{tikzpicture}% \end{document}


Mv files listed in txt file up a directory

This is my first time asking a question :) I am new to bash scripting but pretty good with python. I have a directory with a bunch of files, and I have a text file that contains a subset of file names within the directory. I am trying to write a script that will read that txt file, select the files that are listed in the txt file from the directory, and move them up a directory.   It may sound simple enough but there are hundreds of them so I am trying to automate! Any help or guidance would be appreciated.


Problem to launch java at Debian: "error while loading shared libraries: libjli.so"

I'm trying to launch java:  $ java -version java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory  $ ldd /usr/lib/jvm/java-6-openjdk/jre/bin/java         linux-gate.so.1 =>  (0xb779f000)         libz.so.1 => /usr/lib/libz.so.1 (0xb7780000)         libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7767000)         libjli.so => /usr/lib/jvm/java-6-openjdk/jre/bin/../lib/i386/jli/libjli.so (0xb7762000)         libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb775e000)         libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7603000)         /lib/ld-linux.so.2 (0xb77a0000 $ ls /usr/lib/jvm/java-6-openjdk/jre/bin/../lib/i386/jli/ libjli.so   But java works under root:  $ sudo java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8.7) (6b18-1.8.7-2~lenny1) OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)   UPD:  /usr/lib/jvm/java-6-openjdk/jre/bin/java is actually my java command:  $ type java java is hashed (/usr/bin/java) $ ls -l /usr/bin/java lrwxrwxrwx 1 root root 22 Jul 14 10:15 /usr/bin/java -> /etc/alternatives/java $ ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 40 Jul 14 10:36 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java   UPD2:  I've also tried to set root PATH:  $ sudo su # echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # exit $ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin $ java -version java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory   UPD3:  I'm tried:  # comm -3 <(declare | sort) <(declare -f | sort)   under root. But there is no usable environment variables for java.  UPD4:  strace -f java -version result:


Differences in meaning between present perfect and present perfect continuous

Please help me to identify the difference between these two sentences   This building has always attracted many tourists. This building has been attracting many tourists.


It is an open problem (still open) published on a Chinese mathematics magazine, but i am asking this just because i can not figure it out. I wonder if someone can help? I won't use any answers here to contact the editorial office of the magazine.. And here is the problem: Problem. (Provider: Jiaqiang MEI, NJU) Suppose $f $ be a continuous function over $\mathbb{R}$, and if for each $x\in \mathbb{R}$ $$ \lim_{h\rightarrow 0} \frac{1}{h^3} \int_{-h}^{h} f(x+t)t\ dt =0. $$ Prove that $f$ is constant. Any help is welcomed!


Calculating percentage of two hold in two different shapefile

I have two big datasets of different species. One shp is point which shows the location of species, and the other file is in polygon of same places and has got attribute table of public and free holds. I wanted to see how many percentage of the first one (point shp) is in free hold and how many is in public hold?


Does pointwise convergence to a continuous function on a closed interval imply uniform convergence?

Let's suppose that $(f_n)_{n}$ is a sequence of continuous functions that converges pointwise to a continuous function $f(x)$ on a closed interval $[a, b]$. Is then the convergence uniform, too?  If it is so, how do you prove it? If it isn't, could you give a counterexample, please?    My attempt  I managed to write down the hypothesis in symbolical terms, but could not go beyond that:   continuity of the sequence  ($x_0\in[a, b]$):   $\forall n, \ \forall \epsilon >0 \ \ \exists \delta>0 \  : \ |x-x_0|<\delta \Rightarrow |f_n(x)-f_n(x_0)|<\epsilon $   continuity of the limit function ($x_0\in[a, b]$):   $\forall \epsilon >0 \ \ \exists \delta>0 \  : \ |x-x_0|<\delta \Rightarrow |f(x)-f(x_0)|<\epsilon $   pointwise convergence:   $\forall x\in[a, b], \ \forall \epsilon >0 \ \ \exists n_\epsilon>0 \  : \ n\geq n_\epsilon \Rightarrow |f_n(x)-f(x)|<\epsilon $  The thesis should be:  $\forall \epsilon >0 \ \ \exists n_\epsilon>0 \  : \ n\geq n_\epsilon \Rightarrow |f_n(x)-f(x)|<\epsilon \ \ \forall x\in[a, b]$    Note  Please do not bring sequences such as that of $x^n (x\geq 0)$ as a counterexample, because they are not counterexamples:  $\text{for  } n \rightarrow \infty , \ x^n \rightarrow f(x)= \begin{cases} 0 & \text{if  } 0 \leq x<1 \cr 1 & \text{if  } x=1 \end{cases}$  so there is a pointwise convergence to $f(x)$ on $[0, 1]$; but $f(x)$ - the limit function - is not continuous, then this example lacks the conditions for the theorem to be applied.


I am a new DBA at a company that has never had a DBA before me. SQL Servers are never upgraded unless it is part of a Windows Update on the server. Service Packs (or CUs) are never installed. We have a mix of versions from 2000 to 2014.  I'm trying to develop a policy for maintaining and upgrading the SQL Servers. How often do you upgrade your SQL Servers? Or more specifically, how up-to-date do you keep your SQL Servers and why?  For example:   SQL Servers will be upgraded when the version is not within Microsoft's Mainstream support. SQL Servers will stay within 2 (two) versions of the most recent version released from Microsoft.   What about SPs and CUs?


Let $g(x)=(x-a)(x-b)(x-c)$ with $a\neq b\neq c$. Then $\mathbb{C}[x,y]/\langle y^2-g(x) \rangle$ is integrally closed in its fraction field.   I manage to do with the following theorem:     A smooth function $f$ is non-singular if and only if $\mathbb{C}[x,y]/\langle f(x,y) \rangle$ is integrally closed in its fraction field.   But how will I do without using this? Like an example has done .


How can I generally show that two metric spaces induce the same topology, for instance, in my textbook it says metric space $d(x,y$) and $\sqrt{d(x,y)}$ induce the same topology. How do I show this? Much help would be appreciated.  ok so very generally I wrote up some solution, and it goes:   Let $d^{'}=\sqrt{d}$, then we want to show that $B_d(x,\epsilon) \subseteq B_{\sqrt{d}}(x,\epsilon)$. Let $y \in B_d(x,\epsilon)$,but $d^{'}$ is the square root metric of $d$, so we have $d^{'} \le d$, hence $d^{'}(x,y)\le d(x,y)<\epsilon \implies y \in B_{\sqrt{d}}(x,\epsilon)$, therefore $B_d(x,\epsilon) \subseteq B_{\sqrt{d}}(x,\epsilon)$. is this the correct way?


How to find the IP of a device connected through Ethernet Sharing

I often share my MacBook Pro's Ethernet connection with devices like a Raspberry Pi to log in via SSH and configure files  without using a screen, keyboard, etc.  My current method to find the IP is to ping the hostname. Example: Ping raspberrypi.local.  Recently, I have ran into problems where the hostname is unknown of the device, and I need to login, finding it's IP.  So, I try the command-line utility , which scans for devcies on your local network, but I had no luck finding the device. Fing seemed to only show devices that were on my wireless network.  Are there any suggestions to find local IP addresses of devices I plug into my Ethernet jack?


how to select a substring that starts with x and ends with y through multilines and replace it

I want to find a regex that selects a specific string that is defined by it's beginning & ending characters, through multilines, to be replaced by empty string. suppose that I have the following string for example:  I want to select every string that begins with -- and ends with ;  $str = 'some text --text_to_be_replaced; and another text -- text to be replaced; and some text...;';   what I've tried:  $str = preg_replace('/--(.*);/s', '', $str);   but the returned result is: some text while the expected result is some text and another text and some text...;


"Error establishing a database connection" on blogoverflow.com

I get the following error message when I try to go to   Not sure if its down for maintenance or something. Just a heads up.  Firefox:        Chrome:        IE10


How to fix disk that is likely to fail soon?

Can I repair my hard disk?      I am a beginner with Ubuntu and I don't know how I can fix my hard drive or if it can be repaired.


How can I use GDAL to batch define a projection?

I have a fodler with 1500 ECW rasters, no spatial reference information defined.  Can I use GDAL to batch define a projection for all 1500 in the folder?


Mac Sierra won't boot - SmartBattery: finished polling type 4

I did an update on my Macbook Retina 13" to the most recent version of Sierra OS X. The computer never gets past the Apple logo (black screen with a full progress bar).   I booted into Verbose Mode (command + v) and see that it is stuck at the following point:  SmartBattery: finished polling type 4  Every now and then it will add another line of text (same text) but it never moves beyond that point.  Any advice please! It is a real pain to keep restoring from my Time Machine backup!


I've written following code to reverse an int array, however, I could not see the result to be right. Any hint on this? Thanks!  The result is   [I@15db9742[I@15db9742[I@15db9742[I@15db9742[I@15db9742[I@15db9742[I@15db9742[I@   Which seems to be weird.  public class reverseArray { public static void main(String[] args) {     int[] array = {2, 4, 5, 7, 8, 9, 12, 14, 17, 19, 22, 25, 27, 28, 33, 37};     reverse(array, 0, array.length - 1); }  public static void reverse(int[] data, int low, int high) {      if (low < high) {         int temp = data[low];         data[low] = data[high];         data[high] = temp;         reverse(data, low + 1, high - 1);     }     System.out.print(data);  } }


Using bash variable with escape character in awk to extract lines from file

I am writing a bash script (just learning bash) to extract some lines from a file based on two patterns. The first pattern is just a sentence ending in a colon. The second pattern is a * repeated N (in this case 58) times.  An example file:  lines I don not want lines I don not want lines I don not want  A sentence here: ******************************************************** lines I want lines I want lines I want **********************************************************  lines I don not want lines I don not want lines I don not want   Desired output:  A sentence here: ******************************************************** lines I want lines I want lines I want **********************************************************   I can get the script to work if I explicitly type out A sentence here and \* 58 times within the call to awk, but cleanliness and readability I would prefer to do something like below:  pat1="A sentence here" pat2=`printf -- '\*%.s' {1..58} ; echo` pat2=${pat2//\\/\\\\} awk -v pat1="${pat1}" -v pat2="${pat2}" '/{pat1}/ {p=1}; p; /{pat2}/ {p=0}' $1   Where the first positional variable is the input file. The above code returns nothing. I initially tried it without the substitution on pat2, but got the warning:   awk: warning: escape sequence `\*' treated as plain `*'   I will have to run this command thousands of times and would ideally like a solution that is both clean and efficient. I'm not tied to using awk at all.   Edit:   I just noticed that even when I manually type the patterns into awk, I still receive the warning message. I am likely not passing the variables to awk correctly.


I'm sure this question has been asked before but I couldn't find it.  As part of a pretty simple programming problem in a homework assignment, I've been told I need to loop 10^8 times. But any time I try to loop that many times my program (and whole computer) hangs.   Since this is for a homework assignment, I won't share my actual code, but even this really basic script hangs on my computer:  for i in range(10**8): ... j = i   10^7 loops works fine. 10^8 always hangs.  I'm not a new python user but I'm not sure how to diagnose this. Is it a memory-related issue? What are some strategies for fixing that? Is it just a limit in Python?  I'm using Python 2.7 if that's relevant.   (Also, for the record, the homework assignment has nothing to do with solving this problem. N=10^8 is just what my professor randomly chose.)


I wish to have the shader effect as in the game 'The stack' by ketchapp    As you can see, the color of the objects as well as the skybox keep changing.  I'm completely c# noob and trying my best to find  shaders to replicate the effect. But I can't find anything.   How can I change the color of an object at runtime?


I am using ubuntu 18 switching from OSX.   In OSX mission control there is a feature where each monitor has its own "workspace" that can be independently switched between.   GNOME3 has a similar feature where you can either switch between workspaces on your main monitor, or using gnome tweaks (under workspaces>workspaces span displays) you can switch between workspaces across all of your monitors at once.   This doesn't quite replicate the functionality of the workspace on OSX however, because OSX allows you to switch between workspaces on each monitor independently. For example, on my side monitor, in OSX I could have a code window that I want to remain persistent across multiple workspaces on the other monitors.   Is there an extension or windows manager that has this functionality for ubuntu?    EDIT: This is what I mean:    A window manager where:    Multiple workspaces exist  Workspaces can span multiple monitors  Workspaces can be switched independently


Prove that every odd natural number divides some number of the form $2^n - 1$

Suppose that $m$ is an odd natural number.  Prove that there is a natural number $n$ such that $m$ divides $2^n -1$.  I have absolutely no idea how to tackle this; any assistance would be welcome.


Fetch records from child relationship using Apex

I have a remote action that need to fetch an object child relationship data, but the catch is that is has to be dynamic. For example, the remote action will get Case, CaseComments, list of fields in CaseComments and CaseId and it should fetch the first 5 records in CaseComments that are associated with the relevant case. I'm using Schema.ChildRelationship to query the relation name, and then building the query. For example, for the input 'Case', 'CaseComment', 'CommentBody, IsPublished', '123' the query would look like: SELECT (SELECT CommentBody, IsPublished FROM CaseComments) FROM Case WHERE Id = '5000...' Now I'm using Database.query to fetch the results. I'm getting a List of Case objects, but only with the Id field. How can I access the child objects? When running this query using SoqlExplorer I get a column with the name of the relationship that contains the rows.  This is the basic Apex code: String query = 'SELECT (SELECT ' + fieldsList + ' FROM ' + relationName + ') FROM Case WHERE Id = \'' + (Id)caseId + '\''; System.debug(objName + ' QUERY: ' + query); SObject result = Database.query(query); if (result == null) { return null; } System.debug('RESULT: ' + JSON.serialize(result.get(relationName)));  When I run it I get an Exception: System.SObjectException: Invalid field CaseComments for Case. How can I get the child object rows?


Why did Obi-Wan allow Leia to get adopted by such a high profile figure?

I know that Leia is a princess because she was adopted by the Queen of Alderaan, but why would Obi-Wan allow this? Wasn't the original plan of Obi-Wan and Yoda to hide the Skywalkers from Palpatine? Luke was placed into a very low-profile position, being the child of two farmers on a backwater planet. However, Leia occupies a very important political position.  Is there any reason why Obi-Wan would do this if he was trying to hide her?


$\{f_n\}_{n=1}^{\infty}$ (each bounded) converges uniformly to $f$ then $\{f_n\}_{n=1}^{\infty}$ is uniformly bounded

Let $\{f_n\}_{n =1}^{\infty}$ be a sequence of bounded functions.   Suppose $\{f_n\}_{n=1}^{\infty}$ converges uniformly to $f$. Prove   $\exists M \gt 0$ s.t. $|f_n| \leq M \ \ \forall n \in \mathbb{N}$.   Proof:  Each $f_n$ is bounded so let $\{M_n\}_{n=1}^{\infty}$ be the sequence of upper bounds of each $f_n$. Then the sequence is bounded for if that were not the case, there would be an unbounded function in $\{f_n\}_{n =1}^{\infty}$ which would contradict the hypothesis.  Since $\{M_n\}_{n=1}^{\infty}$ is bounded it has a supremum. Let $S = \sup \{M_n\}_{n=1}^{\infty}$.  So $\forall n \in \mathbb{N}$, $|f_n| \leq S$ clearly. Therefore, $f_n$ is uniformly bounded.  Are there any mistakes in the proof above? Any room for improvements?  Edit: my question is specifically about uniform boundedness of $f_n$ and not abound $f$. Hence, I don't think it's a duplicate of the linked question.


Practicality of virtual destructor in Base Class

Lets take this example:      /* Source.cpp */      struct Base {         virtual void func() = 0;     };      struct Derived : public Base {         virtual void func() override { }     };      int main() {         return 0;     }   Upon compilation (on g++ 8.3.0) via g++ Source.cpp -Wnon-virtual-dtor we get this:      Source.cpp:2:8: warning: 'struct Base' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]      struct Base {             ^~~~     Source.cpp:6:8: warning: base class 'struct Base' has accessible non-virtual destructor [-Wnon-virtual-dtor]      struct Derived : public Base {             ^~~~~~~     Source.cpp:6:8: warning: 'struct Derived' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]     What is the practical thing to do?    Add virtual ~Base() = default; to every such class Base to get rid of the warning (downside is we are adding boilerplate code, which inherently doesn't seem to do anything). Or is there an argument to remove -Wnon-virtual-dtor and leave the code untouched? (downside is we are potentially allowing memory leaks, or are we) I guess a question worth asking is, why doesn't the compiler create a virtual default destructor if the class has virtual members?


Should I Use a Diode to Protect LiPo Battery?

I am building a Bluetooth speaker and will have two power options running into a DPDT Switch. One side of the switch will go to an 11.1 volt 2200 milliamp battery which will be regulated to 12v. The other side of the switch will go to an AC adapter receptacle. This will give me the option to run off the battery or a 12v AC adapter but neither at the same time. The battery will be charged separately off a different circuit receptacle.   My question is would it be a good idea to put a diode on the positive battery line running to the DPDT in case the switch ever failed while running off of AC? This would be a safety measure since I know LiPos can be dangerous and I wouldn't want power going back into the battery from the AC adapter source. If this is a good idea what type of diode should I get and would it only go on the positive side and before or after my regulator before going into the switch?


So I am writing a program that tokenizes a C program, and so far I have managed to handle most cases that I have been able to think of with one exception. If I have a variable declared as such:  char a[] = "Hello World";   The line gets separated into the tokens char a [ ] = "Hello World" and ; as I ensure that there are always spaces where necessary before I split the string based on spaces. Is there a way to use regexes to split the string only if it has seen an even (0 is even) amount of quotations marks since the last split so that the tokens are char a [ ] = "Hello World" ;?


how to display below data using loop using javascript

var employeesById = { "8110923": { "Name": "John Glanton", "Position": "Chief Executive", "Hire Date": "2008-01-15" }, "7734981": { "Name": "Samuel Chamberlain", "Position": "Sales", "Hire Date": "2012-05-01" }, "3400981": { "Name": "Louis Toadvine", "Position": "Customer Support", "Hire Date": "2011-08-24" }, "5517823": { "Name": "Ben Tobin", "Position": "Developer", "Hire Date": "2013-03-19" }, "4587234": { "Name": "David Brown", "Position": "Director of HR", "Hire Date": "2012-01-10" } }


What word best describes someone who doesn't put up with other people's crap?

I'm looking for a word that describes someone who doesn't put up with other people's crap.


How do I set gvim as default application?

I compiled and installed vim 7.4 in Ubuntu 12.04. I want to set gvim as the default application for all text and C/C++ files.   I tried : Right click > Open With Other Application. But couldn't find Gvim in that list. I also can't find Gvim in the launcher.    $which gvim /usr/bin/gvim   Currently, I have to launch gvim from command line only.   $gvim filename &   How can I make gvim as the default editor when I open any text/ C/C++ files from file explorer?


apt-get update says I have not permission

lately whenever i try to update through the terminal I get this message  E: could not open lock file /var/lib/apt/lists/lock  - open (13: permission denied) E: unable to lock directory /var/lib/apt/lists/ E: could not open lock file /var/lib/dpkg/lock  - open (13: permission denied) E: unable to lock administration directory (/var/lib/dpkg/), are you root?   I am using ubuntu 14.04.1 and apt-get had been working just fine until now


Is it correct to say "Would you mind to do something?". I've seen this usage in a few places, but it doesn't sound right to me. I would guess that it's proper to use "Would you mind doing something?" instead.   Yet there are other verbs we could substitute here that make it sound correct with "to". For example, "Would you like to do something?" and "Would you care to do something?"  Could someone explain why "mind to" doesn't sound correct in this context, while "like to" and "care to" sound exactly right?


I do not have a very high performance laptop How can i remove noise and increase speed of render?

I have nvidia processer, but denoiser is not working.


remove file with -h_some_file_name in shell

I have a problem when trying removing a file with name something like -h_some_file_name, this is because of generated script that I made and forget to check the prefix.  If I run the command rm '-h_some_file_name' it return an error rm: invalid option -- 'h'.  If I try to change the name and then remove it using mv '-h_some_file_name' new_filename it return mv: invalid option -- 'h'  Question: How to remove a file with name like -h_some_file_name in shell? if using gui I can right click and move to trash, but in shell only returns an error


I have a sentence:     Please show me the right way so that I can do that rather than take blind action.     Is this sentence grammatically correct?   Can I use instead of to replace rather than? If replaced, the meaning of this sentence is changed?   What is the difference between rather than and instead of? Can you show me some examples to distinguish them?


Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

What I understand about 32-bit OS is, the address is expressed in 32 bits, so at most the OS could use 232 = 4G memory space -- I assume the unit is bytes, so 4GB.  Does this mean if any machine with a 32-bit OS (be it Windows or Unix) has more than 4GB total of RAM + page file on hard disk, for example 8GB RAM and 20GB page file, its memory will never be "used up"?  By "used up" I mean that increasing RAM or page file won't help the performance; of course, it's always possible an application will keep requesting memory from the OS but failing.  Similarly, if this 32-bit OS machine has 2GB RAM and 2GB page file, increasing the page file size won't help the performance. Is this true?


Prove that a $UFD$ is a $PID$ if and only if every prime ideal is maximal.  I know a proof but used Zorn's lemma.Is there a proof that doesn't require Zorn's lemma?


How to fix a single character typo in a code sample?

I just wanted to fix a code sample which had a single character missing. However I can't do this because the minimum edit is 6 characters.  Can we make the checker smarter by allowing single character fixes for code blocks?


Can anyone recommend some tips for the SEO of real estate website.The competition is really high so how to make your website an authority website to make it SEO friendly.


"ö ü ä ß" in Latex (Mac, German, TeXShop)

It sounds simple but I have a really heavy issue with the "ö ü ä ß" in Latex. I use a template from my university, i have a mac and i use TeXShop if that matters.  Within there is a packages.tex with the following  (...)  \usepackage[T1]{fontenc}            % Standard package for selecting font encodings \usepackage{lmodern}                    % alternative Computer Modern-fonts for computer screens \usepackage{textcomp}                   % LaTeX support for the Text Companion fonts (...)   Also I have a thesis.tex with  (...) \usepackage[utf8]{inputenc}     % Accept different input encodings \usepackage{ifthen}                     % Conditional commands in LaTeX documents (...)   Now I tried to use  \usepackage[ngerman]{babel}   as well as  \usepackage[applemac]{inputenc}   but unfortunately it doesn't work. The best case was another error "hyphenation flashed" or something.   \documentclass[     fontsize=12pt,     a4paper,     portrait,                                    oneside,                                         openright,                                   final,                                               titlepage,                                       onecolumn,                                       bibliography=totoc,     numbers=noenddot                     ]{scrbook} \usepackage[T1]{fontenc}         \usepackage{lmodern}     \usepackage[utf8]{inputenc}      \usepackage{ifthen}          \begin{document} öä \end{document}   Now I replaced  \usepackage[utf8]{inputenc}        with  \usepackage[applemac]{inputenc}   in the minimal working example above and it worked BUT in the other document it still doesn't work :( There it gives me the error (see picture)


public static byte[] decompressGzipToBytes(String file) throws IOException {      ByteArrayOutputStream output = new ByteArrayOutputStream();      FileInputStream in = new FileInputStream(file);     try (GZIPInputStream gis = new GZIPInputStream(in)) {          // copy GZIPInputStream to ByteArrayOutputStream         byte[] buffer = new byte[1024];         int len;         while ((len = gis.read(buffer)) > 0) {             output.write(buffer, 0, len);             System.out.println(buffer);         }      }      return output.toByteArray();  }  The above code doesn't properly read a Gzip file into bytes.  I get characters like '[B@6d6f6e28' instead.  But, if I use a BufferReader for text files, then it behaves as expected. What I am doing wrong?


I want to automatically start my MongoDB Server at startup. The command for it is  mongod --dbpath="/Users/prateek/Desktop/Mongo Database"   How do I configure this in Mac OSX El Capitan?  Note - I have installed MongoDB using Homebrew


I installed 12.04 and installed all plug-ins related to video drive.   I installed VLC player and tried to start a .wmv file but I get this error:     No suitable decoder module:   VLC does not support the audio or video format "MSS2". Unfortunately there is no way for    you to fix this.   I followed links of previous .wmv related questions and also searched on Google but did not find a solution to the problem.  Please help me or suggest me any other player.


I would like to have an empty with custom string property that drive a Body Text. But Body Text datablock is not accessible from the GUI. How can i do that ?


A story where a Queen stores the power of the sun in her bracelets?

My nan bought me a book back in the 80's. It was the last of a trilogy and I never read the first two. The story was told by a princess and the world on which she lived royalty had auburn hair and the working class were blonde. The queen through special bracelets was able to harness the power of the sun but there was also something genetically different about her to do so. She had to through a life changing event in order "to change". The story starts off with the princess waiting at the foot of a mountain for her sister who is overdue. The sister had gone off on a hunt in order to change and it is implied that she has died like another sister. The princess meets a hunter instead, shares a meal with him and then heads back to the palace. There she finds her father is leaving because he can't bear seeing his daughters die. There are some other humanoid aliens living on this planet and are more scientifically advanced and are able to test the daughter and find she is missing this genetic component. The queen then takes the hunter for a mate and becomes pregnant. The princess, hunter and scientific alien then go off on a quest to find her paternal grandfather who was kidnapped by aliens years ago and cloned. My memory gets hazy now but there's something about cat like humanoid aliens called something like silth/ seeth and the grandfathers consciousness has been woven into silk by spinners. Anyway she returns home with the silk accepting that she won't be queen to find her mother has given birth to a daughter who will be queen.  If it helps I got the impression that the first two books are about the father and mother. The alien race who abducted the grandfather would clone their captives and then place the babies on different worlds and then harvest them when they are older. The mother changed by fighting off the aliens when they came back for the father.  Any ideas?


How to overlay one texture on another one?

Hi guys I have a problem. I want to project logo bumped texture on other shadder within the same material. But in the end my background material (concrete) becomes transparent (cus of alpha chanel of the logo texture?). My logo texture is a black picture with transparency and bump map is a black background and white logo with some blur.


Bluetooth isn't working in Dell Vostro 3560 with BCM43142 wireless adapter

I installed the wireless driver using this instruction  and I have WiFi working. No problems here.  But unfortunately the bluetooth doesn't work. The Ubuntu bar shows the bluetooth sign and I can turn the bluetooth on/off but I can't discover any devices. And I can't find my laptop when I turn visibility On. So, obviously bluetooth doesn't work.  I couldn't find the reports that blutooth can actually work with this adapter in Ubuntu. So, is there anyone with BCM43142 adapter that have bluetooth working? I am using Ubuntu 12.10 x64.


My USB mouse is disconnecting and reconnecting randomly and often?

I've tried turning off my Surface Pro running Windows 10 from "automatically turning off the power to a USB Root Hub" thru the Device Manager but found it didn't help. I'm running the 64 bit version of windows and was wondering if I switched to the 32 bit version whether it may solve my problem. I don't recall having this problem with earlier versions of Windows. I've been using my Surface Pro in it's Surface Docking Station but no matter which USB port I choose, I get the same result. Has anyone tried this with success..? How do I switch over from my current 64 bit Windows 10 to the 32 bit version..?


\let on macro defined by \newcommand with optional argument

Suppose we have  \newcommand{\foo}[2][optional]{#1 #2}   defined somewhere (e.g. some package) and want to redefine it and re-use the original definition. This usually works with \let like described in :  \let\originalfoo\foo \renewcommand{\foo}[2][optional]{\originalfoo[#1]{modified #2}}   However, this leads to an infinite loop, as \let does not handle the optional argument.  How to handle the optional argument defined by \newcommand with \let?


Improper integral of $\sqrt{x^4 + 1} - x^2$

I'm having a little trouble with this integral:  $\int^\infty_0 (\sqrt{x^4+1} - x^2)\,dx$.  Using the likes of Maple, I can easily find that it takes the form  $-\frac{2}{3}\sqrt{2}(1+i)K(i) - \frac{1}{3}\sqrt{2}(1+i)K(\sqrt{2})$,  where   $K(m) = \int_0^{\pi/2} \frac{d\theta}{\sqrt{1 - m\sin^2\theta}}$  is the complete elliptic integral of the first kind. However, I am looking at a textbook which tells me the solution is simply  $\frac{\Gamma^2(1/4)}{6\sqrt{\pi}}$,  with $\Gamma$ denoting the usual gamma function  $\Gamma(t) = \int^\infty_0 e^{-u}u^{t - 1}du$.  I've thrown a fair amount at this: trying to reduce it via various substitutions to, for instance, a combination of beta functions which can be rewritten as gamma functions via  $B(m,n)= \frac{\Gamma(m)\Gamma(n)}{\Gamma(m+n)}$,  or just a combination of elliptic $K$ functions. Even after a fair amount of time consulting Gradshteyn and Ryzhik, I can't seem to get anywhere... I'd like to eventually get to the gamma function solution, and I'd be most grateful to anyone who can help me get there, even if it's just via a nudge in the right direction.


For these:     It happened that he did not attend the party.   As it happened, he did not attend the party.     Do "it happened that" and "as it happened" mean different things?


What's the motivation for being able to assign a child class instance to base class variable in a stack frame?

Given this code:  #include <iostream>  class base { private:     char x; public:     base(char x) : x(x) {         std::cout << "base::base(char) " << this << std::endl;     }     base(base&& rhs) {         std::cout << "base::base(base&&), moving from " << &rhs << " to " << this << std::endl;         x = rhs.x; rhs.x = '\0';     }     virtual ~base() {         std::cout << "base::~base " << this << std::endl;     } };  class child : public base { private:     char y; public:     child(char x, char y) : base(x), y(y) {         std::cout << "child::child(char, char) " << this << std::endl;     }     child(child&& rhs) : base(std::move(rhs)) {         std::cout << "child::child(child&&), moving from " << &rhs << " to " << this << std::endl;         y = rhs.y; rhs.y = '\0';     }     virtual ~child() {         std::cout << "child::~child " << this << std::endl;     } };  int main(int argc, char* argv[]) {     { // This block enables me to read destructor calls on the console...         base o = child('a', 'b');     }     std::cin.get();     return 0; }   In the stack frame of main there's an area where child is being instantiated. After that the move constructor of base is being called with a reference to the newly created child. The (move) construction of base takes place in a different area in the same stack frame and copies the parts of child which are derived from base. From now on all that's left of child is the base parts, making it nothing more than base.  I know that polymorphism is not possible for objects on the stack and I think I understand why: Efficiency. No vtable lookups and such. The compiler can choose the methods to call at compile time.  What I don't understand is: Why is it possible to assign a child instance to a base variable (in a stack frame) when everything that makes up child gets lost? What's the motivation for that? I'd expect a compile error or at least a warning, because I can't think of a good reason to allow it.


$f : [a, ∞) → R$ is a continuous function. If $\lim_{x→∞} f (x) = L$, prove that $f$ is uniformly continuous on $[a, ∞)$.

Suppose that $f : [a, ∞) → R$ is a continuous function. If $\lim\limits_{x→∞} f (x) = L$, prove that $f$ is uniformly continuous on $[a, ∞)$.  My attempt at the proof:  Well since I have to use both facts, I think my proof needs to be divided into two parts:  1- I have to prove that $f$ is uniformly continuous on $(N,∞)$ where $N>a$ (by using the limit definition somehow)  2- Using compactness, I can easily show that $f$ is uniformly continuous on $[a,N]$  I am having trouble with $(1)$ because I can't find an $\delta>0$ that works for all $\epsilon>0$  Just need a hint in the right direction, thank you!!


I'm trying to build an ubuntu embedded linux kernel for Beaglebone.  Part of the build has a dependency for ia32-libs. When I try to install it it say it needs ia32-libs-multiarch. But it says its not installable! (see below). I have tried other solutions from this forum without success.  Can someone explain what is happening and what I can do about it?  ian@ubuntu:~/beaglebone2/linux-dev$ sudo apt-get install ia32-libs Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  ia32-libs : Depends: ia32-libs-multiarch but it is not installable E: Unable to correct problems, you have held broken packages.


How can I install a wifi driver for RTL8723BE on Ubuntu 18.04?

When I run this command  lspci | grep "Wireless\|WiFi"   I got this result:  05:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter   How can I install a wifi driver for this chip?


How to define fractional factorials, like 3.6!?

I did not know that you could find an answer for that. However, I can only use Excel so far to do it.  How to calculate 3.6! by hand?


Is there any way to remove edges causing a loop?

How do I remove/dissolve the selected edges while keeping the geometry? Every other modeling software I've worked with can do this without any problem but Blender refuses to dissolve/remove them or adds faces if I merge them.


How to rename new tabs heading which is created dynamically by clicking a button using jquery

<input class="txt_tab_head" type="text"/>Tab 1

<input class="txt_tab_head" type="text"/>Tab 2

Contents of Tab 1

Contents of Tab 2

         //Add tab and content $('.add-contact').click(function(e) {   e.preventDefault();   var id = $(".nav-tabs").children().length;    $(this).closest('li').before('
<input class="txt_tab_head" type="text"/>New Tab ' + id + '
');   $('.tab-content').append('

Contents of Tab ' + id +'

'); });   //Renaming tabs $('.tab-txt').on('dblclick',function(){     $(this).find('input').toggle().val($(this).find('a').html()).focus();     $(this).find('a').toggle(); });  $('.tab-txt').on('blur','input',function(){     $(this).toggle();     $(this).siblings('a').toggle().html($(this).val()); });   //Sorting Tabs $( function() { var tabs = $( "#tabs" ).tabs(); tabs.find( ".ui-tabs-nav" ).sortable({       axis: "x",       stop: function() {         tabs.tabs( "refresh" );       }     }); });


Using a secondary internal drive as a 100% Ubuntu Installation

I have an empty hard drive that I want to get Ubuntu on for a dual boot system. I don't know how to just get it on that free drive without touching my Windows drive since both are showing on that screen. I tried the automagic dual boot install option but it only took half of my HDD (no sliders are actually offered on that step) and then botched the installation with a known "third party drivers checkbox" error. I had to fix my drive, stop a GRUB terminal from booting up first, and now there's a residual Ubuntu marker that does nothing somewhere when I choose to boot to UEFI or from removable drives on that blue Windows screen. So now that it's mostly fixed and I can't trust the auto install settings, how do I do all of those manual /root /boot / things just on the drive that I want them on? It's visible on the list but I can't just click on it and press Install and I'm not an expert on what all of those /sda entries and other stuff are supposed to mean.


Item that looks like the keyboard's Backspace key in the notification panel?

I would like to know what the icon that looks like a backspace keyboard key in the upper-left hand side of the notification panel means (what application does it correspond to?).  In the screenshot given below the icon is found in the very left-most position in the notification icons area.    Thanks.


Specification with keyword template in the generic programming

#include <iostream>  namespace oo{    class A{   public:     template<typename T>     static T get_value(){return static_cast<T>(55);}   };    template <typename T=A>   class B{     public:     static double f(){return T::get_value<double>();}   };  }  int main(int argc, char *argv[]) {   using std::cout;   using std::endl;    cout << oo::B<oo::A>::f() << endl;    return 0; }   Considering the example up here, it compiles with an error "type name is not allowed" which refers to "double" and arguments in "get_value()".  Someone has righted this wrong by rewriting the function f() as followed:  static double f(){return T::template get_value<double>(); }   Yet, I do not quite understand the use of "template" here. Could anyone explain that to me, please?  Thanks in advance for your comments.


Why does this program print 13 instead of 15?

public static void main(String[] args) {     int number = 3;     modifyNumber(number);     System.out.println(addAndReturn(number)); }  public static void modifyNumber(int number) {     number = number + 2; }  public static int addAndReturn(int number) {     return number + 10; }  I reviewed the code many times but i still don't understand it. The method "modifyNumber" doesn´t create a variable inside itself so, shouldn't it actually modify the main method's number variable?


What is wrong with my Rolling Craps code?

So I am coding a game of craps which requires me to roll two dice and return the sum of the dice. Rolling a 7 or 11 wins you the game, rolling a 2, 3, or 12 however will lose you the game. Rolling a 4, 5 ,6, 8, 9, 10 will "Establish the point" where the user continues to roll until they roll the same number that was established or until they roll a 7, in which case they lose.  In my case, I get an exception that says   "Exception in thread "main" java.lang.NullPointerException at Craps.getSum(Craps.java:24) at Craps.playRound(Craps.java:29) at Craps.main(Craps.java:70) C:\Users\owner\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 2 seconds)"   My Die class looks like this:  import java.util.Random; public class Die  {     private int number;     private Random generator;      public Die()     {         generator = new Random();         roll();     }      public int getNumber()     {         return number;     }      public void roll()     {         number = generator.nextInt(6)+1;     } }   And my game of craps looks like this:  import java.util.Scanner;  public class Craps  {     private Die die1;     private Die die2;      private void rollDice()     {         die1.roll();         die2.roll();     }      private int getSum()     {         return (die1.getNumber() + die2.getNumber());     }      public void playRound()     {         if (getSum() == 7 || getSum() == 11)         {             System.out.println("You rolled a " +getSum()+ "! You win!!!");         }         else if(getSum() == 2 || getSum() == 3 || getSum() == 12)         {             System.out.println("You rolled a " +getSum()+ " You lose.");         }         else if(getSum() == 4 || getSum() == 5 || getSum() == 6 || getSum() == 8 || getSum() == 9 || getSum() == 10)         {             int established = getSum();             System.out.println("Establishing the point... Re-Rolling...");             rollDice();              do             {                 rollDice();                 System.out.println("You rolled a " +getSum());             }             while (getSum() != established && getSum() != 7);              if (getSum() == established)             {                 System.out.println("You rolled a " +getSum()+ " which is also the established point, You win!");             }             else if(getSum() == 7)             {                 System.out.println("You rolled a 7 after establishing the point, you lose.");             }          }            }      public static void main(String[] args)     {         Craps game = new Craps();         Scanner scan = new Scanner(System.in);         System.out.println("Welcome to the game of Craps!");         System.out.println("Would you like to play a game? (Y/N");         String input = scan.nextLine();         if (input.equalsIgnoreCase("Y"))         {             game.playRound();         }         else         {             System.out.println("Okay see you next time!");             System.exit(1);         }     } }


How does a photon released from particle A interacting with particle B, entangle them?

What does a photon carry from its parent particle that when it interacts with another particle, it entangles both the particles?


I am using a Broadband connection which provides me greater speed with Limited usage as 2.5 GB per Month.   I want some application which can help me by counting my data up/down volumes everyday , so that I can control my usage & stop getting extra bill for over usage.  is there any application like that ?


how to make a list with all possible combinations?

I want to make a list which contains all possible 4-digit combinations of digits 1-6  e.g.>>>list=(1111,1112,1113,.......,6666)  how am I going to do it? I run out of ideas


Does maximum Combat Power change for different Pokemon?

Does each Pokemon in Pokemon Go have its own maximum CP? What does the bar above the Pokemon represent?  If so what is the Pokemon with the highest maximum CP?


How to change "metres" from "degrees" without change of location?

I am working in QGIS (version 3.10). I know that in order to make certain distance analysis (in my case I want to do a heat map) a layer should have meters as units. Initially from the automatic SRC EPSG: 4326- WGS 84 I change my point layer' SRC to one set on metres (3857- WGS84/ Pseudo-Mercator). It does work in the sense the units do change to meters, however the points appear somewhere else. I tried to change the SRC of the project, start from scratch with the new SRC, different SRC combinations (using different SRCs for the project and/ or point layer) but just cannot get the units and the location both right.


How to find out which virtualisation technology is used on Linux VPS server?

I have access to some Debian Linux vps servers, however I cannot access their controls panel directly: only server administrator himself can do that.  Is there any way to find out what visualization technology is used on server from inside VPS? I need it only to know which kernel header package should I install (xen, openvz or any other).


As silly as it sounds, my 3D-view controls are missing. I'm not sure that's what it's called, but its the bottom part of the 3D view where I can select viewmode, layers and object modes.   How can I get it back?


I have a Galaxy S2 with NFC (GT-I9100P) and I wish to have root access to properly administrate my phone.  I've been looking at various forum posts on different sites and I've just been getting more and more confused as to what I need to do.  From what I understand, I need to flash an unsecure kernel to the phone (with ODIN) to get root access, then I can flash the stock firmware back onto the phone and retain root access. Is this correct?  Further information:  My baseband version is I9100PBVLP7   kernel version: 3.0.15-I9100PBVLPA-CL364024dpi@DELL169 #3  and my operator is Orange UK.  I've managed to obtain the firmware version that is on my phone already through sammobile.com, I just have no idea what I need to do next.  Reward If anyone can help me to get root access on my stock firmware I will give them as much bounty as I can when the question is eligible for it.


How can I tell what woke my laptop from suspend?

On other operating systems, there are ways to see what process or event woke them from suspend. I leave my laptop often for multiple days in suspend, sometimes to find that it has woken itself up and is heating whatever surface it is resting on :)  Is there a way to find out what woke it up so that I can prevent that thing from happening again? On Ubuntu 12.04 (elementary Luna).


Combinations of bijective derangement functions

Let $S = \{1,2,3,4,5\}$ How many bijective functions $f:S \to S$ do we have such that $f(x) \neq x$ for all $x\in S$?  I was trying to solve by taking the total number of such functions and subtract all the cases where $f(x) = x$.  $5!$ is all cases  $4!$ is where one $f(x)=x$ and rest are not  $3!$ is where two $f(x)=x$ and rest are not  $2!$ is where three $f(x)=x$ and rest are not  $1!$ is where all five $f(x)=x$  so $5!-(4!-3!-2!-1)$.  But then I realized that, for example, $4!$ contains also the case where all $f(x)=x$ which mean I am subtracting too much.


How can I find the distribution of sample mean of Cauchy distribution?

Let $Y_1,...,Y_n \sim Cauchy(0,1), i,i,d.$  How can I find the distribution of $\bar{Y}$?  I know that $Y_1+Y_2\sim Cauchy(0,2)$ by some integration,  but I don't know how to proceed.


Error function in simulation of normal random variates

I was wondering if there is any benefit to using the inverse error function as opposed to the inverse normal in simulating normal random variates. Increased accuracy for probabilities way in the tails would be nice.   I was not able to find any information about this online so thanks!


I'm trying to create multiple projectiles, as if a spaceship is shooting an enemie

Im using append on an empty array to create multiple projectiles, but every time I hit the spacebar Im getting a NullPointerException on keyPressed when it checks if the spacebar was pressed. I can't figure out why this is hapenning. Help would be really good.   MAIN CLASS:   int naveX, naveY; int inimigoX, inimigoY; Tiro [] tiros;  boolean tiroVisivel; boolean naveDireita, naveEsquerda;  void setup(){   size (800, 600);    naveX = 375; naveY = height - 120;   inimigoX = 385; inimigoY = 0;    tiroVisivel = false;   naveDireita = naveEsquerda = false;   }  void draw(){   background (0);    nave();   movimentoNave();   if (tiroVisivel == true && tiros != null){     for (int i = 0; i < tiros.length; i++){       tiros[i].display();       tiros[i].update();           }   }    inimigo(); }  void nave(){   stroke (255);   fill (255, 0, 0);   rect (naveX, naveY, 50, 100); }  void movimentoNave(){   if (naveEsquerda == true && naveX > 0){     naveX = naveX - 5;   }   if (naveDireita == true && naveX < width - 50){     naveX = naveX + 5;   } }  void inimigo(){   stroke (255);   fill (0, 100, 255);   rect (inimigoX, inimigoY, 30, 50); }  void keyPressed(){   if (key == ' '){     append(tiros, new Tiro(naveX + 20, naveY - 30));     tiroVisivel = true;   }    if(key == 'a' || key == 'A'){     naveEsquerda = true;     }   if(key == 'd' || key == 'D'){     naveDireita = true;   }    if (key == 'r' || key == 'R'){     setup();       } }  void keyReleased(){   if(key == 'a' || key == 'A'){     naveEsquerda = false;     }   if(key == 'd' || key == 'D'){     naveDireita = false;   }     }   PROJECTILE CLASS:  public class Tiro {    private int tiroX = naveX + 20;   private int tiroY = naveY - 30;    public Tiro(int x, int y){     this.tiroX = x;     this.tiroY = y;   }     void display(){     stroke (255);     fill (255, 0, 100);     rect (tiroX, tiroY, 10, 20);    }    void update(){     if (tiroY > 0){       tiroY = tiroY - 10;     }   } }


Work done by gas on atmosphere and work done by atmosphere on gas

Consider a cylindrical container contaning a gas with pressure P1 and volume V1 with a massless piston on top of the cylinder. There is a block of mass m on top of the piston. Suddenly, the mass is removed and so the gas expands irreversibly to a final pressure of P0 which is the external atmospheric pressure. Now I know that work done on a system depends on external forces, so the work done on gas will be = P0 *(change in volume)  Now, I want to know the work done on the atmosphere. So, in this case, my system will be the atmosphere and surroundings should be cylinder contaning the gas. So, work done on atmosphere by the gas will be = - P1 * (change in volume of container)......(or it should be an integral where pressure of gas changes from lower limit of P1 to an upper limit of P0).  So my question is, why are the two work calculated different? Is what I've done correct? One of my friend said that the way I'm calculating the work done by the gas on atmosphere is incorrect, if this is true, then what is the correct way?


How do I communicate to players that a room is unimportant?

Recently, I DM'd the "Death House" one-shot from Curse of Strahd where the players explore a haunted mansion. A lot of the rooms have great descriptions about their contents (e.g. a dining room with elegant wood-paneling and a carved mahogany table) but ultimately serve no function for the players. Unfortunately, this caused a lot of wasted time spent in rooms that ultimately didn't advance the adventure forward.  How do I give the players nudges that they're wasting time without railroading them? Additionally, they didn't seem to enjoy finding yet another "empty" room, is there a way I can keep it fast-paced and interesting as well?


Does the SPECIAL max out at 10 or can I put clothes on to make it 10+?

I have a 10 endurance dweller and I'm wondering if there's any point to put on my +5 endurance suit on him or does it max out at 10 no matter what? Thanks.


Why is it considered dangerous to use the -execdir + argument with the find command?

"Like -exec, but the specified command is run from the subdirectory containing the matched file, which is not normally the directory in which you started find.  This is a much more secure method for invoking commands, as it avoids race conditions during resolution of the paths to the matched files." "As with the -exec option, the + form of -execdir will build a command line to process more than one matched file, but any given invocation of command will only list files that exist in the same subdirectory.  If you use this option, you must ensure that your $PATH environment variable does not reference the current directory; otherwise, an attacker can run any commands they like by leaving an appropriately-named file in a directory in which you run -execdir."  When you run the -execdir command using the + method, why does it make you vulnerable to attack if someone puts an aptly named file in your PATH?  Is it because it's possible that that executable will be run instead of the expected executable?  Sort of like in Windows 7 when you replace sethc.exe with a renamed cmd.exe to access cmd.exe from the login prompt, except in this case it's run by find thinking the command it's running is /usr/bin/ls for example, when it's really running something else named ls? If that's the case I guess one just needs to check sum the command and make sure the entire path is specified when running such a command. I suppose the other version with ; would be volunerable to that as well correct?


Attempting to connect to a Hamachi Minecraft Server gives 'Connection timed out: no further information' error

Whenever I start an Unturned Server, my friends can join it over Hamachi without a problem.  Same way with Magicite, we can play together with no issue.  But whenever we try to join a Minecraft Server I started it says java.net.ConnectionExeption: Connection timed out: no further information: And they can't join.    I am properly launching a Minecraft.1.8.6.exe server not just Opening it to LAN.  I had my friend host a server and I was able to connect without a problem but he says it slows down his computer too much, so we aren't able to play Minecraft together.  I have had several friends try to connect from several different computers, and they had the same problem.  my LAN Minecraft games work OK, but it is just Hamachi hosted games.  Any way to fix it?  I am assuming it'd have something to do with my Hamachi Network Adapter, or my Firewall.  I have inbound, outbound, and Gateway rules set for hamachi-2-ui.exe so I wouldn't think it would've been my firewall.    EDIT: I had my Hamachi connection set as a Public connection and Public Networks don't have the rights to inbound connections, so by setting it as a Work/Home connection fixed the problem.


Is there anyway of changing legacy boot to UEFI boot without destroying whole partition?

Windows 8.1 has been setup in legacy boot mode,it means it is MBR. But I want to chane it to UEFI boot mode which means GPT partition. Can I change in bios legacy boot mode to UEFI boot mode? Will my partitions and data will be destroyed?


I know that there is  question on here about the theory of R+L=J, but there ought to be a question on here for the arguments against. (Spoilers all, to be safe)  What evidence from ASOIAF suggests that Rhaegar and Lyanna are not the parents of Jon Snow?


Why does our Solar system not feel the effects of dark matter the way our galaxy does?

It is said that stars rotate around the nucleus of our galaxy at too high a speed than should be possible based on the amount of visible matter. An explanation given for this is dark matter. However, the orbits of our planets and other objects in our solar system appear to follow predictable Newtonian/Einsteiniam rules. Why do we not see the same rotational anomaly in our Solar system that we see in the wider galaxy?


Show the commutator subgroup of $S_{n}$ is $A_{n}$ for $n \geq 5$

Show that for $n \geq 5$, the commutator subgroup of $S_{n}$ is $A_{n}$ for $n \geq 5$.     I'm not sure on how to handle this problem. I know that the commutator subgroup $G'$ will consist of products of commutators $[\sigma_{i}, \tau_{i}]$ for permutations $\sigma_{i}, \tau_{i} \in S_{n}$. However, I don't know where to start. What would be the best way to approach this?


Lost and found my indian passport with US Visa

I had lost my Indian passport with a US visa and later filed an FIR and got a new indian passport but before reporting to the US embassy i found my lost passport, can I travel with both my passports to the US as the US visa in my lost and found passport is still in force? note: I did not report my lost visa to the embassy as I found it before reporting. @ Patricia Shanahan, there was no such information given to me regarding returning it back.  @ Newton, thanks man, that information was for expired passport and not for lost and found passport, I have to feel that the found passport will be expired and I can travel with the valid visa only. @DumbCoder 3, that is when you reported it to the Embassy but I found the passport before informing them.


How can the confidence interval for standard deviation not include the sample standard deviation?

I'm using the standard formula for the confidence interval for standard deviation:  SQRT(((N-1)*s^2)/(CHISQ.INV((1-Confidence)/2, N-1)))   By mistake I entered a very low confidence level and I noticed that the resulting interval did not include the calculated standard deviation. This happens when the confidence is sufficiently low (e.g. 10%).  Can someone explain me the reason? I've double checked the results with Minitab and they are correct.


Yesterday, Network listing on Windows 10 file explorer showed me one external phone. Thus, I changed my router WiFi password just in case.  Nevertheless, I checked this today and I found 5 new phones appearing randomly for a few seconds.  I've found a similar question , but no solution.  Here is an screenshot:    If I double click that I see: Model: LG-E465g, MAC: 48:59:29:b4:8d:87.  This happens on two PCs that were recently upgraded to Windows 10:   one is connected through Ethernet (desktop PC) the other through WiFi (and I disabled Bluetooth)   I hadn't seen this issue before. I guess these are phones trying to connect to my network, I just don't understand why Windows shows them if they are not connected to my router.  Update: If I hide my SSID this issue stops. As soon as my router SSID is visible, phones start appearing again.  Update 2: I tried MAC filtering but is useless.


How can I effectively save a lot of money for retirement when a 401k is not available?

For some years now, I've been contributing the maximum amount to my personal IRA ($5,500 in 2015) and my 401k ($18,000 in 2015). This, plus employer match, means I am saving about $30,000 per year in a tax-advantaged account.  Now I am considering switching jobs, but they don't have a 401k plan. Do I have any options other than just a standard investment account with 15% capital gains tax? Would it help if I set up self-employment and contracted myself?


Plain integer partitions of $n$ using $r$ parts

Division of number $n$ on parts $a_1,...,a_r$ where $a_1 \le ... \le a_r$ we call a plain if $a_1 = 1$ and $a_i - a_{i-1} \le 1$ for $2 \le i \le r$. Find enumerator (generating function) for plain divisions.  my try  The hint was to use bijection between plain divisions and some commonly know enumerator. I tried to use enumerator of divisions on different parts: $$ (1+x)(1+x^2)...(1+x^r)$$ where number of plain divisions is  $$[x^n](1+x)(1+x^2)...(1+x^r) $$ let function  $$f(n,r) = [x^n](1+x)(1+x^2)...(1+x^r) $$  For some first divisions it works. For example: $$f(4,3) = 1 $$ $$f(6,3) = 1 $$ $$f(11,5) = 2$$ But when I tried to find bijection, I failed. I found that this function isn't correct because $f(15,6) = 4$ but should be equal to $3$ because: $$15 = 1,1, 2, 3, 4, 4 \\ 15 = 1, 2, 2, 3, 3, 4\\ 15 = 1, 2, 3, 3, 3, 3 $$. There I stucked.


Getting Null pointer exception when trying to add two string elements

I was asked following question in an interview  : Array a = {1,2,3,4,5},  Array b = {a,b,c,d,e}, write a program to add individual elements of both array and enter the sum in third array with output like {e1, d2, c3, b4, a5}  I was not able to come up with solution at that time and now I am trying at home and wrote following code but got null pointer exception :  public class ArrayMergeIndividualElements {  String[] a = {"1","2","3","4","5"}; String b[] = {"a","b","c","d","e"}; String s[]=null;  void mergeArrays() {     int k=0;     int j=b.length-1;                 for(int i=0;i<a.length;i++)     {         for(;j>=0;)         {             System.out.println("Number array is "+a[i]);             System.out.println("String array is "+b[j]);                             s[k]=a[i]+b[j]; //getting null pointer exception at this line                            k++;             j--;             break;         }     }      System.out.println("output is :");     for(int l=0;l<s.length;l++)     {         System.out.print(s[l]);     } }  public static void main(String[] args) {      ArrayMergeIndividualElements amie = new ArrayMergeIndividualElements();     amie.mergeArrays(); }  }   I have tried following code by searching on stackoverflow , but no luck     String[] both = Stream.concat(Arrays.stream(a[i]), Arrays.stream(b[j]))                       .toArray(String[]::new);  Individually arrays are printing the value but when I try to add/concatenate them I am getting null pointer.  Also can we add both arrays if one is Integer array and other is String array?  Please help


Does there exist an epimorphism from the ring $\mathbb{Z_{24}}$ onto the ring $\mathbb{Z_{7}}$? an epimorphism is a surjective homomorphism Could someone give me an idea how to know this? to be honest I have no idea


Want to edit a file content for Removing the string after the last underscore and before the file extension using Unix commands

I want to edit the file contents in the 2nd row and 2nd column ,which is a file name from that I want to remove the part after the last underscore and before the file extension .  The contents of the file looks like below Input file contents   No|filename|count 01 |com_101_00000_0001_a234.txt|100   resultant file content  No|filename|count   01 |com_101_00000_0001.txt|100   The number of underscores may vary depending upon the file names present inside the .ctl files.there are multiple files in a folder likes this ,i want to change the contents for all .ctl file in the 2nd row similarly.  Operating system details Linux  2.6.32 -696.30.1.e16 GNU/linux


Using table tag to structure a web page decrease referencing quality?

I am student in web programing. I use massively <table> ... </table> to structure my web page.  My professor once told me it could decrease the referencing quality for my websites, so I ask myself this question :   Why does a <table> tag is a bad practice in structuring a webpage instead of using it for basic data dysplaying ?


For what prime numbers $p$ is $x^2+x+1$ irreducible in $\mathbb{F}_p[X]$

I think it's enough to search for the prime numbers where $x^2+x+1=0$ is not solvable, but I am not sure where to start. Thank you


Why speaker beeps when a cellphone is kept near it?

Once I had kept my cellphone near a computer speaker. After some time, a call came over my phone. Strangely, the speaker started  humming and beeping till I received it. Why did the speaker started humming when the call came?


How do I the extract the first digit from a number (variable in a bash script)?

Let's say the variable numbers=$@ where $@is from user input. The user typed in ./script.sh 901.32.02 and I want to get the first digit 9 and store in another variable. How can I do this? I was told to do    for n in `seq 1 $count`     do var=${numbers[0]}   done   but that prints out the whole input if I echo $var instead of just 9.


"How" vs. "that" in "You know how we have pizza on Thursdays, right?"

From time to time I hear sentences like this:      You know how we have pizza on Thursdays, right?   Here, how doesn't mean exactly how those guys eat pizza, it is something like "that" in this context.   So what is the difference between using how, that or just skipping the conjunction?