Endofunctors of $\textsf{FinVec}$ which are not $C^n$

Let $\textsf{FinVec}$ denote the category of finite-dimensional real vector spaces. For each vector space $V \in \textsf{FinVec}$, choose a vector space isomorphism $\varphi \colon V \to \mathbb{R}^{\dim V}$ and endow $V$ with the standard smooth structure from $\mathbb{R}^{\dim V}$ pulled back along $\varphi$. I think (correct me if I'm wrong!) that this smooth structure on $V$ is independent of the choice of $\varphi$ up to diffeomorphism.    Definition Let $n \in \mathbb{N} \cup \{\infty\}$ (where we use the convention that $\mathbb{N}$ includes $0$). A functor $F \colon \textsf{FinVec} \to \textsf{FinVec}$ is called $C^n$ iff $$f \mapsto F(f) \colon \operatorname{Hom}(V,W) \to \operatorname{Hom}(F(V), F(W))$$ is a $C^n$ function for all $V,W \in \textsf{FinVec}$ (where the smooth structures on the hom sets are the ones described above, as these hom sets are finite dimensional real vector spaces under pointwise addition & scalar multiplication).    Of course, any $C^n$ functor is also $C^m$ whenever $m \leq n$, and in particular $C^\infty$ functors are $C^n$ for all $n$. Examples of $C^\infty$ functors include:   $\operatorname{Hom}(V,{-})$ for any $V \in \textsf{FinVec}$ $V \otimes {-}$ for any $V \in \textsf{FinVec}$ The exterior algebra functor   However, I've been unable to think of any examples of an endofunctor of $\textsf{FinVec}$ which is not $C^\infty$! So:  Does there exist an endofunctor of $\textsf{FinVec}$ which is not $C^\infty$?  If the answer is yes, then my follow-up questions are:  Does there exist an endofunctor of $\textsf{FinVec}$ which is not $C^0$? If $n,m \in \mathbb{N} \cup \{\infty\}$ with $m < n$, does there exist an endofunctor of $\textsf{FinVec}$ which is $C^m$ but not $C^n$?


How do you make clothes move along with model

how do you make clothes move along with your model? Do you rig the model first and then parent it to the body of the character then click cloth simulation? I am a little bit confused with the process. Thanks for the help.


I just wrote an answer for . It solved their original problem. Great.   Then they changed the question by updating the code, invalidating my answer. We're now having a discussion in comments regarding how to define different functions in Haskell.   How should this be handled? If the first question could basically be chalked up to a typo, should it be closed as "can no longer be reproduced"? Should I be modifying my already upvoted question to accommodate the change? I don't want to be rude to them, but the evolution of the question isn't really appropriate for the site.


What statistical test should I use with count data?

In my experiment, participants are shown 4 images (A, B, C, D) that they have to rate on a 5 point scale. So my data looks like this: particpant1: A 5, B 3, C 3, D 1 p2: A 4, B 3, C 2, D 4 p3: A 4, B 3, C 2, D 4 etc... I want to see if A and B are rated higher by participants, but I am not sure how to do this. I thought I could use a poisson regression, because I have count data. But I'm not sure and wouòd appreciate help.


Any shortcut to go to user account window?

Is there any keyboard shortcut to go here?    EDIT: This script does not work  on run {input, parameters}      (* Login menu has to be the last! *)    tell application "System Events"     tell process "SystemUIServer"       set n to number of menu bar items of menu bar 1       tell menu bar item n of menu bar 1         click         repeat with i from 1 to 10           try             if name of menu item i of front menu contains "Login Window" then               click menu item i of front menu               exit repeat             end if           end try         end repeat       end tell     end tell   end tell    return input end run   EDIT2: I made this Automator Script (when I execute it, it works) but when I try to assign it a keyboard shortcut it does not work.


What to do now that "my" bank has finally removed the last bit of access to its alleged customers?

For a long time now, "my" bank (Nordea, in Sweden) has announced that it's removing what they used to call "simplified login". This "simplified login" actually meant "the ability to log in without being harassed with hardware dongles and crippled nonsense". While it existed, it allowed me to automate logging in to fetch the current balance as well as seeing if there are any new transactions for me to record into my own bookkeeping system. I didn't want to believe that they would actually go through with it, and they kept postponing the time for when this was to go into action further and further away. But now they finally did it, in spite of my numerous requests for them to not do this, or at the very least provide some kind of API for me to use. They completely ignored every single attempt by me to talk sense to them, just parroting the same standard replies over and over, since they had clearly made up their mind: they will not give even the most basic access to one's account without being forced to actively sit there and manually enter codes into a hardware device or to use an "app" on a surveillance unit ("smartphone"), which is completely useless to me or anyone with half a horse sense left in their mind. The less I comment on their new, severely broken website, the better, but the point is that it makes automation 100% impossible, even for fetching your balance. I'm not talking about making actual money transactions automatically or anything like that. Please note that their so-called "Open Bank API" service is fake. It isn't actually available to individuals like me -- only to major organizations/companies and "app makers" with special permission and a lot of red tape. (They don't make this clear at all for some reason.) So, now I've just spend significant time and effort removing all my code related to Nordea and all the careful automation I've set up to keep track of my finances. It's all gone. They will very clearly never listen to me, their API is not actually available to use, and none of their alleged "methods of login" can be automated. I spent countless hours over a long time coding and thinking about that mechanism, and now it's useless. To make matters even worse, they are actually still going to be charging the same hefty fee monthly from my account, even though I now don't even get to know how much money I have in my account... Switching banks isn't feasible, nor would it do any good as they are all the same. I wonder if they treat people with a lot of money in their accounts the same way as they do me? Do they also have to manually log in with a dongle and codes every time they want to see their account balance or fetch data to update their local bookkeeping database table? That Ethereum/Ether thing sounds promising when they explain it on their website, but I've never met a single person who knew what that even is. They barely have heard of Bitcoin, let alone know how to use it or own any. What should we do now that the powerful, gigantic banks have decided that the slaves don't even deserve even the smallest amount of "power"?


Late 90s/early 2000s anime movie where a research facility in a snowy place is attacked by Americans

This anime movie was released late 90s up until 2004.  All I remember of the movie is that the scientists are at a research facility in a snowy and ice covered place, when a band of Americans shows up and starts killing everyone and one of the mercenaries uses a minigun.


If $\cos x + \cos y - \cos(x+y) = \frac{3}{2}$, then how are $x$ and $y$ related?

If $$\cos x + \cos y - \cos(x+y) = \frac{3}{2}$$ then         (a) $x + y = 0$   (b) $x = 2 y$   (c) $x = y$   (d) $2 x = y$      It is problem of trigonometry, and I have the solution of the problem. However, after seeing the solution, I don't quite understand how is one supposed to know how to approach this problem. My request is:     Don't just solve the problem, but also tell me from where do you come to know which approach would work. (Tell me from where do you come to know which trick or approach to be used to solution this problem.)   Thanks in advance.


Is Design School a Requirement for Graphic Design?

Is it required for people to go to design schools to become a Graphic Designer? I've heard many cases where they have started from scratch without previous education in design and are doing fine as freelancers/working in studios.  Would it be better to go to a design school to become a Graphic Designer? How much leverage would it give you if you went to one?


Writing report in Winedt: Forced to use "Erase Output Files" after each mistake

I'm writing my thesis using MiKTeX and WinEdt 9 for Windows. I write the different chapters individually, and then I have a "masterfille" with the documentclass "report" where I use the command "input" to load the individual chapters. In other words there is only a preamble in the "masterfile".  I have a very general problem which is the following: No matter what kind of mistake I do whatsoever, I will first receive the correct error message, say I forgot to end a table or something (it really does not matter). If I correct this mistake and try to recompile without using the option "Erase Output Files" in Winedt, I will always and very quickly receive a new error message, often containing a mysterious "Undefined control sequence". Having to do this every time and to recompile plus run the Biber (L+B+L+L+D) is very time consuming, since the document is very large. Any ideas what the problem could be? Here is the preamble of my "masterfile" (I am probably including irrelevant information, sorry for that):   \documentclass[12]{report} \setcounter{tocdepth}{2} \usepackage{layout} \setlength{\voffset}{-0.75in} \setlength{\headsep}{5pt} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{csquotes} \usepackage{authblk} \usepackage [T1]{fontenc} \usepackage[backend=biber, style=authoryear-comp]{biblatex} \usepackage{xyling} \usepackage[super]{nth} \usepackage{xspace} \usepackage{cgloss4e} \usepackage{abstract} \usepackage{array} \usepackage{multirow} \usepackage{hyperref} \usepackage{xr} \usepackage{gb4e} \noautomath  \let\eachwordone\itshape   \makeatletter \pretocmd{\@footnotetext}{     \@noftnotefalse\setcounter{fnx}{0}%     \renewcommand{\thexnumi}{\roman{xnumi}}     }{}{} \apptocmd{\@footnotetext}{     \@noftnotetrue     \renewcommand{\thexnumi}{\arabic{xnumi}}     }{}{} \@ifpackageloaded{bidi}{% \pretocmd{\@LTRfootnotetext}{     \@noftnotefalse\setcounter{fnx}{0}%     \renewcommand{\thexnumi}{\roman{xnumi}}     }{}{} \apptocmd{\@LTRfootnotetext}{     \@noftnotetrue     \renewcommand{\thexnumi}{\arabic{xnumi}}     }{}{} } \makeatother     \addbibresource{ref.bib}    \title{The origins of Old Romance V2: A comparative study of Late Latin, Old French and Middle High German} \author{XXX} \date{\today}   \begin{document}  \tableofcontents   \chapter{Old French} \input{chapters/OldFrench2}  \printbibliography  \end{document}


Why does Path.Combine ignore the first part of a ftp server path?

I have two parts of a ftp server path. Let's name the /one and /two.  The full path I want to achieve is /one/two.  When I use System.IO.Path.Combine("/one", "/two"); the output is "/two".  Why is that so? I expected it to be "/one/two" as you would normally with windows paths.  Is this by design, wrong usage by me or a bug in the .net class (unlikely)?  (How) can I use System.IO.Path functionality to produce "/one/two"?


Invalid Magic Number on Ubuntu 16.04 server

I have received the following error after rebooting my virtual machine:   Error: Invalid magic number. alloc magic is broken as 0x7e92a4a0: 7e845c0 Aborted. Press any key to exit.   I have scoured the internet to no avail.


Finding boundary vertices from given set of coordinates?

How to find the the boundary co-ordinates from a given set of  co-ordiantes?  I understand that this question asked previously and answered here    But the answers given here are about the estimates of the the convex hull of the set.   How could we get the boundary points only?


I have a Samsung Galaxy S4. Is there a way in Android or an app that can take ? I.e. have the raw camera data to process in a program like Photoshop. I am using Android 4.2.2.


