I know how to add a picture to my LaTeX file, e.g. \includegraphics[width=7cm]{curve.pdf}. What I'd now like to do is place some latex symbols onto the picture. Like a \gamma to name a curve. I do not want to do that in the graphics editing program e.g. because I might want to rename that curve later and don't want to repeat the editing process.  I know I can do a \put in a picture environment. But this environment forces me to specify its size at the beginning. That would be cumbersome since I'd have to go open the graphics file and do some calculations. Is there a way to get the dimensions (or aspect ratio) of a graphics file within LaTeX, so I might use it there? But even if I could do these calculations automatically, I still wouldn't like the redundancy of specifying the width for \includegraphics again, but I could live with that.  Also, is it possible to specify the size in cm to the picture environment? I just tried and got some errors.  So basically what I am looking for is a solution as simple as possible which:  a) lets me specify a width or a height and a file, and displays the image scaled while keeping its aspect ratio and then   b) lets me put LaTeX stuff inside the image in relative coordinates (percentages or 0...1), so I won't have to redo anything should I decide that the image needs to be a bit larger or smaller.  (b is kind of like setting \unitlength to the whole width=height for the 'picture' environment. But of course most images are not square and I also don't appreciate the redundancy (but could live with it).)


Could the shell function return value not exceed 255?

#!/usr/bin/env bash # set -x  readonly err_code=256  my_function () {     return $err_code }  my_function  echo $? # print 0   If the err_code exceed the 255, all the top bits will be dropped just like unsigned byte, how to explain this? Is there any feature document for this? I googled a lot w/o luck.  Thanks!  UPDATE:  Okay, I got it, it doesn't just happen only in shell but Unix-based system, the shell function is also called by command substitution. Thanks for linked questions!


Assign pointer to class function to pointer to function

I'm trying to send a pointer to a class function as a variable to another class. I'm trying to keep both classes separate so I can reuse the code without having to edit it in the future.  I'm compiling on Windows 7, using Visual Studio 2015.  DATASTRUCT dataItem = {0, 1, 0, 1, dataText, parentClass::doSomething};  childClass.addItem(dataItem); //childClass is initiated as a member of parentClass   Elsewhere:  typedef struct dataStruct{     double min_x;     double max_x;     double min_y;     double max_y;     GLTEXT label; //custom struct for text information     void(*function)(void); }DATASTRUCT;   I want childClass to be able to go about its business and check for certain parameters, and when childClass is done I want it to call doSomething from parentClass, without actually knowing it's a nested class.  The error I get during compile is:  void(parentClass::)() cannot be used to initialise an entity of void()().  I am able to define a standard function and call that, but that's not unique to each parentClass, and I then have to specify which parentClass::doSomething to which I am referring.  The simplest solution I have found is to redefine the pointer to function in childClass to void(parentClass::*)(), which is exactly what I want, but not how I want it.  With that said, I don't know where to take this, is there another way? Something similar?  Edit:  If possible, how would I explicitly send the information required for my childClass to properly interpret the function pointer dynamically.  So...  childClass.addItem(classInformation, dataItem, &parentClass::doSomething);   Or does the receiving end always have to know "parentClass::" in advance? Would this then be a good time to use void pointers?  Am I chasing after my own tail or is this going somewhere?  Edit:  Something like this seems dangerous, but, here it is.  childClass.addItem(classInformation, dataItem, static_cast<void*>(&parentClass::doSomething));  childClass::callParent(classInformation, void*function){     static_cast<classInformation.something*>(function)(); }   What would "classInformation.something" be in this case?


What are the risks of allowing my stock broker to lend out my shares to short sellers?

Some types of brokerage accounts allow the stock broker to lend my shares to short sellers (probably without needing to notify me). Do I incur any risks when I sign up for such accounts? Is there any risk that I can lose my shares? If there are risks, how am I compensated for the risk (e.g. higher interest rates on idle cash, a small share of the commissions from the short seller, etc.)?


Interstellar: Why did they go to Miller's planet? How was Miller even able to send a green light?

Apologies if this has already been answered, but I was not able to find it.  After re-watching Interstellar, I am not able to make sense of the scene where the crew decides to visit Miller's planet, the water-covered one near the black hole.  Lazarus was launched 12 years prior, and given the 2 year trip to the Saturn wormhole, it means Miller would have landed, in Earth's frame of reference, 10 years prior.  The whole crew acknowledges the fact that 1 hour of Miller-time (lol) equals 7 years of Earth-time.  This means that by the time our Brand/Cooper/etc crew makes it near Miller's planet, Miller could have only been on the planet for about 1.5 hours.  The protagonist crew KNOWS that Miller has only been on the planet for 90 minutes of her own time.  So, is the audience expected to believe that in a mere 90 minutes, Miller determined that her planet was a candidate for colonization and sent out multiple green light messages telling NASA to come to her?  I would think it would take at least days, more likely months, to determine a planet was suitable to be the salvation of the human species.  There are other problems with this aspect of the plot as well:  1) Apparently Miller crashed and died, so how and why would she/her ship/her robot send out the green light signal to NASA, along with accompanying data to prove her planet's worth as a future home.  2) Even if she hadn't crashed and died within 90 minutes, HER PLANET WAS NOT INHABITABLE.  It was just a shallow ocean with nothing to offer humanity.  Where was her "good data" even coming from.  In short, to me the Miller planet visit makes no sense.  1) She couldn't have been there for more than 90 minutes, 2) the planet was a colonization dud, and 3) she crashed and died upon trying land there.  So, given those three blockers, how does "we got a signal from Miller telling us her planet was a possibility" even enter the narrative.  It basically implies that IMMEDIATELY (under 90 minutes) upon nearing the planet, Miller, from space, took inaccurate readings about a planet she hadn't even landed on yet which convinced her to send a green light signal back to NASA, a signal that carried the fate of the entire human race.  Then she crashed and died, on planet that turns out to be uninhabitable.  AND, kicker, the crew chose this 90 minutes of data over the YEARS of data the other two scientists had been transmitting.  Bonus question:  How did our crew (and the Lazarus 12 for that matter) get to chose which planets they navigated to.  Seems like they just "entered the wormhole" and magically arrived at the system they wanted to.


I often find myself trying to determine which colour is the "complementary" one of (or would nicely fit with) two colours imposed by the client brand. At times, only one colour is imposed, and I want to find two colours that would fit it.  Is there a quick and easy way to figure it out?


Is it possible to UI automate testing involving Two-factor Authentication for an iOS app?

I have an iOS app that uses 2FA for certain account related features. I'd like to create some UI automation tests for those features, but they require receiving either SMS messages or email. On a simulator, there is no such way to access SMS. I think it might be possible to access the email instead, but that would involve opening up Mobile Safari and logging into an email account- do iOS automation frameworks even support that level of granularity for accessing UIWebViews?.  Is it even possible to have automated tests for 2FA? One presumes that if there's a way to access the test account's SMS or email accounts- so on a device, not in the simulator- it might be feasible.


Having problems with my code, exception in thread "main"?

Whenever I try to run this code: import java.util.Scanner;  public class KCFRodriguez2019101507 {          Scanner sc = new Scanner(System.in);         static String empName, position, status;         static int empNo, salaryReg, salaryCon, year, deduction, netPay;         static float deduct;              @SuppressWarnings("null")     public static void main(String[] args) {         @SuppressWarnings({ "unused", "resource" })         Scanner sc = new Scanner(System.in);             String a = "Employee Name:";             String b = "Status:";             String c = "Position Title:";             String d = "Employee Number:";             String e = "Regular Salary:";             String f = "Contractual Salary:";             String g = "Year Hired";                          System.out.println(a);             Scanner entry = null;             empName = entry.nextLine();             System.out.println(b);             status = entry.nextLine();             System.out.println(c);             position = entry.nextLine();             System.out.println(d);             empNo = entry.nextInt();             System.out.println(e);             salaryReg = entry.nextInt();             System.out.println(f);             salaryCon = entry.nextInt();             System.out.println(g);             year = entry.nextInt();                  } }  I get an error saying that "exception in thread 'main'", so I cant compile the code. I'm fairly new to java, so I don't know how to fix this. I'm trying to make a program that allows the user to enter Employee data. Error Code: Employee Name: Exception in thread "main" java.lang.NullPointerException at KCFRodriguez2019101507.main(KCFRodriguez2019101507.java:24)


adding double in swift and floats give different answers. And both are wrong. why?

let test:Float = 187.67 let test2:Float = 234 print(test+test2) //output: 421.66998  let test3:Double = 187.67 let test4:Double = 234 print(test3+test4) //output: 421.66999999999996   Obviously, the correct answer is 421.67. Any idea why it didn't give me that number?


The sequence $x_{n+1}=\frac{x_n}{2}-\frac{2}{x_n}, x_0>0$ is bounded?

Consider the sequence $$x_{n+1}=\frac{x_n}{2}-\frac{2}{x_n}, x_0>0.$$ How can you prove that this sequence is bounded or unbounded for those values of $x_0$ for which it is defined. With a number generator I noticed that all terms of the positive out of range $[-2,2]$  form finite sets in strictly decreasing order. We found that it can be periodically. For $x_0=\frac{2}{\sqrt{3}}$ its terms  repeat of 2 by 2.  I tried to prove boundedness to the method of reduction to absurdity but we did.   Thanks so much for any suggestion


Human who becomes immortal and builds planets

I wanted to re-read this but can't remember the title.  I read it 10-15 years ago but don't know if it was new at that time.  The plot centered on a human who had learned an alien technology that allowed him to build planets and be immortal.  Another planet creator tries to kill him.   (edit) I don't remember the cover or author.  It was at least novella length but I think it was a full stand alone novel.  More specifics on plot as follows (IIRC):  The story begins on a planet he created for himself as a luxury planet responsive to his every whim.  After recognizing an attempt on his life, he discharges a paid female companion and takes off in a private spaceship.    I recall that he was specifically human because it was a big deal that he had learned the technology as few or no other humans could master it.  Mastering the ability required attuning oneself to what the aliens considered gods but there was debate as to their actual makeup (i.e. sentient "gods", accessing universal archetypes, etc).    He travels to talk to either his teacher or else some other elder masters to figure out who is out to get him.  He then travels to a planet made by his enemy which turns out to be a planet sized personal trap.  If I remember correctly his enemy was attuned to either a lightning or storm type god or archetype.  It isn't the Farmer novel noted below that that was a very good suspicion based on the limited stuff I originally posted.


