Is there any permission required to built similar style of (Stackoverflow)? I reviewed both:  and  but they not mentioned Website Style?

SO is not Open-Source, but I like the whole idea of Stack Overflow :   Giving bounties for Questions Up/Downvoting Questions The Badges The intelligent use of Ajax-Technologies Highly Rated users have administrative powers Reputation system Editing posts like a wiki   So I would like to program a (what is it called) Q&A site / board / wiki system. Am I allowed to?


I have a question concerning part (c) of Exercise 5.1 in Chapter II of Hartshorne: He asks to prove that if $\mathcal{E}$ is a locally free $\mathcal{O}_X$-module of finite rank and $\mathcal{F},\mathcal{G}$ are arbitrary $\mathcal{O}_X$-modules, then $$ \operatorname{Hom}_{\mathcal{O}_X}(\mathcal{E}\otimes_{\mathcal{O}_X}\mathcal{F},\mathcal{G})\cong \operatorname{Hom}_{\mathcal{O}_X}(\mathcal{F},\mathcal{Hom}_{\mathcal{O}_X}(\mathcal{E},\mathcal{F})). $$ My question is: is it really necessary to suppose that $\mathcal{E}$ is locally free of finite rank for this to hold? Because I seem to be able to construct canonical maps in both directions which are mutually inverse, without using that $\mathcal{E}$ is locally free. Namely $$ F:\operatorname{Hom}_{\mathcal{O}_X}(\mathcal{E}\otimes_{\mathcal{O}_X}\mathcal{F},\mathcal{G}) \to \operatorname{Hom}_{\mathcal{O}_X}(\mathcal{F},\mathcal{Hom}_{\mathcal{O}_X}(\mathcal{E},\mathcal{F}))\\ \varphi\mapsto \left(\substack{F(\varphi):\mathcal{F}\to\mathcal{Hom}_{\mathcal{O}_X}(\mathcal{E},\mathcal{F})\\ b\in\mathcal{F}(U)\mapsto F(\varphi)(U)(b)\in\mathcal{Hom}_{\mathcal{O}_X|_U}(\mathcal{E}|_U,\mathcal{F}|_U)}\right) $$ where we define for open sets $V\subseteq U\subseteq X$ and sections $a\in\mathcal{E}(V)$ and $b\in\mathcal{F}(U)$ $$ [F(\varphi)(U)(b)](V)(a):=\varphi^{\text{pre}}(V)(a\otimes b|_V). $$ Here $\varphi^{\text{pre}}$ is the precomposition of $\varphi$ with the canonical map from the presheaf tensorproduct to the sheaf tensor product. On the other hand, we also have the map $$ G:\operatorname{Hom}_{\mathcal{O}_X}(\mathcal{F},\mathcal{Hom}_{\mathcal{O}_X}(\mathcal{E},\mathcal{F}))\to\operatorname{Hom}_{\mathcal{O}_X}(\mathcal{E}\otimes_{\mathcal{O}_X}\mathcal{F},\mathcal{G})\\ \psi\mapsto G(\psi) $$ where on simple tensors $a\otimes b$ with $a\in\mathcal{E}(U)$ and $b\in\mathcal{F}(U)$ (and I believe the values on simple tensors suffice to specify all of $G(\psi)$) we define $$ G(\psi)(U)(a\otimes b):=[\psi(U)(b)](U)(a). $$ It seems to me that these two constructions are mutually inverse and don't use any assumption on $\mathcal{E},\mathcal{F},\mathcal{G}$. Am I mistaking somewhere?

Does the hom-tensor adjunction hold for $O_X$ modules also? With sheaf hom and sheaf tensor product, the statement would consist of a natural transformation $Hom_O (M \otimes_O N, K)\cong_{nat} Hom_O(M, Hom_O(N, K))$, $O = O_X$ is the structure sheaf and $M,N,K$ are sheaves of $O_X$ modules.  If true I think I can check this by hand, by describing sheaves in terms of compatible germs, defining this adjunction on the germs and checking that they glue together. It is easier in the quasi-coherent sheaves on a scheme case because then one can just work in an affine cover and the distinguished base.  I am little bit concerned that one might need a finite presentation hypothesis somewhere, in order for $Hom$ to localize well. ($Hom_{R[S^{-1}]}(M[S^{-1}], N[S^{-1}]) \cong Hom_R(M,N)[S^{-1}]$ needs $M$ finitely presented.)


My headphone jack and my speakers are not working at all. They just randomly stopped when my macbook air was closed. Is there any system preferences that i need to change?

Periodically, my MacBook Pro 17" stops recognizing my headphones. No amount of unplugging and replugging seems to help. The sound settings never show headphones as an output device. How can I fix this? The only thing I can find elsewhere on the Internet are people saying, "Reboot!" This works, but is impractical and annoying.


I want to recreate the following diagrams   Here is my MWE  \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,intersections}  \begin{document} \begin{tikzpicture}      \draw [->, name path=x] (-1,0) -- (9.5,0) node [right] {$x$};     \draw [->] (0,-1) -- (0,6) node [above] {$y$};      \node at (0,0) [below left] {$0$};      \coordinate (start) at (1,0);     \coordinate (k) at (2.6,0) ;     \coordinate (c) at (4.5,3.5);     \coordinate (end) at (9,0);     \draw [thick,name path=curve] (start) to[out=70,in=180]         (c) to[out=0,in=180] (end);         \draw [dashed] (2.6,2.81)node [above,left] {$(a,f(a))$} --(k) node [below=1mm] {$a$};         \draw [dashed] let \p1=(c) in (c) -- (\x1,0) node [below] {$x$};         \draw (4.5,3.5) node [above] {$(x,f(x))$};  \end{tikzpicture} \end{document}

I am trying for teaching purpose to explain how basically linear regression might work and how it could be extended. Since I am not the TeXpert I fear that my idea might be tricky and more difficult than it probably can be. I have seen many nice plots with tikz and pgfplots.  I searched around and found finally the following image.    This image looks quite appropriate, cause I can explain how the regression might look like. But the problem is that I cannot manipulate, e.g. draw grid, change the naming of x_0 resp \epsilon, change the red line to a dotted one, add other points than P and Q, etc. If the function itself is x^2 or some mixture, I don't mind for explanation. My main objective is to illustrate the basic ideas. And if I would have a sample, then I could extend it little bit further to mean, variance, etc.  Is anybody willing to give me a helping hand? I don't mind if somebody could point me to existing samples. Would be fine as well.


Show that if the edges of $K_n$ are colored with $n$ different colors, then there must be a triangle where all three edges have distinct colors.  So, I want to use induction on $n$ where $n$ is the number of vertices in the graph then the base case would be $n=3$ ($K_3$ graph) because you must have a triangle with three distinct edge colors. Then, I know if I draw it with $n=4$ and so on so forth it is true, but I'm having trouble putting it more eloquently.

This is again some homework translated (hopefully not too badly) from my book  The graph $K_{n}$ is colored using $n$ different colors, in a way that each color is used at least once. Prove that there exists a triangle with its edges colored in different colors.


I am using Processing language (derived from Java PApplet) version 3.01  Here is my code...    Pig a = new Pig(1);   Pig b = new Pig(1);   HashMap<Pig, String> m = new HashMap<Pig, String>();   m.put(a,"foo");   String c = m.get(b);   println(c);    class Pig {   int a;   Pig(int x) { a=x;}   boolean equals(Pig b) { return b.a==a;}   int hashCode() { return a;} }   As you can see I am using Pig for key, I defined the equals and hashCode. I expect output "foo", however, I get output null.  Any idea what is going on here?  Why doesn't this work?