Why do you write an async function in an arrow function?

I have read many subject about async arrow functions, but I could not understand exactly why and where i need to use an async arrow function in another arrow function?  Sample usage:  const x = (data, callback) => async (dispatch, getState) => {}   In this thread  i seen you can provide a closure.  In my case this code snippet from a react-redux application i have sharing function body on below, that is in the action.js  export const loginUser = (data, callback) => async (dispatch, getState) => {     const response = await api.ajax.login.retrieve(data);     let decodedJSON = Buffer.from(response.json, 'base64').toString('ascii');     decodedJSON = JSON.parse(decodedJSON);     dispatch(handleAccountProperties(decodedJSON));     if (decodedJSON.authenticated) {         console.log("data.history::"+ JSON.stringify(data.history));         data.history.push('/customer-account');     } };   You can sense from the code the data variable has a value like "this.props.history" in this code i have seen my data.history object is good relax with its value but history.push does not navigate the page. I couldn't find a technical explanation


What is the synonym/antonym for "feminist"/"feminism"?

I am looking for a word or phrase that are to men's rights as the words feminist/feminism are to women rights.  And will the word or phrase be called a synonym or antonym?


made an error in uk visa application, what to do?

While filling the online form, instead of ticking on female, i ticked on male. Though my passport has female written on it. I have made the online payment and have taken the printout. My interview with VFS is in one day.


How can I find the inverse function of $f(x) = x^x$? I cannot seem to find the inverse of this function, or any function in which there is both an $x$ in the exponent as well as the base. I have tried using logs, differentiating, etc, etc, but to no avail.


Add navigation buttons to browse through answers

Maybe just small optional DVD-player like chapter-selection icons directly below the vote buttons, something à la  >>, <<, >|, |<   for next, previous, last and first answer.


Equivalent of significance in population data?

I know that significance tests don't make sense on population data. But how then can I figure out if effect sizes are meaningful? Is it purely a judgement call?  Background: I have a census for an entire population. I want to look at correlations between income and the different things studied in the population, e.g. income vs education level, income vs religion, income vs family size, etc.   I will calculate correlations for all the variables across incomes, and look at the ones with the highest correlations.   However, with enough variables, one would assume that at least some of the correlations would then be due to chance, and who knows, perhaps all of them are due to chance.   Is there any way to account for this, and state whether there is more or less chance than we would expect? Or do I just have to report the results as I find them, and let the reader draw their own conclusions about whether they are purely chance?


I just install Microsoft Edge browser using a deb package. Now I can not uninstall it. If I go to the menu, and right click on it, there is no option to uninstall. If I open Discover app, Edge it not listed anywhere, I did an exhaustive search...


I am having trouble formatting a wide table. Thanks to  my basic structure seems fine. But I find now that the text in one of the columns is too wide for the cell.  \documentclass{article} \usepackage{booktabs,ragged2e,tabularx,geometry,amsfonts} \begin{document}  \newcolumntype{L}{>{\RaggedRight\arraybackslash}X}   \begin{table}[htbp]      \caption{Lots of vertical rules}  \label{tab:a}     \begin{tabularx}{\textwidth}{|*{7}{l|} *{3}{L|}}         \hline         Ref & \multicolumn{6}{c|}{Model Used}         & Approach & Limitation & Goal \\         \hline         & MBTI & FFM & BFI & KTS & BTR & NEO-FFI          & \multicolumn{3}{l|}{} \\          \hline         [10] &  & &\checkmark & & &          & Interactive personality profiling approach          & Test were based on subjective evidences which may lead to uncertainty.         & In order to propose a structure for effective software team structure. \\         \hline          [20] &  & & & & &\checkmark          & Quazi-Experiment          & This study is conducted with students which leads to ambiguity on difference in nature of students and software engineers.         & In order to propose a structure for effective software team structure. \\         \hline         & & & & & & & & & \\          \hline     \end{tabularx}  \end{table} \end{document}   The problem is that in the sell containing the text "Quazi-Experiment" the words are too long: they are sticking out past the right hand side of the cell. How can I prevent this?


I have a folder called HUD and it needs to go to c:/.../Steam/.  Can't find how I need to do it.  This is my script:  @echo off title[*] Yannick's Gui's installer :a: echo [*] Yannick's Gui's installer echo [*] Welcome %username% echo [*] %username% Je Kan kiezen uit deeze optie's  ECHO -------------------------------- ECHO 1.Install HUD ECHO 2.Delete HUD Echo 2.Close ECHO --------------------------------   CHOICE /C 123 /M "Optie?:"  IF ERRORLEVEL 5 GOTO ins IF ERRORLEVEL 4 GOTO del IF ERRORLEVEL 4 GOTO exit  xcopy "%~d0%~p0hud" C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Source\cstrike\custom\ /c /d /e /h /i /k /q /r /s /x /y  :ins xcopy "%~d0%~p0hud" C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Source\cstrike\custom\ /e pause  :del del C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Source\cstrike\custom\hud GOTO End  :exit close


I am new to Blender. I downloaded a .obj file of a plant model. When I unzipped it I found two files (.obj and .mtl).  I imported the .obj file and I couldn't do the same with the .mtl to apply the material and the textures.


What is the replacement for sun.misc.BASE64Decoder?Where can I find jar for sun.misc.BASE64Decoder?

I have code that uses BASE64Decoder class which is imported from package sun.misc.BASE64Decoder.But,our code got upgraded from java 8 to java 11.Java 11 rt.jar doesn't contain this package now.What is the jar to be provided in classpath that contains this package?


If we have two topologies $(X,\mathcal{T})$ and $(Y,\mathcal{U})$, then we may take the product topology. We define the projection map $\prod_x$ in the usual way.  If $A\subset X\times Y$ is closed, is $\prod_x(A)$ closed in $X$? I think that it is, as:  $A=(X\times Y)\setminus (\cup_\lambda T_\lambda \times U_\lambda=(X\setminus \cup_\lambda T_\lambda \times Y\setminus \cup_\lambda U_\lambda)$ so that:  $\prod_x(A)=\prod_x((X\setminus \cup_\lambda T_\lambda \times Y\setminus \cup_\lambda U_\lambda)))=X\setminus \cup_\lambda T_\lambda$ which is closed in $X$. Is this correct?  Cheers.


Include Newtonsoft Json.NET in the project without DLL showing

I do not want to have Newtonsoft.Json.dll next to my EXE file, so I am wondering if there is any way to include Json.NET to my project without using DLL?


macOS app for showing external HDD usage statistics?

I'm planning on selling a used external HDD on eBay.  Are there any applications for Mac out there (preferably free) that can show me statistics about the usage history for the drive so that I can let potential buyers know the condition more precisely?


Cannot open a file with white spaces in its name from the console. Why?

I have installed WineHQ on my Ubuntu. I want to run Balsamiq  ~/Downloads/Balsamiq_Mockups_3$ ls -1 Adobe AIR balsamiq_mockups_3.5.15.swf Balsamiq Mockups 3.exe framework_4.6.0.23201.swf icons META-INF mimetype skins textLayout_2.0.0.232.swf   If I go for   wine Balsamiq Mockups 3.exe wine: cannot find L"C:\\windows\\system32\\Balsamiq.exe"   How to fix this problem?


What's wrong with my step-toward-target implementation?