I was wondering what the mathematical distinction between  and  were in the context of quantum mechanics? Most texts use this paradigm interchangeably.


Find the value of $\lfloor x+y \rfloor$ where $x \in \mathbb{R}$, $y \in \mathbb{Z}$

I'm trying to understand properties of the greatest integer function and I am struggling to find the value of $\lfloor x+y \rfloor$  where $x \in \mathbb{R}$, $y \in \mathbb{Z}$, and prove that it is correct value.  I don't really know how to prove this, but I have been dividing it into different cases. I think that it equals $\lfloor x \rfloor + y$ when $x,y$ are both positive but not sure how to prove it. Depending on if one or both $x$ and $y$ are negative, and their ultimate sum, I get different values. I am having trouble determining when exactly this happens though and then proving the results. Any help would be great, thanks!


Implicit Function Theorem on a composition of functions

Let $f(x,y)$ be a $C^1$ function where $f(0,0)=0$. What conditions on f guarantee $f(f(x,y),y))=0$ can be solved for $y$ as a $C^1$ function of $x$ near $(0,0)$ Hello, I've been stuck on this problem for a bit and was wondering if anybody could help me out. I tried using the chain rule on the composed function to try and see when the implicit function theorem conditions will hold, but got stuck. Any help/hints are appreciated!


How can I make a pair of words stick together in line breaks? For example, "MS Access". I don't want a line break in the middle. But, I'd like to set this up once, not at  every occurrence of that word pair.  edit: Check out Sveinung's answer for two possible problems - overfull line, and hyphenation. For sure, I don't want that.