I ran into an interesting (and very frustrating) issue with the equals() method today which caused what I thought to be a well tested class to crash and cause a bug that took me a very long time to track down.   Just for completeness, I wasn't using an IDE or debugger - just good old fashioned text editor and System.out's. Time was very limited and it was a school project.  Anyhow -   I was developing a basic shopping cart which could contain an ArrayList of Book objects. In order to implement the addBook(), removeBook(), and hasBook() methods of the Cart, I wanted to check if the Book already existed in the Cart. So off I go -  public boolean equals(Book b) {     ... // More code here - null checks     if (b.getID() == this.getID()) return true;     else return false; }   All works fine in testing. I create 6 objects and fill them with data. Do many adds, removes, has() operations on the Cart and everything works fine. I read that you can either have equals(TYPE var) or equals(Object o) { (CAST) var } but assumed that since it was working, it didn't matter too much.  Then I ran into a problem - I needed to create a Book object with only the ID in it from within the Book class. No other data would be entered into it. Basically the following:  public boolean hasBook(int i) {     Book b = new Book(i);     return hasBook(b); }  public boolean hasBook(Book b) {     // .. more code here     return this.books.contains(b); }   All of a sudden, the equals(Book b) method no longer works. This took a VERY long time to track down without a good debugger and assuming the Cart class was properly tested and correct. After swaapping the equals() method to the following:  public boolean equals(Object o) {     Book b = (Book) o;     ... // The rest goes here    }   Everything began to work again. Is there a reason the method decided not to take the Book parameter even though it clearly  was  a Book object? The only difference seemed to be it was instantiated from within the same class, and only filled with one data member. I'm very very confused. Please, shed some light?


I have a little chat application where I want the users to be able to send username and a message. The Javascript validation for it looks like this:  js Validation:      var re_username = /^[a-zA-Z.-]+(?:\040[a-zA-Z.-]+)*$/;     var is_username = re_username.test($('#chatusername').val());      var re_message = /^[a-zA-Z.]+(?:\040[\w\,\.\:\?\!\&\-\n\%\@]+)*$/;     var is_message = re_message.test($('#messagecomment').val());   ... then I'm sending it with JSON.stringify() and via $.ajax({}) to PHP with prepared statements, which then looks like this:   php:  require('../dbconfig.php');  $mysqli = new MySQLi($server,$user,$password,$database);  // prepare and bind $stmt = $mysqli->prepare("INSERT INTO messages (username, message) VALUES (?, ?)"); $stmt->bind_param("ss", $username, $message);  $data = file_get_contents("php://input"); $arr = json_decode($data,true);  $username = $mysqli->real_escape_string($arr['username']);           $message = $mysqli->real_escape_string($arr['message']);  // possible php validation ?: if(preg_match("/^[a-zA-Z.-]+(?:\040[a-zA-Z.-]+)*$/u", $username)) {   print $json_invalid;   exit; }  if(preg_match("/^[a-zA-Z.]+(?:\040[\w\,\.\:\?\!\&\-\n\%\@]+)*$/u", $message)) {   print $json_invalid;   exit; }  $stmt->execute() $stmt->close(); ...   Is this setup fairly safe or how should a proper formattting, php validation and preg_match() look like when allowing characters like ,.:?!&-n%@ ?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


My site content is loaded by ReactJS by fetching a webservice (in componentDidLoad).  I need a strong SEO positioning on my pages, so I am trying to understand if Googlebot can read the content.    Fetch As Google     Page Cache (show with the Google search resuts)  No content - Empty page    Can Google actually fetch and index the content when Fetch As Google shows content but the Google cache does not?  Does Google bot really read my React-loaded HTML?  Do I need to pre-render my pages (i.e. )?

I did Fetch and Render twice on a particular page but the cached version of the page is still not showing up on Google.  I did a Fetch and Render on other posts on the site and they all showed cached versions within 24 hrs.  Haven't tried doing any change on the above post so not sure if Google is really crawling the page.


What is the difference between spin and angular momentum, are they linked i.e. spin is a form of angular momentum. And is spin what I think it is (the way the electron/particle actually spins)

If I understand correctly, spin is an intrinsic property of particles, which follows the algebra of angular momentum, but has nothing to do with an "orbital angular momentum" in that the particle is not like a small sphere that rotates on itself, to which we could attribute an angular momentum as usual in classical mechanics, cf.  and  Phys.SE posts.   My question is: why does spin combine with orbital angular momentum to give total angular momentum? To me this is surprising, as spin, in fact, has nothing to do with a classical angular momentum. Any insight on that?


On Ubuntu 20.04, the terminal doesn't seem to recognize the *regex. Example, on 18.04 and other prior releases I could just typed and entered sudo apt install ubuntu-restricted*  and it would automatically pick both ubuntu-restricted-extras and ubuntu-restricted-addons package. But, on 20.04 it seems to throw an error saying  can't find package ubuntu-restricted*  Is there anyway to get the previous behavior on terminal back?

When I run this command :  apt install libkf5*   I get the following error :  Unable to locate package libkf5*    I'm sure that the packages whose names start with libkf5 exist (tab-completion says so) . So the problem is not about the absence of those packages.(Note the asterisk at the end of that error message , the wildcard's not working at all) I use apt v.1.9. Thanks in advance.


Fair warning, I am new to Ubuntu (coming from windows), so you may have to dumb some things down.  I got a desktop for christmas. It is a pre-built used desktop. It has absolutely no drivers on it currently. I actually somehow managed to get minecraft working, but then I realized the graphics were horrible! I also have no sound. I googled and googled so that I could figure what the heck graphics card I have and came up with this info  01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Barts XT [Radeon HD 6870]   Now, I have googled and googled to figure how to get the drivers for it, to no avail. I did find somewhere that told me to look in the additional drivers but the only thing is there is Unknown: Unknown. I am scratching my head and going nuts trying to figure this all out. If you need additional info, you will probably need to tell me how to find it.

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


We started the first day of our semester today by having a review of dimensional analysis. Viewing it afresh, I began wondering how it all “works”, i.e. what is the physics behind it all?  Nature sure doesn’t give a damn about how (or in which units) we choose to measure its properties. But anyway, we, according to our whatsoever knowledge, decided to “label” the observables in the universe with a finite set of “fundamental” units including meters, seconds, grams, etc.  And then the dimensional analysis applied to get time period ($T$) of a pendulum, assuming (reasonably) that it might only depend on gravity ($g$), length ($l$), mass ($m$) and amplitude ($\theta$), we neatly (and correctly) get that $$T=f(\theta)\sqrt{{l\over g}},$$  which I find humongously nontrivial.  How on earth can a “labelling system” devised by us put such severe limits on how a pendulum can oscillate and thus tell Nature how to behave? Just by noticing that adding grams to seconds is meaningless as adding apples to oranges?  (Note that the example of pendulum was just representative.)    The  which has been claimed mine to be the duplicate of is entirely different indeed, except the similar title. Let me show how.  That question asks why it is not justified to add quantities of differing dimensions. While I ask why dimensional analysis gives the correct physical form of the answer in terms of the observables.

Dimensional analysis, and the notion that quantities with different units cannot be equal, is often used to justify very specific arguments, for example, you might use it to argue that a particular formula cannot possibly be the correct expression for a particular quantity. The usual approach to teaching this is to go "well kids, you can't add apples and oranges!" and then assume that the student will just find it obvious that you can't add meters and seconds.  I'm sorry, but... I don't. I'm not convinced. $5$ meters plus $10$ seconds is $15$! Screw your rules! What are the units? I don't know, I actually don't understand what that question means.  I'm specifically not convinced when this sort of thing is used to prove that certain formulae can't possibly be right. Maybe the speed of a comet is given by its period multiplied by its mass. Why not? It's a perfectly meaningful operation - just measure the quantities, multiply them, and I claim that the number you get will always equal the current speed of the comet. I don't see how "but it doesn't make sense to say mass times time is equal to distance divided by time" can be a valid counterargument, particularly because I don't really know what "mass times time" is, but that's a different issue.  If it's relevant, I'm a math student and know extremely little about physics.


I am currently trying to find a string within a variable that outputs something like this:     one,two,three   My code:  echo "please enter one,two or three) read var  var1=one,two,threee  if [[ "$var" == $var1 ]]; then     echo "$var is in the list" else     echo "$var is not in the list" fi   EDIT2:  I tried this but still not matching. Yo uwere correct about it not matching the exact string from previous answers as it was matching  partial.       groups="$(aws iam list-groups --output text | awk '{print tolower($5)}' | sed '$!s/$/,/' | tr -d '\n')" echo "please enter data" read "var"  if [ ",${var}," = *",${groups},"* ]; then     echo "$var is in the list" else     echo "$var is not in the list" fi   Trying this its still not matching the exact string as i need it to.

I have a string in Bash: string="My string"  How can I test if it contains another string? if [ $string ?? 'foo' ]; then   echo "It's there!" fi  Where ?? is my unknown operator. Do I use echo and grep? if echo "$string" | grep 'foo'; then   echo "It's there!" fi  That looks a bit clumsy.


Is there a tablet that can be purchased with Ubuntu or what tablets are suggested for Ubuntu?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


How do I convert this piece of response into a valid array? I want to perform an Object.map on the data:  var user_roles = "['store_owner', 'super_admin']";   This is not a valid JSON so I can't use JSON.parse

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I have the following instructions for Windows:    However, I am using Mac OS X with the latest version of MacTeX.  I already found this thread:    But I am not sure if this is similar to my case. Any ideas how I can perform these steps on a Mac OS X operating system?

I've searched online, but I have not found any clear instructions how to permanently add .sty files to my TeXShop installation. I'm using a Mac with OSX (TeXShop is a mac only program).  What is the best way of doing this? The one comprehensive set of instructions I found .   I've got as far as extracting the files (running LaTeX on the .ins and . dtx files) but after that I don't know what to do. I also don't understand how to update the index of my distribution, and whether there are particular OSX specifics (the instructions are for Windows).


For example we have $\frac{0}{0}$ which is undefined or we have a multiplication of $2\times2$ and $3\times3$ matrices which is also undefined. Is there any symbol for representing it?

Consider a partial function $f$ that is defined only for a few values of its domain (my exact use case is $\delta$ transition functions in automata). One can 'complete' it by saying $$g(x)=0\iff f(x) \text{ is not defined.}$$  Is there a symbol to mean "undefined"? Would it be correct, or accurate, to write $\nexists f(x)$?


I have a dataset like this,  Id  TestId  LabelName   Rule 1    1       NULL      ( Quality=Red )  1   1        OR        (Quality=Yellow)  1   2        NULL    ( Non Ts=True )  1   3        NULL    ( Delivery=Red )  1   3        OR      ( Delivery=Yellow )  1   4        NULL    ( New Supplier Assesment=Red )  1   4        OR      ( New Supplier Assesment=Yellow )    I want the end result like below  Id       Rule 1        (Quality=Red) OR (Quality=Yellow) OR (Non Ts=True) OR (Delivery=Red) OR (Delivery=Yellow)   I tried doing it with a Case statement and Window Functions could not obtain what i wanted. Could anyone help me out.

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


I want to Create a slideshow lockscreen using the GNOME desktop. I am running Ubuntu 16.04 LTS.  I am particularly talking about the "lockscreen" not the Login screen, and definitely not the wallpaper...  It should basically be like Windows spotlight.   Any help will be highly appreciated,

How do  I create a desktop wallpaper slideshow with my own set of images?   With the images coming from a pictures folder, or pre-selected With the images displayed in order, or randomly With the images changing every few minutes, or after random periods of time


I use some objects like workbook, worksheet, app for Excel tasks. After I am done with Excel, I try releasing them by the code below. After all, I still see EXCEL.EXE at Task Manager. Why doesn't it release completely?  My class for Excel tasks:  Excel._Application app = new Excel.Application(); Excel._Workbook workbook = app.Workbooks.Add(Type.Missing); Excel._Worksheet worksheet = null; app.Visible = true;  worksheet.Cells[1, 1] = "test string";  workbook.SaveAs("C:\testfile.xlsx");  object misValue = System.Reflection.Missing.Value; workbook.Close(true, misValue, misValue); app.Quit();  releaseObject(worksheet2); releaseObject(workbook); releaseObject(app);   releaseObject class:      private void releaseObject(object obj)     {         try         {             System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);             obj = null;         }         catch (Exception ex)         {             obj = null;             MessageBox.Show("Unable to release the Object " + ex.ToString());         }         finally         {             GC.Collect();         }     }    EXCEL.EXE is still at Task Manager:

I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:  while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers();   Although this kind of works, the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed.  What am I doing wrong, or is there an alternative to ensure interop objects are properly disposed of?


Suppose that $f$ is a continuous function defined on an interval $I$. Prove that $|f|$ is continuous on $I$.  Our definition of continuity: Let $I$ be an interval, let $f:I\rightarrow\Bbb{R}$, and let $c\in I$. The function $f$ is continuous at $c$ if for each $\epsilon>0$ there exists $\delta>0$ such that $|f(x)-f(c)| < \epsilon$ for all $x\in I$ that satisfy $|x-c|<\delta$. The function $f$ is continuous on $I$ if $f$ is continuous at each point of $I$.

Let $f(x)$ be a continuous function. Prove that $\left|f(x)\right|$ is also continuous.  Is it correct to say that, by the reverse triangle inequality, $\left|f(x)-f(c)\right| \geq \left|f(x)\right|-\left|f(c)\right|$ in all cases, so we will always have that for all $\left|x-c\right|<\delta$ implies $\left|f(x)-f(c)\right|\leq \epsilon$?  I am not sure if my solution adequately uses the functional form, since I just used the equation and not my actual function. Please help with the proper solution!


Is it possible to make continuous raster legend in QGIS? Something like in ArcGIS???

I'm looking for a way to insert continuous colour legend for a raster layer.  I managed to create discrete symbols with values along the bar, but I would like to have a continuous bar with some values on the bar, similar to the old plugin "One-Band Raster", that it doesn't work with the QGIS version higher than 1.7  I tried to set in properties->style, where I selected the  Render Type "Singleband pseudocolor" and see the "generate new color ramp" box.  I tried both "Continuous" or "Equal interval". However, in the Composer the legend always is displayed with discrete symbols.  Is there any way that can make QGIS Composer to display a nice continuous band for a raster layer?


How to add a tag to my favourite tag list. I could search for a tag but don't know how to add that to my favourite tag list.

What are watched tags and ignored tags? How do they work? What are tag subscriptions? What are interesting tags? On Stack Overflow, the content of the main page question list appears to be influenced by watched and ignored tags. How does that work?   For more information, see "" in the .


Sirius's brother Regulus took Kreacher to the cave, drank the potion, and swapped the real locket for a fake one.  Inside the fake one was a note telling whoever happened to find the locket--most likely Voldemort--his initials and exactly what he'd done. Voldemort is pretty smart, he would probably figure out everything, kill Kreacher, and take the locket back.  So why did Regulus even bother making a fake locket?  And once he had, why did he put the note in the locket?  It just seems stupid to me.

led me to asking this one. R.A.B. takes the "real" locket out and asks Kreacher to destroy it, then puts the "fake" locket back in the basin. Why would he feel the need to do this? He knows already that Voldemort has used someone else to drink the potion (Kreacher). In fact Kreacher's story to him about his mistreatment on the island seems to push him over the edge to act.   Instead of assuring that someone else (most likely innocent like Kreacher) would have to drink from the basin, why not just leave the note outside the basin for someone to find? If Voldemort finds it then so be it, at least then no presumably innocent person would have to drink again.


I will be taking the American Math Contest. Various topics are covered in this test including advanced geometry and algebra. It would be great if any of you could provide books/references which contain challenging or hard problems related to advanced geometry and algebra.

Also, I want to make it clear: Beginner.  I'm getting really frustrated trying to study for math competitions:   On the one hand, there are books teaching the high school curriculum, but that's it. I don't need these, I know (almost) everything on your regular high school curriculum. On the other hand, there are books for the IMO. But they assume you have a really strong olympiad mathematics background, and they are only there to prepare you for the IMO. They're basically composed of one or two lines of theory per chapter, and then a huge list of hard exercises and problems. I don't need these either: I'm not even near the IMO calliber, and the solutions to the problem seems to rely on theorems and techniques that aren't taught in high school.   What I am really looking is for a bridge between these two extrema: A book that makes a connection between high school basic math and IMO advanced math.  A book that covers  is what I am trying to find. I've never heard about any of these topics, though they seem to be essential for math competitions. Also, I've never found any book that covers them.   I'm not sure whether a single book will contain such a broad range of topics, so I believe that I'll need a book for Algebra, a book for Number Theory, a book for Combinatorics, etc.   But if that's the case, I also want to make it clear that I'm not looking for a book that teaches you college Algebra, college Number Theory, etc. I want something that covers topics that appear on a math competition, but doesn't assume anything other than high school maths.  Thank you in advance.


Are these all interchangeable or do they have different meanings? Someone you loved. Someone you had loved. Someone you have loved.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I'm very new to Java and I'm having an issue with adding a set to a list of sets. The code builds fine but gives me a Null pointer exception whenever I run it, and I have no idea why. Here it is:  public class Jaccard{  List<SentenceUtils> sents; List<Set> shingleSets;  public Jaccard( List<SentenceUtils> list ){      sents = list;     generateShingleSets(); }  private void generateShingleSets(){      for(int i = 0; i < sents.size(); i++){          String[] shingle = sents.get(i).getShingles();         Set<String> setShingles = new HashSet<>(Arrays.asList(shingle));       }     shingleSets.add(setShingles); }   Please help if you can.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I recently bought a new 1TB hard drive and I would like to do a couple of tests before I start using it (I prefer to know if there are problems or there may be problems now before it is too late).  The question is: How useful or how to scan it?  In Windows when a unit is formatted with zeros, if there is a defective sector, the unit automatically reassigns it for a new one (tests performed in this scenario). In Linux I'm not sure if this happens and I do not have to do these tests anymore. So, I can think of some options and at the same time some doubts:   Format the unit with zero fill. If there are bad sectors, will they be replaced by new sectors automatically as in Windows? Execute the badblocks tool. This tool although I consider it very good, for a new disc I do not know if it is too exaggerated since it tests with 3 different patterns; demanding more time and wear, perhaps, unnecessary. Can only 1 pattern be programmed? Would it be advisable for this case? Run tool F3 - Fight Flash Fraud. This tool writes a file occupying the entire space of the unit and then checks it, so that the following tests (write / read / test) would be executed. It is used to detect fraudulent pendrives and because after writing the file it proves it, I suppose that this would detect any error in sectors of the surface. For what I think is a good alternative for testing.   These are the options that occur to me and I would like to be told, which of these options would be best applied in cases of new discs and also in cases of used discs and why.

I know how to to check / repair my hard drive but I don't know a way how to see the number of bad sectors on my hard drive.  P.S. It looks like my hard drive will die soon :-(


How can my system run a command every time that it is started?  Is there any script that the system runs when it is starting?  I'm using CentOS 6.2.

Is there any way to make/run a bash script on reboot (like in Debian/Ubuntu for instance, since thats what my 2 boxes at home have)  Also, any recommended guides for doing cron jobs? I'm completely new to them (but they will be of great use)


I'm having trouble submitting an assignment into turnit in and my professor never replied back to my email. The assignment had 3 different parts to it and I was only able to submit one of the parts because I tried to submit them separately instead of together. I asked my professor if I could just email him the other 2 parts of the assignment and he never answered back. I emailed him 4 days ago.

As a grad student, I just find it tremendously frustrating when emails are ignored by faculty (both at my institution and at other places). Is this acceptable? I'd be content with a simple response with one line along the lines of "I have read this email and am busy right now, will respond in X days when I can write a more detailed email." I understand that, as a first year student in my field, I'm not really in a position to request anything of anyone, but it just seems like common decency.  Instead, I never hear back, as if my email has been jettisoned off into oblivion.


Sometimes, after a few days, there are two or three good answers to a question, or answers which are very much like each other. It can be hard to choose which to accept. I think that after two days, you should be able to accept up to three answers, and the 15 points should be divided between the three answerers.  (Maybe this could be limited to only accepting answers you have upvoted yourself.)

Often more than one person contributes to the community coming up with the final accepted answer to a question. However, it is only possible to accept a single answer. Restricting to one final answer does make sense for the sake of referencing that answer later, but in many cases that answer is the product of the input from several individuals. I would like to be able to decide how much of a bounty goes to different users, or some other mechanism to recognize the contribution of multiple users. Of course I could always upvote their previous answers, but this is really incorrect if their previous answers aren't the complete, final answer I've accepted.  What think you metaSOrs?


Whenever I create a new account on another stackexchange network I find that it takes the description of my AskUbuntu account.  How do I choose what description to be taken to new accounts?

There seems to be no answer to this already. Every time I create a new SE account, it fills in the new account's data with the data from the "oldest" profile (which is something I don't want), so I have to change it every single time (username, info, etc). How can I change which account is used to "sync" with (and especially, to pull the data from when creating a new account)?


If I give a user the rights to read on my secondary replica which is in sync (not async) with primary replica, and if that user runs a query with a lot of Select into ##Temptable statements on the database (that creates a lock on a table), will that slow down the Primary Replica? I was thinking if the deadlock and locks on secondary replica will cause the slowness on the Primary replica, since they are synchronous and the primary should wait for the secondary to commit the transaction?

I need to provide real-time, or almost real-time, data for SSRS and Tableau reporting. I don't want the production OLTP system to be negatively impacted by long running queries. Will running a large query on a secondary database in an availability group affect transaction performance in the primary database?