I want to move a game object from its current position toward the mouse position.  I wrote this Vector2D class to help me:  public class Vector2D {          private double xVect;         private double yVect;          public Vector2D() {                 xVect = 0;                 yVect = 0;         }         public Vector2D(double x1, double y1) {                 xVect = x1;                 yVect = y1;         }         public double getX(){             return xVect;         }         public double getY(){             return yVect;         }          public double length() {                 return Math.sqrt((xVect*xVect) + (yVect * yVect));         }         public void normalize() {                 double length = length();                 if(length > 0){                     xVect = (xVect/length);                     yVect = (yVect/length);                 }         }         public Vector2D normalize2() {                 double length = length();                 return new Vector2D((xVect/length), (xVect/length));         } }   I then try to move it toward the target position.  public void move(){ // saveX , saveY - mouse x, y coordinates // x, y - game object coordinates     Vector2D moveVec = new Vector2D(saveX, saveY);     moveVec.normalize();     while(cont){         if(saveX > x){             x += ((moveVec.getX()));         }if(saveX < x){             x -= ((moveVec.getX()));         }         if(saveY > y){             y += ((moveVec.getY()));         }if(saveY < y){             y -= ((moveVec.getY()));         }         sleep(); // Thread.sleep(200);         frame.repaint();         cont = moveEnemy(moveVec);     } }   But something strange happens: When x = 0 and y = 0, everything is OK, but when for example x = 200 y = 0, my object moves along the red line instead of directly toward its target.    Why is this? What's wrong with my code?  EDIT:  public boolean moveEnemy(Vector2D v){     if((((x - sizeX) <= currentX && currentX <= (x + sizeY) && (y - sizeY) <= currentY && currentY <= (y + sizeY)))){         return false;     }else if((((x - sizeX) <= saveX && saveX <= (x + sizeY) && (y - sizeY) <= saveY && saveY <= (y + sizeY))) && (saveX != currentX || saveY != currentY)){         miss(v);         return false;     }     return true; }


What is "spin" as it relates to subatomic particles? I've heard that it's similar to angular momentum but I've also heard that's not completely the case.


Selecting 51 distinct natural numbers from 1 to 100

I was unable to answer correctly 1 of the options of a question asked for a masters exam for which I am preparing. So I am looking fo help here.  Let $a_1 < a_2 < ...< a_{51}$ be given distinct natural numbers such that $1\leq a_i \leq 100$ for all i=1,2,...,51 . Then is following option correct or not : There exists $i$ and $j$ with $1\leq i\leq j \leq 51$ satisfying $a_i$  divides $a_j$.  I don't know which result I should use to prove \ disprove it, So, I am asking for your help. It seems to be a combinatorial question.


Mysql user can see all databases, but should only see his own


I would like to know if there is a difference in the values taken from measurements of a given characteristic sampled at primary forest=1 and secondary forest=0  I'm using two vectors, one with the data itself (DATA$Measurements), and the other one with the category of sampling point (DATA$Point).  How should I perform the wilcox.test fucntion?  I'm doing this way:  wilcox.test(DATA$Measurements~DATA$Point)   But I notice that are other forms of performing this test:  wilcox.test(DATA$Measurements,DATA$Point) wilcox.test(DATA$Measurements,DATA$Point,paired=TRUE)   Which one is more suited for testing my question of interest, and what is the difference between these options? (Is there a difference between points for this given characteristic)?


Failed to download repository information while installing updates

When i run system update then i got following error:  W:Failed to fetch cdrom://Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64      (20130820.1)/dists/precise/restricted/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  W:Failed to fetch cdrom://Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)/dists/precise/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  W:Failed to fetch cdrom://Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)/dists/precise/restricted/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  W:Failed to fetch cdrom://Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)/dists/precise/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  E:Some index files failed to download. They have been ignored, or old ones used instead.   please help me on this.


An idiom for deriving pleasure from another's suffering

I believe it is what the Germans call "". English itself has no such equivalent word. (Although it has been adopted as a .)  Does an idiom exist that describes it?


What is a field_base compared to a field_instance? Is field base what is created with field_create_field()?


Bad sound quality of 3.5mm headphone with mic on laptop

I have a set of headphones that have a built-in mic for hands-free calling. They work great on my Sony Ericsson Cedar cellphone.  The problem is that when I connect headphone to my Dell N5010 laptop to listen to music, the quality is horrible, with very weak or no vocals.  When I hold down the talk button on the mic, however, it changes: the quality goes up. When I let go, it goes back to sounding bad. When I adjust the jack by pulling it out and moving it around, the quality goes back up, but I have to hold the jack in place.  I've looked for a way to configure the sound card but found nothing.   Is there a solution besides gluing down the talk button on the mic?


Java - using System.getProperty("user.dir") to get the home directory

I was wondering if using:  System.getProperty("user.dir");   to get the absolute path of a folder is the best way to go about it? I am looking to pass my application onto other computers and I need a full proof way of getting the 'home' directory so that I can just add onto the path when I need to use other folders by just doing:  String path = System.getProperty("user.dir"); String otherFolder = path + "\\other";


Showing that if $\lim_{x\to\infty}f'(x)=L$ then $\lim_{x\to\infty}\frac{f(x)}{x} = L$.

Let $f:[0,\infty)\to\mathbb{R}$ differentiable and suppose that $$\lim_{x\to\infty}f'(x)=L.$$ How can I prove that $$\lim_{x\to\infty}\frac{f(x)}{x} = L\;?$$  I have solved some similar problems using the Mean Value Theorem, and I am trying to use it again in this one, but nothing works. For example, I tried to apply the MVT in $[x, 2x]$ but it does not work. Some hint?


Why and What changes should be done to Driver class in mapreduce program when using stringtokenizer instead of split()

I am new to java and hadoop. I was practicing mapreduce wordcount example where I came across 2 way of splitting the line in mapper class.  1st one   public class WordCountMapper extends                 Mapper<LongWritable, Text, Text, IntWritable> { @Override public void map(LongWritable key, Text value, Context output)           throws IOException, InterruptedException { String line = value.toString(); String[] splits = line.split(" ");   for (String split : splits) {  output.write(new Text(split), new IntWritable(1)); } } }   2nd one  public class WordCountMapper extends Mapper<LongWritable, Text, Text, IntWritable> {  private final static IntWritable one = new IntWritable(1); private Text word = new Text();       public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException      {          String line = value.toString();          StringTokenizer tokenizer = new StringTokenizer(line);           while (tokenizer.hasMoreTokens())          {             word.set(tokenizer.nextToken());             context.write(word, one);          }      }  }   Driver class  public class WordCountDriver  {     public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException      {         Configuration conf = new Configuration();         Job job = new Job(conf, "WordCount");         job.setJarByClass(WordCountDriver.class);          job.setInputFormatClass(TextInputFormat.class);         job.setOutputFormatClass(TextOutputFormat.class);          job.setMapperClass(WordCountMapper.class);         job.setReducerClass(WordCountReducer.class);          job.setOutputKeyClass(Text.class);         job.setOutputValueClass(IntWritable.class);          FileInputFormat.addInputPath(job, new Path(args[0]));         FileOutputFormat.setOutputPath(job, new Path(args[1]));          job.waitForCompletion(true);     } }   when I am using 1st one as mapper class I am getting proper output and if I change only mapper class to 2nd code and Keeping the rest same I get an error as follow     Exception in thread "main" java.lang.NoClassDefFoundError:    I understood that some changes should done in Driver class but my concern is to know what is causing this error!! This may help me understand concepts of java and Hadoop.


How to *disable* automatic reboots in Windows 10?

Windows 10 lets you 'schedule' a reboot for later. I want to disable it.  Evidently Windows scheduled itself for a reboot last night when I wasn't looking and just closed everything I had been working on the night before.  I reboot on the regular; I don't need Windows to do that for me.  Can I disable it completely? I don't mind if it downloads everything, and then says "hey, you should reboot," but it should never reboot itself, ever.  I'm using the "Pro" edition of Windows 10.


Homotopic maps $(X, A) \to (Y, B)$ induce homotopic maps $X/A \to X/B$

Working with a homework problem:  $X$ and $Y$ are topological spaces and $A\subset X$, $B\subset Y$.  I have $f,g:(X,A)\to (Y,B)$ as homotopic maps.  I need to show that the induced maps:  $\hat{f},\hat{g}$ are homotopic.  My instinct says that the homotopy I should use is $\hat{F}:I\times (X/A)\to (Y/B)$ should be given by $\hat{F}(t,[x]) := [F(t,x)]$.  I showed this map is well defined without any problem.  Edit:  More precisely, $\hat{f}$ maps the pair $(t,[x])$, where $x$ is any element in $[x]\in X/A$, to $[y]$, where $y$ is any element in $[F(t,x)]$.  But I'm having difficulty showing the map is continuous.  If I take $V$ to be an open subset of $Y/B$, how can I use the continuity of $F$ to show that $\hat{F}$ is continuous?


paragraph style - how to force line break? \paragraph{} \\ - make paragraph a header?

I want to format paragraph to work as a regular title  \paragraph{title} text goes here   output of that is:  title text goes here    how can I change the output to force line break and use the usal indentation of 1st line?  title  text goes here  __  edit1: this is for a thesis and I'm using the document class - book. I don't want to use \subsubsection because this is the structure of the document. I just simply need one level of headers deeper.  And that is why I wanted to use \paragraph as a heading not as paragraph.  edit2: clarification: I'd like paragraph to behave like a header like section subsection subsubsection etc


MathJax rendering for suggested edit queue

I would like to suggest a new feature that when reviewing suggested edits on sites that support MathJax that the suggested edit queue renders the MathJax in the rendered output view. The following suggested edit on Electrical Engineering is an example:    Personally I find that verifying the edit is valid is difficult when that view doesn't render the MathJax. I've been in the habit of opening a new window to paste the markup into a new question (that I discard) to view the rendered output, but it doesn't make for a very efficient workflow.


How do I fix the problem of collinearity, i think i am in the dummy variable trap

I am estimating the whether floods affect electoral outcomes and I am using a difference-in-difference estimator. I have run my probit model with reelected party as the dependent variable (1 if reelected, 0 if not) and I have my group variable (1 if flooded), time variable (before and after) and the treatment effect. When I run this regression everything is fine, however as soon as I try to add any other independent variable STATA says it omits it due to collinearity. I have quite a few dummy variables in my sample, for example when I try to interact large or small flood with the treatment effect it says there's collinearity but it also says this for other variables that are not dummy variable such as the total area flooded. How do I fix this? It happens everytime I try to interact anything with the treatment effect but I think I need to interact my other independent variables with it becuase, for example flood size only affects the treatment group. Pleae help!


Texstudio on Mac, cannot view multiple pdf

[Noob Alert] I am new to texstudio, having shifted from texshop due to lack of tabs and code folding.  I need to compile two (or more) documents side by side with the tabs. I am unable to view (go to pdf) for one of them if the pdf of the other is active. Using internal pdf viewer.  The solution to this question preseneted in the link below did not work for me


I'm worried that I won't be able to survive my first summer in Reign of Giants. So I am thinking about what I will need. I guess it's normal to not be able to move out of camp very much because of the heat, so stocking up on stuff is crucial. I also realised that twigs wither, so there won't be lots of those around. Also I have not managed to get even one of my farms to produce anything. I guess I should count them out for the summer. So I am looking for tips for what needs to be in stock before first summer starts. For example:   Endothermic Firepit Ice Box X Grass X Twigs X Fertilizers/Rot/Manure X Logs Ice Cube   I know there is probably not a perfect list out there, but I'd like to have the more experienced player's view on this.


I have a HTML page that have an iframe. I want to change style of iframe content but I don't seem to be able to do so.  I want to change the font of all content inside the iframe to "Tahoma". This is my code:  <!DOCTYPE>     <title>phpinfo()</title>


Position, velocity, acceleration, jolt, and

I am familiar with the fact that $\displaystyle{\frac{dx}{dt}}=v$, $\displaystyle{\frac{dv}{dt} =a}$, and $\displaystyle{\frac{da}{dt}=J}$ where $J$ denotes the 'jolt', or jerk. Are further derivatives of position named, or is that basically as far as it goes, insofar as special names are concerned? Is there a name for the 4th derivative of position w.r.t time, for example?   Analogous to that question, we have that $\displaystyle{p=mv}$, $\displaystyle{F=ma}$, and $\displaystyle{Y=mJ}$, where $Y$ is the "yank." (I just found out about the 3rd derivative names today, which is the primary motivation for this question.)  $Mx$, mass times position, seems kind of meaningless and arbitrary, but maybe I'm wrong about that.


no pre-installed ubuntu one application or software

I installed ubuntu 16.04 LTS, but there is no ubuntu one software, not in ubuntu software center also..Though it is showing selected in unity tweak tool.How can I get it. Please reply.


Add a "voted to close" activity event somewhere on the user profile page

Often when I vote to close, I want to go back and check the comments on the question, to see if it's been improved, to comment further, or to answer the question.  It would be helpful to add a bit of a trail so I can find those questions again. I'm suggesting adding an event to the Activity page on the user profile, because this is the logical spot for the given action.  I realize the Activity page is public, but I don't see why this content couldn't be added only for the currently logged-in user.  An alternative would be to add a new tab on the user profile page that only lists current-user content, and is not shown publicly. I'm sure there are other events, data, or statistics that could be shown here as well, so I'm certain a new tab like this wouldn't be underutilized.    One thing that could be done instead of this is to always add a comment stating why I voted to close. This works well enough, but only some of the time -- for example, if there is already a vote to close as a duplicate and a comment with a link to that duplicate, I'm not going to add a comment myself if I have nothing to add aside from a close vote.  Another way to do it would be to favourite the question. This only works well to a point since questions that get voted to close don't necessarily end up being downvoted (i.e., for my "closed favourites," I couldn't just look at the last page of my favourites).    Related: Jon Skeet  that votes to close on your own questions be shown in the Recent Activity area, which is not what I'm requesting here.


Cross-thread operation not valid error when i get string from other Task