So i'm building an application wich is asking the language to the user. But when i run it I get a NullpointerException and I can't seem to find the mistake i hope you guys can help me out.  this is my starter class  package ui;  import domein.*; import java.util.Scanner;   public class Start {  private DomeinController domeincontroller; private Taal taal; private Speler speler;  public Start(DomeinController controller) {     this.domeincontroller = controller;     this.taal = taal;     String naam, kleur, keuzeTaal;     int geboortejaar, spelerAantal;      Scanner scan = new Scanner(System.in);      System.out.println("Geef de gewenste taal in (nl, fr, en): ");     keuzeTaal = scan.next();      taal.controlleerTaal(keuzeTaal);   }  }   And this is the class where i validate the language  package domein;  public class Taal { private String taal;  public String getTaal(){     return taal; }  public void setTaal(){     this.taal = taal; }  public void controlleerTaal(String taal){     if(taal == "nl" || taal == "fr" || taal == "en"){         taal = taal;     }else{         throw new IllegalArgumentException("Gelieve een juiste taal te kiezen");     }  } }   and this is the error i get  Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$156(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at ui.Start.<init>(Start.java:32) at main.StartUp.start(StartUp.java:27) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$163(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191) ... 1 more Exception running application main.StartUp Java Result: 1


How to make list of mathematics symbols in a book?

I want to make a list of mathematical symbols in a book. I know that using the command \index{}, we can make a list of symbols.  Is there any such easy way to make list of mathematical symbols?


Travel in the Schengen area after my residence card was lost or stolen

I have already booked my flight from Italy to the Netherlands through Ryanair. I'm staying in Italy legally and have a carta di soggiorno. However, after booking my flight, my wallet was stolen, which contains all my IDs except my passport. I filed a police report, and I'm trying to get a new residence card. However, I need to go to the Netherlands ASAP. Will Ryanair accept the police report and receipt of getting a new residence card from the post office?  UPDATE (17.07.2014)  Thanks for helping me out. BTW it's OK now. I went to our local CISL here in Florence, Italy, where they process your envelope for renewing your permesso di soggornio or carta di soggiorno (residence permit for foreigners) to be submitted to the post office. That's where you pay and get your postal receipt, and they make an appointment for you at the questura. Anyway, long story short, they processed a application for IMPROVISED residence permit which is good for 30 days to travel within the Schengen area, so all I have to do is go to the questura, bring my travel booking, the police report and copy of my passport. Now I can travel, and it's my first time to fly with Ryanair because I always use Transavia to go to Holland. =) Hope this helps for future persons who will have the same issue with lost or stolen residence permits...Just wish me luck that the questura will process my improvised residence permit immediately.


What exactly do quotation marks around the table name do?

I thought that the quotation mark (") was simply a type of grouping marker but I'm debugging some NHibernate code and notice that while  SELECT * FROM site WHERE site_id = 3;   Works fine  SELECT * FROM "site" WHERE site_id = 3;   fails with a table or view does not exist error.  What gives?


I am able to solve this sort of problem pretty easily.     An arm wrestler is the champion for a period of 75 hours. The arm   wrestler had at least one match an hour, but no more than 125 total   matches. Show that there is a period of consecutive hours during which   the arm wrestler had exactly 24 matches.   However this homework problem I can't seem to figure out.     Tyler has five weeks to prepare for his driver’s test. His mother   volunteers to ride with him for either 15 minutes or one half hour   every day until the test but not for more than 15 hours in all. Show   that during some period of consecutive days, Tyler and his mother will   drive for exactly 8.75 hours.   If I try doing it the same way as the first problem. I get $70$ pigeons and $95$ pigeon holes. I honestly don't know where to start with this problem. I thought that maybe I could assume that they only drove $.25$ hours on each day and prove that there is a period of consecutive days where they drove for exactly $8.75$ hours. Then I could say that we assume there is one day that they drove for $.5$ hours and work my way up, but I can't seem to get that to work either.


List files sorted by the number of lines they contain

How can I list the number of lines in the files in /group/book/four/word, sorted by the number of lines they contain?   ls -l command lists them down but does not sort them


Automatically deleting 'C:\Documents and Settings\user\Local Settings\Temp'

I'm trying to find a way to automatically clean/delete the temporary files from C:\Documents and Settings\user\Local Settings\Temp\ at shutdown/boot on my Windows XP Professional x64 SP2 machine.  The main reason for this is to clean Local Settings/Temp to remove old junk automatically. (I had thought I had this covered through Firefox settings, but I was only clearing temporary Internet files). Currently, there's around 3 GB of temporary files, and I'd like to prevent this build up without having to remember to do anything on my part.  I have already looked at using  (explained in Super User question ), but it doesn't seem to touch that directory.  I'm aware of programs such as , but I would ideally like to use a solution that doesn't require additional software (so, I expect, something using a scheduled BAT/CMD script would be what I'm looking for).  One of the potential issues, I believe, is that there may be legitimate files in the Temp folder that may be needed on the next boot (for software installations or updates, for example) and the perfect solution would be able to distinguish those and leave them until they weren't needed (Note: I realise this perfect solution may not be reasonably possible).  I've already set up Disk Cleaner on a shutdown script, but when cleaning temporary files, Disk Cleaner doesn't clean this particular directory, and so I'm looking for alternative options (see Super User question  for a little more detail).  So, what are my options for automatically deleting the temp files from C:\Documents and Settings\user\Local Settings\Temp?


I often see questions on Stack Exchange sites which I presume are written by non-native English speakers who use the word "doubt" in place of the word "question". Is this a case of misunderstanding the correct meaning or are people being taught that this is correct usage?


Examples proving why the tensor product does not distribute over direct products.

I recently read about the result that the tensor product distributes over direct sums. I was curious if it also distributes over direct products, but google tells me it doesn't.   What are some simple counterexamples to why this property isn't true? I know that there is a natural homomorphism  $$ \left(\prod M_i\right)\otimes N\to \prod (M_i\otimes N) $$ given by $(\prod m_i)\otimes n\mapsto \prod (m_i\otimes n)$ when $M$ and $N$ are modules over some commutative ring $R$. Are there standard examples where this homomorphism is not injective/surjective and hence not an isomorphism?


A Switch-Pitcher is pitching (Can pitch with the left or right arm).  A Switch-Batter is at the plate (Can bat from the left or right side).  In the MLB, who is forced to choose what side they are going to play from first (giving the other guy the advantage)?  And are they stuck on that side for the entire at-bat?


Why too many capacitors in parallel for Vdd supply net? Can't we just add all to replace with one big capacitor?

Here is a schematic of a Basys-2 board's power regulator IC and filters. It is just an example but this is fairly similar to many designs I've seen.  Why are there so many capacitors added in parallel rather than just one big capacitor? Can someone give me pros and cons of adding many many capacitors in parallel rather than one big capacitor for each supply net?


dear texperts:  does beamer have a "hook" that stops it from creating .snm, .out, and possibly .nav files?  I don't use the first two [they are all 0 bytes].  I know texshop can delete them and I can delete them by hand, but since I now have about 200 of these littered around, it would be nice to stick a "don't create" command into my beamer template.  /iaw


Alright, I have been doing the following (variable names have been changed):   FileInputStream fis = null; try {     fis = new FileInputStream(file);      ... process ...  } catch (IOException e) {     ... handle error ... } finally {     if (fis != null)         fis.close(); }    Recently, I started using FindBugs, which suggests that I am not properly closing streams.  I decide to see if there's anything that can be done with a finally{} block, and then I see, oh yeah, close() can throw IOException.  What are people supposed to do here?  The Java libraries throw too many checked exceptions.


Does cinnamon 2.0 really break your 13.10 desktop?

I was reading an article that warns not to use cinnamon 2.0 on ubuntu 13.10 or it will break. Is this true? This is the article.


Errors with template function within a class (C++)

I'm having some difficulties with a template function within a class I'm writing. I've boiled it down to a concise set of examples to make it easy to demonstrate (and this proves that I'm missing or screwing up a fundamental concept here).  Basically, if I define this function outside of the class, or if I set it up as a member function, it works perfectly. These two examples work:  As a member function...  // testing.hpp:  class testing { public:     template <typename T>     T getVal(std::string szKeyName, T TDefaultVal) {         return TDefaultVal;     } };  // main.cpp:  #include "testing.hpp" int main(int argc, const char * argv[]) {     testing x;     std::string st = x.getVal("ConfigKey", "ConfigVal");      std::cout << "Returned value is: " << st << std::endl;      return 0; }   Stand-alone...  template <typename T> T getVal(std::string szKeyName, T TDefaultVal) {     return TDefaultVal; }  int main(int argc, const char * argv[]) {     std::string st = getVal("ConfigKey", "ConfigVal");      std::cout << "Returned value is: " << st << std::endl;      return 0; }   However, if I separate declaration and implementation of the testing class, it does not work:  // testing.hpp  class testing { public:     template <typename T>     T getVal(std::string szKeyName, T TDefaultVal); };  // testing.cpp  #include "testing.hpp"  template <typename T> T testing::getVal(std::string szKeyName, T TDefaultVal) {     return TDefaultVal; }  // main.cpp  #include "testing.hpp"  int main(int argc, const char * argv[]) {     testing x;     std::string st = x.getVal("ConfigKey", "ConfigVal");      std::cout << "Returned value is: " << st << std::endl;      return 0; }   The above fails to compile with:     Undefined symbols for architecture x86_64:   "char const*   testing::getVal(std::__1::basic_string, std::__1::allocator >, char   const*)", referenced from:         _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see   invocation)   It's really frustrating because I feel like I really should be able to identify the problem, but after a fair bit of tinkering I can't, so I'm hoping someone can square me away here. It's worth noting that regardless of what type I use -- std::string, int, etc. -- I get the linker error. I've also tried calling the function with  std::string st = x.getVal<std::string>("ConfigKey", "ConfigVal");   but this did not help, either. Any help or clarification would be greatly appreciated.   Thank you.


Separate vs. joined words (hyphen or not)

English is not my native language, and sometimes it's confusing.. Especially uk-english vs. american and hyphens  Can someone explain a bit when to use which of these?  It's for a global english website  football team, footballteam, football-team movie fan, moviefan, movie-fan  "football-players/fans" vs. "football players/fans"   Thanks


Manage another user's credentials for network access

I have a Windows account that is used for running services (ie. it's not intended that any person should log in as that account). Turns out one of the services needs to access a remote network share that's on a machine in a different Windows domain, and so needs to supply remote credentials to get to that share.  Now if it was me needing to access the remote share, I would simply open Credential Manager, and save the required credentials.   But it's not me, and my understanding of credential manager is it only saves credentials to be used by the logged in user.  I can of course solve this problem. I temporarily elevate the privileges of the service account to allow interactive logins, then I login as that user and use credential manager to store the correct remote credentials. Then I remove the interactive login privileges.  But that feels very hacky and not the kind of thing I ought to be doing.  So my question is: Is there another way to save remote credentials for an account other than the one you're logged in as? Any better way to solve my problem.


How to retrive data on a internal harddisk that is partially broken

I recently experienced problems with my ubuntu 18.04 and no one couldn't actually help me out there       So I want to reinstall it but I want to copy my data on the hard disk to some other drive. The problem is that after successful login, I can only work on the system for almost 1 minute before which it will end up in a black screen full of errors    Please help me out in this


Which STL container can be used for quickly finding and erasing elements in it

I have a collection of unique ints which is always unsorted, something like   [1, 56, 78, 89, 887, 98, 100, 0, 23, 114, 900]   I would like to quickly remove an element from the container, say 887 and the result should be   [1, 56, 78, 89, 98, 100, 0, 23, 114, 900]   I am currently using a vector and using this code to erase the element.  container.erase(std::remove(container.begin(), container.end(), elem), container.end());   where elem holds the value to be removed. This works but I have do this operation a million times or more and hence I would like to see if I can use any other algorithm or container to remove elements faster.


Seeing apt-get changelogs for to-be-upgraded packages

describes how to get the changelog for a given package. However, it's the whole changelog.  What I'd like is a way to see what will be changed in whatever I'm about to upgrade. For example, I was imagining something like:  $ sudo apt-get upgrade --show-changelogs Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   foo     -- adds the bar feature for better snazziness     -- removes the deprecated baz feature  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 8,864 kB of archives. After this operation, 285 kB disk space will be freed. Do you want to continue [Y/n]?    Unfortunately, I don't see anything like that in the man pages for apt-get. Does this or something similar exist?  UPDATE: I've written a  talking about apt-listchanges and Debian changelogs in a little more depth that incorporates some of the feedback in this question.


How prevalent is this reversal of "yes" and "no"?

Example:     Aren't you going to the store?   Where I am from, the correct answer indicating I am going to the store is yes. The contraction "not" is ignored. Is this sort of confusion prevalent elsewhere?    I don't understand what is so complicated about my question here:   Is this sort of confusion prevalent elsewhere?  I am not asking for any of the answers provided here. They are all grand answers, but they have nothing to do with my question, which is is bold this time. I am not asking how to answer this sort of question. I am not asking what this sort of statement means. I am furthermore not asking for an opinion. If you don't understand how ignoring the adverb "not" is confusing, please don't answer. I am asking a very simple question; one desiring a very simple answer.  To reiterate, the confusion arises from the fact that the proper response of "yes" and "no" is reversed.


I am trying to find all the matches from a string using re in python.  my string is of the form   [Page] # asdf [/Page]  [Page] # Hello ## Woo [/Page]   and I want to find all the contents within the page tags. So currently I have tried -   page = re.compile(           r'^\[Page\]'           r'([\S\s]*)'           r'\[\/Page\]'           , re.IGNORECASE       )   But doing re.match using this expression matches the first [Page] and the last [/Page]. However I need all such occurrences. Eg.  m = re.match(page, my_string) m.group(1)  # asdf [/Page] [Page] # Hello ## Woo   I need to match all the Page tags.


I know that often oxidation processes are mentioned when referring to the color change from yellow to brown in bananas (specifically: those that you get everywhere in supermarkets, with no seeds).  However, I am really interested if there is a specific oxidative pathway that is generally followed in this process, and whether it has been examined.


Can I play Minecraft on a USB flash drive?

I've got a 4 GB SanDisk Cruzer here with practically nothing on it, and I'm about to go house-sit for a friend with a computer but no internet. It sure would be nice to play Minecraft while he's away, but I'd just as soon not muck around in his Documents and Settings\Application Files folders.   Is it possible to have Minecraft and my world on the flash drive itself such that I can play it directly from the drive, rather than installing to each computer I bring it to?


What is a good asymptotic for $f_n = f_{n-1}+\ln(f_{n-1})$?

Let $f_0=2$ and $f_n=f_{n-1}+\ln(f_{n-1})$. What is a good asymptotic to the sequence $f_n$? With good I mean much better than $f_n \sim \dfrac{3n \ln(2)\ln(n)}{2}$.


Density can be transferred by a homeomorphism?

Let $(X,T_1),\,(Y,T_2)$ be topological spaces and $H$ be a homeomorphism from $X \to Y$. If $C$ is a dense subset of $X$, is $H(C)$ necessarily dense in the $Y$?  I thank you in advance.


Unable to open a folder with space in cmd

I'm unable to open a folder in cmd. The folder name has a space  The script that I'm working on is  start D:\My Data   which does not work. However start D:\MyData seems to work  but I need the space in the folder name...  start "D:\My Data" just opens another cmd window:


Why do I need to quote variable for if, but not for echo?

I've read that you need double quotes for expanding variables, e.g.  if [ -n "$test" ]; then echo '$test ok'; else echo '$test null'; fi   will work as expected, while  if [ -n $test ]; then echo '$test ok'; else echo '$test null'; fi   will always say $test ok even if $test is null.  but then why don't we need quotes in echo $test?


How to remove an item from JavaScript object

I have the following JavaScript structure:  obj = [    {       "patient_category_id":1,       "patient_category_alias":"He",       "patient_category_name":"Hello",       "translate_id":null,       "active":1    },    {       "patient_category_id":2,       "patient_category_alias":"Hi",       "patient_category_name":"Hilo",       "translate_id":null,       "active":1    }];   I want to remove translate_id and active, then insert created, like this:  obj = [    {       "patient_category_id":1,       "patient_category_alias":"He",       "patient_category_name":"Hello",       "created": 'xxxx'    },    {       "patient_category_id":2,       "patient_category_alias":"Hi",       "patient_category_name":"Hilo",       "created": 'xxxx'    }];


AES key schedule. Does it use a KDF to generate the round keys?

So for each round in AES a different key is used, and as I saw the keys are created form a master key.  My question is how these round keys are generated.   Are they created via a Key Derivation Function as the session keys, or its something else ?


I know "Matrix" is usually defined as any array of numbers or other mathematical objects arranged in rows and columns. But the problem is that seems not really like a rigorous mathematical definition. Cause some notions used in the definition like "Array" or "Arrangement" are ambiguous. I mean Matrix is an important concept which we use it to define other things like operators, vectors, tensors, etc, but Matrix itself is not well defined.  Can we define Matrix in terms of more fundamental notions like sets, n-tuples, maps, functions, etc? Or should we take it as a primitive notion?  Thank you in advance.


How to force MS SharePoint URLs to open in Safari when Chrome is set as default browser?

I like using Chrome on Mac and it is my default browser.  However, Microsoft SharePoint and Chrome don't work well together.    I am wondering if there is a place where I can specify domains to auto open in Safari? Or better yet, have an option on right click menu of URLs to open in Safari?  Any ideas how to achieve this?


Determine the exact value of equations involving more two trig variables

$2\cos^2x=1+\sin x$.  Determine the exact values of $x$ such that $0 \leq x \leq 2\pi$.    I am experiencing problems with factoring this question.  First I started by getting everything on to the left side so: $2\cos^2x-\sin x-1=0$.  Then seeing as there are two trig variable here ($\cos$ and $\sin$), I used the pythagorean identity and replaced $2\cos^2x$ with $1-2\sin^2x$ to make it into a one variable question: $1-1-2\sin^2x-\sin x-1=0$.   By collecting like terms it then becomes $-\sin^2x-\sin x=0$.  Now you could factor these with $0$ and $-1$, but then it creates uneven brackets so this musn't work.  I don't think the quadratic formula is necessary, but I am wondering if this could be treated as a difference of squares question.    If you replace the $\sin x$ and make the question into $-x^2-x=0$ it is a little easier to look at, however I am not sure if this is the right approach.  If someone could please clarify my answer, that would be appreciated!


how to sort from lowest to largest in matlab

i have this number array   A= [1  2   3   4 1   2   3   1 3   1   1   2 1   2   1   1 2   1   0   6 1   2   1   0]   i want to sort the 4th column from smallest to largest, and the corresponding rows will followed in their new position, something like this:  A =[1   2   1   0 1   2   3   1 1   2   1   1 3   1   1   2 1   2   3   4 2   1   0   6]   so the last row, become on the top because zero in the 4th column is the smallest number in 4th column, so how i will do that? thanks


I'm reading The Art of Electronics(3rd), and I'm just stuck with exercise 1.19. Here is the question:     Explain why L∝n² for an inductor consisting of a coil of n turns of   wire, maintaining fixed diameter and length as n is varied.   I'm not expecting a long complete mathematical explaination, because the book only gives me a little information, claiming that that should be enough.  My idea: I∝1/n(because practically a wire does have some resistance), and V∝n. As a result, L=V/I∝n². But I also notice that an ideal wire shouldn't have any resistance. So I'm confused now…


Blank Page and "Missing \begin{document}" error in simple document

Im new with LaTeX, I have MikTek and TeXnic Center. The first time I tried to write a document I noticed I couldn't cancel terms in mathematical equations, so iI download the cancel package and installed it by hand.   Now the new package is working (or at least that is what I think), but for example the following simple document generates a Missing \begin{document} error and a first blank page:  \documentclass{article}  \usepackage[spanish,activeacute]{babel} \usepackage{amsmath} \usepackage{cancel}  \title{...} \author{...}  \begin{document}  \maketitle  \begin{equation} \cancel{a} \end{equation}  \end{document}   I cant copy all the build output from the TexnicCenter output window, but here you can see some part of it    Why is this?


I have an install script that creates a user:  sudo useradd -c "My test user" -G users -m -p "passw0rd$" -K PASS_MAX_DAYS=-1 -s /bin/bash myuser   However when I try to log in via ssh I get the following error:  myuser@myserver's password: Permission denied, please try again.   But when I login as root and update the password to the same one specified in the original command:  passwd passw0rd$   I am then able to log in without any problem. What could be causing this problem?


Today PHP claims that 30.26 - 30.26 = -3.5527136788005E-15  My calculator (and common sense) says that it should equal 0. Both numbers being used in the calculation were taken from a MySQL database, data type is varchar(255). Taking this into account with floatval() doesn't seem to do the trick. Anybody know what's going on here?  /*  this is what the table looks like... __________________________________________ |uid    |AccountNumber|    Total|    Paid| __________________________________________ |51     |3255         |    30.26|   30.26| __________________________________________ */  $q = "SELECT Total, Paid FROM Account WHERE AccountNumber='3255';"; $r = mysqli_query($db, $q); $vars = mysqli_fetch_array($r);  $balance = floatval($vars['Total']) - floatval($vars['Paid']); echo $balance;   OUTPUT  -3.552713678805E-15


If the market always goes up then why doesn't everybody invest and become rich?

I'm new to investing and I've heard investors saying that the market always goes up, so in the long term, everybody is going to win. Is it true, if so then why doesn't everybody invest and get rich?


I have been trying to prove (the left half of) the following inequality:  $$ \underbrace{\sum_i \sum_j |x_i| \le \sum_i \sum_j |x_i + x_j|}_\textrm{?} \le 2 \sum_i \sum_j |x_i|$$  (All $x_i$s are arbitrary reals and sums are over $1, 2, \dots, n$)  The right half follows by a simple application of the triangle inequality, but the left half isn't as simple.  I tried induction, and I could reduce the above problem to proving the following statement:  $$ \sum_i |x_i + x_{n+1}| + \sum_{i=1}^{n+1} |x_i + x_{n+1}| \ge \sum_{i=1}^{n+1} |x_i| + n|x_{n+1}|$$ or more simply (replacing $x_{n+1}$ by $y$), $$ 2\sum_i |x_i + y| \ge \sum_i |x_i| + (n-1)|y|$$  However, I don't know if the above "reduction" is any simpler than the original problem itself!  Can I continue the above line of thought, or is there an easier way to solve this problem? Any help is appreciated! :)


With Windows 7 it was possible to change the fonts used by Windows for title bar, menus, popups, etc.  This way I could get rid of "anti-aliased" fonts such as Segoe UI that are blurry and use "aliased" fonts such as Tahoma that are sharper and much more readable for me. That, and disabling ClearType give me the right fonts display configuration.  I cannot find this fonts configuration dialog in Windows 10 so far.  Where can I find this dialog for Windows 10? (sorry about the French snapshot)


Redheaded scout educates backwater isolated planet of humans on how to use paperwork to avoid exploitation

I recall reading a short story, novella, or novel of a crash-landed (?) redheaded scout who educates a backwater isolated planet of humans on how to use paperwork to avoid exploitation by an expanding human empire.  When empire finally came, his redheaded descendants use fees, fines, documentation, paperwork, and procedural methodology to protect the planet and its people from those who would exploit the "ignorant savages."  What is the name of this story/novel?


I'd like to control a few input pins (say 5) and a few output pins (at least 2) from a computer. The computer has no parallel port. What is the best way to do this? USB-to-parallel adapter (anybody have one to recommend which works on Linux)? Or perhaps there is some other general purpose USB "control board" where I can use read input from some pins and write output to others? I don't even know what to google for, so any pointers are appreciated!


Getting a NullPointException, not sure why - Attempting to scan a file and write a String array

Not sure why this is getting a NullPointerException.  According to error log, NullPointerException is thrown while executing this statement.  "file[i] = loadSaveFile.nextLine()" towards the end of the script.  public class SaveGame { static String[] file; static String loadSaveFile; static String gameDir; static int numLines = 0;  public static void main(String[] args) throws FileNotFoundException {     File saveFile = new File(gameDir + "\\savefile.txt");     Scanner loadSaveFile = new Scanner(saveFile);     Scanner findNumLines = new Scanner(saveFile);     while(findNumLines.hasNext() != false){         findNumLines.nextLine();         numLines++;     }     for (int i = 0; i < numLines; i++) {         file[i] = loadSaveFile.nextLine();         if(loadSaveFile.hasNextLine() == false){             break;         }     } } }


What happens when the source of light and distance between the slits is changed in Young's Double slit experiment

What happens when the distance between the slit and the source of light is changed in Young's Double slit experiment.


I'm looking for explanation on  but unfortunately there's no Wikipedia entry or self-contained paper to start from. The statement of this effect is that:     "At leading order, multiple scattering only affect the momentum   distribution of the final particles, but not their total number. The   suppression at small p is compensated by an increase at larger p."   Can someone please explain why? I'm looking for a calculation based answer and not just qualitative discussion.


Forward Cognito Forms responses to my email address

How can I setup Cognito Forms to forward or send entries to my email address?


How would I go about calculating $$\lim_{n\to\infty}\frac{\left(1 + \frac11\right)^1 + \left(1 + \frac12\right)^2 + \left(1 + \frac13\right)^3 + \cdots + \left(1 + \frac1n\right)^n}n$$ and $$\lim_{n\to\infty} \frac n{\left(1 + \frac11\right)^1 + \left(1 + \frac12\right)^2 + \left(1 + \frac13\right)^3 + \cdots + \left(1 + \frac1n\right)^n}$$  These limits have to do with $e$ but I don't know how to begin with them. Thanks for any help.


How to hibernate the Mac after sleep after a set time?

I have these settings on my MacBook with Catalina:  System-wide power settings:  Currently in use:  standbydelaylow      10800  standby              1  womp                 1  halfdim              1  hibernatefile        /var/vm/sleepimage  proximitywake        1  powernap             1  gpuswitch            2  networkoversleep     0  disksleep            10  standbydelayhigh     86400  sleep                5  hibernatemode        3  ttyskeepawake        1  displaysleep         5  tcpkeepalive         1  highstandbythreshold 50  acwake               0  lidwake              1   and what I want to achieve is to enter hibernation after an amount of time of "sleep" (after sleeping for 15 minutes for example), like some Linux distro do. I'm new to macOS and what I know is that hibernatemode 3 means      The system will wake from memory, unless a power loss forces it to restore from hibernate image.   but I  think I need to leave hibernatemode 3 and change standbydelaylow and standbydelayhigh values. Am i correct? These settings are for ac and battery mode or I need to change for these different states? And closing the lid the MacBook goes to sleep immediately?


Prove that n choose k is even for 0<k<n if and only if n is a power of 2

Prove that $\binom{n} k$ is even for all $k$ between $1$ and $n-1$, if and only if $n$ is a power of $2$.  I have tried strong induction on Pascal's triangle but I've got nowhere. I think that there is a generating function approach to this question that I'd like to find.


I'm trying to write a code that returns a new array which swaps every pair of elements. If there is an odd number of elements, the last element remains the same.   Currently what I have is this which doesn't seem to be working at all. I keep returning a nullpointerexception error when trying to test it   public static String[] pairSwap(String[] inputArray) {     String[] outputArray = new String[inputArray.length];     for (int i = 0; i < inputArray.length; i += 2) {          inputArray[i] = outputArray[i + 1];         inputArray[i + 1] = outputArray[i];          if (inputArray.length % 2 != 0) {             inputArray[inputArray.length] = outputArray[inputArray.length];         }     }     return outputArray; }


Awesome-CV tempplate giving an error while running

I am new to Latex. I really like the awesome CV template and would like to use it. However I am not able to make it work. I am running it using the XELatex. I am getting the following error and I am not able to solve it. I would appreciate if anyone could help me to solve this. Thanks in advance, Jon


Why, exceptionally, for joint normal random variables does it hold true that $0$ covariance between their components is equivalent to independence?

For any generic random variables $X$ and $Y$, we know that $$X\perp \!\!\! \perp Y \implies \text{Cov}(X,Y)=0\tag{1}$$ but not viceversa.  Now, let us consider two random variables $X$, $Y$, whose joint distribution $(X, Y)$ is normal. Why in this case does it hold true that: $$ X \perp \!\!\! \perp Y \iff \text{Cov}(X,Y)=0\tag{2}$$?  Could you please explicit your reasoning, specifying why normal joint distribution of $X$ and $Y$ is essential for $(2)$ to hold?


How to return an Array's "name" as a String

$myAry = array();  // I want to return the array's name.  // something like echo $myAry.name;  // Should print "$myAry".   Thanks,


Let $f$ be an analytic function on a disc $D$ whose center is the point $z_0$.  Assume that $|f'(z)-f'(z_0 )|<|f'(z_0)| $ on D.  Prove that $f$ is one-to-one on D.


My Laptop randomly goes to sleep while working maybe because of malfucntioning lid sensor. How to solve it?

My laptop sleeps randomly sometimes while working on it. I observed it is due to pressure of my palm over the palm rest. I've googled about that and found about lid sensor are involved in sleep mechanism when we close lid and now i am sure it's due to the same sensor(faulty) that this problem is happening. My laptop is Dell Inspiron 15 3000 Series 3567 I am unable to find about my Lid Sensor in book manual of the Laptop. Can anyone help me how to disable that switch entirely or where is the location of that switch. I've disabled the setting of sleep on closing lid. But that seem not to help me much. Problem occurance frequency has reduced but problem is still there. Now it takes less time like moments of second to turn back on from sleep unlike earlier. PS: I dont have virus on my pc so rule that possibility out.


One-dimensional vector space and it's subspaces

Consider a vector space $V$ , show that: "$dimV=1\Leftrightarrow V$  has exactly two subspaces". Well I can understand that since $dimV=1$ the only subspaces are the zero and it self, but how can i prove that? How can I prove the equivalence? Thanks in advance.


Get posts sharing taxonomy term with current post's

I have a post and I want to get a loop with a list of all other pages, which are in the same taxonomy/taxonomy-categorie. Right now, I'm only able to insert the taxonomy name by myself. I think it should be the same way like asking for the current post type.  Here is my array:   $post_type = get_post_type( $post->ID ); $args = array( 'post_type' => $post_type, 'posts_per_page' => -1, 'taxonomy' => 'taxonomy category',);    Thank you!


I am trying to deploy around 80 Components which include Apex Class,Trigger and Visualforce Pages. But it is failing due to below exception,     MyTrigger: execution of BeforeInsert caused by: System.QueryException: Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch Trigg...   All test classes are run as a part of deployement process hence few of the test classes are making this trigger fire causing error. As its a change set deployment error, could not get the complete error statement. Also my trigger includes below code.  if(trigger.isBefore & trigger.isInsert) {         for(AggregateResult ar : [select ABC__c, Name, max(Revision__c) maxRev from XYZ__c                                      where ABC__c in :oppMap.keySet()                                     group by ABC__c, Name order by ABC__c, Name]) {             decimal maxRev = Integer.valueOf(ar.get('maxRev'));             string oppAppKey = String.valueOf(ar.get('ABC__c')) + String.valueOf(ar.get('Name'));             lrMap.put(oppAppKey, maxRev);         }     }   Let me know how to fix this. Should i try using limit or is there any other solution?


In my whole problem, I was stuck in one direction, which is to show (i) implies (ii).  (i) Every Cauchy sequence in $\mathbb{R}$ converges to a limit in $\mathbb{R}$. (ii) Every monotone and bounded sequence in $\mathbb{R}$ converges to a limit in $\mathbb{R}$.  Explaining in english, my idea is: Cauhcy is a bounded sequence. Given that (i) is true, i.e: this bounded cauchy sequence is convergent. Then, since not every bounded sequence is convergent, it requires some conditions so that it is convergent. One of a condition is "monotone". So, I try to use this to show (i) implies (ii). But my TA think "this is saying nothing". If I would like to use some maths to explain, like $\epsilon$, a sequence $\{x_n\}$ etc.... How could I use it??


Firefox throws 'invalid identity escape in regular expression' when using Perl tokens with 'u' flag

/\p{Z}/u.test(' ') works on Chrome 71.0.3578.98 and returns true, but on Firefox 65.0 it throws the error: SyntaxError: invalid identity escape in regular expression  Is this a problem with ES implementation in Firefox, or I am using the regex wrong, and Chrome is just being nice and interprets that in the desired way?


After updates, some text is not rendering.  I think it is in the form of binary. Here's a  of the issue in GIMP.


Does Java Graphics (Graphics2D) uses graphics card?

does java Graphics or Graphics2D class uses graphics card? I am trying to draw a ton of things inside paintComponent() method in my JPanel, and I'm scared that it might take longer than it should.


Given an arbitrary infinite set $S$, how to construct an injection $\mathbb{N} \to S$ with the Axiom of Choice?

Let $S$ be an arbitrary infinite set. As a part of our homework, I have the following question: Question: How can I construct an injection $\mathbb{N} \to S$? Intuitively, I understand that such an injection should exist but describing it explicitly is probably not possible. Therefore, I think we need to use the Axiom of Choice: If $X$ is a set of non-empty sets, then there exists a choice function $F$ on $X$, i.e. a function on $X$ such that for all $M \in X$, we have $F(M) \in M$. Our class was given the following hint: Construct a family of $A_n \subseteq S$ with $|A_n| = 2^n$ for all $n \in \mathbb{N}$. Next, construct a family $B_n \subseteq S$ of non-empty and pairwise disjoint subsets. However, I do not really know what to do with this hint. Maybe the condition $|A_n| = 2^n$ indicates that we should use the power set of some set with $n$ elements but that is just a vague idea. I would really appreciate it if you could help me advancing with this problem.


Is there a way to orient an object to my view?

I am wondering if there is a way to orient an object to my viewing rotation? I have a slope that I want to place things on, this slope was made by hand so I don't know the exact X and Z rotation. I can make my view look at it from the top down with shift + 7, is there a way to make my selected object take this same rotation? the rotation on the sloped object isn't applied yet, does that make a difference?


How to make this code non-case sensitive?

I'm new to programming and so I'm trying out some stuff to see if I actually understood. I was able to make this "program" non-case sensitive, but really poorly (since I had to make 3 variables for the same answer, just to make it non-case sensitive). How can I make this code better?  fav_color = "Red" fav_color2 = "RED" fav_color3 = "red" guess_count = 0 guess_limit = 3  while guess_count < guess_limit:     x = input("What's Carlos' favorite color? ")     guess_count += 1      if x == fav_color:         print("You win!")         break     if x == fav_color2:         print("You win!")         break     if x == fav_color3:         print("You win!")         break


Usually when we consider the pressure exerted by gas, there is nothing to do with the weight of the gas. On the contrary the atmospheric pressure is defined as the weight of the gasses. What is the difference here?


"One of the children who was" vs. "one of the children who were"

In the construction "one of the [plural noun] who ...", should the verb agree with "one" or "[plural noun]"?   For example, which of the two following sentences is grammatically correct? Or are both acceptable?        She was one of the several children who was sold at the auction    She was one of the several children who were sold at the auction.


How does Warlock Spell slot level interact with the feat Metamagic Adept from Tasha's Cauldron of Everything?

I have a warlock tiefling for which I am considering to choose the feat Metamagic Adept from Tasha's Cauldron of Everything. This will get me 2 sorcery points to spend.  Looking at the sorcery point system, I believe I could spend these 2 sorcery points to regain one 1st-level spell slot, since a warlock only has a few of these. I imagine this would be helpful. However this is not stated in the feat specifically, only to use two Metamagic options. Is there a source that mentions something about the feat that one could exchange the 2 sorcery points into spell slots as well? Or would someone rule it as possible?  If I understand correctly, as a warlock I could only cast spells at a certain level. The reason I am asking is related to the question above. If I am returning 2 sorcery points and get a 1st-level spell slot back. That would be great at lower levels I think. Since a warlock as of 3rd level could only cast spells from level 2, a warlock starting from level 5 casting level 3 spells, etc. Meaning I (most likely) wouldn't prepare a 1st level spell at higher levels. Could I exchange 2 sorcery points for a 1st level spell, but then cast it at a higher level spell since I am a warlock, or is that the reason why the answer to question 1 would be no?   Below the information on sorcery points (Flexible Casting) and the Metamagic Adept feat. Metamagic Adept feat:  You’ve learned how to exert your will on your spells to alter how they function. You gain the following benefits:  You learn two Metamagic options of your choice from the sorcerer class. You can use only one Metamagic option on a spell when you cast it, unless the option says otherwise. Whenever you gain a level, you can replace one of your Metamagic options with another one from the sorcerer class. You gain 2 sorcery points to spend on Metamagic (these points are added to any sorcery points you have from another source but can be used only on Metamagic). You regain all spent sorcery points when you finish a long rest.   Flexible Casting:  You can use your sorcery points to gain additional Spell Slots, or sacrifice Spell Slots to gain additional sorcery points. Creating Spell Slots. You can transform unexpended sorcery points into one spell slot as a Bonus Action on Your Turn. The created Spell Slots Vanish at the end of a Long Rest. The Creating Spell Slots table shows the cost of Creating a Spell slot of a given level. You can create Spell Slots no higher in level than 5th. Any spell slot you create with this feature vanishes when you finish a Long Rest.


Creating index layer for multiple maps in ArcGIS Desktop?

I am trying to create an index layer of just the area within the Orange lines. I am having difficulty creating this layer due to it not being a simple box area.   The goal is to create a index layer, with grids, so that the Data Driven Pages would be used to generate it as a mapbook for the response area for my firehouse.   Below is an image of what I am speaking about.   Any ideas?   I am using ArcGIS Desktop.


501 distinct coprime integers between 1 and 1000?

This is exercise 1.6.1 of   Suppose that 501 distinct integers are selected from 1 . . . 1000. Show that there are distinct selected integers $a$ and $b$ such that $a | b$. Show that this is not always true if 500 integers are selected.  This seems like it should be simple but it's has been stumping me for a few days.  Here's my idea for a proof:  Let $S$ be a set of 500 distinct integers between 1 and 1000 that don't divide each other. Let $S_{1-500}$ and $S_{501-1000}$ partition $S$ into sets containing the elements ≤ and > than 500, respectively. Then consider $2 S_{1-500}$ and $\frac{1}{2}S_{501-1000}$, the result of multiplying the elements of these sets by 2 and 1/2, respectively. Because elements of S are coprime, $S_{1-500}$, $S_{501-1000}$, $2 S_{1-500}$, and $\frac{1}{2}S_{501-1000}$, are disjoint. Also note that each of these sets is a subset of the integers from 1 to 1000. One can deduce that the cardinality of the union of these sets is 1000, and therefore they form a partition of the integers from 1 to 1000.  Now, I know this demonstrates that you can't add another number to $S$ that is coprime with all the elements in $S$, which means that a coprime subset of the integers from 1 to 1000 can have at most 500 elements. Can someone articulate why this is true for me? Also, this was in a section on the Pigeonhole principle, can someone rework the proof to utilize that, and possibly make it simpler? Thanks.


How can I reduce the delay before window previews are shown in the Windows 7 taskbar?

I really love the preview feature of the Windows 7 taskbar. There's only one reason I don't use it more often -- it takes a relatively long time to display the actual window.  There is a registry trick () to reduce the delay used by general menus, and make the submenus open instantly when hovered upon. I'm wondering if there's a similar trick that can be used for the Windows 7 taskbar's previewing.


Where should I place local executables on macOS?

I often write system-wide scripts and I wonder where to place my executables on macOS. On many Linux system, /usr/local/bin (also /usr/local/sbin) is usually empty and I place my executables in there. But on macOS, /usr/local/bin has already contained a lot of executables provided by such as . I understand /usr/local/bin is the most proper directory to place executables locally installed and similar questions also are answered /usr/local/bin, but I feel hesitant to contaminate by mixing my executables. Is it good manner to place my executables in /usr/local/bin in spite of many other executables existing? In other way, I am wondering where is the second best directory to place my executables. I think /opt/bin is the second best at the moment because /opt/bin seems to proper directory to place my executables by its purpose and /opt/bin does not exist by default on macOS (empty assured). Is there any idea or advice about my wondering? similar questions (answered /usr/local/bin is best):


Currently, when someone suggests an edit, they are unable to keep track of it without watching reputation levels or constantly refreshing the page. What I would like is a notification, that shows up like the notification where someone has edited your question, that shows whether a suggested edit has been approved or rejected after the last vote is cast. This way, the community can be notified when their edit has been rejected/approved, while focusing their efforts on another question/answer.


I'm trying to figure out how to boot from my SSD.  I installed a new SSD and cloned my hard drive to it. The SSD is showing up in my drives list.  In the boot menu I have the 5 options:  P0 : dvdram IBA get slot P4: WDC WD10 P5: Samsung SSD UEFI: WDC WD10    Of these only the last works. Even the P4 option doesn't work. As a result I am not able to boot from my SSD. I think I need to have my SSD with UEFI before it can boot, but am just not able to get that.


I am trying to understand the derivation of the stars and bars formula. I understand how a problem can be converted to the stars and bars format, but I am confused about how the problem of choosing all the different ways to put k stars in n sections can be written as ${n+k-1 \choose k}$. Generally "n choose k" is for counting the number of combinations of k objects we can get given n distinct objects right? That I understand since we're doing permutation divided by the number of orderings for each group since order doesn't matter. I need help figuring out how stars and bars fits into this.


I use String.Compare like below sample  static void Main(string[] args)     {         int result = String.Compare("A", "a");         Console.Write(result);         Console.ReadKey();     }   but , when run the program , result is 1 . but i except result will be -1 . i use vs 2013 .


How do I customize the date/time display in GNOME Shell's top bar?

Time indicator is shown as "%a %H:%M" in the center of the top bar.  How do I move it back to the right where it belongs, and make it include the full date and time ("%Y-%m-%d %s %H:%M")?


X,Y are independent standard normal distributed then what is the distribution of $\frac{X}{X+Y}$

X, Y are independent standard normal random variables, what is the distribution of $$ \frac{X}{X+Y} $$  Could anyone help me with this? Thanks.    I have worked the problem by multivariable transformation:  Let $$Z=\frac{X}{X+Y} , W=X$$  Consider transformation $$(X,Y)\longrightarrow(Z,W)$$  Then $$X(Z,W)=W , Y(Z,W)=\frac{W(1-Z)}{Z}$$  defines the inverse transformation.  The Jacobian is $$J(Z,W)=\frac{w}{z^{2}} $$  So $$f_{Z,W}(z,w)=f_{X,Y}(w,\frac{w(1-z)}{z})\cdot\mid\frac{w}{z^{2}}\mid$$  As X  and Y  are independent. Then the marginal pdf of Z  is $$f_{Z}(z)=\intop_{0}^{\infty}\frac{w}{z^{2}}\cdot f_{X}(w)\cdot f_{Y}(\frac{w(1-z)}{z})dw+\intop_{-\infty}^{0}-\frac{w}{z^{2}}\cdot f_{X}(w)\cdot f_{Y}(\frac{w(1-z)}{z})dw$$  After calculation we get $$f_{Z}(z)=\frac{1}{\pi\cdot\frac{1}{2}\cdot(1+(\frac{z-\frac{1}{2}}{\frac{1}{2}})^{2})}$$  Hence $$Z\sim \mathrm{Cauchy}(\frac{1}{2},\frac{1}{2}).$$


I am wrapping up the first year of my Master's degree at an R1 university (social sciences program). I really want to apply for my PhD, but I am concerned that my master's GPA is prohibitively low. I am ending the first year with a 3.6 (primarily due to text anxiety, which was new to me this year). I love learning and feel that I've gained a lot from my classes, but it's not reflected in my test scores.   My undergraduate GPA was a 3.9 I do not yet have publications, but I've joined multiple labs and connected with professors who know my research interests and motivations.   Will my GPA be too low for admission into a PhD program? I will be completing my thesis next year. At this point, I think I've gained a good perspective on how I need to approach my studies in grad school, and I've developed strategies to improve my academics in my last year. Can anyone recommend strategies to help me improve?  Thanks!


Show that the sequence $a_n=\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+...+\frac{1}{n}$ is rising and is unbounded.

We have a sequence:  $$a_n=\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+...+\frac{1}{n}$$  We need to show that it is rising and above unbounded.  So I did the following:  $$a_{n+1}=a_n+\frac{1}{n} $$  $$a_{n+1}>a_n $$  $$a_n+\frac{1}{n}>a_n $$  $$\frac{1}{n}>0$$  $$n>0$$   Which holds.   First question: Is the upper proof enough to satisfy that the sequence is rising  As far as I understand, I need to also now show that supremum doesn't exist.  So I have done the following:  $$ \sup{a_n}=\lim{a_n} = M $$  $$M>0$$  $$M>a_n$$ for every $n$  $$a_n+\frac{1}{n}<M$$  $$1<(M-a_n)n $$  Because $M>a_n$ we can divide without sign direction change  So we get:  $$\frac{1}{M-a_n}<n$$  Which I think isn't the end of the proof. I do not know how to continue.


Apparently if I want to format a date to my own format ie. 1 June 2016 10:44 am I can only do this with outputText but output text does not respect the users time zone so everything is GMT. If I use outputField it automatically converts it to the users time zone but I have no control over the format it displays it in. Does someone know how to get my custom format to display in the users time zone? I don't care which I use I just want to show it my way in the proper time zone  This respects users time zone but I cannot control formatting  <apex:outputField value="{!c.CreatedDate}"/>   or This does not respect users time zone but I can control formatting   <apex:outputText value="{0,date,dd MMM YYYY h:mm a}">   <apex:param value="{c.CreatedDate}"/> </apex:outputText>   This method is called from the controller when page is called and populates the variable csComments with records  public void ShowComments() {   disp = true;   RetrieveAcctInfo();   caseNo = System.currentPagereference().getParameters().get('cn');   System.debug('Case No: ' + caseNo);   cd = [select id, AccountId, Priority from Case where CaseNumber=:caseNo];   if (acctid != cd.AccountId) { disp = false; errMsg = 'Access Restricted'; }    else {     csComments = [select Comment__c, CreatedDate from CSPComments__c where CaseCom__c=:cd.id ORDER BY CreatedDate DESC];     ccCount = csComments.size();   }   initpri = new List<SelectOption>();     initpri.add(new SelectOption('None',' -- Select Priority --', true));   initpri.add(new SelectOption('Level 1','1 - System Down'));   initpri.add(new SelectOption('Level 2','2 - Funtioning with Errors'));   initpri.add(new SelectOption('Level 3','3 - System Issue'));   initpri.add(new SelectOption('Level 4','4 - Non Critical Issue'));   inpri = cd.Priority;   curpri = inpri; }   This is the part of the page that is showing the results. The manager wants my date to be in the approved style of 1 June 2016 11:26 am    <apex:pageBlock id="cl" rendered="{!disp}">

Date/Time	Comment
       <apex:repeat value="{!csComments}" var="c">
                                       <apex:outputField value="{!c.CreatedDate}" />             	           <textarea class="dtarea" rows="4" cols="60" disabled="true">{!c.Comment__c}</textarea>
     </apex:repeat>
     </apex:pageBlock>


Conservation of energy (or lack thereof) in Doppler cooling

I did not find my question answered elsewhere, so here it is.  I'm doing a project in my first optics course, and we are reading a bit about Doppler cooling. I understand that a laser is tuned to a frequency where the photon energy $E_p = h \nu$ corresponds to an energy slightly below the energy $E_{abs}$ required to excite the gas atoms, and that an atom moving towards the laser at a high speed (relative to rest of the gas) will experience a blueshift that allows the atom to absorb the photon, thus slowing down the atom.  I also understand that the photon is re-emitted in a random direction, which of course means that the atom's velocity in the direction of the laser will be decreased. What I'm not sure I understand is how the re-emission of the photon doesn't just bring the atom back to the same kinetic energy (but with a different direction of motion).  I have not been able to find a source explaining this, but here's my own attempt at an explanation (which I am not sure is correct, which is why I am asking here): The absorbed photon has an energy (in the frame of the laboratory) of $E_1 = h \nu_1$ which is slightly less than the absorption energy $E_{abs}$. But after the absorption the atom's speed is reduced, thus the photon will be emitted with a different frequency $\nu_2$ (in the frame of the laboratory). Since the speed of the atom (relative to the frame of the laboratory) has been reduced by the absorption, the energy $E_2$ of the emitted photon will be closer to $E_{abs}$, thus $|E_{abs} - E_2| > |E_{abs} - E_1|$ (the last step of the explanation only works if the atom's speed perpendicular to the laser is not greater than the speed parallel to the laser for most atoms, but since the laser is tuned to only hit the fast moving atoms, this seems improbable enough to not invalidate the explanation).  Is this explanation correct or have I made mistake? I have taken a special relativity course but no quantum mechanics yet, so please keep the quantum mechanics to a minimum if possible.


Ubuntu Software doesn't open even after the fix release

I know there are couple of questions for this asked here but all of them lead me to this . The page says the problem is fixed and the fix is released. However, I still see the issue. I have upgraded my system literally few mins ago and when running gnome-software from terminal, I see the exact same error. Gs-WARNING **: failed to open plugin /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: cannot open shared object file: No such file or directory  Ubuntu Software won't launch but has a process running. What have I tried?  Restarting. Installing upgrades and restarting. Re-installing gnome-software Removing and installing gnome-software.  None of them seem to fix the problem and it's absolutely annoying. Is there something that I can do to better understand the problem and fix it?


My Minecraft skin works fine in 1.8.9 (I use it to play on Hypixel), but when I play on 1.9, my skin turns into Alex or Steve. This has been happening since the snapshots. I have tried re-uploading the skin on minecraft.net, but it still doesn't work. Does anyone know how to fix this?


Can I upload a video file to embed in a custom infowindow in Cartodb?

I want to embed video clips into custom infowindows in Cartodb, and I know how to do this via a youtube link, but is there a way I can embed a video from a file I have saved on my computer? Or does the video need to come from a website?


Error on checking if value of textField is equal to string JAVA

Hey im having trouble with checking if a JTextField value is given. I think I have the correct code, but it is not saying anything that could possible be broken.   Q: Why wont it display or run the Game.main(null) when the value of the textfield is "Dianamu" ?  public void mouseClicked(MouseEvent e) {    String values = textField1.getText();    if(values == "Dianamu"){        Game.main(null);    }    System.out.println("Login Works:"); }   Thanks in Advance


Why is $dE = C_V dT$ for an ideal gas, even when the process is not constant volume?

I have come across the following derivation for the "equation of an adiabat for an ideal gas" in many textbooks. The following steps are referenced from :   dE=dQ+dW   dW=−pdV dQ=0 dE=$C_{V}$dT therefore $C_{V}$dT=−pdV   All the symbols have the usual meaning.(The derivation then proceeds to use the eqn. of state arriving at PV$^{\gamma}$=const.)    Problem     I don't understand the use of eqn. 4 in step 5. In an adiabatic process both P and V can vary so, then how can one use a quantity that requires V to be constant?


V.I. Arnold says Russian students can't solve this problem, but American students can -- why?

In a book of word problems by V.I Arnold, the following appears:   The hypotenuse of a right-angled  triangle  (in  a  standard  American  examination) is 10 inches, the altitude dropped onto it is 6 inches. Find the area of the triangle.  American school students had been coping successfully with this problem for over a decade. But then Russian school students arrived from Moscow, and none of them was able to solve it as had their American peers (giving 30 square inches as the answer). Why?  's the book. I assume the answer is some joke at the expense of the Americans, but I don't get it. Possibly a joke about inches? Anyone?


Why does the air flowing above the aerofoil moves faster than the air flowing below the aerofoil?

why can't it be the other way around that the air flowing below the chamber moves faster than the air moving above the upper chamber?


How to protect copying files out of flash memory?

I have customers who want to buy large amount of flash memories but he wants to copyright all files inside it.   The flash will contain files that will be delivered for his customers but they're not allowed to copy or delete any of the files the only allowed permission is to ready the files.   I searched and found many solutions but all have on function it WriteProtect the USB though I can't add files to Drive at all but I can delete or copy any file in the drive.   Is there any way to protect the flash memory so I can't copy data out of it?


I have the following code inside a backbone view:  var BookView = Backbone.View.extend({  initialize: function() {     this.render(); },  render: function() {    this.model.fetch({     success : function(model, resp, opt) {        alert(this.$el.html() ); //THIS ONE DOESN'T WORK?     }   });   alert(this.$el.html() ); // THIS ONE WORKS FINE }  });   I have two alert(this.$el.html() ); calls, one outside the fetch, and one inside. But for some reason, the one outside the fetch call works, but the one inside the fetch call returns an error:  Uncaught TypeError: Cannot read property 'html' of undefined


Find all solutions to the equation functional $f(x)+f(x+y)=y+2$  Letting $y=0$ one gets $2f(x) = 2 \Rightarrow f(x) = 1.$ I found this problem on aops and the proposed solution made the same observation and then stated "Substituting this into the given functional equation yields $2=y+2$, which is not true for all $y$. Thus the given functional equation has no solutions." However I don't see how they made the conclusion? Substituting this back gets $1+f(x+y)=y+2$? If I would keep $y=0$ I would get $1+f(x) = 1+1 = 2$? What am I missing here?


Basically I want to say I am graduated today. Here is the sentences:  it is a huge honour to graduate from a top university such as ...... .  It is correct? or it must be "to be graduating". Thanks


Multiple Python Versions on Ubuntu 15.10 Causing Problems

I have a hosted server running Ubuntu 15.10, as I use Python 3.6 on my development machine I installed that (wget URL, configure, make, make install etc), this is the point I realised that Ubuntu already had Python 3.4.3 already installed and my life was becoming complicated.  The first symptom of having multiple versions was getting pip to behave, I had a lot of trouble and ended up removing the Ubuntu version of Python and reinstalling it. This seemed to fix things (mostly), but python3 now is linked to my python 3.6.0 install, but pip3 is linked to the 3.4.3 version.  If I start python with python3.4 then it loads the 3.4.3 and I can use it with the packages I have downloaded (primarily MySQLdb (the fork for 3x Python)).  All the above is obviously not ideal, but I thought since it works I will keep testing my setup. The problem is that when the www-data user runs python3.4 it cannot find the packages; I presume it is looking in the wrong place.  Ideally I would like to get rid of Python3.6.0 and just use the native bundled 3.4.3. The multiple installs seem to be causing pip (and me) a lot of confusion.


How to flip normals/direction of curve geometry in 2.8

I'm trying to make a seat belt. I've pulled a loop off the seat and converted that geometry to a curve, and then extruded/beveled the geometry in the curve properties. It works, but it's making the belt vertical instead of laying horizontal how I want it.   I've searched around, some suggested using Switch Direction to change the way the normals(?) face on the curve, but that does nothing. I can't figure this out. How can I get the geometry on the curve to be in the horizontal direction?


Programmatically, how does "rooting" a device enable access?

From a layman point of view, one would say, "Oh, I'm unrooted so I am blocked and access is not allowed." I want the programmatic point of view; telling me how an unrooted device doesn't have access to the whole filesystem, etc., and how a rooted device has that access.  Examples:  1.Is the filesystem set by default to disallow reads/writes to /system, /sys, /data, etc.?   2.Is there something stored in /system or /data (such as a program, block device/file, etc.) that the unrooted OS runs that limits system-wide access on several tasks that rooted users have?  3.Does the default "unrooted" OS actually have system-wide prevention of unrooted access?  Because look at it this way: to "root" your device something must be changed, right? So the "rooting program" or process must entail how this restriction is circumvented. Does anyone here/can anyone link to anything (or explain it) that explains this process of how the rooting progress allows users access they weren't normally given by default (programmatically; not details on steps to follow in a rooting process and not info on how to root on your phone from a user's point of view; from a developer's point of view).   Best example: Say I'm an Android developer and I wish to learn how to create a rooting program. What would I, for example, need to know to do this?


check to see if filepath exists bash linux script

Hi I had a question how to how write a script that would first check to see if a given filepath exists and if so outputs the path in readable sentences. I was going to start with   if [ -e "$1" -a -d "$1" ]; then   echo $PATH  else    echo "Path does not exist" fi   so basically I'm just a little confuse on when I run my script ./myscript filename how exactly filename gets passed into $1 so I can check to see if it exists. I was also wondering how to do this to see if a user exists on the system. Any help is greatly appreciated!


I have a class:  public class MyObject { public string Name; public int Age; }   I have a List of Myobject objects:  Name Age ABC 12 BBC 14 ABC 11   How to sort this list with condition: sort Name first & sort Age later. With this list, the result after sorting:  Name Age ABC 11 ABC 12 BBC 14


After upgrading from Ubuntu 13.04 server, the www pages won't display themselves.     Error 403 Forbidden You don't have permission to access / on this server.   I've changed access control saves from apache2.2 to apache2.4, but that didn't work. What else could I do?


This question has been asked a lot of times. But the solutions are not resolving my problem.  I have a form on localhost (xampp). But the form details are getting auto-filled. Please suggest something to prevent auto complete of fields.  I have already tried following:  autocomplete="off" autocomplete="false"


I'm working in the categories of $A$-modules. I'm trying to prove that $\hom(P,\cdot)$ is an exact functor $\iff$ $\exists\,Q$ such that $P\oplus Q$ is a free $A$-module.  I'm having trouble translating the property of "freeness" into the preservation of exact sequences (and vice-versa). They still seem like totally different things to me.   Any tips?


Static nested class as parameter in REST service

I see this in some code , and I have a hunch it is not a good practice. What are your opinions ?  @RestController public class AddController {     @RequestMapping(value="/Add", method = RequestMethod.POST)      public ActionResponse add(@Valid @RequestBody    AddRequest request) {         // Method does as much as necessary     }     static class AddCRequest {                       public String parameter1;         public long parameter2;         public long parameter3;     } } }   Having the static nested class as a parameter of of the methdos of the service , is it good ? Static implies only one instance of the class ? How will it behave with concurrency ? A very good theorical-technical explanation would be appreciated.


What is the single word for a school where only boys study?

A school where both boys and girls study is called co-ed (co-education)  What is the name for the school where only males study?  (Calling it a male school seems a bit awkward)


Survey database design: associate an answer to a user

I'm doing the conceptual model for a survey database.  The goal is store the answers given by users (it's going to be an Android app).  I have three entities: user, question and option.  A question will have one or more options (for example: How many employees do you have? 1-40, 40-1000, +1000).  Options will have a text (1-40) and a value (the value selected by user).  User will select one (or more) of these options.  My conceptual design is:    I don't know how to associate an answer with an user.  How can I represent that relation? Do I have another entity to represent option value?  This model will store questions and pre-made answers (offered answers) and allows them to be re-used in different surveys.  I have to represent question like this one:    This question is related to this one:


I use a MacBook pro and am using Linux Mint. I know this is an Ubuntu forum but Mint is built on top of Ubuntu so I am trying here.  The Macbook Pro doesn't have a Page Down or Page Up button. Applications such as Epiphany and Terminal use these buttons to switch between tabs. Ubuntu and Mint both use APT so I assume all applications are the same if not extremely similar. You cannot re-key-bind the terminal nor Epiphany. So I tried the Keyboard settings app and Keyboard Layout app to see if I could change the keys. This proved futile.  What I want is either to rebind the keys in Epiphany and the Terminal, or bind Page up and Page down to something else.


Putting a piece of code in between two html tags in Solaris

On a solaris HTML file, how do I insert between an html tag and head tag? through bash scripting.  I have an html tag that looks like this:     I want to insert a script written in text file, inside this 'SOLARIS' run HTML file, AFTER the long  tag and BEFORE  tag, meaning BETWEEN the two tags, How do I do that?  I want to test using the bash commands to do it for one file at a time as well as multiple file in a folder directory. Will I have to use the folder path in my BASH code? Will I have to use FOR loop or interation in my BASH code? What would be the right code. Note: it is SOLARIS run html file not LINUX one. The name of my HTML file is report.usc20.html.  These are the lines of script that I want to use that are in my backbutton_and_scroller_script.txt file:
Back To The Hardening Page
   Not seeing a Scroll to Top Button? Go to our FAQ page for more info.


print() inside thread outputs wrong value

I'm trying to recreate a stupid idea called sleep sort, however the output is far from expected. I am expecting 0 1 2 3 5  However I get 0 5 5 5 5  ...which is wierd because the thread does: sleep for (item) seconds and then print that item. Here's my code import threading import time  def sleepSort(lst):     for item in lst:         threading.Thread(target = lambda: (             time.sleep(item),             print(item)         )).start()  sleepSort([3, 0, 2, 1, 5])  Is there something wrong with my code? Thank you very much in advance!


How to add the current dir to Bash's path and why is it considered a bad idea by some people?

I'd like to add the current dir to the path so i don't have to keep typing stuff like ./a.out over and over.  I also recall someone saying it was a bad idea, but don't remember why. I Windows and DOS it's a common practice…  BTW, I'm using bash and Mac OS X.


I'm wondering if there's any way that I can alias the ( and ) buttons to \begin{pmatrix} and \end{pmatrix}, so that when I type those characters in math mode, LaTeX will magically replace them with the correct commands.  As far as I can tell there's no reason to use the "dumb" versions, and it would save me a whole lot of time. Is this possible?  I'm not actually asking how to redefine (. I'm asking LaTeX to replace all (s in math mode with \begin{pmatrix}.


Apex:OutputText to Currency Format from String Wrapper

is there a way to pass a string to the <apex:outputText> so that it can be formatted as a currency or percent value?  Here's what I have inside a column of my visual force table:  <apex:outputText value="{0, number, currecny}"> <apex:param value="{!row.values[1]}" /> </apex:outputText   this gives me an error at runtime (when the visual force page loads), which I think may be some kind of type mismatch, where <apex:outputText> is expecting a Decimal or number but I am passing a string.  This is the error at runtime:     The value attribute on  is not in a valid format. It must be a positive number, and of type Number, Date, Time, or Choice.   Thanks


how to create one column for several columns in a table

I have a code that group multiple columns as a one column. But I have problem with separation of it.   \documentclass[conference]{IEEEtran}  \usepackage{pgfplots} \usepackage{siunitx} \usepackage{multirow}  \pgfplotsset{width=7cm,compat=1.3}  \begin{document} \begin{table}[h]     \caption{Calculation}     \label{tbl::agreement}     \centering     \begin{tabular}{|l|l|c|c|c!{\vrule width 2pt}l|l|c|c|c|}         \hline         & \multicolumn{4}{|c|}{class1}{\vrule width 2pt}&\multicolumn{5}{|c|}{class2}\\         \hline         \textbf{Column}&\textbf{Algorithm}&\textbf{min}&\textbf{max}&\textbf{std}&\textbf{Column}&\textbf{Algorithm}&\textbf{min}&\textbf{max}&\textbf{std}\\\hline         \multirow{3}{*}{age}&Original&9&2.8&100&\multirow{3}{*}{age}&Original&13&2&10\\ \cline{2-5} \cline{7-10}         &A&2&95&96&&A&2&100&100\\\cline{2-5} \cline{7-10}         &B&100&100&100&&B&100&100&100\\\hline     \end{tabular} \end{table} \end{document}     between class1 and class2 separation is thicker. And I want to group {Column, Algorithm, min, max, std} as class1 for left of table. But there is a split between {Column} and {Algorithm}. Can you please help me?


Continuous v. per-chapter/section numbering of figures, tables, and other document elements

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


What's the difference of get command output using`command`and $(command) in Shell?

What is the difference in collect a command output in Shell script using `command` and $(command)? For example:  # IP1=$(ifconfig eth0 | grep -e "inet " | cut -d: -f2 | awk '{print $1}') # IP2=`ifconfig eth0 | grep -e "inet " | cut -d: -f2 | awk '{print $1}'` # echo $IP1 $IP2 > 192.241.145.112 192.241.145.112


Let $A$ a infinite set, prove $Card(A)+Card(A)=Card(A)$

Let $A$ a infinite set, prove $card(A)+card(A)=card(A)$  My attempt: Let $A$ a infinite set. Then we have a subset $B$ of $A$ such that B is infinte countable, this implies: $card(B)=card(\mathbb{N})$ Then: $card(\mathbb{N})=card(\mathbb{N}\cup\mathbb{N})=card(\mathbb{N})+card(\mathbb{N})$.  This implies:  $card(B)=card(B)+card(B)$  But i need this for $card(A)$. Here i'm stuck, can someone help me?


I've been working on a solution of a problem in Java. I have a store and I need to ask the customer if she/he had bought anything. If he/she types "yes" I want the program to continue to the next question and if he/she types "no" I want a message to appears such as "have a nice day!" and then I want the program to stop. How can I manage this?  Thank you!  Here's what I've done so far ~Line 17 to 20~ (but it doesn't work very well):  import java.util.Scanner;  public class Discount {  public static void main(String[] args) {     String cname;     float I_price, drate, discount, dprice;      Scanner in = new Scanner(System.in);      System.out.println("Enter Costumers Name:");     cname = in.next();      System.out.println("Have you bought anything?");     if (cname == "no") {         System.out.println("Have a good day!");         System.exit(0);     }      System.out.println("Enter Price of Item:");     I_price = in.nextFloat();      System.out.println("Enter Discount Rate:");     drate = in.nextFloat();      discount = (I_price * drate / 100);     dprice = (I_price - discount);      System.out.println(             "Costumer Name:" + cname + "\n" + "Discount Rate:" + discount + "\n" + "Discounted Price:" + dprice + "\n");     } }


How to show that $\Bbb R^m$ is not diffeomorphic to $\Bbb R^n$ when $n \neq m$

Suppose that there is indeed an diffeomorphism $f: \Bbb R^m \to \Bbb R^n$, and $f(a) = 0$. Then $f \circ f^{-1} = identity$. In class my teacher asserts that $Df^{-1}_a \cdot Df_a = identity$ and $Df_a \cdot Df_a^{-1} = identity$. Why this is true and how does it imply that $f$ cannot exist?


TeXLive: added custom .sty .cls but I still obtain "not found" error

I am using Fedora 23 operating system with TeXLive version 2014.19.20140525_r34255.fc23  I downloaded  then I unpacked the llncs2e folder content inside  /usr/share/texlive/texmf-dist/tex/latex/llncs2e   but it seems to not work. Here the full TeX test document  \documentstyle{llncs} % \begin{document}  \title{TEST TITLE}  \author{Foo}  \institute{Foo}  \maketitle  \begin{abstract}  Foo  \end{abstract}  \section{Introduction}  Foo  \end{document}   I also tried to add on top  \usepackage{llncs}


Proposed question: How can two identical virtual addresses point to different physical addresses?

I've been contemplating asking this question (for no reason other than satisfying my curiosity) on a Stack Exchange but don't know which one to ask it on.     Following a fork() call in Linux, two processes (one being a child of   the other) will share allocated heap memory. These allocated pages are   marked COW (copy-on-write) and will remain shared until either process   modifies them. At this point, they are copied, but the virtual address   pointers referencing them remain the same. How can the MMU (memory   management unit) distinguish between the two? Consider the following:         Process A is started   Process A is allocated a memory page, pointed to by the virtual address 0x1234   Process A fork()s, spawning process B   Process A and B now share virtual address 0x1234, pointing to the same physical memory location   Process B modifies its 0x1234 memory page   This memory page is copied and then modified   Process A and B both have virtual address 0x1234, but this points to different physical memory addresses         How can this be distinguished?


We have an SMTP only mail server behind a firewall which will have a public A record of mail..  The only way to access this mail server is from another server behind the same firewall.  We do not run our own private DNS server.  Is it a good idea to use the private IP address as an A record in a public DNS server - or is it best to keep these server records in each servers local hosts file?


Let $Y = \prod_{i\in I}X_i$ have the standard product topology over $X$ (all $X_i$ s are equal), and $Z = C(I,X)$ with the compact-open topology. If $I$ is discrete, are Y and Z equivalent? This seems true but I can't find any confirmation and am not sure how to formally prove it. I may just be confused as many formulations of the product topology give a basis in the terms of a product of subsets rather than a subset of products  If I'm understanding, each $A \in Y$ is a subset which contains all products where to each $i_1,i_2,\dots ,i_n$ is assigned any arbitrary open set X from a specified collection $O_1,O_2,\dots ,O_n$. The set contains all products of this form, regardless of what values they assign to each of the other elements of I.   Then A should exist in Z from the intersection with each k of the mappings which take the compact set $\{i_k\}$ to an $O \in O_k$, taking the union to capture each $O_k$. Each $B \in Z$ sshould also be of this form (since in particular each compact set in the discrete I is finite, and all of these cases can be formed from finite intersection or infinite union of this case.  Am I correct in how I'm understanding these? Is there a good way to formally equate these two?


I'm doing this question in Hungerford's book:    I didn't understand how can be possible this intersection be equal to $R$, because $R_M$ is $S^{-1}R$ with $S=R-M$, maybe the author means they are isomorphic? I need a hint to begin to solve this question.  Thanks a lot


An example of totally ordered field with cardinality larger than continuum.

Is there any totally ordered field with cardinality larger than the continuum? If such field exist, please give an example (an simple one if possible).


How to install ubuntu alongside with windows 7?

I need to install ubuntu alongside with windows 7. But when I clicked on "Install ubuntu alongside with windows 7" there is a msg  "write previous changes to disk and continue". There was two options "Go back" and "Continue". I've three drives C:,D: and one is Recovery Drive. Will it affect the other drive when I click on continue?


Best way to obtain clarifying information when reputation doesn't allow comments?

Meta only requires a reputation of 1 in order to add comments to a question, however most other require 50 or more. As someone pretty new to using Stack Exchange, I find it frustrating because there are a lot of questions which require clarification.  I find lots of questions where I have lots of knowledge, but I need to ask clarifying questions to properly answer their question. It doesn't feel right for me to put that in an answer, but makes sense to do so as a comment to their question.  What is the best practice for obtaining clarifying information when unable to post a comment?


Remove the shortened URL from the Post-Ban-Message

The message informing users about the :  Sorry, we are no longer accepting questions/answers from this account. See  to learn more.   Can it please be replaced with a real link?  Sorry, we are no longer accepting questions from this account. .