My problem is the following:  I decided to do an apt-get dist-upgrade. At first it said that it had to remove a lot of programs, which seemed a little suspicious, but I trusted the upgrade system. I said to myself "well, maybe there are dependencies issues, and it's easier for the update system to remove those programs and install the newer ones. We are in the year 2015, it probably knows what it's doing". Well, it didn't, since it deleted the OS basically.  So now my problem is the following: I can't recover my personal files because my home folder is encrypted, and I don't have the mount passphrase, only my user password. I searched all the web but I couldn't find anything that solved my problem. I tried booting from a live-cd and recover the passphrase with ecryptfs-unwrap-passphrase but it was worthless, because when I try, it asks me for my... passphrase (I tried my user password but it didn't work out). I also tried using  script, but it only outputs unrecognized characters.  I tried the approaches suggested  but eventually they didn't work out, basically when I'm asked for my passphrase, which I couldn't recover yet with any of those methods.  Any suggestions?    EDIT: @zhongfu  I did that, and I get the following:  INFO: Found [MYUSER]. Try to recover this directory? [Y/n]: y INFO: Could not find your wrapped passphrase file. INFO: To recover this directory, you MUST have your original MOUNT passphrase. INFO: When you first setup your encrypted private directory, you were told to record INFO: your MOUNT passphrase. INFO: It should be 32 characters long, consisting of [0-9] and [a-f]. Enter your MOUNT passphrase:   so we are back at square one. So I went to /media/xubuntu/f6c13be2-8045-4ec6-b1af-c1f2524de4ed/home/.ecryptfs/MYUSER/.ecryptfs and there is a file called wrapped-pashprasse, so apparently there is a wrapped passphrase, and I don’t know why it said that it couldn’t find it earlier. Next I did ecryptfs-unwrap-passphrase, I enter my account password, but I get the same result. I don't know what else to do.  I opened the wrapped passhprase file with gedit and got strange symbols mixed with hex values. If I could see correctly what characters the strange symbols are encoding, I could get the passphrase, but I don't know how.  I was thinking, maybe if I could get the binary representation of that file, I could convert those symbols into hex by myself, right?

I have a big problem. When I made a upgrade from 10.10 to 11.04 I lost all my data in home directory. I have only data from my home encrypted directory. What can I do? Thanks Martin


I have a . It runs ICS 4.0.4, has 512 MB RAM, a 1 GHz proccesor – ARM v7, Powervr and 128 MB internal memory.  Can I flash and add a custom rom? And if so, which one? I need Jelly Bean.

There are several reasons to be looking for a ROM:   Upgrading or downgrading your stock ROM Looking for firmware from a different region/language Flashing a custom ROM for different features, removing bloat, etc.   But where can one find ROMs in the first place?  What sites are likely to have the ROM I need?  ; please add to the wiki answer instead of posting separate answers.  See also:


Suppose that $n$ is a composite, squarefree integer such that for every prime divisor $p$ of $n$, we have $(p - 1) | (n - 1)$. Prove that $n$ is a Carmichael number.  Having a lot of trouble with this problem, looking through my notes couldn't really find anything useful apart from the definition of a Carmichael number. After going back to my professor his two hints were to use Fermat's Little Theorem and to consider what the prime factorization of n looks like. This wasn't much help, and any further assistance is greatly appreciated.

I am having some trouble with this proof and I need some help heading down the right direction:     Suppose $n = p_1p_2 \cdots p_k$ where $p_i$ are distinct primes and that $p_i - 1 \mid n - 1$. Show that $n$ is a Carmichael number, that is, that $a^{n - 1} \equiv 1 \pmod n$ for all $a$ with $\gcd(a, n) = 1$.   Thank you for your help.


I'm having a hard time with understanding how to model the rotational kinetic energy of rigid bodies. I will appreciate any good suggestion about resources such as books or videos regarding topics like adding angular velocity vectors (with inclined axis), and how to calculate Inertia Moments and Inertia Tensors. These are some exemples of the systems I will try to model:        Any suggestions or advice will be really helpful. Thanks in advance.

What are some good books for learning the concepts of Kinematics, Newton laws, 2D Motion of Object etc.?


I want to learn about compiling a kernel from scratch. How can I download the latest stable Linux kernel from , compile it, and install it in a VMware virtual machine? This is just for educational purposes.

I want to test an (upstream) custom kernel on Fedora.  The plan so far is:   use a recent fedora config as starting point, e.g. /boot/config-3.6.6-1.fc17.x86_64 lookup build dependencies lookup right make commands execute some make commands cp resulting vmlinuz/System.map to /boot adjust grub   But what about the initramfs...img file ? How do I generate it?  What else is important?


I am writing my own class file and when I am browsing through code developed by others I see % sign popping up at the end of command lines while other authors do not use it. Consider the following example from biblatex:  \DeclareCiteCommand{\citeauthor}   {\boolfalse{citetracker}%    \boolfalse{pagetracker}%    \usebibmacro{prenote}}   {\ifciteindex      {\indexnames{labelname}}      {}%    \printnames{labelname}}   {\multicitedelim}   {\usebibmacro{postnote}}   Here the % sign is used after the second and third line. Other others only use it in constructs like  \newcommand*{\bla}{%   \a   \b}   where % is only present at the first line. Finally there are authors that use it almost everywhere (after every line). As a class/package writer what should I do?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


I am an Indian passport holder. I am planning to travel from Delhi to Vancouver, Canada with Japan Airlines and there is a layover of 11 hours in Narita, Tokyo. So do I need any kind of visa from Japan for staying such long hours ?

I will be transferring between two international flights at Tokyo Narita airport. I'm scheduled to depart the same day I arrive. I am planning to stay within the airport during the layover. Does anyone know if I will require a transit visa at Narita?


so i'm currently adding a base color to my liquid but the color end up changing both of my cup and my liquid (pict 1) i have also made a new materials but it won't change a single color and stayed like this (pict 2), is there any possible way to fix this?

How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.


I never really understood the character of Bob Taylor in Prisoners - his motives and why he is important to the story at all.   Firstly, for some reason, he is attracted to children's toys and clothing. At the candlelight vigil, we can see him gently stroking a teddy bear, almost like a child. He buys children's clothing at the mall. Secondly, he breaks into people's houses to steal the children's clothes. Not to mention, he soaks them in pig's blood. Thirdly, he is a maze fanatic who has snakes in his house. He even confesses the abductions/ murders of the girls.   I didn't really get this man's motif. He is not even responsible or has anything to do with the abductions, so how does he lead our protagonists to Mrs. Holly's house? I understand that he was abducted by Mrs. Holly, but that still doesn't explain how he contributed to solving the mystery? And what's with the clothing fetish and the mazes and the snakes? Mrs. Holly does mention Alex's "snake accident", but how is that related to Bob Taylor's snakes at all? And why does he confess to the abductions?   Now, I understand I'm asking way too many questions in one post and am technically breaking the SE rules. So answer this one question:  What's up with Bob Taylor in this movie?

I watched Prisoners but I didn't fully understand Bob Taylor. Why is he so obsessed with mazes and what are those boxes full of snakes? Also, why did he buy children clothes and steal Joy's and Anna's?  Did he participate in the kidnappings in any way?


Question: Let $\{u_n\}_n$ and $\{v_n\}_n$ be two bounded sequences such that $\{v_n\}_n$ is  convergent. Prove that $\overline{\lim}~(u_n+v_n)=\overline{\lim}~u_n+ \lim v_n$.   My try: Since $\{u_n\}_n$ is bounded, there exists a $K>0$ such that $|u_n|\leq K$ for all $n\in \mathbb{N}$. Again since $\{v_n\}_n$ is convergent, let $\lim\limits_{n\to\infty} v_n=l$. Then given $\epsilon>0$, there exists a $m\in \mathbb{N}$ such that $$|v_n-l|<\epsilon, \forall n\geq m.$$ How can I show that required result?

Given a convergent sequence $x_{n}$ and bounded sequence $y_{n}$  I need to prove that $\limsup (x_{n}+y_{n})=\lim x_{n}+\limsup y_{n}$, when $n$ tends to $\infty$.  I chose $z_{n}=x_{n}+y_{n}$, we know that $z_{n}$ is bounded as being sum of two bounded sequences, so from the Bolzano-Weierstrass Theorem, we know that there is a  subsequence of $z_{n}$, let's call it $z_{n_{k}}$, that converges to $\limsup (x_{n}+y_{n})$. $y_{n_{k}}$ is bounded as well, so there is a convergent subsequence $y_{n_{k_{j}}}$. All this gives me that  $\limsup (x_{n}+y_{n})\leq \lim x_{n}+\limsup y_{n}$,  What can I do for getting the other inequality?   Thank you and Good evening.


I want to write a function that simply plots the data. How can I write the function in a way that it takes as arguments known keywords from plt.plot? For example:  def plot_data(x, y):     plt.plot(x, y)     plt.axvline(max(y))    Say I have 2 different data sets: I want to assign different colors and different labels.   The way I am doing it now is:  def plot_data(x, y, color=None, label=None):     plt.plot(x, y, color=color, label=label)     plt.axvline(max(y))   plt.plot(x1, y1, color='g', label='set1') plt.plot(x2, y2, color='k', label='set2')   But what if I also want to assign different linestyle, different linewidth, different markers, ....  Is there a neat way to pass these keywords into the function instead of just writing them all?  def plot_data(x, y, color=None, label=None, ls=None, lw=None, marker=None):     plt.plot(x, y, color=color, label=label, ls=ls, lw=lw, marker=marker)     plt.axvline(max(y))    I can imagine something like:   def plot_data(x, y, **kwargs):     plt.plot(x, y, **kwargs)     plt.axvline(max(y))

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


Where can I download Google Chrome for Ubuntu Desktop 16.04 LTS 32 bit?

Google has  so on a 32bit Debian machine it's not possible anymore to update the APT repository:  W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)   Also has the .deb file removed from Google servers as it seems.  Is there any alternative .deb download of the last release (46?) available somewhere?  Reason: For an automated Debian build system (debootstrap-based) I urgently need a way to install Google Chrome 32bit v46 (or similar). Switching to another browser (including Chromium) is not a quick enough option for me at the moment..


I'm struggling to prove that if any epi with codomain $P$ splits, then $P$ is a projective object. The converse direction I proved by factoring the identity to give a right inverse of the pi.  How can I prove this claim?

There are various characterizations for an $R$-module to be projective. Two of them can be generalized to any category:  i) $P$ is an object such that given morphisms $\alpha: A \rightarrow B$ and $\varphi: P \rightarrow B$ such that $\alpha$ is an epimorphism, there exists a morphism $\widetilde{\varphi}: P \rightarrow A$ such that $\alpha \circ \widetilde{\varphi} = \varphi$. (Lifting property) In other words, the functor $\text{Hom}_{\mathsf{C}}(P,-): \mathsf{C} \rightarrow \mathsf{Set}$ preserves epimorphisms.  ii) $P$ is an object such that every epimorphism with codomain $P$ splits.  It is easy to see that (i) $\Rightarrow$ (ii) holds in general, by taking $\varphi = \text{id}_P$. Also if the category has the property that for every object $X$ there is an epimorphism $\pi:P \rightarrow X$ where $P$ satisfies (i) (an abelian category with this property is said to have  enough projectives), we can show the reverse implication (ii) $\Rightarrow$ (i).  My first question: Does (ii) $\Rightarrow$ (i) hold in general? I suspect the answer is no. If so, under which conditions does it hold?