At my code, I design a GUI that managed in one task . From the Form1 class I send parameters to method to other class at different task and get parameters from the task.  At form1 class I have myEvt_valueChnaged(string s) method that gets string s as argument - string that contain the text of textbox that send from the event at manager class - invoked from different task.   With the received string I update the textbox at the GUI as wrote here:  private void myEvt_valueChnaged(string s) {     textBox1.Text = s; }   with this code I get the error:  invalidoperationexception was unhandled by user code - Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on.   I tried to add line at the method : var y =s; and then textBox1.Text=y; but it didn't solve it.  How can I solve this issue?


Can rsync be used to make only hard links, not copies?

I'm working on a system to automatically back up my computer using rsync and the Google Drive app (I have a Macintosh computer). (This app creates a directory whose contents are saved to the Google Drive cloud.) The idea of the backup system is to (automatically) copy files to the Google Drive directory (using rsync, preferably) then upload the directory to the cloud.  This system has a major drawback, however: memory waste. Every file that I backup has to be copied to a second location in my computer, doubling the space the file uses. It would be much more memory efficient to make hard links instead of copies. I would like to duplicate my directory tree using hard links, then update the duplicate when the original changes.  Can I use rsync to make hard links instead of copies? I think this might be possible with the link--dest= option, but I can't figure it out.  Edit: A few clarifications, in response to feedback.    This question has been listed as a duplicate of  . I don't understand why the questions are the same. I gather that the similarity has to do with using the --link-dest= option to create hardlinks. But this is what I don't understand how to do! So I'm not satisfied with the duplicate question. It seems like using --link-dest= to make hardlinks only works if you already have a backup to compare it to. I'm not computer proficient compared to the users of this site. If the answer to my question is something like "this is easy, just read the man page for rsync more carefully" or something like that, I'll do it. I'm perfectly happy using some other bash utility to achieve the functionality I'm looking for! I just happen to like rsync, but I'm open to other options. JdeBP has suggested using pax, for example.


Vote count click functionality is present without the privilege after loading new answers

When a user has the  privilege, they can click on the post score to see the individual counts for upvotes and downvotes.  When a user doesn't have this privilege this functionality isn't present, except after loading newly added answers without refreshing the page. After clicking the "new answers to this question" link the click functionality to view vote counts is added to all posts, though actually clicking on it results in a dialog stating that an error occurred (I'd assume due to not having the required reputation).  May be related to the fix for this previous bug report:


How to retrieve layouts of customs objects belonging to a managed package?

I am trying to retrieve the layouts of all(standard + custom) objects from a test Enterprise org using package.xml manifest files. There are some customs objects that I have created on this org.  There is a managed package(SalesForece Google Ads,SFGA) installed in this org. This packages contains some customs objects also e.g   SFGA__Ad_Group__c SFGA__Google_Campaign__c SFGA__Keyword__c SFGA__Search_Phrase__c SFGA__Text_Ad__c SFGA__Version_33_0_3__c   My package.xml manifest file tries to fetch layouts. File looks like  <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata">    <types>        <members>*</members>        <name>Layout</name>    </types>    <version>25.0</version> </Package>   In response I get the layouts of standard objects and the custom objects that i created myself. However I do NOT get the layouts of custom objects that belong to that managed package. How can I get the layout of custom objects that belong to a managed package?  Also, will I be able to change the layouts? I know I can change the layouts for standard ones and the ones that i created myself.


Display all the folders which do not have any sub directory

How do I display all the folders which do not have any sub directory using the terminal?


Why is "are" used for the clubs and not "is" for singular? Ex. Juventus ARE very good, Real madrid ARE nice  Why can't say "is" because that is singular?


java equivalent of assert( 0 && "description")

What is the Java equivalent this? assert(0 && "description");  I've tried assert(false && "description");  But Java types are too strict for that. Any tips on the idiomatic way to add a description to an assert statement?


Computer can't detect ubuntu 18.4 from live usb

I'm trying to boot Ubuntu from my USB using multibootusb. Installing Ubuntu into the USB drive was successful and I made sure that my computer boots from the USB first.  I'm booting in UEFI mode because my original OS is Windows 10 and I've made the file format for the drive is FAT32. Even then, the computer goes straight to Windows.   I've even disabled the Windows boot manager but my computer just goes straight to the diagnostic tests. My computer was able to boot Ubuntu after writing it into my USB with Universal USB Installer, so could it be a problem with multiboot?


Showing that the minimal polynomial of an $n \times n$ matrix has degree at most $n$ without using the Cayley-Hamilton Theorem

Let $A$ be an $n \times n$ matrix over a field $k$. Or, more generally, an endomorphism of an $n$-dimensional $k$-vector space. Then the minimal polynomial $p_A(t)$, of $A$, has degree at most $n$. The usual way to show this is as a corollary of Cayley-Hamilton:     If $\Phi_A(t) = \det(tI - A)$ then $\Phi_A(A) = 0$ and $\deg \Phi_A = n$. Since $p_A \mid \Phi_A$, it follows that $\deg p_A \le n$.   One can also prove this using the structure theorem:     The $k[t]$-module $V = k^n$, with action given by $t \cdot v = Av$, decomposes as a direct sum $$V \cong \bigoplus_{i = 1}^r k[t]/(q_i), $$ where $0 \ne q_1 \mid q_2 \mid \dots \mid q_r = p_A$. Taking dimensions we have $$ n = \sum_{i = 1}^r \deg q_i. $$ Therefore $\deg p_A = \deg q_r \le n$.   It is clear that we do not need the full strength of the structure theorem; all we need to do is show that there is a module-embedding $$ k[t]/(p_A) \hookrightarrow V. $$ This is shown in the course of proving the structure theorem.  Question:  Can we show that $\deg p_A \le \dim V$ without using Cayley-Hamilton or the the structure theorem? In particular, are there any easier proofs of this fact than as a corollary of Cayley-Hamilton?


Javafx - should i make a static class for controlling my AI or an Object for each?

I am making a poker game (Texas Hold Em) and am wondering if I should be making a static class that controls all AI for simplicity or should I be aiming at making it in itself an instance so that each player could possibly use a different algorithm? I mean it is poker so I suppose there could be a decent scope on strategy but I could probably create a static class that randomly chooses a statistic ratio for their decisions...I don't want a boring AI that is completely predictable  Currently I have a object to represent the cards as strings and when passed a string from an array of card strings it returns its ImageView equivalent, then I have an Object for the rules that dictate what can and can't be currently done as well as analyzing against the community cards for the best hand and returns the type of hand the player has and temporarily stores the cards that made up that hand in case two players have a similar hand and needs to figure out which one wins. Then I have the player class which basically sets whether that player has checked called or folded.  Edit: Also I have rewritten the way cards are dealt about 3x's. I basically am trying to design the game in such a way that different poker styles can be added later and perhaps maybe even blackjack


This morning I did what I usually do, which is to go through and do some reviews (close votes, mostly). I was reviewing a post in the Low Quality queue that was questionable, but I let it pass (I've seen a lot worse, but this one seemed, to me at least, to be a valid answer to the question). Immediately, I got the screen that told me that I'd failed an audit. That I'm okay with, and I fully understand.  Right after it, though, it's now giving me everyone's favorite message:     You have failed too many recent review audits – looks like you might   need a break. Come back in 2 days to continue reviewing.   I swear I haven't failed a single review audit in at least a month, maybe even longer. Why is it locking me out after failing only 1 audit?!? Is there a counter that just never resets no matter how long it is in between failing audits? That seems a little unfair...


Is it possible to construct a smooth "flat-top bump function"?

Is it possible to find a smooth function $p$ such that $$p(x)=0 \text{ if } x\le -1$$ $$p(x)=0 \text{ if } x> 0$$ $$0\le p(x) \le 1 \text{ if } -1<x<1$$ $$p(x) = 1 \text{ if } -\frac{1}{2}\le x \le \frac{1}{2}$$ Hint: The following function has continuous derivatives of all orders $$f(x) = 0 \text{ if } x\le 0$$ $$f(x) = e^{-\frac{1}{x^2}} \text{ if } x>0$$  My thought: Considering the left-half of the function $p$, I tried something like $e^{-\frac{1}{\tan^2(x\pi)}}$. The shape looks good but I am not sure about the smoothness at $-1$ and $-\frac{1}{2}$. For $x=-1$, since $\tan$ is infinitely differentiable so we have smoothness there. But for $x=-\frac{1}{2}$, I am not sure about the smoothness after "gluing" with $y=1$.


How to determine the options Linux kernel was build with?

Say, I have custom kernel from my distribution, how could I get list of all options the kernel was build with?  It's possible to get them by reading config file from kernel package from vendor's repo, but is there any other way? I mean ways to get that information form the kernel itself, maybe from procfs?


Is $-1$ a prime number, and if it isn't, why isn't it?

I know that $1$ is not a prime number, but what about $-1$?  Furthermore, what is the reason we categorise $1$ as not being prime?


I'm using Mac, and I'm trying to time the command execution.  If I do  time echo   it doesn't have any output  But If I do  time ls   it does give me the output of time function  Any idea why that happens?  Update: turns out it's cuz I'm using zsh, with oh-my-zsh installed. It works well in bash, but no output in zsh. Any idea why?


What could we call a person with deep knowledge in various fields?

Possible Duplicate:          I just wondered, what could we call a person with deep knowledge in various fields? For example, computers, music, sports, etc.  I think I could use sage, but it wouldn't be appropriate if someone is experienced in multiple fields.


Tex document that displays its own source code

Just out of curiosity, I was wondering how it is possible to write a LaTeX document which, when compiled, generates a document that contains exactly its own source code (i. e. a ).   Since LaTeX is Turing-complete, there's an argument from theoretical computer science which ensures the existence of such a document, but it seems rather hard to actually construct such a program.  I hope that someone is able to come up with a nice solution to this brainteaser.


Every ordered field has a subfield isomorphic to $\mathbb Q$?

I'm going through the first chapter in a text on real analysis, which contains preliminaries on ordered fields, the real numbers, etc. Supposedly I had learned about such things already, in calculus, but I thought it wouldn't hurt to go over it again.  Up until the paragraph which is the subject of my question, everything is thoroughly proven and examples are provided. However the following excerpt just goes through facts, whose proof I cannot conceive:      Although $\mathbb Q$ is an archimedean field, these properties cannot be used to define $\mathbb Q$ since $\\$ there are many Archimedean ordered fields. What distinguishes $\mathbb Q$ from the other $\\$Archimedean ordered fields is that $(\mathbb Q,<)$ is the $smallest$ ordered field in the following sense: $\\$ if $(X,\prec)$ is an ordered field, then $X$ contains a sub-field which is (field) isomorphic to $\mathbb Q$.$\\$ Furthermore such an isomorphism preserves the order relation.   I've concatenated the paragraph a bit, so the text isn't idem from the book (if anyone wishes to know it's Phillips, An Introduction to Analysis and Integration Theory, Dover Publications). Also $\mathbb Q$ contains no proper subfields, and this can be verified by the apparently easy-to-prove fact that, if a field has characteristic zero, then it contains a subfield isomorphic to $\mathbb Q$. Then it remains to prove the preservation of order.  I'm guessing that some concepts from abstract algebra or field theory would easily suffice, but at the moment such topics are a bit over my head, so all I can think of doing is actually constructing the isomorphism $\phi:\mathbb Q\to\hat{\mathbb Q}$, where $\hat{\mathbb Q}$ is a certain subfield of  $X$ in such a way that field operations are preserved, but I really can't come up with anything. So the question is: how do I construct this isomorphism, or, if there's a better way of proving this, how is it done? Thanks for any help.  Edit: Assume the existence of $(\mathbb Q,<)$ as an archimedean ordered field.


How can I add MP3 to the podcast app on my MacBook with Catalina 10.15?

Before I updated to Catalina, I was able to add MP3 files to iTunes, then select get info -> options, and change media type to podcast. I was then able to listen to MP3s (which were mostly lectures) as podcasts on my phone, giving me the ability to rewind 15 seconds .  Now Catalina has disturbed my universe and removed podcasts from iTunes and isolated it as its own app. This no longer allows me to categorize songs as podcasts and I am therefore becoming stupider as the days go by.    How can I add MP3s to the podcast app on my MacBook Pro (Catalina 10.15)?


I do not see any bounty button. I've checked the FAQ and related questions, but I guess nobody has been so lame to ask this question so far. I'm a newbie to this site and my situation is like this:  my reputation is 51 the question age says 3 days  Are there any other requirements I have to meet to offer bounty for my question, that are not mentioned in FAQ? Or have I missed something?


Can I say Mr. Smith is a teacher that I really like. OR Mr. Smith is a teacher whom I really like.


Consider the following integral:  $$\int_{\text{One line \\ Second line}} \text{Loss}\left(\text{Foo, Bar} \vert \alpha\right)$$   which renders:    How can I have One line and Second line on two separate and consecutive lines at the bottom of the integral?


if $X$ is independent of $Y_1....Y_n$, is it independent of $f(Y_1,..Y_n)$

So we have the conclusion that if $X$ and $Y$ are independent, then $g(X)$ and $h(Y)$ are independent (g, h measurable?), is it still true that for general case $X$ independent of $g(Y_1,..Y_n)$, where $Y_i$ are themselves not independent to each other.  I don't see how this is duplicate with that of showing $g(X)$ and $h(Y)$ are independent.  If it is not generally true, can we at least show however, $X$ is independent of the sum of $Y_i$?   Let me add some more condition, what about $X$ and $Y_i$ are all gaussians? And the function $g$ $h$ are nice smooth functions.  Essentially, I just want to show $X$ is independent of sum of $Y_i$.


I've created a class with a few objects.   class SalesPerson {     String number;     String name;     double salesAmount; }    So now I need to copy some data from a text file to an array.   "sales.txt"  S0001 Alice 2000 S0002 Bob 3400 S0003 Cindy 1200 S0004 Dave 2600    Below is the shortened version of my code, assuming that the getName(s), setName(s) and constructors are created and the text file can be successfully read:   class ArrayImport {     public static void main(String args[]) throws FileNotFoundException {         String fileName = "sales.txt";         SalesPerson sp = new SalesPerson[4]; //Manually counted          //Read the file         Scanner sc = new Scanner(new FileReader(fileName));          //Copy data to array         int i = 0;         while (sc.hasNext()) {             sp[i].name = sc.nextLine(); //Error starts here             sp[i].number = sc.nextLine();             sp[i].salesAmount = Double.parseDouble(sc.nextLine());             i++;         }     } }   I get the error message "Exception in thread "main" java.lang.NullPointerException..." pointing to the line which I commented "Error starts here".    So I am guessing that this is not the way to assign a value to an object array, and if my guess is correct, what are the correct syntax?


I'm working on a large document which contains several figures. Due to the figures it takes a long time to compile.   I would like to comment out all the figures while I'm working and then put them back in at the end. To do this, I added something like   \renewenvironment{figure}{\begin{comment}}{\end{comment}}  which I could then comment out when needed. However, this just doesn't work and gives all sorts of problems. Specifically, I tried to compile this -   \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{comment} %\renewenvironment{figure}{\begin{comment}}{\end{comment}} \begin{document} \begin{figure} \begin{center} \includegraphics{image.png} \end{center} \end{figure} \end{document}   With the % everything compiled perfectly. If I remove the %, I get an error  Excluding 'comment' comment.) Runaway argument? ! File ended while scanning use of \next.


How to get rid of horizontal line in moderncv?

In the beginning of each section in the moderncv package there is a horizontal line. I cannot figure out where to find the code to modify/ get rid of it. e.g.


Showing that $\sum_{i=1}^n \frac{1}{i} \geq \log{n}$

I have been trying to prove this by induction on $n\in \mathbb{N}$, but this approach seemed to get me nowhere. I have a suspicion it might be necessary to express $\log{n}$ as $\int_1^n 1/x\text{ }dx$, but I could not build a rigorous argument from that.  Any help greatly appreciated!


Why $\alpha$ in ElGamal cryptosystem has to be a primitive root?

When choosing the public key for ElGamal, $\alpha$ must be chosen as a primitive mod p. What if $\alpha$ is not a primitive root ? How will it influence the encryption and decryption ?


Wild Magic Surge - What does "You cast ..." mean for your spell slots?

In response to  question, I started to think about what it means when a Wild Magic Surge results in a "You cast spell-X".  So, "specific beats general" gives:   You can cast a second spell when you would not normally be allowed to You can cast a spell you don't know If the surge forces you to cast a concentration spell you would lose any concentration spell that you currently had active Subject to what the specific entry says you can target it how you like Unless the specific entry prohibits it you could use metamagic on the spell   I am pretty confident in all of the above but if anyone disagrees please address in an answer.  Here comes the question.  How does this impact on your available spell slots?  "You cast ..." to me suggests that if you have an applicable slot available then you have to use it to cast the spell because that is the general rule for casting spells but if you don't then "specific beats general" and it is cast anyway.  Specific examples:     You cast fireball as a 3rd-level spell centered on   yourself   This must be a 3rd level spell:   if you have a 3rd level slot available you have to use it? if you don't, if you have 5 sorcery points and a bonus action available must you use these to get that slot? if you don't have any of that then the spell goes off anyway?      You cast confusion centered on yourself.   No level specified and confusion is a 4th level spell:   if you have a 4th level slot available you have to use it? if you have a 4th, a 6th and an 8th level slot you can choose which one to use? if you have only a 5th level slot but also 6 sorcery points and a bonus action, you could choose to use the 5th level slot or use the points to create a 4th level slot? if you don't have any 4th level or higher slots but you have 6 sorcery points and a bonus action available must you use these to get that slot? if you don't have any of that then the spell goes off anyway?   And so on ...


Profile Picture Bug - Picture Dosen't Show Up on any Stack Exchange Menu Bar

I am having a  with my profile picture not showing up on any of the stack exchange communities that I am a member of.   I know this is not a huge concern but it is an issue that I have encountered. Does anyone know if this is something that I can fix this  easily or is this a bug that needs to be addressed?  UPDATE  I have reuploaded a different image to my profile and fixed my original issue! Now I have a much worse one!


How do I create/expose properties that will be passed to my component from the Lightning App Builder

I want to expose some properties in the Lightning App Builder that can be set and passed to my component.  At present I don't have the proper code and so I am getting this screen.    Say I wanted to have a property called PostalCode how would I set this up within my component to provide a text box within the App Builder to set this value for the component?  Right now I have a standard Attribute for Postal Code and its not displaying a property.      <aura:attribute name="PostalCode" type="String"/>   Is there an additional attribute or completely different tag I should be using to set this up?


Creating fishnet grid Shapefile in QGIS?

How do I create a fishnet shapefile using QGIS?   The equivalent task of "Create Fishnet" in ArcGIS.


Remove duplicate from two generic list C#

I've got a problem. I need to write a csv file (whit append) but i can't write the item that are duplicate in the file. So:  I read all item in the csv file, I add the item to my list (that then I write to the file), and I want to remove duplicate from the list before writing in the file... I try to use "distinct" but it doesn't work.  My class:  class MyList_Base {   public string Cliente  {get; set; }   public double   TotaleProvvigione  { get; set; }   public double   TotalePunti        { get; set; }   public string   Descrizione        { get; set; }   public double   Pezzi              { get; set; }   public double   Provvigione        { get; set; }    public bool     DigitalPen         { get; set; }   public bool     ReferenzaPersonale { get; set; }   public DateTime Data               { get; set; }   public string   Mese               { get; set; }   public string   Gara               { get; set; }   public double   PuntiGara          { get; set; }   public string   Note               { get; set; }     public MyList_Base(string cliente, double totaleProvvigione, double totalePunti, string descrizione, double pezzi, double provvigione, bool digitalPen, bool referenzaPersonale, DateTime data, string mese, string gara, double puntiGara, string note)   {     Cliente            = cliente;     TotaleProvvigione  = totaleProvvigione;     TotalePunti        = totalePunti;     Descrizione        = descrizione;     Pezzi              = pezzi;     Provvigione        = provvigione;     DigitalPen         = digitalPen;     ReferenzaPersonale = referenzaPersonale;     Data               = data;     Mese               = mese;     Gara               = gara;     PuntiGara          = puntiGara;     Note               = Note;   }    public override string ToString()   {     return Cliente + ";" + TotaleProvvigione + ";" + TotalePunti + ";" + Descrizione + ";" + Pezzi + ";" + Provvigione + ";" + DigitalPen + ";" + ReferenzaPersonale + ";" + Data + ";" + Mese + ";" + Gara + ";" + PuntiGara+";" + Note;   }    public static MyList_Base Parse(string csv)   {     string[] tmp = csv.Split(';');     return new MyList_Base(tmp[0], Convert.ToDouble(tmp[1]), Convert.ToDouble(tmp[2]), tmp[3], Convert.ToDouble(tmp[4]), Convert.ToDouble(tmp[5]), Convert.ToBoolean(tmp[6]), Convert.ToBoolean(tmp[7]), Convert.ToDateTime(tmp[8]), tmp[9], tmp[10], Convert.ToDouble(tmp[11]), tmp[11]);   }  }   And this is what I need to do : "//TODO: REMOVE DUPLICATE"  public List<MyList_Base> LoadMyData(string nomeFile) {   if (!File.Exists(nomeFile)) return null;    List<MyList_Base> tmp = new List<MyList_Base>();   StreamReader sr = new StreamReader(nomeFile);    while(!sr.EndOfStream)   {     tmp.Add(MyList_Base.Parse(sr.ReadLine()));   }    sr.Close();   return tmp; }  public bool Save(string nomeFile) {   var tmp = LoadMyData(nomeFile);   StreamWriter sw = new StreamWriter(nomeFile);    //TODO: REMOVE DUPLICATE    foreach (var x in this)   {      sw.WriteLine(x.ToString());   }    sw.Close();   return true; }   Can someone help me?  PS: sorry for my bad english.. Fabio.


Continuous probability about meeting between two friends

My friend and I are hoping to meet for lunch. We will each arrive at our favorite restaurant at a random time between noon and 1 p.m., stay for 15 minutes, then leave. What is the probability that we will meet each other while at the restaurant? (For example, if I show up at 12:10 and my friend shows up at 12:15, then we’ll meet; on the other hand, if I show up at 12:50 and my friend shows up at 12:20, then we’ll miss each other.)


shell script - use variables from config file

My FilePath.property file is as below.  filepath1 = /var/log/Test filepath2 = /home/Backups   I want to read this FilePath.property file inside my shell script and  use filepath1 and filepath2 in my script for deleting old logs inside the Test and Backups folders.


Programmatically adding shapefile to data frame in ArcMap?

I have a toolbox with python script which creates a shapefile from JSON txt file, but it does not show the generated shapefile in arcmap, i have to add it from the output location.   What code shall I use to display this shapefile once it is created?


How can I ensure reliable updates for an Android phone/device?

My Android phone has been abandoned by the manufacturer and carrier. It's stuck on 2.2, and doesn't seem likely to get any updates in the future, nor can I find updated ROMs for it.  I'd be willing to purchase a new phone, but how can I ensure that it will be supported? Does Google, or any carrier, or any manufacturer, make any guarantees about providing timely updates for their phones?


"Free Vector" for commercial use ALTERED

If you find "Free Vectors" online and change the color scheme or tweak it a little and then used it for commercial use would that still be grounds for violation of copyright?


Is current in superconductors infinite? If they have 0 resistance then I (V/R) should be infinite?

I learned many years ago that according to Ohm's law, current is equal to voltage divided by resistance. Now if superconductors have zero resistance then the current should be infinite.  Moreover the power should be zero too as $P=I^2R$.  In superconductors, current can pass without applied voltage. Since current is flowing so there is definitely some energy flowing in the wires but VIt=energy and V is zero so there is no energy ?  How to solve this discrepancy?


What is the meaning of accepting an answer (esp. less upvoted) in the child meta sites?

In child meta-s, we often try to get community consensus about certain policy or rule by asking a question.     But let's say that, the OP (which can be a Mod also) accepts an answer which satisfies their query. But community members may have upvoted other answers more than the accepted one. What does such "acceptance" mean in a meta site?  [Note: I could find following post which relates to my query:  The accepted answer suggests that, it's not expected to accept an answer when there is a tag ]


Product of two irreducible affine varieties is irreducible.

Let $K$ be any algebraically closed ground field. For $X \subset \mathbb{A}^n$ and $Y \subset \mathbb{A}^{m}$ irreducible affine varities, I am trying to show that the product affine variety $X \times Y$ is also irreducible by showing that the coordinate ring $A(X \times Y) = K[x_1,...,x_{n+m}]/I(X \times Y)$ is an integral domain.  I am trying to do this by contraposition but am stuck. Here is what I have:  Since $X$ and $Y$ are affine varities so $X=V(S)$ and $Y=V(T)$ for some subsets $S \subset K[x_1,...,x_n]$ and $T \subset K[x_1,...,x_m]$. Then $X \times Y = V(P)$ where $P \subset K[x_1,...,x_{n+m}]$ is the set of all polynomials from $S$ considered as polynomials in $n+m$ variables by setting the last $m$ variables equal to zero, along with the polynomials from $T$ considered as polynomials in $n+m$ variables by setting the first $n$ variables equal to zero.   We also have that $V(P)=V((P))$ where $(P)$ is the ideal generated by $P$. Hence  $A(X \times Y)=K[x_1,...,x_{n+m}]/I(X \times Y) = K[x_{1},...,x_{n+m}]/\sqrt(P)$ by Hilbert's Nullstellensatz. Assuming $A(X \times Y)$ is not an integral domain there exits $f,g \neq 0$ such that $f,g \in \sqrt(P)$; moreover we can assume that this implies that $fg \in (P)$ since, if not, then since for some $k$ we have $(fg)^k = f^kg^k \in (P) \subset \sqrt(P)$, $f^k$ and $g^k$ are also zero divisors so we just choose $f=f^k$ and $g=g^k$ instead.     I'm not sure if what I've done so far points me in the right direction, but I am at a loss for seeing how to show that $X$ or $Y$ must be reducible.    Edit: My question was unfairly marked as a duplicate thread. None of the threads cited as alleged duplicates address how to prove that this is irreducible by showing that the coordinate ring of the product is an integral domain.


Booking 2 ways ticket, not onboard 1 way, consider canceling both?

It's hard to explain the situation in title, so here it is:  I'm booking a 2 ways tickets from Singapore to Vietnam (Hanoi). However, i didn't board the trip Sing-Viet. Instead, I purchased another 1 way ticket, from Singapore to Vietnam with different time.  In that case, when I'm back from Vietnam to Singapore, the flight counter said, my tickets is not valid anymore, as i didn't take the 1st board,     Based on International Rules, they said.   So, Is my 2 ways tickets valid?


Even if there are certain locking spells can protect the lock against , can't a wizard just break through the walls on side? As one door is a part of a wall closing a room, can't a wizard blast through some nearby walls?


Proving that $f(\bar Z)\subset\overline {f(Z)}$ when $f$ is a continuous map

I'm trying to solve this question from my textbook:     Let $f:X\rightarrow Y$ be a continuous map and let $Z \subset X$.   Prove the inclusion $f(\bar Z)\subset\overline {f(Z)}$.   Thanks in advance for any help!


I have one lists with many duplicates, for example:  AARC AARC AARC TNGT TNGT TNGT CAAC CAAC   And one list without any duplicates, for example:  AARC TNGT YUGT BATR   etc.   All of the entries in the first list will appear in the second list, but not vice versa.   I want to compare the lists and find out how many entries are in both, however I want to retain and recognize duplicates. For example, the output could either be:  AARC AARC AARC TNGT TNGT TNGT   Or  AARC\tAARC AARC\tAARC AARC\tAARC TNGT\tTNGT TNGT\tTNGT TNGT\tTNGT   The issue I'm having is that comm grabs the first duplicate and moves on, counting subsequent entries as not being shared. Every article I can find online references removing duplicates, not retaining them. There used to be a database I could use for this, but they recently changed their default behavior to removing duplicates, and with thousands of entries I can't do it by hand :/


I'm having some difficulty with understanding why KVL (Kirchhoff voltage law) is valid when considering an AC circuit. I mean, the system is by definition not in steady state, right? That in turn means that the change in current causes a change in the magnetic field, which is manifested within the electric potential. I realize the potential is still defined and thus a line integral over a crossed curve of ALL of it's component should be zero.   However, what I often see (for, say, RLC circuits with an AC emf) is total disregard to the time varying components of the electric potential. Only the emf of the different components are considered and their sum is said to be zero. How can that be? What about the "second" part of the potentials?


Could this be faster than the speed of light?

Let's say that I have some type of long bar. It is perfectly incompressible. On one side I have a sensor that detects any force. On the other end, I hit the bar with a hammer. From the moment my hammer hits this bar and the moment my force transducer picks up the force on the other end should be instantaneous right? Why would this scenario be any slower than the speed of light?


I noticed that the letter z is different from other font. Is there any special command for this?


PID changing when using ps --no-header command

When I user the tag --no-header or the = at the end of the column name the last PID always changes adding 1 to it. Why does it change? Is there a way to fix it?


Why did the engineers leave the map to their military base planet?

Prometheus starts with the finding of the cave paintings of a star map. Shaw and Holloway had interpreted it as an invitation.  In the further action it occurs that the place pointed to by the map was actually a military base with ships full of mass destruction weapons pointed to Earth.  Why would the engineers show humanity the way to their weaponry?


Objects not equal after copying an object using spread operator

From this  resource,  the spread operator can be used for copying. I tried copying one object to another  const product1 = {'name': 'Pejeta Coffee Beans', 'price':500.00, 'category':'beverages'}  const product2 = {...product}  product1 === product2 //returns false   and after comparing the two objects, I got a false result. What could be the underlying reason fo this?


How do I un-italicize units when writing equations? For example, I need to un-italicize m/s, m, and Hz

Here's and example of what I have which italicizes everything: \begin{equation}  \lambda = c/f = (3x10^8~m/s)/2x10^8~Hz = 1.5~m \end{equation}


After I installed everything I needed, Ubuntu became slower and slower. I uninstalled some things and it became little bit faster but still wasn't fast. I did a fresh installed of Ubuntu 13.04 and formatted 12.10 then installed Ubuntu 13.04 since 12.10 was getting slow.


Does still it matter to be the "first author" nowadays

It used to be that the first author (meaning, the author whose name comes before the others) is thought to have contributed most to the publication.  But in the last couple of decades, it seems that the first author no longer matters AT ALL, instead the last person has become the most important.   I attribute my observation to two things,   The first author is typically a student, someone with no name recognition, or someone who is getting advised or funded by the last author. The last author is typically the director or advisor of the project. In recent years many of these people have become ultra famous through things like TEDtalks and other media hype. It didn't use to be this way before the internet.    Nowadays whenever I evaluate how potentially interesting a paper is in my field (stem), before I even read it, I almost always look at the last author, especially if it is someone famous. If I don't recognize anyone, I am quick to assume that the paper is not interesting. I am trying to fight back against my bias.   Does being the "first author" still carry any weight in today's academic culture?


Lyx - Set vertical margins or space between two sections

I would like to change the spacing between the sections of a document. Changing the margins values seem to have no effect. What can I do ? Thanks,


Negative correlation between y and X, yet positive coef. in Logit model?

I was playing around with some data on the presidential elections in 2016 and I got a result that doesn't seem to make sense.    I am running a Logit model on percentage voted for Trump as dependent and my two independent variables are average minimum wage and rate of unemployment from 2012 to 2015.   Here is my code:  import statsmodels.api as sm import pandas as pd  df = pd.read_csv("Data_sets/pres_and_unemp_data.csv", index_col=0)  y = df["pct"] X = df[["min_wage", "Rate"]] result = sm.Logit(y, X).fit() print(result.summary2()) print(df.corr())   And this is the output:   Optimization terminated successfully.          Current function value: 0.647033          Iterations 4                          Results: Logit ================================================================ Model:              Logit            Pseudo R-squared: -0.383 Dependent Variable: pct              AIC:              2123.6788 Date:               2020-03-03 17:08 BIC:              2134.4813 No. Observations:   1638             Log-Likelihood:   -1059.8 Df Model:           1                LL-Null:          -766.38 Df Residuals:       1636             LLR p-value:      1.0000 Converged:          1.0000           Scale:            1.0000 No. Iterations:     4.0000 ------------------------------------------------------------------             Coef.    Std.Err.     z      P>|z|     [0.025   0.975] ------------------------------------------------------------------ min_wage    0.0418     0.0191   2.1860   0.0288    0.0043   0.0794 Rate        0.0182     0.0212   0.8555   0.3923   -0.0234   0.0598 ================================================================                Rate  min_wage       pct Rate      1.000000  0.233336 -0.131478 min_wage  0.233336  1.000000 -0.310230 pct      -0.131478 -0.310230  1.000000


How to attach PDF using \includepdf without losing editable data?

I am attaching some PDF to my document using \includepdf, some pages of which have comment data which might have added while creating original PDF.  Now for generated PDF that comment data is missing. Is there any way to keep it intact while attaching using \includepdf?  Tried the way printing and saving it again as PDF. It works but not so convenient in my case as I have thousands of indivisual such files. Please help.


I have added the language tag like so --  <!-- language: js -->  But for some reason syntax highlighting still doesn't seem to be working.   Here is the answer I am talking about --


I have a folder with 36,348 files gz files. I want to unzip all of them.  Running:   gunzip ./*   results in   -bash: /usr/bin/gunzip: Argument list too long   What's the easiest way to get around this?


Prepopulated database, which method should I use? - Android application

I want to use prepopulated table to do some data manipulations with android application, I have over 200,000 values (it's a dictionary). One method is to copy pre-seeded database byte for byte, and another is to execute "INSERT INTO" query in DataBaseHelper class's oncreate method. What is the best method to do it? or is it even bad idea to do these manipulations with android application.


Regex Python how to find the string with the smallest length

Let's say we have the text below,     Lorem Ipsum is simply dummy text of the printing and typesetting   industry. Lorem Ipsum has been the industry's standard dummy text ever   since the 1500s, when an unknown printer took a galley of type and   scrambled it to make a type specimen book. It has survived not only   five centuries, but also the leap into electronic typesetting,   remaining essentially unchanged. It was popularised in the 1960s with   the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus   PageMaker including versions of Lorem Ipsum.   and I want to match the text between the 2 bold words.  When I use the.*Pagemaker, a bigger part of the text is matched from the very first instance of 'the' to Pagemaker and not from the instance of the which is closest to it.  Could you help me please?


Use different tags for different terms of the same unlabeled equation

I have a long equation (but that fits in just one line), with three terms:  \begin{equation*}\label{eq:threeterms} A = \underbrace{A_1}_{(1)} + \underbrace{A_2}_{(2)} + \underbrace{A_3}_{(3)}. \end{equation*}   The equation is not numbered, as it barely fits on the line, and I use hand-written references $(1)$, $(2)$ and $(3)$ in all the text to refer to the three terms. I would like to be able to define three (non displayed) tags for the three terms, and refer to them with \eqref{eq:term1} (etc), to have a nice link to the equation and not just the text $(1)$.  Is this possible? I tried naively with three \tag{1}, \tag{2} and \tag{3} (or \tag*) commands but I cannot attain what I would like.


My Ubuntu installation won't boot even to recovery mode. What should I do?

Following a simple apt-get upgrade, I find my Ubuntu 16.10 installation booting to a blank display regardless of selecting normal boot or recovery from GrUB, with the various kernels installed. How could I approach fixing this? Are there some logs that could help me diagnose what is going wrong?


From :     When bash is run with -c, it is considered a non-interactive shell, and it does not read ~/.bashrc, unless is -i specified.     How is a non-interactive shell defined?   Is a non-interactive shell defined as a shell which can't accept input from stdin? For example bash -c cat can accept input from stdin. Can a non-interactive shell output to stdout? For example, bash -c date can write to stdout.  Does bash -c (without additional -i option) always create a non-interactive shell?


Dual boot Windows 10 and Ubuntu - Can't load Ubuntu

I'm a newcomer to Ubuntu, and have just installed version 15.10 (64 bit) alongside Windows 10.  All seems to have gone well, but I can't boot Ubuntu from Grub.  I've checked the install from a live USB, and all appears ok (to my novice eyes).  Do I have to configure Grub in anyway, or have I inadvertantly installed the boot loader on an incorrrect partition?  I would be grateful for any advice, and apologise if this topic has already been covered previously.


Why are bias nodes used in neural networks?  How many you should use?  In which layers you should use them: all hidden layers and the output layer?


SQL 2008 developers edition functionality

I'm trying to find out if SQL developers edition will support windows 2008 HA / clustering.  According to this link  it doesn't support.  Listed in the Express column.


Prove that $\mathbb{Z}[i]/\langle a+ib\rangle$ is isomorphic to $\mathbb{Z}/\langle a^2+b^2\rangle$ where $a, b$ are relatively prime

My attempt :  Define a map $f$ from $\Bbb{Z}$ to $\Bbb{Z}[i]/\langle a+ib\rangle$   by $f(n) = n+\langle a+ib\rangle$.  Then I have shown that $f$  is ring homomorphism and kernel is $\langle a^2+b^2\rangle$.  For subjectivity let p+iq $\in \mathbb{Z}[i]$. Now a+ib $\in \langle a+ib \rangle$ implies ib+$\langle a+ib \rangle$ = -a+$\langle a+ib \rangle$. Similarly i(a+ib) $\in \langle a+ib \rangle$ implies ia+$\langle a+ib \rangle$ = b+ $\langle a+ib \rangle$.  Now a and b are relatively prime implies there exist integers u, v such that au+bv=1.  Now p+iq +$\langle a+ib \rangle$ = p+iq(au+bv) +$\langle a+ib \rangle$ =p+iqau+iqbv+$\langle a+ib \rangle$ =p+bqu-aqv+$\langle a+ib \rangle$ =$f(p+bqu-aqv) $. Hence f is surjective.    Is proof of subjectivity correct?


How many times has the matter in our solar system been recycled from previous stars?

I've got a basic understanding of these facts:   The Universe is a little over 13 billion years old.  Our galaxy is almost that old. Our solar system is roughly 4.6 billion years old. The heavier elements (Carbon, oxygen, etc...) are only produced by stars.   When our solar system coalesced, the matter that makes up the planets came from a previous generation of stars.  (Meanwhile our Sun is busy making its own slightly-heavier elements, but those aren't ours.  Those belong to the next "generation" after our star dies.)  So we're all sitting on a rock whose matter was spewed out of a star (or stars) that preceded this solar system. But what I want to know is:  How many cycles of coalescing, fusing, nucleosynthesis, exploding -- and then repeating the cycle -- have this atoms in this ball of rock I'm standing on been through?    How do you know this?  Can you tell by the make-up of the matter in the solar system?  Looking around the Orion arm to see remnants of our former home?


This is my code I want to do it in landscape but I failed.  \documentclass[a4paper,12pt]{report} \usepackage{pdflscape} \usepackage{rotating}  \begin{document} \begin{landscape}     \begin{table}         \centering         \footnotesize         \begin{tabular}{|c|c|c|c|c|c|c|c|c|}             \hline             \textbf{Characteristics}&\textbf{6LoWPAN}&\textbf{ZigBee}&\textbf{RFID}&\textbf{NFC}& \textbf{Cellular}& \textbf{Z-Wave}&\textbf{BLE} & \textbf{SigFox } \\              \hline              Standard&IEEE 802.15.4& IEEE 802.15.4&RFID&ISO/IEC 1443 A and B, JIS X-6319-4&3GPP and GSMA, GSM/GPRS/EDGE(2G), UMTS/HSPA(3G), LTE(4G)&Z-Wave&IEEE 802.15.4 &SigFox\\                           \hline                  Network&WPAN&WPAN&Proximity&P2P Network&WNAN&WPAN&WPAN&LPWAN\\              \hline              Range&Short Range 10-100m&Short Range 10-100m&Short Range upto 200m&Short Range 0-10cm 0-1m 10cm-1m&Several km&30m(indoors), 100m(outdoors)&Short Range ~15-30m&Long Range 10km(Urban) 50km(Rural)\\              \hline              Data Rate&250kbps&250kbps&4Mbps&106/212/404kbps&NA&40kbps&1Mbps&100bps(UL), 600bps(DL)\\              \hline              Features&Commonly Used Internet Access&Mesh Network&Low Cost&Security&Longer Range&Simple Prorocol&Low Power Version Available&Long battery life (upto 20 years), low cost\\              \hline              Applications&Monitor and control via internet &Monitor, control home industry&Tracking,Inventory,Access&Payment,Access&M2M&Home monitoring and control &Wireless headsets, audio applications&Street Lighting Energy meters\\              \hline         \end{tabular}          \caption{Comparison Of IoT Communication Protocols \cite{al2017internet}}         \label{block1}      \end{table} \end{landscape}  \end{document}


I wrote a simple command-line program for figuring out how long it will take to transfer a large file via a given interface. I don't understand why, but it always produces output like this: It will take Infinity seconds or Infinity minutes to transfer 10.0 gigabytes/10240.0 megabytes.  I don't understand why it's giving me that output.  import java.util.Scanner;  public class TransferTime {      public static void main(String[] args) {         Scanner input = new Scanner(System.in);         double speed = 0;         double gigabytes = 10;         System.out.println("This will help you find out how long it will take to transfer a file");         System.out.println();          System.out.println("How many gigabytes do you want to transfer?");         gigabytes = input.nextDouble();          System.out.println("Enter 2 for USB 2, 3 for USB 3, f for FireWire 800 or t for Thunderbolt");         String connection = input.next();         System.out.println();         if (connection == "2") {             speed = 480;          } else if (connection == "f")             speed = 800;          else if (connection == "3") {             speed = 625;         } else if (connection == "f") {             speed = 100;         } else if (connection == "t") {             speed = 1280;         }          double megabytes = gigabytes * 1024;         double seconds = megabytes / speed;         double minutes = seconds / 60;          System.out.println("It will take " + seconds + " seconds or " + minutes                 + " minutes to transfer " + gigabytes + " gigabytes/"                 + megabytes + " megabytes");         input.close();      } }


Let x and y denote the values of two consecutive die roles(6 sided). U=min(x,y) V=max(x,y). Determine the conditional probability mass function for U given V=v.


Implementation of dependency injection using C#

I'm new to patterns and am trying to understand the concept of using interfaces to prevent tight coupling. I have created a class:  public interface Imul {     int multi(int a, int b); }   I implemented this interface in a separate mul class:  public class mul: Imul {    public int multi(int a, int b) => return a * b; }   Now here is my problem: in the main program how should I write it to understand the concept of in-dependency?  static void Main(string[] args) {      // Implementation }


Obtaining a list of words from a GNU aspell dictionary

I downloaded the aspell package for Bengali language dictionary support. From the tarball, I was able to isolate the bn.wl file, which is simply a list of about 100,000 words, one on each line.  The problem is that the encoding is apparently is13194-bn, and any text editor I open the file with is showing garbage (one garbage-word per line). It's probably expecting utf8 or something.  How can I convert this file to readable form? I tried using iconv but it apparently can't recognize the encoding.


What SciFi series has a female protagonist/pilot member of a small Earthly explorer corps?

This is a series of novels probably written in the last 15-20 years. I read them about 8 years ago.  The future Earth has many problems but it is not a dystopia. A means of FTL is discovered. It is easy to run (most ships require only a single crew member) but expensive to operate - Earth only builds and finances a very small number of the ships. The explorer corps (not capitalized because I do not think this is its proper name) is a very small group. Over time, it has grown smaller as Earth becomes more self-interested and less interested in paying the steep cost of learning about "what's out there."  The protagonist is a woman (who I think was petite and pretty but not beautiful). She had feelings for her mentor pilot who died before the events of the novels in the series. The novels are about how she personally survives the many pitfalls of exploring the Universe essentially by herself during her missions.  Some of the novels included these events (a line item per novel):   Rescue stranded science team, who was running out of air. Witnessing the collision of a terrestrial and Jovian planet as well as attempting to rescue a portion of the inhabitants they discover there while observing. Investigating a giant alien artifact discovered by the explorer corps. Investigate why stars are exploding for an unexplained reason and why that reason seems to be approaching the Earth (maybe in conjunction with #3).   I can almost visualize the name of the author and/or the book names but it is buried just a bit too far back in my mind.


My physics textbook tells me that the sum: (1 + (y/m) + (y/m)^2 + ... + (y/m)^n) where m < n, equals: (1 / (1 - y/m)) * (1 - (y/m)^n+1) ...but I can't work out how. Can anyone help? It's part of a long argument proving the convergence of the power series exp(tX) where X is a 2x2 matrix. They're summing a series (1/m!)y^m + (1/m!m)y^m+1 ... + (1/m!)(1/m^n)y^m+n which (as I can see) equals y^m/m! times the series above.


How do you turn off Bluetooth on startup using MacBook Air and macOS Sierra?

Every time I turn on my laptop (from a completely off state) the Bluetooth is on by default. How can I prevent it from turning on at startup and then only turn it on (manually) when I want to connect any Bluetooth devices like mouse and keyboard?


prove if $a$ is odd then there exists a Pythagorean triplet with it

I want to show that if $1 <  a \in \mathbb{N} $ is odd, then there exists $b,c\in \mathbb{N}$ s.t (a,b,c) is a primitive Pythagorean triplet. I believe it would be enough to show there exists $s<t\in \mathbb{N}$ with $\gcd (s,t)=1$, $2 \nmid s+t$  and $a=s^2-t^2$. But I couldn't find a way to do this.


Show that an irrationally periodic function is also a constant function

Let $f:\mathbb R \to \mathbb R$ be a function such that for any irrational number $r$, and any real number $x$ we have $f(x)=f(x+r)$. Show that $f$ is a constant function.


Showing $\text{Aut}_\mathsf{Grp}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}) \cong S_3$

So I believe I've finished the proof, but it all amounts to case-work and I really think (and hope) there's a better approach than this. Here's what I've done: Attempt: Within $\text{Aut}_\mathsf{Grp}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z})$ identities must be mapped to identities thus what defines each isomorphism is the bijective function between its last three elements: \begin{matrix} (0,0) & \mapsto & (0,0) \\ (0,1) & & (0,1) \\(1,0) & & (1,0) \\(1,1) & & (1,1) \\ \end{matrix} If every bijective function between these last three elements constitutes a homomorphism (including the first unchanged mapping of identities), then $\text{Aut}_\mathsf{Grp}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}) \cong S_3$ in that isomorphisms in $\text{Aut}_\mathsf{Grp}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z})$ can be identified with permutations of three elements, which is exactly what $S_3$ is. I then, essentially go case-by-case showing every one of the six different bijections is a homomorphism. For two of those bijections (which are just compositions of other bijections I've already checked) I apply the following lemma:  If $\phi :G \to H$ and $\psi : H \to K$ are bijective homomorphisms, then $(\psi \circ \phi)$ is a homomorphism. As proof, assume the premise. We then have $\forall a,b \in G:$ $$\psi (\phi (ab))= \psi(\phi(a) \phi(b))=\psi (\phi(a))\psi (\phi(b))$$ $\implies (\psi \circ \phi)$ is a homomorphism.  So my questions are:  Is the proof that I have sufficient? Is there a better proof for this problem? (A hint towards it rather than complete give-away would be much more appreciated)  EDIT: I have indeed looked at , but the approach carried out there uses vector spaces which I have not been introduced to or am supposed to use to solve this problem.


Bad interpreter: no such file or directory

So I need to run one script, and I just drag & drop it to console, but console outputs this error:  matas@H81M-D2V:~/Desktop/gui$ '/home/matas/Desktop/gui/load.sh'  bash: /home/matas/Desktop/gui/load.sh: /bin/bash^M: bad interpreter: No such file or directory matas@H81M-D2V:~/Desktop/gui$ ^C matas@H81M-D2V:~/Desktop/gui$ ^C matas@H81M-D2V:~/Desktop/gui$    The script:  #!/bin/bash if [[ $(nvidia-settings -q '[gpu:0]/DigitalVibrance[DFP-1]' | grep 'Attribute.*1023\.') ]] then     nvidia-settings -a '[gpu:0]/DigitalVibrance[DFP-1]=0' > /dev/null     echo "Vibrance Disabled" else      nvidia-settings -a '[gpu:0]/DigitalVibrance[DFP-1]=1023' > /dev/null     echo "Vibrance Enabled" fi


How can I install Ubuntu 13.10 alongside windows 8? This option doesn't appear in the installation menu


Which is the real size of a file in disk in Windows?

When I create a .txt file with just one character, I found that the explorer check the size in 1KB but when I check in properties they said 1bytes and size from disk 4KB, so wich is the real size on disk? thank you.


I want to send a number of parameters from an application to a database table through PHP. I use the 'GET' method and want to set some restrictions to the variables and/or in some way make it safe as in the approach below. The good thing is that they can only contain greek letters, numbers and the .-, symbols.  Is this doing it correctly?  FORM:  <input type="text" name="a"> <input type=text" name="b">   URL:  http://the url.php?a=4,52&b=αβγδ.,-12345   What I want it to do, simply:  Show rows where id=x if the user sends an existing id and the correct key that is defined in the PHP file.  Safe approach [edited]:  $dbh=db_conn();  $vara = mb_convert_encoding($_GET["a"], 'UTF-8', 'ISO-8859-7'); $varb = mb_convert_encoding($_GET["b"], 'UTF-8', 'ISO-8859-7');  $sqlb = $dbh->prepare("SELECT * FROM table WHERE id = ? AND $vara='myknowkey';");  $sqlb->execute($varb);


Powershell to install Farm solutions (wsp)

we are trying to deploy farm solution wsp file on the SharePoint server via PowerShell. The wsp is a webpart. I got this script by browsing forums...  Foll. is our code:-  $oUrl="http://mysite:9999/"     $solutionPath="C:\MySolutions\"  $solution="FarmSolution.wsp" $path= $solutionPath + $solution  Add-SPSolution -LiteralPath $path install-spsolution -Identity $solution -WebApplication $oUrl -GACDeployment  WaitForJobToFinish   Using the above PowerShell the wsp gets successfully deployed into the GAC. The webpart can then be added to page and used successfully.  My question is on the foll. line:-  install-spsolution -Identity $solution -WebApplication $oUrl -GACDeployment    Since the wsp gets deployed to the GAC, then what is purpose of using -WebApplication $oUrl. Can I remove this part? Generally, the only purpose of using the -WebApplication $oURL without following -GACDeployment is to deploy the wsp to inetpub/site/bin.  Now, if our goal is to deploy the wsp to GAC, then why not use it as:-  install-spsolution -Identity $solution -GACDeployment    Would this be correct?  This question doesnt look to be duplicate of  as the question addresses the concern of using either -WebApplication or -GACDeployment or both together in powershell to deploy an feature. Also, the answer shows that the value of the 3rd column (Depyoled To) under Manage farm solutions depends upon the use of -WebApplication or -GACDeployment in powershell while deploying as explained by @Waqas Sarwar MCSE which I have marked as an answer.


Can't remove a hidden bootcamp partition

I had a bootcamp partition that I'd wanted to remove. It seemed like it'd been removed using bootcamp, but it is still taking up a big chunk of space in the System storage, and now I can't find it to get rid of it. This is what the diskutil list returns:   Last login: Fri Jan 17 13:03:32 on ttys000 Elisas-MacBook-Pro-2:~ Elisa$ diskutil list /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *251.0 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         199.0 GB   disk0s2  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +199.0 GB   disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD            138.5 GB   disk1s1    2:                APFS Volume Preboot                 24.5 MB    disk1s2    3:                APFS Volume Recovery                519.0 MB   disk1s3    4:                APFS Volume VM                      1.1 GB     disk1s4   I have looked through other threads on this topic but haven't found a solution to work, as I don't have the extra disks for bootcamp that other posts have shown. Any help is appreciated, this is really not one of my skill areas.


I tested the following python code which reverses a string  >> s = 'abcd' >> s[::-1] >> 'dcba'   But I am confused, what exactly the two comma and negative one does it the code ?


Sudoers NOPASSWD for single executable but allowing others

Operating System: Arch Linux  Linux version: 4.16.11  Sudo version: 1.8.23  What I need:   be able to execute any executable with a sudo with a password prompt be able to execute one executable, /home/username/script.sh, without a password prompt.   When I configure like this  username ALL=(ALL) NOPASSWD: /home/username/script.sh   I have the desired effect on the script.sh, but I cannot execute any other executable with sudo.  Example  $ sudo ./script.sh # runs fine!   Attempt something other  $ sudo nano /etc/sudoers [sudo] password for username:  Sorry, user username is not allowed to execute '/usr/bin/nano  /etc/sudoers' as root on hostname.   Seems this is a result of replacing ALL with NOPASSWD, and seems I need both. If the sudoers file has ALL for the user, I can execute whatever I want with password prompt  username ALL=(ALL) ALL   I tried to combine ALL and NOPASSWD but had no results  username ALL=(ALL) ALL, NOPASSWD: /home/username/script.sh   Like this it asks for password for script.sh.  Can I have both?