I've been googling this for a while to find nothing that works. When someone dies, I want a message like "Lmao you suck"

Can you use the /testfor command in minecraft 1.8 to find out if a player has died ?  I need it for my map, where 2 players (Only) are pitted against eachother. I want it so that when one of them dies, it will detect the death and declare the victor.


I have the latest MacBook Pro running the latest version of OS X and I am using the corded mouse.   The horizontal scroll speed using the mouse wheel is dead slow. The vertical scroll speed is OK for scrolling regular websites, etc., but when I try to scroll something like a Trello board, the horizontal scroll speed is unbearable and I have to tilt the mouse wheel multiple times to get from one card to the other.  Is there a way to increase the horizontal scroll speed, or am I stuck with a single speed for both axes?  Hacking system files or config files is OK with me if that's what it takes!

I have recently bought a Logitech M510 as my main mouse switching over from a magic mouse. I didn't realize missing horizontal scrolling would be such an issue, but apparently it is.   Now a mac does support horizontal scrolling by holding shift + scrolling, this is however amazingly slow.   I have the Logitech Control Center installed, which offers a few extra options, but nothing regarding the horizontal scroll speed. The scrolling speed options offered there only affect vertical scrolling.    Can the vertical speed be one setting and the horizontal speed another?


The highlighting for SQL code blocks doesn't appear to recognize the keyword 'output'. Please see  for an example. Note that 'output' in the code block isn't colored blue like the other SQL keywords.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


I could not find any way to solve this question. Let $\{ a_n\}$ be a sequence of real numbers with $\lim_{n \to \infty} n\, a_n = \alpha >0$, and let $f(x)$ be real-valued continuous function on $[0,\infty)$ with $\lim_{x \to \infty} f(x)=k$. Compute $$ \lim_{n\to \infty} \frac{1}{n} \int_{0}^{\infty} f(x) e^{- a_n  x} dx.$$

If $\lim_{n\to\infty} n a_n = \alpha > 0$. Let $f(x)$ be real-valued continuous function defined on $[0,\infty)$ with \begin{equation} \lim_{x\to\infty} f(x) = k \end{equation} Evaluate \begin{equation} \lim_{n\to\infty} \frac{1}{n} \int_0^\infty f(x) e^{-a_n x} dx \end{equation}  I am totally lost on this. I "cheated" and pretend that $f(x) = k$. Then we get something like  $$(-k)\lim_{n\to\infty}\frac{1}{n a_n}\left( e^{-a_n \cdot\infty} - 1\right)$$  For the $\lim_{n\to\infty}\lim_{x\to\infty} \frac{e^{-a_n x}}{n a_n} $, since $\lim_{n\to\infty} n a_n = \alpha > 0$, at least we know that when $n$ is very big, $a_n$ should be positive. So this term is zero.  I don't know if my hand-waving argument is correct or not. In addition, what would be a better way of doing this?


It has recently been mooted that micro-satellites could be propelled to nearby stars through the use of powerful, ground based laser systems. However, given that light has no mass, I don't know how to calculate the force exerted by a laser on an object and Google has been relatively little help.  Consequently, is there an easy way to calculate the force exerted on an object by a laser given the power, frequency, distance, albedo of the impacted material etc.

Photons have no mass but they can push things, as evidenced by .   Can photons push the source which is emitting them? If yes, will a more intense flashlight accelerate me more? Does the wavelength of the light matter? Is this practical for space propulsion? Doesn't it defy the law of momentum conservation?  Note: As John Rennie mentioned, all in all the wavelength doesn't matter, but for a more accurate answer regarding that, see the comments in  .  Related Wikipedia articles: ,


NOTE: THIS IS NOT A DUPLICATE QUESTION. It is specific to Foldit.tar.gz and installing this game is done uniquely. There is an askubuntu page answering the question, "", but those instructions are for that generic file type. They don't work with this particular game, and in this explanation I've resolved that.  Also, I'm an absolute beginner, running Ubuntu 13.01 for only about 2 months now. I'm only barely familiar with the console at this point. Please bear with me. However, what I offer is the simplest and most concise solution to this problem you will find (out of the first 50 or so google results that come up).  1- From your Downloads folder right click the downloaded file "Foldit.tar.gz" and select the option to extract it into any folder you choose. I picked /Public/Foldit in my home folder.    2- The next step is easiest done from the console. Type in  sudo apt-get install xclip which enables you to cut and paste within the game. (It should run without this feature, if you don't want it.) Then type this in to start it  sudo xclip      3- Next type in sudo apt-get install libglut3 which is a prerequisite not mentioned on the fold.it site nor in the readme file. (I asked them to change that, but who knows.) If that command didn't work, like it didn't for me, then go to this page to download the libglut3 package, , which I was then able to install via the software center. There, you should be all set.    4- Before you try to start the game, make sure you're on-line so it can download all the updates and puzzles. The readme file says, "To start the game, run Foldit from this directory." So go into the folder where you put the original download extracted, and double click Foldit. If it doesn't work completely for any reason (like it didn't for me), restart ubuntu, and try this step again. For me, Foldit wouldn't load up some of the puzzles, but on my 3rd try, it worked perfectly and has ever since.  Don't you love it when you wind up answering your own question? Thank you to everyone that showed and interest and/or helped me.

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


Okay... So I've installed Ubuntu 14.04 (Upgraded from 12.04.3 ) I've been using Ubuntu for about two years now and I know myself around the system pretty well...   Every time I attempt to shut down the computer I always get stuck on the Ubuntu Splash menu and have to push the button to shut it off.  Specs:    6GB ram Intel Core 2 Duo CPU E7400 @ 2.80 GHz x2G  Graphics: Gallium 0.4 on AMD RV635 64bit OS Ubuntu 14.04 1TB hard drive (Dual booted Windows 7 on 600GB partition)

If I try to shutdown my computer it simply takes me back to the login-screen. I looked around and found :  Type in terminal:   sudo gedit /etc/default/grub Find the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" Change this to:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force" Save the file and close the file.  Finally, in terminal: sudo update-grub   But now there is a new problem when I try step 5 it says:  *myname*@ubuntu:~$ sudo update-grub [sudo] password for *myname*:  /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). *myname*@ubuntu:~$    I am new whit linux and dont know what to do.


In a turbocharged engine, an intercooler is installed to cool down the compressed air (apparently for better combustion). In contrast, in the power plant they use air preheater to heat up the air before it mixes with the fuel to fire up. What is the difference?

According to Carnot efficiency formula $\eta=1-T_C/T_H$, can we say that the engines of cars are more efficient on cold days where $T_C$ (the temperature of the surroundings) is less than on hot days?


I am looking to launch an app within the next few days on the store. I have done this before in the past under a parents name but as I am 17 and will be 18 in a few months wandered whether it would be worth signing up to the program with my own account now.  I have read other posts on the min. age being 18 but is there anything that could feasibly happen as a result of this? Or am I just better off doing it under my parent for another year?

When I registered to be an Apple Developer, I inadvertently did so without realizing the requirement to be 18 years of age (I was 17 and 6 months away from being 18 at the time). I did not take out any sort of paid membership at the time, however.  I am now 20, will this cause me any problems now or is it nothing I need to worry about?


I am trying to format the chaptertitles in my dissertation, but titlesec doesn't seem to work...     \documentclass[12p]{report} \usepackage[T1]{fontenc} \usepackage{fontspec} \usepackage[utf8]{inputenc} \setmainfont{Times New Roman} \usepackage{newunicodechar} \newunicodechar{ő}{\H{o}} \newunicodechar{ű}{\H{u}} \PassOptionsToPackage{defaults=hu-min}{magyar.ldf} \usepackage[magyar]{babel} \usepackage[autostyle]{csquotes} \DeclareQuoteStyle{magyar}{,,}{''}{>>}{<<}  \usepackage{newtxtext,newtxmath} \usepackage[a4paper, margin=2.5cm]{geometry} \renewcommand{\baselinestretch}{1.5} \usepackage{titlesec}  \titleformat{\chapter}[block] {\normalfont\chapfnt\bfseries}{\chaptertitlename\ \thechapter}{12pt}{}  \begin{document} \title{TITLE OF MY DISSERTATION} \author{My name}  \maketitle  \include{chap1}  \end{document}   THe chap1 file: \chapter{Very very long chapter title to appear in multiple line in the begining of the chapter}  And my titles look like this:  Basically, I would want my chapter title to begin in the same line as the label, 12 point, times new roman, standard stuff, but for some reason, this code doesn't work. Any help is greatly appreciated!!

I cannot find a way to change chapter style with babel included (for hungarian language). Here is the example:  \documentclass[a4paper]{report} \usepackage[magyar]{babel} \usepackage{titlesec}  \titleformat{\chapter}[hang] {\normalfont} {\LARGE\thechapter.} {10pt} {\LARGE\MakeUppercase} [\normalfont] \titlespacing{\chapter}{0pt}{0pt}{30pt}[0pt]  \begin{document} \chapter{First chapter} \end{document}   If I comment out the \usepackage[magyar]{babel} line, everything works as expected, however, with babel it does not work. Is it possible to style chapters (and sections, etc.) while using babel?


I have this application and it needs admin rights (I am an admin already), but I need to run it very often and it's becoming quite annoying have to click "Yes" every time. Is there a way to prevent the popup and automatically grant the permission for this specific program?

I'm want to grant a user administrative rights to one application on Windows 7. I don't want them to be able to have full admin rights, but admin rights are required for one of the applications they need to use.   Is there a way to set up a batch script or something where the user won't know it's being run as admin?  Or is there another way?  How can I accomplish this?


I am using Ubuntu 12.10. Since Ubuntu 12.10 has reached "end of life" I am unable to download and install softwares which I require. when I type the following command in terminal I get the following message.  $ do-release-upgrade -d Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Err Upgrade tool signature                                                                                404  Not Found [IP: 91.189.91.13 80]                                                                                Err Upgrade tool                                                                                404  Not Found [IP: 91.189.91.13 80]                                                                                Fetched 0 B in 0s (0 B/s)                                                                                WARNING:root:file 'raring.tar.gz.gpg' missing Failed to fetch Fetching the upgrade failed. There may be a network problem.   The command "Ubuntu-support-status" gives the following...  ashish@Ashish:~$ ubuntu-support-status Support status summary of 'Ashish':   You have 1987 packages (100.0%) that can not/no-longer be downloaded You have 0 packages (0.0%) that are unsupported  Run with --show-unsupported, --show-supported or --show-all to see more details   Can you  tell how to upgrade  Ubuntu 12.10 to Ubuntu 14.04 LTS or any other version...

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I have been looking around the net for solutions but I just cannot get rid of this error.  sudo apt-get update Ign http://archive.canonical.com saucy InRelease                                Ign http://extras.ubuntu.com saucy InRelease                                    Ign http://ppa.launchpad.net saucy InRelease                                    Get:1 http://glug.nith.ac.in saucy InRelease                                    Get:2 http://qgis.org saucy InRelease [3,187 B]                                 100% [1 InRelease gpgv 9,491 B] [Waiting for headers] [Waiting for headers] [WaSplitting up /var/lib/apt/lists/partial/glug.nith.ac.in_ubuntu_archives_dists_sauIgn http://glug.nith.ac.in saucy InRelease                                      E: GPG error: http://glug.nith.ac.in saucy InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)   EDIT: This particular error disappeared upon changing the server to the main Ubuntu server. There were a few errors with 404 not found, and I removed those ppas from the software list. On a sidenote, I recently removed and purged qgis so don't know what its doing there.

After installing Ubuntu 13.10 I try to install ubuntu-restricted-extras or any software, it shows me:  E: GPG error: http://archive.canonical.com saucy InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication


i'm confused i need your help developers!  MyApp launch ERROR java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference a work with RecyclerView and CardView with a Fragment.   @Override public int getItemCount() {     //ERROR NullPointerException    return visitaList.size();  }   Entire Adapter Java Code  public class VisitaAdapter extends RecyclerView.Adapter {  private Context context; private List<Visita> visitaList;  public VisitaAdapter(Context ctx, List<Visita> visitaList){     this.context = ctx;     this.visitaList= visitaList; }  @Override public VisitaViewHolder onCreateViewHolder(ViewGroup parent, int viewType){     //inflating and return our view holder     LayoutInflater inflater = LayoutInflater.from(context);     View view = inflater.inflate(R.layout.layout_visita, null);     return new VisitaViewHolder(view); }  @Override public void onBindViewHolder(VisitaViewHolder holder, int position) {     //getting the product of the specific position     Visita visita =visitaList.get(position);      //binding data with the viewholder     holder.textViewEmpresa.setText(visita.getTitle_empresa());     holder.textViewMision.setText(visita.getMision());     holder.textViewFecha.setText(visita.getFecha());      holder.imageView.setImageDrawable(context.getResources()             .getDrawable(visita.getImage())); }  @Override public int getItemCount() {     //ERROR NullPointerException    return visitaList.size();  }   class VisitaViewHolder extends RecyclerView.ViewHolder {     TextView textViewEmpresa, textViewMision, textViewFecha;     ImageView imageView;      public VisitaViewHolder(View itemView) {         super(itemView);          textViewEmpresa = itemView.findViewById(R.id.textViewEmpresa);         textViewMision = itemView.findViewById(R.id.textViewMision);         textViewFecha = itemView.findViewById(R.id.textViewFecha);         imageView = itemView.findViewById(R.id.imageView);      } }   }  Fragment launch the recyclerview  public class ReplantFrag extends Fragment {  //Adding to the list all items List<Visita> visitaList;  //The Recycler view RecyclerView recyclerView;  public ReplantFrag() {     // Required empty public constructor }    @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     // Inflate the layout for this fragment     View view = inflater.inflate(R.layout.fragment_replanta, container, false);      //getting the recyclerview from xml     recyclerView = (RecyclerView) view.findViewById(R.id.reciclerview);     recyclerView.setHasFixedSize(true);     recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));      VisitaAdapter adapter = new VisitaAdapter(getActivity(), visitaList);      recyclerView.setAdapter(adapter);      //agregar items a la maqueta Recycler+CardView       List<Visita> visitaList = new ArrayList<>();      //adding items in list     visitaList.add(new Visita(             1,             "ARAUCO S.A.",             "Revisión Caldera",             "20-01-2018",             R.drawable.arauco_logo));      visitaList.add(new Visita(             2,             "ARAUCO S.A.",             "Inspeccion Nariz Toro",             "22-01-2018",             R.drawable.arauco_logo));      visitaList.add(new Visita(             3,             "COLBUN S.A.",             "Revisión Tuberias",             "25-01-2018",             R.drawable.colbun_logo));      return view; }   }  Thanks Mate!!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am wondering how to prove the formula $|HK| = \dfrac{|H| \; |K|}{|H \cap K|}$ where $H$ and $K$ are finite groups. Let $|H|$ denote the order of $H$ and so on.  I have seen proofs from these websites:  and .  But I do not really understand the idea of the proof. Can someone explain the proof to me, please? Thanks so much.

I just read about the First and Second Isomorphism Theorems in the book Abstract Algebra by Dummit and Foote. After proving the Second Isomorphism Theorem, they said:        Proposition 13 isn't really important for my question (I guess) but anyway it is the one that states that if $H$ and $K$ are two finite subgroups of $G$ then $|HK|=\dfrac{|H||K|}{|H\cap K|}$.  I didn't understand why $|AB:A|=|B:A\cap B|$. It is obvious if $AB$ is finite because using the Second Isomorphism theorem we have $|AB:B|=|A:A\cap B|$ because $AB/ B \cong A/ A\cap B$. Then $$ |AB:B|=\dfrac{|AB|}{|B|}\quad\textsf{and}\quad|A:A\cap B|=\dfrac{|A|}{|A\cap B|}\\[0.3in] \implies\dfrac{|AB|}{|B|}=\dfrac{|A|}{|A\cap B|}\\[0.3in] \implies\dfrac{|AB|}{|A|}=\dfrac{|B|}{|A\cap B|} $$ which proves that $|AB:A|=|B:A\cap B|$, but this doesn't prove it if $A$ or $B$ is infinite and I believe there's a simple general proof that under the asssumptions in Theorem 18 we get $|AB:A|=|B:A\cap B|$. Could anyone please help me? If the proof is easy (and I guess so because they stated the relation in the book like if it was obvious) then could you give me hints?  Thank you in advance!


I have just installed Ubuntu 14.04 (64bit) and can't watch Netflix, just wondering if there’s a way round this. Thanks.

Is there a way to stream Netflix content to my Ubuntu machine?


I wrote a simple query to get latest posts  SELECT TOP 10 * FROM Posts ORDER BY CreationDate DESC   and the result it returns are dated 2015-07-12 (today is 2015-07-16).   Is the data 4 days behind?

When I use , the results I get don't reflect recent activity. Sometimes the data I get back are two months out of date. What's wrong? This is intended to be a canonical reference for questions about SEDE not reflecting real-time results.


Find all function $f \colon \mathbb R \to \mathbb R$ such that $$\large f(xf(y)) + f(yf(x)) = 2xy, \forall x, y \in \mathbb R$$   Me, thinking about things without noticing the lesson: I wonder what is the hardest problems about function equations?  My maths teacher: Let's move on the next problem which you can see on the board there, Thành Đạt!  30 minutes later...  Everyone in class: Well, we can calculate the value _$f(0)$ and prove that $f(xf(x))$ equals to-  That one kid who is certainly better than everyone (and is studying advanced calculus while you haven't started on the basics yet): Also, it can also be proven that $f(1) = \pm 1$.  (Everyone knows that.)  My maths teacher: Actually, this problem has only been proposed yesterday so there hasn't been a solution yet. Let us work this out together.  After 1 hour of figuring out what we are doing with our lives...  My maths teacher: That there's the answer, $f(x) = \pm 1, \forall x \in \mathbb R$, and don't write that down in the actual test if there is a problem in a competition that is similar to this. I've taken a shortcut just because-  Me: I want to go home.  My maths teacher: Thank you for finishing my sentence but please don't interrupt me, again.  So I have provided the solution below, please help me with coming up with a shorter solution.

Find all function $f:\mathbb{R}\rightarrow \mathbb{R}$ so that $f(xf(y))+f(yf(x)=2xy$.  By putting $x=y=0$ we get $f(0)=0$ and by putting $x=y=1$ we get $f(f(1))=1$. Let $y=f(1)\Rightarrow f(x)+f(f(x)f(1))=2x$, which tells us that $f$ is an injective function. The only solutions I came up with so far are $f(x)=x$ and $f(x)=-x$.


I'm trying to find a way to split a string based on space, but haven't been able to find any simple or working solutions online. In python, we had a .split() function that worked easily, but not in C++.  For example, I'm trying convert this string:  "I love 29 pies"   to this vector:  {"I", "love", "29", "pies"}   Thanks in advance!

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


Can I use Choice Ethanol Gel Chafing Dish Fuel to cook marshmallows, or do I have to use a certain kind.

It's become common practice around my apartment to use a sterno to roast marshmallows because it's easy, cheap and (primarily) because we can't have a campfire in my living room.  Is this dangerous?


How to see first and last 5 lines of file?  Right now I am using   head filename ; tail filename  Any other way around and more efficient?

I have a file with many rows, and each row has a timestamp at the starting, like  [Thread-3] (21/09/12 06:17:38:672) logged message from code.....   So, I frequently check 2 things from this log file.   First few rows, that has the global conditions and start time is also given. Last few rows, that has the exit status with some other info.   Is there any quick handy single command that could let me display just the first and last few lines of a file?


Given a series of almost identical answers, what is the proposed etiquette on which one to accept? Do I go for the user with the lower rep, or do I award it based on who answered first (of course accuracy comes first)?

Lately I've been getting some good answers to some specific questions. However, I've been hesitating on what answer I should accept.  Do I go with the short quick answer or do I accept a later answer where someone has elaborated on the previous answer with some code?  It's not really important but it kind of bugs me to not accept an answer when people have taken the trouble of replying.  Here's two examples:


I want know how to disable discrete graphic in Ubuntu 14.04 ,my computer's gaphic cards are Intel and ATI 5650. I only want to use the Integrated card because the temperature of computer can stay low.

I could disable ATI discrete graphics in Ubuntu 13.10 with this command:  echo OFF > /sys/kernel/debug/vgaswitcheroo/switch   But in Ubuntu 14.04 it does not work. cat /sys/kernel/debug/vgaswitcheroo/switch shows the same:  0:IGD:+:DynPwr:0000:01:05.0  1:DIS-Audio: :Pwr:0000:02:00.1  2:DIS: :DynPwr:0000:02:00.0    What should I do in Ubuntu 14.04?


With the following line of code:  System.out.println(Arrays.toString(ar));   My output is like this:  [2, 4, 6, 8, 8]   And when I simply print out the array:  System.out.println(ar);   My output is:  [I@78f1f2cc   How do I print out 2 4 6 8 8 without using a for loop?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


In page : $206$ of the following electronic textbook :  , the author says that the Hilbert function of $ S_X $ is : $$ \mathrm{dim} \ ( S_X )_d = \begin{pmatrix} n+d \\ n \end{pmatrix}  - \begin{pmatrix} n+d-s \\ n \end{pmatrix} $$ with, $ X $ is any hypersurface of degree $s$ in $ \mathbb{P}^n $.  Can you explain to me please, what is $ S_X $, and how do we obtain this formula above ?  Thanks in advance for your help.

Let $X$ an hypersurface in $\mathbb{P}^{n}$ of degree $d$. I would like to prove that the Hilbert polynomial of $X$ is  $\qquad \qquad \qquad \qquad \qquad \qquad p(n)= \begin{pmatrix} n+r \\ n \end{pmatrix} - \begin{pmatrix} n+d-r \\ n \end{pmatrix} $  In the book "Geometry of Algebraic Curves Vol. II", Arbarello, Cornalba, Griffith, p. 7, I read that this result can be proved by taking the cohomology of the following exact sequence  $ \qquad \qquad \qquad \qquad \qquad 0 \longrightarrow \mathcal{O}_{\mathbb{P}^{r}}(n-d) \longrightarrow \mathcal{O}_{\mathbb{P}^{r}}(n) \longrightarrow \mathcal{O}_{\mathbb{P}^{r}}(d) \longrightarrow 0 $  Nevertheless, I am not able to compute $p(n)$.


I have a document that I want in two different versions, and the difference being the language only.  is a way of achieving this, but I am unsure about how to get this to work for LaTeX/Tex files. Do anyone have any experience with this?  I am aware of ifthen and \newcommand, but it's getting a bit messy.

Consider that you are working on a standard that should be translated into some other languages. The document structure (figures, table structures, ...) is constant among languages. Is there any facility/technique/strategy/package to streamline multilingual documents production?  Is it possible to use a -like method in (la)tex?


How can I make buttons F1, ..., F12 behave as normal on Windows 10 and as buttons specifically for my laptop when pressing Fn+F...? By buttons which are specific for my laptop I mean volume buttons, light buttons, touchpad button and so on.  My laptop is Lenovo B50-10.

I just have bought a new Lenovo Ideapad S400u notebook, and it is not default F1-F12, it is default mute button, refresh, more brightness, less brightness...  I've downloaded "Lenovo Keyboard Slim Fn Switcher" or something like that, but it didn't work.  Then, how can I change Fn function to get my F1-F12 buttons? I'm running Windows 8.1.


I am trying to parse a string line which has comma separated values in and keep in the Vector. The challenge is that i m unable to retain the precision values after certain position. Below is the code which i am trying.     string name = "1, 0, -23.5346 -412.13647, 0, 11.2, 0.4, -2233.12345, 0, 0, 0, 567.46436, 0, 0, 1.654321, 0.1232"      stringstream ss(name);     vector<string> result;     int cc=0;      while (ss.good ()) {             string val;             getline (ss, val, ',');             cout <<"value for "<<cc<< " is "<<std::stod(val)<<endl;             result.push_back(val);             cout <<"cc "<< cc;              cc++;      }       The output i received is   value for 1 is 1 value for 2 is 0 value for 3 is -23.5346 value for 4 is -412.136 value for 5 is 0 value for 6 is 11.2 value for 7 is 0.4 value for 8 is -2233.12 value for 9 is 0 value for 10 is 0 value for 11 is 0 value for 12 is 567.464 value for 13 is 0 value for 14 is 0 value for 15 is 1.65432 value for 16 is 0.1232   In the above code, I am unable to retrain the precision values, for example instead of -412.13647, the value -412.136 is stored. How can i Resolve this issue?

In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?


I have a few sets of scripts that I've written to make setting up linux very simple. So I have made those scripts into separate functions instead and put it all in one script. I have numbers set so when the user inputs one of the numbers, it will call that function. However, when the user inputs one number, the script calls ALL the functions:  n=1 #note you need spaces between [ ] while [ $n == 1 ] do     echo "Base install=1"     echo "Mintrepos=2"     echo "Asusn13 driver=3"     echo "Install Standard openbox=4"     echo "Install Xfceopenbox=5"     echo "backing up standard open box config=6"     echo "backing up openboxfce=7"     echo     read choice     if [ "$choice"==1 ]     then         baseinstall     fi     if [ "$choice"==2 ]     then         linuxmintrepos     fi     if [ "$choice"==3 ]     then         asusn13driver     fi     if [ "$choice"==4 ]     then         standardopenbox     fi     if [ "$choice"==5 ]     then         xfceopenbox     fi     if [ "$choice"==6 ]     then         backupstandopenbox     fi     if [ "$choice"==7 ]     then         backupxfc4openbox     fi     echo "You installed: "     if [ "$choice"==1 ]     then         echo "baseinstall"     fi     if [ "$choice"==2 ]     then         echo "linuxmintrepos"     fi     if [ "$choice"==3 ]     then         echo asusn13driver     fi     if [ "$choice"==4 ]     then         echo "standardopenbox"     fi     if [ "$choice"==5 ]     then         echo "xfceopenbox"     fi     if [ "$choice"==6 ]     then         echo "backupstandopenbox"     fi     if [ "$choice"==7 ]     then         echo "backupxfc4openbox"         echo "If you would like to keep going, type in 1, if not, type in any other number"     read n     fi  done

I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month="01"] && [$day="01"]; then         date="$last_month/$yes_day/$last_year"         fulldate="$last_month/$yes_day/$last_year" else         if [$month="01"] && [$day="02"]; then                 date="$last_month/$yes_day/$last_year"                 fulldate="$last_month/$yes_day/$last_year"         else                 if [ $day = "01" ]; then                         date="$last_month/$yes_day/$year"                         fulldate="$year$last_month$yes_day"                 else                         if [ $day = "02" ]; then                                 date="$last_month/$yes_day/$year"                                 fulldate="$year$last_month$yes_day"                         else                                 date="$month/$yes_day/$year"                                 fulldate="$year$month$yes_day"                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found


String abc=11235.271; Float.parsefloat(abc);   o/p 11235.271 no data loss  while as in  String abc=58996.706; Float.parsefloat(abc);   o/p 58996.707   .001 is getting added after decimal  Can anyone pls help me on this

public class doublePrecision {     public static void main(String[] args) {          double total = 0;         total += 5.6;         total += 5.8;         System.out.println(total);     } }   The above code prints:  11.399999999999   How would I get this to just print (or be able to use it as) 11.4?


I am a Ghanaian male. A 3rd year non working Medical student in the carribean but a registered Pharmacist in my home country. But currently in the carribean. I was refused a standard visitors visa for which I wanted to visit the Uk for 3weeks for vacation and return to school. I would like to reapply this December for vacation. I would really appreciate any recommendations and criticisms as to what I have to do in order to increase my chances of getting the visa. Thank you.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I saw this question in a paper and was not able to solve it. Assume that we are given an efficient algorithm called RSA_break() that can decrypt, without the knowledge of the private key, 1% of all possible ciphertexts encrypted using the public key (n,e) in RSA. Basically, for a single ciphertext, RSA_break() will deterministically output the entire original plaintext or return a failure. For 1% of the set of all possible ciphertexts, RSA_break() always succeeds, while for the rest 99%, it will always fail. How can I use this RSA_break() function as a building block to build an efficient algorithm to break all possible ciphertexts?

I was given a cryptography question during an interview the other day.   Imagine you are given an efficient algorithm which for a given RSA public key (n,e) is able to decrypt 1% of the messages encrypted with that key.   1% means that the algorithm will deterministically decrypt 1% of all possible ciphertexts on the first call, and will never decrypt the other 99% of all possible ciphertexts with any number of invocations.   Figure out an algorithm that uses this one and can decrypt any message. Any ideas?


Many years ago, I bought around 400 BTC for a few hundred dollars (?) and stored them in a hard drive. Shortly after that, I lost this hard drive, wrote it off as an "Oh well" and didn't think anything more of it.   Last week I found the hard drive and, according to Google, it's worth around 1,000,000 USD.  I know how to sell the btc, I just don't know what will happen to me if I do and what I should prepare myself for legal and tax-wise. I would like that money, but have no idea what kind of tax and legal cataclysm I should expect, as I have no documentation on what I paid for them, or even where they came from. I am in the US, in Michigan.  I really don't know much about bitcoin, so if there is a way to track this stuff down I would be grateful if someone could share it with me.  What steps do I need to take to declare this money and obtain it without getting arrested / investigated?

My friend owns roughly $1M USD worth of Bitcoin. These coins are sitting on a (backed up and encrypted) hard drive in Brasil. He bought these coins legitimately, and has the paper trail to prove it.   He recently moved to the US, and now wants to get his coins and liquidate them.  I've been doing research on this topic, and I am unsure what kinda of taxes he will have to pay on these coins.  I've seen articles talking about capital gains tax from buying / selling coin, but he is not trading them in the US.  My thoughts lead me to think that this would be similar to him bringing over a ton of gold or other assets, and selling them off here, which makes me think of paying a sales tax.  As Bitcoin is still a newer development in the tax world, I am struggling to find any documentation on steps for this, so any feedback / options would be great.


I have a table and I want to rotate it. The table has 3 rows and 4 columns, and I want to rotate the text inside this table as well. How can I do this?


What's the difference between these would an should, for example in these sentences?      Why would I open an account to insult you?      Why should I open an account to insult you?

I was wondering if someone could explain the subtle difference between these sentences:  1) Monday should be fine.  2) Monday would be fine.  This is in the context of someone asking if they could help me out on Monday instead of on Sunday. I am a little confused about the difference between the usage of 'should' and 'would' here. Both seem to fit. I personally seem to prefer 'should' but I can't explain why. Any help would be appreciated.  Thanks.


I have this code:  enum type{FOO, BAR}  class base{     funct(type t); } class other : base{     funct(type t); }  int main(){     base x;     x = other();     x-funct(FOO); //This call base::funct() }   Always call to base function, i dont get it.

Someone mentioned it in the IRC as the slicing problem.


Let $V$ be a $continuous$ vector-field defined on a domain $U$ in $R^n$ . Let $x_0$ be a point in $U$. Is it true that the differential equation $\frac{dx}{dt}$ = $V(x)$ admits a solution $\phi(t)$ satisfying initial condition $\phi(0)$=$x_0$    defined on some open interval containing $0$.  By Arnold's Book Existence theorem I know that unique solution exists in case of smooth vector field.But here vector field is only $continuous$.Can we have counterexample in this case?

I've recently seen the existence-uniqueness theorem for ordinary differential equations from Arnold's book. I understand that the theorem as stated guarantees both existence and uniqueness if the corresponding vector field is continuously differentiable. I've also noticed that in most examples where unique solutions don't exist, the differentiability of the vector field is missing. My question is, will any weaker condition suffice to guarantee only the existence (and not necessarily the uniqueness) of an ODE? Is it for example true that if the vector field is just continuous, a solution exists even if not unique?  I went through , but this doesn't seem to answer my doubts completely.


I was not aware that, when searching by zip code, the careers site . (As per the  of the answer to the above bug report, I am opening a feature request to have this changed.)  While I completely understand the reasons for this (I think Stack Exchange deserves to earn a profit), this is a bit limiting for users who want to find out what kinds of companies exist in a geographic area, whether they are actively hiring or not. It's a great networking opportunity!  I'd really like to see these companies whether or not they have job postings available. I have two proposals:   Could we add a difficult-to-find or "hidden" feature of some kind to include all companies in a zip code search? Maybe a non-prominent checkbox on an advanced search screen or a "poorly" documented search criteria (like "include:all" or "onlyjobs:false")? The incentive for paying for a job listing would still be there since users would need to go out of their way to use this feature (thus reducing "hits" on the company's profile). If the first isn't palatable (which I could understand), could you at least give companies the option to pay for placement in zip code searches, job listing or no? Companies with job listings would get priority placement (at the top of the list) and/or companies with no job listing would be grayed out with a notice ("0 job listings"). Any kind of search which includes criteria other than zip code (such as "c#") would automatically filter out companies with 0 job listings.   Example scenarios:   I'm interested in a job listing in another city, but I want to know whether or not there are other companies in the area before I pursue it seriously (you know, in case things don't work in the first couple months). I am fairly content with my current job, but I want to find out what else is going on in my hometown, maybe connect/cooperate with other developers doing similar/compatible things.     I'll add that companies which have no job postings (yet) have very little incentive to list themselves on careers if they can't be discovered. This proposal would provide some additional incentive to list themselves (which would look good in your advertising: "200,000 companies listed and growing...") and, with option 2, also provide a little extra cash to help pay for improvements to the service.

On Careers, if I type in our postal code (48326), it does not reveal our company page even though our postal code is entered as 48326 on our Careers company page. If I instead do a search by company name as thyssenkrupp, then our company page appears.  I believe most candidates will first search by city or postal code rather than by name, and we could be missing great talent. Is this a bug or does the search ignore the postal code or what gives?


Good Evening,   My code won't round off, and I don't know why! Please help!  import java.util.*; import java.math.*;  public class Arithmetic {      public static void main(String[] args) {         Scanner scan = new Scanner(System.in);          int tipPercentage;  // tip percentage         int taxPercentage;  // tax percentage         int totalTip;       // total tip         int totalTax;       // total tax         double mealCost;    // original meal price         double totalCost = 0.0; // total meal price          // Write your calculation code here.             mealCost = scan.nextDouble();             tipPercentage = scan.nextInt ();             taxPercentage = scan.nextInt();              totalCost += mealCost;             totalCost += mealCost*tipPercentage/100;             totalCost += mealCost*taxPercentage/100;           // cast the result of the rounding operation to an int and save it as totalCost              mealCost=(int)Math.round(totalCost);           // Print your result         System.out.println (" The total meal cost is " + totalCost + " dollars. ");     } }

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I am currently looking whether a group G of the following order is simple or not  $ord(G)=100$ $ord(G')=200$  We have first that for $G$, $ord(G)=2^25^2$. For $G'$ we have that $ord(G')=2^35^2$. Now with the third theorem of Sylow we have, that in both case there is only one $5-$Sylowgroup. But why $G$ is not simple, while $G'$ is simple? I just try to follow the thinking of this site

Show that any group of order 200 is not a simple group.   I have started with the sylow 5-subgroup, but the sylow 2 subgroups i found that they are 25 subgroup but i couldnt proceed in the proof any more! Please help.


Once someone asked me the question "What is linearity?" in a proficiency exam. I went hot and cold all over. Although, I heard and even used the term linearity many many times, I had not really thought about it until that time. After a hopeless discussion, he said linearity is the satisfaction of the following conditions:  $$f(x+y)=f(x)+f(y)$$ $$f(ax)=af(x)$$  Since then I have no idea about linearity. Because there are:   Linear equations Linear differential equations Linear algebra Linear programming Linear interpolation and so forth...   According to the definition even a straight line $y=mx+n$ cannot be considered linear as long as $n\neq0$. But there are so many linearities.   So, what is this term linearity?

I hear so many terms involving the word "linear". Linear function, linear equation, linear system, linear operator, linear transformation, linear mapping, linear space, linear algebra, linear electrical circuits, linear filters, linear electrical elements, linear approximation, linear optimization.  I'm getting crazy trying to understand the application of the "linear concept" to all this aspects (function, equation, mapping, system, operator, transformation, algebra, etc.) and I wish to know the one essence that is to be linear. What something has to be to be linear? If I say something is linear, what do I know for sure about that something (no matter what the something is)?       I heard a definition of linearity is by homogeinity (scaling the input results in a scaled output) and addition (summing the inputs results in summing the outputs). Can I apply this simple definition to all the branches (operator, mapping, system, transformation, algebra, ...) I mentioned ? Do they all behave like a line ?  y = ax + b, for example, is a line but doesn't behave like a line because y is not linear.


I saw a story on TV when I was a child (in the 80s) that involved a man working from earth to transform the climate of Mars. Then, later, he travels to the surface of Mars, and discovers the corpses of Martian life forms everywhere, which I remember as being made of a lot of squidgy tubes, like octopi or kelp (not humanoid at any rate). He's filled with heartbreak and regret.  I'm pretty sure this isn't from one of the adaptations of The Martian Chronicles.

I have been searching for the name of a short sci-fi film for decades.  The story is about a team of scientists who figured out a way to terraform Venus by sending algae plants there in a rocket which changes the atmosphere so that humans can live there.  At the end, it works, but the first people that arrive on Venus discover that the algae has killed the native Venusians, a race of worm-like creatures.  The final shot (as I remember it) is of an astronaut finding a half-sphere with writing on it, and he says “it wasn't much, but it showed that they were intelligent…”  I saw it on TV in probably the late seventies or early eighties, possible as an HBO short take that they would show to fill time in between movies.  Does this sound familiar to anyone?