What I'm trying to do   I've created a shell script that I've added to my $PATH that will download and get everything setup for a new  project. I would like the script to end by changing my terminal directory into the new project folder.   From what I understand right now currently it's only changing the directory of the sub shell where the script is actually running. I can't seem to figure out how to do this. Any help is appreciated. Thank you!  #! /usr/bin/env bash  echo -e '\033[1;30m=========================================='  ## check for a directory if test -z "$1"; then   echo -e ' \033[0;31m✖ Please provide a directory name'   exit fi  ## check if directory already exist if [ ! -d $1 ]; then   mkdir $1 else   echo -e ' \033[0;31m✖ The '"$1"' directory already exists'   exit fi  # move to directory cd $1  ## Download Laravel echo -e ' \033[0;32m+ \033[0mDownloading Laravel...' curl -s -L https://github.com/laravel/laravel/zipball/master > laravel.zip  ## Unzip, move, and clean up Laravel echo -e ' \033[0;32m+ \033[0mUnzipping and cleaning up files...' unzip -q laravel.zip rm laravel.zip cd *-laravel-* mv * .. cd .. rm -R *-laravel-*  ## Make the /storage directory writable echo -e ' \033[0;32m+ \033[0mMaking /storage directory writable...' chmod -R o+w storage  ## Download and install the Generators echo -e ' \033[0;32m+ \033[0mInstalling Generators...' curl -s -L https://raw.github.com/JeffreyWay/Laravel-Generator/master/generate.php > application/tasks/generate.php  ## Update the application key echo -e ' \033[0;32m+ \033[0mUpdating Application Key...' MD5=`date +”%N” | md5` sed -ie 's/YourSecretKeyGoesHere!/'"$MD5"'/' application/config/application.php rm application/config/application.phpe  ## Create .gitignore and initial git if -git is passed if [ "$2" == "-git" ]; then   echo -e ' \033[0;32m+ \033[0mInitiating git...'   touch .gitignore   curl -s -L https://raw.github.com/gist/4223565/be9f8e85f74a92c95e615ad1649c8d773e908036/.gitignore > .gitignore    # Create a local git repo   git init --quiet   git add * .gitignore   git commit -m 'Initial commit.' --quiet fi  echo -e '\033[1;30m==========================================' echo -e ' \033[0;32m✔ Laravel Setup Complete\033[0m'  ## Change parent shell directory to new directory ## Currently it's only changing in the sub shell filepath=`pwd` cd "$filepath"

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


Let's say I'm planning to buy some length of Kanthal-A1 wire. To power it, I have a 120 volt, maximum 20 amp power supply (my wall outlet). That part is okay. The problem is, I want it to be able to reach a certain temperature (1200 c), but the only thing I can control is the resistance! How can I figure out the max temp it'll be able to reach by only controlling the resistance?

The wire I am using is standard temp. nitinol wire which needs to be heated up to 45 degrees Celsius in order to be effective (move). What voltage do I need to achieve this?


I have a problem in my bibliography, I have several sources of the same author in the same year. They are automatically supplemented in the bibliography with a/b/c and so on. In the PDF output they are displayed in the wrong (at least not the right for me) order.  \usepackage[   backend=bibtex8,   style=authoryear-comp,   dashed=false,   hyperref=true,   maxbibnames=9,   maxcitenames=3,   firstinits=true,   isbn=false,   url=false ]{biblatex} \usepackage[autostyle=true,german=quotes]{csquotes} \DeclareFieldFormat{postnote}{#1} % no prefix «S.» before page in citation \renewcommand{\labelnamepunct}{\addcolon\addspace} % colon instead of dot before title \DefineBibliographyStrings{ngerman}{andothers={et\ al\adddot}} %et al. instead of u.a. \DeclareFieldFormat{pages}{#1}% no prefix for the `pages` field in the bibliography   These are my entries from the bibliography file:  @Misc{2016Kommissiononline2,   Title                    = {Single European Sky},   Author                   = {{Europäische Kommission}},   HowPublished             = {\url{http://ec.europa.eu/transport/modes/air/single_european_sky/index_en.htm}. Zugriff am: 15.07.16},   Year                     = {2016},   Owner                    = {lebster},   Timestamp                = {2016.07.12},   Url                      = {http://ec.europa.eu/transport/modes/air/single_european_sky/index_en.htm} }  @Misc{2016Kommissiononline23,   Title                    = {Single European Sky 2+},   Author                   = {{Europäische Kommission}},   HowPublished             = {\url{http://ec.europa.eu/transport/modes/air/single_european_sky/ses2plus_en.htm}. Zugriff am: 27.07.16},   Year                     = {2016},   Owner                    = {lebster},   Timestamp                = {2016.07.15},   Url                      = {http://ec.europa.eu/transport/modes/air/single_european_sky/ses2plus_en.htm} }   This is the respective output:    Has anyone an idea how to get the a/b/c entries in an alphabetical order?

The following MWE  \documentclass{article} \usepackage[utf8]{inputenc}  \RequirePackage{filecontents}  \begin{filecontents}{debug.bib} @online{physx, author = {{Nvidia Corporation}}, key = {Nvidia Corporation}, title = {PhysX}, year = {2017}, url = {https://developer.nvidia.com/physx-sdk}, language = {eng}, version = {3.3}, organization = {Nvidia Corporation}, date = {2017}, month = {04}, urldate = {2017-04-30}, }  @phdthesis{Wald04, author = {Wald,Ingo}, title = {Realtime ray tracing and interactive global illumination}, school = {Universität des Saarlandes}, year = {2004}, address = {Postfach 151141, 66041 Saarbrücken}, language = {eng}, URL = {http://scidok.sulb.uni-saarland.de/volltexte/2004/319}, }  \end{filecontents}   \usepackage[%   backend=bibtex      % biber or bibtex  ,style=alphabetic    % Alphabeticalsch  ,citestyle=alphabetic  ,sorting=anyt        % no sorting  ,sortcase=false  ,sortcites=true      % some other example options  ,isbn=true  ,url=true  ,doi=true            % prints doi  ,natbib=true         % if you need natbib functions  ]{biblatex} \addbibresource{debug.bib} \begin{document} \nocite{*} \printbibliography \end{document}   does sort the bibliography as   Wald Nvidia   However, how can I sort them alphabetically as   Nvidia Wald   When I change the backend for this MWE to biber instead of bibtex it sorts them correctly but I need to remove the address field as it can not process the adress field. Maybe because of the "ü" or because of the "," (Invalid argument)  As the template I have to use throws hundreds of errors when using biber I really would like to get this working with bibtex. I assume the reason is because of the {corporate name} author which are all sorted AFTER the personal authors.


Show that the system of all matrices of the special form  $$     \begin{pmatrix}     \alpha & \beta \\     -\beta & \alpha \\     \end{pmatrix} $$  combined by matrix addition and matrix multiplication, is isomorphic to the field of complex number.  How do i start showing this ?  And first of all how can matrix have a one to one connection with complex numbers

I have been trying to prove this, but I am having trouble understanding how to prove the following mapping I found is injective and surjective. Just as a side note, I am trying to show the complex ring is isomorphic to special $2\times2$ matrices in regard to matrix multiplication and addition. Showing these hold is simple enough.  $$\phi:a+bi \rightarrow \begin{pmatrix} a & -b \\ b & a \end{pmatrix}$$  This is what I have so far:  Injective: I am also confused over the fact that there are two operations, and in turn two neutral elements (1 and 0). Showing that the kernel is trivial is usually the way I go about proving whether a mapping is injective, but I just can't grasp this.  $$ \phi(z_1) = \phi(z_2) \implies \phi(z_1)\phi(z_2)^{-1} = I = \phi(z_1)\phi(z_2^{-1}) = \phi(z_2)\phi(z_2^{-1}).$$  So if we can just show that the kernel of $\phi$ is trivial, then it also shows that $z_1 = z_2$. The only complex number that maps to the identity matrix is one where $a = 1$ and $b = 0$, $a + bi = 1 + 0i = 1$.  Using a similar argument for addition we can just say that the only complex number $z$ such that $\phi(z) = 0\text{-matrix}$, is one where $a=0$ and $b=0$, $a+bi=0+0i=0$.   Surjective:  I forgot to add this before I posted, but I honestly don't really understand how to prove this because it just seems so obvious. All possible $2\times2$ matrices of that form have a complex representation because the complex number can always be identified by its real parts and since the elements of the $2\times2$ matrix are real then the mapping is obviously onto.  I have always had trouble understanding when I can say that I have "rigorously" proved something, so any help would be appreciated!


At Code Review  for evaluation and got an interesting question: Could the class be made more generic? So, can it? There's no INumeric interface so I'm looking for options. I'm giving a simplified version of the code here:  public class Statistics<TNumeric>  {     public TNumeric Sum { get; private set; }     public long Total { get; private set; }     public void Add(TNumeric number)     {         Total++;         Sum += number;     } }   This is the very simplified version, focused on the part I want to improve. The TNumeric is a generic type and could be a double, int or something else. And it would almost work, except it knows of no plus operator on this type. So Sum += number; won't compile. Main issue is that I want to keep statistics with integers separate from statistics with floats.    So, how do I get this to work in my generic statistic class? Or is this still impossible in C#?

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


Is there way I can only show the tasks which are running in the Ubuntu dock which are running on the current virtual desktop instead of showing all the tasks?   I'm on Ubuntu 20.04.

I would like my Dock to show only the windows of the current workspace. Especially in the little preview window. I find it very confusing to jump around workspaces when trying to find the right window.


Currently when I use cmd.exe the red color is too dark and the blue and green colors don't apears. In other computers I don't have this problem. Using c:/windows/syswow64/cmd.exe in my computer I don't have this problem.  Previously I didn't change anything.  How I get normal colors?  The answers of the question  refers to reset all the look. I need only to undertand the colors.

I have made several customizations to how the Command Prompt window looks in Windows and now I want to reset it to its original state.  How can I do that? I just want it to look that way it does after you install Windows.


I've recently updated my ubuntu to 16.10 from 16.04 . I've ISO image of Ubuntu 16.04 (ubuntu-16.04-desktop-amd64.iso) but I donot have iso image of Ubuntu 16.10. How can create it so that I can share Ubuntu 16.10 with my friends and also as a backup in case I need to install it again in the future.  Thank You in advance...!!

How can I create an ISO image file of my Ubuntu system which I CAN INSTALL later ?  I used remastersys, but it created me only a live version. When I tried the install option on the generated ISO image file it acted as a live version whilst I need to install it on an other computer.


Is there really anything one can do to expedite vanquishing or neutralizing a victim in an incapacitated condition from Hypnotic Gaze?  The Wizard School of Enchantment gives the skill Hypnotic Gaze at 2nd level which leaves a creature that fails its save with the condition incapacitated. Incapacitated means the creature cannot take actions or reactions. Damage ends the effect.   Theoretically, using the reaction action, all damage from multiple PCs could be delivered at one time - but those attacks are not at advantage or auto-critical because incapacitated doesn’t mean paralyzed.   Though attaching manacles might seem to be one option or throwing the creatures weapon away so it is unavailable could be another - both apparently could be resisted by an incapacitated victim as noted by the first answer below.   What are other viable combat actions that could be used to optimally increase the chances of dispatching an opponent with the incapacitated condition?     Of note — this is not a duplicate of . None of the answers in that question apply. Paralyzed & unconscious creatures (which that question addresses) and sleeping creatures (which that question addresses) are not the same as incapacitated. Incapacitated simply means the creature cannot take actions or reactions. Attacks don’t have advantage and hits aren’t automatic criticals like with paralyzed or unconscious victims. The creature isn’t helpless when incapacitated - despite the typical real world meaning of the word. Lastly and most importantly, paralyzed and unconscious conditions don’t end with damage like the condition does with hypotic gaze which changes the possible actions. These are different questions requiring different answers.

There is no coup de grace mechanic in D&D 5e like there is in previous editions. So how is a helpless opponent dispatched quickly, mechanically? Is it just a matter of giving the opponent advantage?  It seems like one should be able to deal with someone who is under the effects of a sleep spell, for example, more quickly than just what a to-hit bonus enables.


In Google Webmaster tools I get duplicate content warnings for paging pages. How do I fix this? Do I need to add Page 2, Page 3, etc. to my meta description?     HTML Improvements   Duplicate meta descriptions Meta description   information can give users a clear idea of your site's content and   encourage users to click on your site in the search results pages.     I have these already in place.  <link href="http://site.com/youth-basketball-tournaments?page=2" rel="canonical" />  <link rel="prev" href="/youth-basketball-tournaments?page=1" /> <link rel="next" href="/youth-basketball-tournaments?page=3" />

I am having an issue with one of the websites.  Google is reporting that I am having duplicate meta descriptions for few pages. What we did is that we used URL rewrite to rewrite the pages to be more seo friendly. Here is one example with one of our product pages:  Old format:  www.mysite.com/Product.aspx?ProductID=12345&SKU=44412-2212A   New format:  www.mysite.com/Products/12345-44412-2212a.aspx   What we are doing now, when someone will ask for www.mysite.com/Products/12345-44412-2212a.aspx they are taken to www.mysite.com/Product.aspx?ProductID=12345&SKU=44412-2212A but the URL still remains www.mysite.com/Products/12345-44412-2212a.aspx.  But if someone type in www.mysite.com/Product.aspx?ProductID=12345&SKU=44412-2212A, they will see exactly the same page as www.mysite.com/Products/12345-44412-2212a.aspx since the data on the page is same.  What I was thinking is to block product.aspx pages in robots.txt file, but I don't know if that automatically will block Google bots from crawling this page too www.mysite.com/Products/12345-44412-2212a.aspx, since that one is only URL rewritted page from the other page format, www.mysite.com/Product.aspx?ProductID=12345&SKU=44412-2212A.  What do you guys think, how can we tackle this problem, any advice, because GWT is reporting that I have duplicate meta description issue, and those are the pages reported as duplicate, I want to have only one page per product?


Here's my code. I would like to not show the equation numbers to the right of the equations. Is that possible?  \frame[t]{ \frametitle{An Example} \vspace{0.1in} \begin{itemize} \item Since $A= ABUAB^c$ with $AB$ and $AB^c$ being mutually exclusive events, by Axiom 3,  \begin{align} P(A) &= P(AB)+P(AB^c) \\ &= P(A|B)P(B) + P(A|B^c)P(B^c) \\ &= P(A|B)P(B) + P(A|B^c)\lbrace1-P(B)\rbrace. \end{align} \end{itemize} }

I have an equation like this:     \begin{align}       P(A \cup B) = \sum_{\omega \in A \cup B} P(\omega) = \sum_{\omega \in A} P(\omega) + \sum_{\omega \in B} P(\omega)       = P(A) + P(B)     \end{align}   For some reason, LaTeX is automatically labeling the equation. How do I turn that off? Secondly how do I write something in LaTeX on this site. I tried enclosing in '$' but it doesn't work.


I came across this question when I tried to solve a math problem, and my solution was heavily based on this statement above. I find it very intuitive because you can't draw a continous function from one point of the plane to another (with different y's) without having to draw the line such that it is possible to find a very small interval on which the function is strictly increasing/decreasing. My question is the following: is this statement provable (and how the proof would unfold) or even true? I asked my math teacher whether there is a theorem about this topic, and he couldn't remember one.

Does there exist a nowhere monotonic continuous function from some open subset of $\mathbb{R}$ to $\mathbb{R}$? Some nowhere differentiable function sort of object?


I am adding materials to my model but the bottom edges of faces do not show the colour/material even if the rest of its faces are coloured. Why is this?  As you can see by the picture, the grey area above the indent is part of the face of the red material but it is not shaded red along with the rest of the face. The indented section only coloured the middle red and left the top and bottom material-less. How do I fix this?

I'm following  and I have applied a material to the body mesh and when I apply the material to the faces to the side of the mesh, I can see the top/bottom material is showing on the top and bottom parts of the side faces.  This is the rendered view:     and this is the wireframe showing the selected faces which the side material is applied to:    I'm not sure why this is happening, can anyone advise? Thanks


Munkres - topology p.278  I exactly followed the argument in the text, and I cannot find where I used hausdorffness. Where in the argument used Hausdorffness?  The reason why I am asking is that the article in wikipedia requires the Hausdorffness:   Wikipedia - Let $X$ be a compact Hausdorff space. Then a subset $F$ of $C(X)$ is relatively compact in the topology induced by the uniform norm if and only if it is equicontinuous and pointwise bounded.

The more general version of this theorem in Munkres' 'Topology' (p. 290 - 2nd edition) states that   Given a locally compact Hausdorff space $X$ and a metric space $(Y,d)$; a family $\mathcal F$ of continuous functions has compact closure in $\mathcal C (X,Y)$ (topology of compact convergence) if and only if it is equicontinuous under $d$ and the sets  $$ \mathcal F _a = \{f(a) | f \in \mathcal F\} \qquad a \in X$$  have compact closure in $Y$.  Now I do not see why the Hausdorff condition on $X$ should be necessary? Why include it then? Am I maybe even missing something here (and there are counterexamples)?  btw if you are looking up the proof: Hausdorffness is needed for the evaluation map $e: X \times \mathcal C(X,Y) \to Y, \, e(x,f) = f(x)$ to be continuous. But the only thing really used in the proof is the continuity of $e_a: \mathcal C(X,Y) \to Y, \, e_a(f) = f(a)$ for fixed $a \in X$.  Cheers, S.L.


I am using Ubuntu 16.04 and I am stuck into blue screen with no message.  Its just showing a cursor nothing else.    Any help is appreciated.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


public static void main (String args[]) {    Scanner io = new Scanner(System.in);   int a = io.nextInt();   io.nextLine();   for(int i = 0; i < a; i++ ) {        String input = io.nextLine();      String[] splitArr = input.split("\\s+");      int p[] = new int[input.length()];      int q = 0;      for (String par : splitArr) {        System.out.println(par);        p[q++] = Integer.parseInt(par);        System.out.println(p);      }      Sort(p);      } }      The input: 2 121213      Output: 121213 [I@1f96302   The last line shows the array stored in p[]. That is incorrect. Help someone!

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]


Installing 2Tb hybrid SSD/HD into Thinkpad T430. Bought it from ebay, not sure if NIB or ??? would like to test it before loading it up with Ubuntu 20 LTS. (Beginner) Currently running Ubuntu 16.04 LTS, I downloaded 20 and put it on a USB, it runs fine, AFAIK. No dual boot for the new install.

I suspect there might be bad sector on a disk. I used ext3 filesystem.  What tool is the best equivalent of the error checking tool of Windows?


How can I prove that the tensor $\mathbb{Q} \otimes \left( \prod_n \mathbb{Z}/n\mathbb{Z} \right)$, where the product is taken over all the positive integers $n$, is not trivial?

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


I am running Ubuntu 20.04 and, when I open the "applications" application (the checkerboard looking thing in the sidebar) some of the applications have duplicate icons, and, in the case of the Audacity sound editor, clicking on each one brings up an Audacity that behaves differently. I also have a "software updater" along with a "software and updates" plus a "Ubuntu Software" and; wait, there's more...a "snap store" Are these different "repositories?" and, when a box pops open saying "Updated software is available for this computer" with install now (or later) is that the way I should be updating; because I can also go to the "software and updates" and it will tell me the sources are out of date, I need an internet connection, and then will go to "refreshing cache" before hanging up, so I have to pull the battery out of the laptop then reboot (because I can't even bring up a terminal to run pgrep and kill) I prefer to use command lines in a terminal because I'm trying to learn unix and eventually the kernel etc. Can I run apt-get update; then upgrade and skip all the graphical package managers, which is what I believe the snap store and Ubuntu software is? I think I have 3 copies of Audacity and they overwrite each other; or they have their config files in different places and I have lost music that I've spent hours on by forgetting which icon opened the program if I have to restart... I just want a simple way to update, even if I have to do it manually every other day... livepatch is on, too, confusing me more...thanks for reading this far and for any help; trying to attach a screenshot...

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I am using .Net Core 2.1  I have a smal form that hits the controller when I dont have any ActionVerbs on the controller. As soon as I add method="delete" to the form and [HttpDelete] on the controller I get 404. What am I doing wrong?     C#   [HttpDelete] public ActionResult DeleteProduct(int? productID, int? subscriptionID) { }      HTML   <form method="delete" action="@Url.Action("DeleteProduct")">  <input name="productID" type="hidden" value="@product.ProductID" /> <input name="subscriptionID" type="hidden" value="@subscription.SubscriptionID" />  <button type="submit" class="btn btn-warning"> Tabort <i class="fa fa-trash trashIcon" aria-hidden="true"></i> </button>  </form>

I've seen a couple questions around here like , which mentions:     Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.   I've also heard that browsers support only GET and POST, from some other sources like:        However, a few quick tests in Firefox show that sending PUT and DELETE requests works as expected -- the XMLHttpRequest completes successfully, and the request shows up in the server logs with the right method. Is there some aspect to this I'm missing, such as cross-browser compatibility or non-obvious limitations?


Test program: \documentclass{article} \usepackage{xcolor} \begin{document} \color{red}1 \color{blue}0 ... many lines ... \color{red}1 \color{blue}0 \end{document}  Test result: Only first few lines are correctly colored. The rest is all blue. Using \textcolor{...}{...} seems OK, but not with \color{...}. The above code is MWE, with 200 repeats (400 lines) of 1 and 0. The bug appears when processed with xelatex but not pdflatex.

\documentclass{article}  \usepackage{xcolor}  \begin{document}  \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue  from here, something is wrong?  \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue \color{red}red  \color{green}green  \color{blue}blue  \end{document}


As a amateur in almost all fields, I ask some silly and many questions. And as an amateur I don't think I should answer questions I have no deep knowledge about. But at the same time it doesn't seem right either?

I have used the websites of SO a lot the past few months because I am busy with a large scale web project. I feel I get better answers here on SO than when I just do a Google search, maybe because I can be more specific here with my problem, and the responses are really fast.  Occasionally when I am not working I try to answer some questions, but the question almost always has an answer which is 'as good as' or 'better' than the answer I would supply.  So my question/answer ratio is about 20/1 something, if not more. When I look at my profile page I see a bucket-load of questions and almost nothing I answered myself.  Is this considered bad behaviour? I can see that this looks a little egoistic.  : One devoted to one's own interests and advancement.


How to get public URL of Content Document which is Uploaded on a record. How to get value in SOQL QUERY.I NEED THIS URL TO PUT  IN JSON

I am trying to get the image addresses from Salesforce Files using the following query in workbench. There are thousand files, but no results are displaying.  Select Id, ContentDocumentId, ContentDownloadUrl, DistributionPublicUrl  from ContentDistribution  where ContentDocumentId='0691000000FOq3nAAX'`   The result I would like to achieve is the address a user gets each time he/she right-clicks an image and click the Copy Image Address option.  Would appreciate if someone could help me with this inquiry.


On any Stack Exchange site you can't vote for your own question.  So, Why does it give you the option, and then reject your vote? Would it not be better just not to have the option?  This way they are not receiving ?  An alternative would be to have the rating but not show the arrows...

I've often wondered why Stack Exchange has opted to keep the upvote/downvote buttons available for clicking on question/answers posted by the user. For instance:    Even though these buttons have no use for the user, why are they still placed on the post's left hand column? Moreover, the comments have no controls for flagging/+1'ing the user's own comment. What is the reason for this discrepancy? What benefit do the +1/-1 buttons provide to the user, even though they can't be used for anything?


This is my first post and I really need help. I recently uninstalled Deepin for Ubuntu 19.10 and I think uninstalling also messed up grub and I am stuck with grub rescue. Can you tell me how to fix it. I’ve looked through many articles and forums but none of them help

After I deleted my Ubuntu partition, I rebooted my computer and I only get a prompt:   grub rescue >   The command ls lists   (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)   I check them one by one:  ls (hd0,msdos5)/ ls (hd0,msdos1)/   But I cannot find the right partition.


Theorem: Every neighborhood is an open set.   Proof: Consider a neighborhood $E=N_r(p)$, and let $q$ be any point of $E$. $$\text{There is a positive real number $h$ such that $d(p,q)=r-h$} \tag 1$$ $$\text{For all points s such that $d(q,s) \lt h$, we have $d(p,s) \leq d(p,q)+d(q,s) \lt r-h+h=r$, so that $s \in E$.} \tag 2 $$ Thus $q$ is an interior point of $E$.  Definition: A neighborhood of $p$ is a set $N_r(p)$ consisting of all q such that $d(p,q) \lt r$, for some $r \gt 0$. The number $r$ is called the radius of $N_r(p)$.  I know from definition, to prove a set $E$ is open, we need to show every point of $E$ is an interior point of $E$. I still don't get those tagged equations as to why.

Previously, someone posted his/her proof of "every neighborhood is open" . I am focusing on the same statement, but it seems that my approach is different from his/hers. Could someone comment on my own proof? Here we go:  Let $X$ be a metric space and $p\in X$. Fix $r>0$. Define a neighborhood around $p$ as $N_r (p)=\{q\in X| d(p, q)<r\}$. Now, take $w = \frac{r}{2}$. Then, $N_w (p)\subset N_r(p)$. In other words, every point of $N_r(p)$ is interior. Therefore, $N_r (p)$ is open. Since $r$ is arbitrary, this proves every neighborhood is open.  Update:  Under my definition of "neighborhood," can I prove in this way instead: For all $m\in N_r(p)$, take $w=\frac{r−d(m,p)}{2}$. Then, $N_w(m)\subset N_r(p)$.   Update2  From the hints given in comments, I solve it:  Assume $m\in N_r(p)$ and $q\in N_w(m)$. Take $w=r-d(m, p)$. Then, $d(p, q)\leq d(p, m) + d(m, q)< d(p, m) + r-d(m,p) =r$.   Thanks to @JoséCarlosSantos and @fleablood !


The problem I am working on not only requires me to use several levels but also identify, from a set of attributes, which ones could be treated as levels.   What is a good resource to understand Mixed Models? Also, what are the concepts that one must understand before putting such models to use? And what are other models that could be useful to in such hierarchical setting.

I am talking about the regression method that measures the impact of several layers of independent variables upon a dependent variable.


I am flying from London to Central America and back this summer on a bit of an extended holiday.   I am considering stopping over in NYC on the way back for a few days. (My flight from Panama to London would be through NYC anyway and got offered a good deal by a travel agent.)   I am residing in London as an EU citizen and I always use my EU passport to get around the world. However as I was born in the States I am also a fully fledged US citizen with the blue passport. The only time I've used my US passport in the past was for a US holiday a decade ago. I've never lived in the States so I don't sound American etc.   I want to book my flights and travel around Central America using my EU passport for simplicity's sake.   However I have come across on the US foreign office website a bit stating that US dual citizens can only enter and exit the State with a US passport.   What should I do?   I assume that I can't check into my flight on a European passport then enter and exit US border control with a US passport?   Can I just ignore the fact that I've got a US passport and hope they don't clock on it? My EU passport will state my place of birth as the States but as I've said I don't sound American or anything. Is that risky?   I don't want to be turned back at the gates on my first NYC trip!

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I'm extending Object like this:  Object.prototype.is_a = function (x) {   return this instanceof x; }   All works as expected  "foo".is_a(String) // true "foo".is_a(Object) // true "foo".is_a(Array) // false "foo".is_a(Function) // false "foo".is_a(Boolean) // false "foo".is_a(Date) // false "foo".is_a(Number) // false "foo".is_a(RegExp) // false   but, when  "foo" instanceof String // false   this keyword on the is_a() function is same as foo right? Why does it return different results?

"foo" instanceof String //=> false "foo" instanceof Object //=> false  true instanceof Boolean //=> false true instanceof Object //=> false false instanceof Boolean //=> false false instanceof Object //=> false  12.21 instanceof Number //=> false /foo/ instanceof RegExp //=> true  // the tests against Object really don't make sense  Array literals and Object literals match... [0,1] instanceof Array //=> true {0:1} instanceof Object //=> true  Why don't all of them? Or, why don't they all not? And, what are they an instance of, then? It's the same in FF3, IE7, Opera, and Chrome. So, at least it's consistent.


There are $200$ students in a class. Each student is a member of at least one of the clubs Eagles, Falcons, Tigers and Pythons.   If each club has $100$ students, then the number of students who are members of all the four clubs is at the most ? If each club has $120$ students, then the number of students who are members of at the most two clubs is at the least ? If each club has $140$ students, then the number of students who are members of at least three clubs is at least?  Need help with this problem as I am unable to find out a way to solve this problem with literally no other information given. This could have been solved if some information can be given about some of the individual clubs but here nothing has been given. How to solve this and these types of questions? What should be the approach? Thanks in advance!

There are $200$ students in a class. Each student is a member of at least on of the clubs Eagles, Falcons, Tigers and Pythons.  If each club has $100$ students, then the number of students who are members of all the four clubs is at the most .....  If each club has $120$ students, then the number of students who are members of at the most two clubs  is at the least .....  If each club has $140$ students, then the number of students who are members of at least three clubs is at least ....   I came across this question and I tried to solve it using the $4$ circles Venn diagram but it is a very chaotic way to solve this (Too many variables come into picture and it all got messed up) and even I was only able to solve the first question. Any way or method to simplify the solution approach for this question? Any help is appreciated. Thanks!


I have a task for which on every click of the button some text is added or updated in the same div.   I have created a dummy code :  <!DOCTYPE html>
This is a paragraph.

  <button id='btn2'>Set HTML</button>
1

     On one click of button, the text changes from 1 to 11, but nothing happens on second click and henceforth. I want it to keep changing everytime I click the button, i.e. it should change to 111, then next click 1111 and so on.   I am not able to figure out whats wrong or missing in the code

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


How can i find necessary and sufficient condition for this system to have a solution:  $x \equiv u_1(mod \ m_1)$  $...$  $x \equiv u_n(mod \ m_n)$

How to prove that a congruence system with $n$ equations can be solved if and only if all the equations can be solved two by two?  \begin{cases} x \equiv a_1 \phantom ((mod\phantom mm_1) \\ x \equiv a_2 \phantom ((mod\phantom mm_2) \\ ... \\ x \equiv a_n \phantom ((mod\phantom mm_n) \end{cases}  I know that if $n=2$, the system can be solved if and only if $\gcd(m_1,m_2)\mid a_1-a_2$.  The thesis is: the system is solvable $\Longleftrightarrow$ $\gcd(m_i,m_j)|\mid a_i-a_j$ for all $i\neq j$.


I have added an alias command to kill my guake terminal to my .bashrc  alias killguake="kill -9 $(ps aux | grep guake | head -n -1 | awk '{print $2}')"   But the problem is, the sub-command i.e. ps aux | grep guake | head -n -1 | awk '{print $2}' is executed at the time of terminal startup and killguake is set to kill -9 result_of_subcommand.  Is there any way to set it like so, that the sub command is run/calculated  every time I run killguake? So that it can have the latest PID for the guake.  I have also tried piping to the kill using xargs but that also result in same, that is calculating everything at startup. Here is what I tried with piping  ps aux | grep guake | head -n -1 | awk '{print $2}' | xargs -I{} kill -9 {}

I use ps -ef | grep catalina | grep -v grep to print the tomcat process running on the system:  kshitiz   7099     1  0 May11 ?        00:02:29 /usr/lib/jvm/jdk1.8.0/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:38156 -Dcatalina.base=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1 -Dcatalina.home=/opt/tomcat-7.0.42 -Dwtp.deploy=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps -Djava.endorsed.dirs=/opt/tomcat-7.0.42/endorsed -Dfile.encoding=UTF-8 -classpath /opt/tomcat-7.0.42/bin/bootstrap.jar:/opt/tomcat-7.0.42/bin/tomcat-juli.jar:/usr/lib/jvm/jdk1.8.0/lib/tools.jar org.apache.catalina.startup.Bootstrap start   Then I use ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}' to extract the process id:  7099   But when I alias the whole command alias tomcat_id="ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}'" and use it via alias, it prints the whole text and awk doesn't seem to work.  type tomcat_id gives:  tomcat_id is aliased to `ps -ef | grep catalina | grep -v grep | awk -F' ' '{print }''


So in our textbook it's stated that "A Graph G is connected as a topological space if and only if G is connected as a graph" without a proof and my lecturer did not prove it during the lecture, so I am wondering how that proof would go.   Thank you for your time!

Let $X$ denote a topological space and suppose that $\mathcal{O}$ is an open cover of $X$. Assume $\emptyset \notin \mathcal{O}.$ (Thanks Niels!) Now make $\mathcal{O}$ into an (undirected) graph as follows:   Vertexes: elements of $\mathcal{O}$. Edges: we draw an arc between two vertexes iff they have a non-empty intersection when viewed as subsets of $X$.      Question. Is it true that if $X$ is connected (as a topological space), then $\mathcal{O}$ is connected (as a graph)?   The case where the open cover $\mathcal{O}$ has only two elements is easy, but the general case where $\mathcal{O}$ is allowed to have arbitrary cardinality is harder.


I want the limits separated, like in the second one here:   TOO CLOSE: $\int_{a}^{b}$ RIGHT: $\int\limits_{a}^{b}$   How to I do the same thing with the vertical line "evaluated at"-limits?   TOO CLOSE: $|_{a}^{b}$ then the limits are too close; I want them more separated. RIGHT: ???

I was having some thought about what would be the syntax to make the end point evaluation of derivatives or integrals. Such as making the | with the two end points of evaluation on the top an bottom of the line. Any suggestions would be wonderful.


The shell script snippet is given below  if [[ $OS == Linux ]] ; then      LINUX_FC=gfortran # #   set 32 or 64 Bits executable #     ARCH=`uname -m`     echo "PROCESSOR IS: $ARCH"     if [ [ $ARCH == x86_64 ] ]  ; then         BITS=SIXTYFOUR;     else         BITS=THIRTYTWO;     fi  elif [[ $OS == Darwin ]] ; then          DARWIN_FC=gfortran;  else     BITS=THIRTYTWO; fi;   Error is   OPERATING SYSTEM IS: Linux : command not found jobcomp1: line 34: syntax error near unexpected token `elif' 'obcomp1: line 34: `elif [ [ $OS == Darwin ] ] ; then

I have this script to divide a file over a 100000 or even more in 50000 lines.  desc()                                                     {                                                       echo $1 $2|awk '{d=$1;}                                 BEGIN {a=1;b=0}                                            { f=d"0"a;                                                while ((getline x<d)>0)                                   { print x>>f".txt"                                        if (b++>=50000)                                            {                                                         close(f);b=0;a++;f=(a<10)?d"0"a:f=d""a                }                                                  }                                                   }                                                   END {print "Terminado ... ! "}'                         }                                                      if [ -f $1 ]; then                                              desc $1 $2                                      fi                                                        When I execute it I got this error message:  sh-3.2$ parte.sh pa.txt                                  : command not found                                      '/parte.sh: line 2: syntax error near unexpected token ` '/parte.sh: line 2: `desc()                              sh-3.2$                                                    Can anyone help to solve it?


i have a 3D Object and want to add a background image( if possible even a movie) to this 3D Object. I use Cycles to render and tried a plane with the  image as texture. When i go into render mode, it looks like this(picture with background) and when rendered, it has no background. The key also looks into  a different direction.  Should i even use Cycles for this or use motion tracking? i tried to use that but had several problems.     Rendered mode   When scene is rendered

First time I've used cycles rendering engine.  I'm using a movie clip as the background in short animation. Selected RBGA under Property Tab, and Transparent under Film Tab.  It looks good and individual frames in OpenGL active viewport render, and looks fine.  When I try to get it to spit out PNG files of the finished animation the objects render out fine, except no movie clip background as Blender Render engine did when using Paper Sky setting.  Operator error, or am I trying to do something Cycles won't do?  Haven't found an answer in my searches so far.  Can anyone point me in the right direction please.   Addition:  I think I found my problem after a couple more hours of research.  Post should read "operator ignorance" instead of operator error.  Too tired to try the solution tonight, everything looks better in the morning. Thanks anyway.  Sorry, I just saw your posts.  Really tired.  Much appreciation.


What are the odds of shuffling a deck of 52 cards and going through each card one by one without getting any repeats (like 2 kings back to back).  I'm bad at this kind of deduction, but at a high level it seems roughly like 1 in 13 odds over 52 iterations.   Can anyone provide a more accurate approach to solving this?

What is the probability that a shuffled standard deck of 52 cards has no two cards of the same rank together ?  I am unable to get a handle on this problem, and wonder whether there is an analytical solution ?


I've got an annoying problem with my terminal. The problem existed with the gnome terminal and even though i've got the terminator terminal as a default the problem persists!  When a code line is too long the code instead of continuing to the line below as normal it goes write back from the left of the line some times making the allready typed code invisible!   Some other times it even goes upwards!  Why is that?

Something I have noticed in Ubuntu for a long time that has been frustrating to me is when I am typing a command at the command line that gets longer (wider) than the terminal width, instead of wrapping to a new line, it goes back to column 1 on the same line and starts over-writing the beginning of my command line. (It doesn't actually overwrite the actual command, but visually, it is overwriting the text that was displayed).  It's hard to explain without seeing it, but let's say my terminal was 20 characters wide (Mine is more like 120 characters - but for the sake of an example), and I want to echo the English alphabet.  What I type is this:  echo abcdefghijklmnopqrstuvwxyz   But what my terminal looks like before I hit the  key is:  pqrstuvwxyzghijklmno   When I hit enter, it echos  abcdefghijklmnopqrstuvwxyz   so I know the command was received properly.  It just wrapped my typing after the "o" and started over on the same line.    What I would expect to happen, if I typed this command in on a terminal that was only 20 characters wide would be this:  echo abcdefghijklmno pqrstuvwxyz   Background: I am using bash as my shell, and I have this line in my ~/.bashrc:  set -o vi   to be able to navigate the command line with VI commands.  I am currently using Ubuntu 10.10 server, and connecting to the server with Putty.  In any other environment I have worked in, if I type a long command line, it will add a new line underneath the line I am working on when my command gets longer than the terminal width and when I keep typing I can see my command on 2 different lines.  But for as long as I can remember using Ubuntu, my long commands only occupy 1 line.  This also happens when I am going back to previous commands in the history (I hit Esc, then 'K' to go back to previous commands) - when I get to a previous command that was longer than the terminal width, the command line gets mangled and I cannot tell where I am at in the command.  The only work-around I have found to see the entire long command is to hit "Esc-V", which opens up the current command in a VI editor.  I don't think I have anything odd in my .bashrc file.  I commented out the "set -o vi" line, and I still had the problem.  I downloaded a fresh copy of Putty and didn't make any changes to the configuration - I just typed in my host name to connect, and I still have the problem, so I don't think it's anything with Putty (unless I need to make some config changes)  Has anyone else had this problem, and can anyone think of how to fix it?  Edit  It was my .bashrc file.  I've copied the same profile from machine to machine, and I used special characters in my $PS1 that are somehow throwing it off.  I'm now sticking with the standard bash variables for my $PS1.  Thanks to @ændrük for the tip on the .bashrc!  ...End Edit...


I'm trying to condense the size of my comments by using a condensed font however its not working correctly.  The font shape looks fine with ttfamily enabled in basicstyle, however, there is a huge amount of space between the letters for comments. How can I get rid of this spacing?  \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern}  \begin{document}     \begin{lstlisting}[language=Prolog,basicstyle=\ttfamily\footnotesize,commentstyle=\fontseries{lc}\selectfont\itshape]     hello :- world     % This is a comment     \end{lstlisting}     \end{document}   Edit: How do I get the source of this post to compile like I've seen in other threads?

I am wondering why in the pdf of the example below the letters of the word "function" and the word "sum" seem to have different spacing. This somehow looks ugly.   Apart from that, I am wondering if someone has a "nicer-looking"/"easier-to-read" way of displaying R code with the LaTeX package listings.  \documentclass{scrartcl}  \usepackage[T1]{fontenc} \usepackage[american]{babel}  \usepackage{graphicx} \usepackage{fancyvrb} \usepackage{listings}  \lstset{% setup listings     language=R,% set programming language     basicstyle=\small,% basic font style     keywordstyle=\bfseries,% keyword style         commentstyle=\ttfamily\itshape,% comment style     numbers=left,% display line numbers on the left side     numberstyle=\scriptsize,% use small line numbers     numbersep=10pt,% space between line numbers and code     tabsize=3,% sizes of tabs     showstringspaces=false,% do not replace spaces in strings by a certain character     captionpos=b,% positioning of the caption below         breaklines=true,% automatic line breaking         escapeinside={(*}{*)},% escaping to LaTeX         fancyvrb=true,% verbatim code is typset by listings         extendedchars=false,% prohibit extended chars (chars of codes 128--255)         literate={"}{{\texttt{"}}}1{<-}{{$\leftarrow$}}1{<<-}{{$\twoheadleftarrow$}}1         {~}{{$\sim$}}1{<=}{{$\le$}}1{>=}{{$\ge$}}1{!=}{{$\neq$}}1{^}{{$^\wedge$}}1,% item to replace, text, length of chars         alsoletter={.<-},% becomes a letter         alsoother={$},% becomes other         otherkeywords={!=, ~, $, *, \&, \%/\%, \%*\%, \%\%, <-, <<-, /},% other keywords         deletekeywords={c}% remove keywords }  \begin{document}  \noindent Just some text; see Line \ref{foo}. \begin{lstlisting}[caption={A first example}, label=list:ex] x <- c(1, 3, 2) id <- function(x){     x # just a dummy (*\label{foo}*) } 3 <= 4 3 != 4 !TRUE y <- "foo" (pv <- sum(x*x^x)) y ~ x + a \end{lstlisting}  \end{document}


I'm somewhat new to blender. How exactly does one stretch UV islands so that they form a perfect grid? I'm looking to scale/rotate islands from two points, sort of like unfolding a beach towel. I'd like to do this to more easily texture my model.  I've tried to illustrate an example below:    Thank you!

I have this setup:   The mesh is only the visible top side, with a mirror modifier for the bottom part. Now I want to unwrap it like in the picture. I want the inner circle (red) to go to the top of the UV map...  The problem is that no matter what automatic unwrapping I use, it never works as intended.  The closest I've gotten was by using "follow quads", but that skewed the UV map a lot:   I used the result from the second image and manually adjusted the vertices with a lot of scaling and "align auto", but its very far from perfect as you can see in the first image.  Here's what I want exactly:   The uv vertices should be distributed evenly (horizontally) The middle line (yellow) should be on a "natural" y height (so there's no stretching)   I hope it's clear what I want to achieve. I'm sure there must be some automatic way to perfectly align and distribute the UVs in this way.  By the way: If you look closely you can see that I already placed a uv seam (aligned with the green y axis in the screenshot) but that didn't really help.


I want to consider a commutative ring $R$ (we can restrict to, say, $k[x,y,z]$ if needed) with an ideal $I$ and a maximal ideal $m$.  Now, I think $I/mI$ is actually a $R/m$-vector space.  I'm wondering if there's a slick way to prove this?  I can define a scalar action  $$R/m \times I/mI \longrightarrow I/mI$$ $$(\bar{h},\bar{f}) \mapsto \overline{hf}$$  where the overbar denotes the respective projection to the quotient.  You can then prove that this is well-defined.  So you can define this scalar multiplication and show that it obeys the vector space axioms, but I'm hoping there's maybe a better way.    Also, if $R$ is Noetherian, we can write a finite list of generators for the ideal $I=(f_{1}, \ldots, f_{k})$.  Is it then necessarily true that $(\bar{f}_{1}, \ldots, \bar{f}_{k})$ is a basis of the vector space $I/mI$?  I suppose I should also check, are all my hypothesis correct here?  I know something like this is true, but maybe I need to be assuming more structure or something.  Thanks!

Let $M$ be an $R$-module and let $I$ be an ideal of $R$ such that $I$ is a subset of $\mathrm{Ann}(M)$. Define a product of an element of $R/I$ by an element of $M$ as follows: $$(r+I)\cdot m=rm.$$ (a) Show that this product is well defined. (b) Show that this product, together with the sum of elements of $M$, turns $M$ into an $R/I$-module.  My answer for (a): Let $r+I,s+I \in R/I$ such that $r+I=s+I$. Then $(r+I)m=(s+I)m$, for all $m \in M$. Then $rm=sm \implies r=s$  (since the inverse of $m$ is in $M$), so the product is well defined.  Is my answer to (a) correct?  How can I use Ann(M) to answer (b)?


I am working on a design where I need to amplify a small ac signal (a few μv, 1 Mhz) with a gain of 30 to 40, while introducing as little noise as possible. The input is driven by another op amp, so a high input impedance is not a requirement.  Currently I am using an op amp configured as non inverting amplifier. Even if the high input impedance is not required, the physical separation between input and output kind of makes me feel comfortable.  However when searching online I see a lot of examples where inverting amplifier configurations are used in similar situations, which made me wonder whether it might be advantageous to switch to an inverting design.  After some research I still could not find any particular reason why I might use an inverting amplifier in this scenario. Neither do I need an amplification of less than 1, nor a summing amplifier, as mentioned in answers to similar questions (, ).  So is there any particular reason why I would use an inverting amplifier if I am just amplifying a voltage with a gain of more than 1 (maybe considering noise, stability or other issues)?  EDIT: Just to clarify, I am talking about following op amp configurations:  Non inverting amplifier (left) and inverting amplifier (right):

Op amp circuits are designed to achieve a specific gain regardless of the differences between individual op amps.  One very common circuit has a gain of -R2/R1.  Here's a (corrected) schematic:    Another common configuration has a gain of R2/R1+1 and is non-inverting:    What I can't see is why on earth anyone would use the inverting one, except for the odd case where you actually want inversion. The non-inverting one has high input impedance without an extra input stage, and almost the same gain. Is there any advantage to the first example?  Also, since the first example does not have high input impedance, it can take significant current to drive.  So, often a source follower is placed before the amplifier.  For the second configuration, is there any reason why a source follower would ever be necessary?


I recently found out that one of my Domains (which was only a empty Wordpress installation), was hacked. The website didn't show the wordpress installation anymore, instead there was just a website with some music that say "Hacked my Team_cc" and some more text.  I've now changed very passwords from any other website, because there are mulitple websites with different domains on the same server. But my question is now, since only one Domain was attacked, was it just a hole they found in the older Wordpress installation, or why weren't the other domains affected?  Is there a known bug in Wordpress 3.8 that allows users to get access to the files? How can I find out if they compromised FTP or ssh?  Best regards

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I'm looking at using a Meanwell IRM-03 isolated switchmode power supply () in a project but the active/neutral pins are arranged in an inconvenient way for the PCB tracks. It would be a heap easier to route the board if I swapped those connections.  Is there any reason I shouldn't just swap them? Most of the discussion I can find around the topic refers to equipment where swapping them means the neutral is switched, making it dangerous.  Similar power supplies are used in countries with non-polarised 2 pin power sockets (eg USA) - in that case I imagine it could get plugged in either way with no ill effects.

(I am located in the US)  I'm taking apart a cable to use for AC in a project.  When I stripped the ends, I saw the expected Black/White/Green colors to indicate hot/neutral/ground respectively.  However just to be sure (before using the cable) I traced each with a multimeter.  What I found was as below, however their positions on the plug are REVERSED from what I would expect to find in an AC plug in the USA. (As indicated in any number of the results from e.g. )  Am I correct, that I should be using this cable's BLACK wire for neutral, and it's WHITE wire for hot?


I know this is a duplicate but the other two haven't helped me much.    Fist attempt: Tried proving through double inclusion, but wasn't sure of how to convey being an element of one implied being an element of the other in either direction, although I suspect from left to right would be the easier of the two.  Second attempt: Tried proving equality directly, using the fact that the boundary of a set is equal to the set difference of its closure and interior, but struggled proving closure of union is a union of closures, or the interior of a union is a union of interiors.   I'm getting pretty frustrated and any help would be greatly appreciated!

Assume $\bar A\cap\bar B=\emptyset$. Is $\partial (A \cup B)=\partial A\cup\partial B$, where $\partial A$ and $\bar A$ mean the boundary set and closure of set $A$?   I can prove that $\partial (A \cup B)\subset \partial A\cup\partial B$ but for proving $\partial A\cup\partial B\subset \partial (A \cup B)$ it seems not trivial. I tried to show that for $x\in \partial A\cup\partial B$ WLOG, $x\in \partial A$ so $B(x)\cap A$ and $B(x)\cap A^c$ not equal to $\emptyset$ but it seems not enough to show the result.


Let $x,y,z$ be positive real numbers satisfying $x^2+y^2+z^2=1$. Prove that : $$\frac {1}{x} + \frac {1}{y}+\frac {1}{z} \geq 3{\sqrt{3}}.$$  I derived the equality case easily. I was able to prove the inequality with the help of Lagrange Multipliers, which made it look very easy. Is there any other way to prove the same inequality without calculus ?  I tried AM-GM and Cauchy-Schwarz but could not find a proper set of values to apply these on so as to obtain the inequality. Any help would be appreciated . :)

let $x,y,z>0$ such that $x^2+y^2+z^2=1$. Find the minimum of $$\frac{1}{x}+\frac{1}{y}+\frac{1}{z}.$$  Is the answer $3\sqrt{3}$ by any chance?


$\omega(n)$ is the number of distinct prime factors of $n$ and $\omega'(n)$ is the number of distinct prime factors of $n$ with multiplicity. For example if $p,q$ are prime numbers then $\omega(p^2q)=2$ and $\omega'(p^2q)=3$.  What is the distribution of $\omega'(n)$ for $n$ between $2^m$ and $2^{m+1}$ where $m$ is a sufficiently large integer?  Do we have with probability at least $\frac12$ at least $\log\log n$ indistinct factors?

I just discovered Matlab's factor()-function, and I randomly typed in 20081294819, and to my surprise it only had two factors (5099 and 3938281)! I had expected many more factors for such a big number and wondered how normal this was. The following is what I've done in my investigation so far.  In the first figure below, I have plotted the probability that some number below $10^k$ has $m$ indistinct prime factors.  The second figure shows the evolution of the probability of finding a number with $m$ indistinct prime factors as the numbers one is looking at grows, i.e. it is just another way to visualize the same data. I have left out all points of zero probability.  If one looks at the first part of the figure, it seems that the peak of the curve for some $k$ shifts toward higher $m$ as $k$ grows.   My first question is this: Does this behavior (i.e. the peak shifting toward higher $m$ as $k$ grows) continue indefinitely, or will the peak stabilize at some point? The latter seems unlikely but I can't be sure.  My second question is this: Approximately how fast does the peak-value $m_{peak}$ move as $k$ grows?  I briefly looked at the , but this involves distinct primes and I don't really know much number theory, so any help would be greatly appreciated!


Let $p$ be a prime. We learned that the number of solutions to $x^k\equiv 1\pmod{p}$ is $\gcd(k, p-1)$ and I know how to prove it in case $k$ divides $p-1$.  But how do I prove it in the other case?

Let $p, q$ be distinct odd primes, I would like to compute the number of solution $\mod p$ to the congruence $x^q \equiv 1 \mod p$. (Show that it's $gcd(q, p - 1))$  If $x^q \equiv 1 \mod p$, since $q$ is prime, this must mean that $x$ is either $1$ or has order $q$.   Hence, the problem reduces to finding the number of elements of $U_p$ which is either $1$ or has order $q$.  If $ q \nmid  p - 1$, then there is only one element, namely $1$.  If $q \mid p - 1$, then the number of elements of order $q$ is $\phi(q) = q - 1$, and so the number of solutions to the congruence $\mod p$ is $q - 1 + 1 = q$, and in either case the number of solutions is $\gcd(q, p - 1)$.  Does this look fine?


I have the problem that the shorting of authors in text citation is not working when I have two citations of the same first author. If I only cite one of the two, then it works properly. Does anyone know what's the reason for this behaviour and how I can change it? I want et al. all the time. Here I isolated the problem: \documentclass[12pt,twoside]{report}  \setlength{\headheight}{15pt}   \usepackage[ngerman]{babel} \usepackage[autostyle]{csquotes} \usepackage[babel]{microtype} \usepackage[   style=authoryear,    autocite=inline,    maxcitenames=2,    maxbibnames=99,    backend=biber, %--->führt (zeitweise?) zu fehler     dashed=false ]{biblatex} \DeclareFieldFormat{titlecase}{#1} % - titel bleibt unverändert ... auch better bibtex checken wenn was nicht stimmt (export) \addbibresource{references_promotion.bib}  %damit auch bei \citeyear, also ohne klammern der hyperref kommt \DeclareCiteCommand{\citeyear}     {}     {\bibhyperref{\printfield{year}}}     {\multicitedelim}     {}    % Doppelpunkt nach dem Jahr im Literaturverweis \renewcommand*{\postnotedelim}{\addcolon\space}  % Seitenangabe ohne automatischen Zusatz \DeclareFieldFormat{postnote}{#1} \DeclareFieldFormat{multipostnote}{#1}  \DefineBibliographyStrings{ngerman}{    andothers = {{et\,al\adddot}} }   \begin{document}  \textcite{claussEinsatz2013} \textcite{nidiekbe2019} \textcite{nidiekNachschlag2020a}  \printbibliography   \end{document}  Here is the bibtex: @article{claussEinsatz2013,   title = {Der Einsatz des iPads als Instrument in der Musiktherapie},   author = {Clauß, Tobias and Seideneck, Mario and Gatzsche, Gabriel},   date = {2013},   journaltitle = {Musiktherapeutische Umschau},   volume = {34},   pages = {362--369},   number = {4} }  @incollection{nidiekbe2019,   title = {be\_smart: Zur Bedeutung von Musik-Apps für die Teilhabe von Jugendlichen und jungen Erwachsenen mit komplexen Behinderungen an Kultureller Bildung},   booktitle = {Forschung zur Digitalisierung in der Kulturellen Bildung},   author = {Nidiek, Imke and Gerland, Juliane and Hülsken, Julia and Sieger, Marvin},   editor = {Jörissen, Benjamin and Kröner, Stephan and Unterberg, Lisa},   date = {2019},   pages = {37--48},   publisher = {kopaed},   location = {München},   langid = {german},   series = {Kulturelle Bildung und Digitalität \#1} }  @article{nidiekNachschlag2020a,   title = {Nachschlag zu Heft 1/2020. Mehr Teilhabe an Kultureller Bildung durch digitale Musikinstrumente},   author = {Nidiek, Imke and Gerland, Juliane and Hülsken, Julia},   date = {2020},   journaltitle = {Gemeinsam leben},   volume = {2},   pages = {123--128},   number = {2} }

In the header of my document I set the maximal author names to 2:  \usepackage[style=authoryear-icomp, maxbibnames=9, maxcitenames=2, backend=biber]{biblatex}   Now, when I cite texts with two authors, LaTeX gives me the following:     (Author_A/ Author_B 2012: 232)   When I have three authors or more, LaTeX makes it:     (Author_A/ Author_B et al. 2012: 232)   But I want LaTeX to just name the first author if there are more than two authors ... like this:     (Author_A et al. 2012: 232)   Any tips on how to achieve this ?


i got stuck on this problem  How can prove it?  i dont wanna use that sin(1/x)=1/x-1/(6$x^3$)+...

My question is simple.  Let $f(x)=x^3\sin(\frac{1}{x}), x\in \mathbb{R}$. Is this function uniformly continuous on $\mathbb{R}$?  I think it is not uniformly continuous when $x$ goes to $\infty$


Consider an injective function $f: \Bbb N \rightarrow  \Bbb N$  Show that the series given by:  $$\sum_{n=1}^{\infty } \frac{f(n)}{n^2}$$  diverges.   I'm really not sure how to use the injectivity hypothesis, so any suggestion or any answer would be well received.

We know that $\displaystyle\zeta(2)=\sum\limits_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$ and it converges.        Does there exists a bijective map $f:\mathbb{N} \to \mathbb{N}$ such that the sum $$\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^2}$$ converges.      If our $s=2$ was not fixed, then can we have a function such that $\displaystyle \zeta(s)=\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^s}$ converges


The new  for 5e can infuse magic into weapons or shields, and use the infused item as a spell focus for material components. However, can you wave your focus for the somatic part of a spell as well?  Basically, I am curious whether an artificer can have a one-handed crossbow in one hand, and an infused shield in the other and still cast V, S, M spells.

If there is a wizard that, by some means, has acquired proficiency in the use of shields, can said wizard use his shield in one hand and his arcane focus quarterstaff in the other and still cast somatic component spells?  Since the quarterstaff has been crafted to also be an arcane focus, and the Sage Advice Compendium states that you can provide the somatic components of spells with the same hand wielding the arcane focus, in this case an arcane focus quarterstaff, could that wizard still be able to perform somatic component spells while using a shield in the other?  I understand War Caster is the feat that allows you to cast somatic component spells even while using a shield and weapon or two weapons in each hand, but is this a simple way around those rules seeing as this "weapon" is your arcane focus? I would like to believe it is not, but I'm not fully fluent in the ways of spellcasting.


I'm travelling to China from US and will be transiting at LHR. Here's   my situation: I booked a round trip (virgin atlantic) from US to China   flying on 12/23/2018 and returning 1/4/2019. By 12/23, when I arrive   at LHR, my current US working visa will be expired.      I do have a valid Canada visa. The layover is about 4 hours and   doesn't need to go through border control. I looked online and it   seems I don't need one as long as I have "a visa for Canada, New   Zealand, Australia or the USA (this can be used for travel to any   country)", so this criteria is met due to my Canada visa.      However, at that time, I will not meet the returning exemption   criteria (yet) because I won't have a valid US visa that grants me   reentry (which I'll renew in China). Will this fact keep me from   boarding my flight back to China?   I don't think I have the time for applying a transit visa at the moment, so I'm really hoping this doesn't stop me from going back to China..... Million thanks!

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I have this same question. I want to send a workbook to my collogues (each worksheet will be locked/protected) and I will keep the master (unprotected). When I make a change(s) how can all the other workbooks be automatically updated to show that change(s)? A pivot table will not work for me. I need all books to be updated as I make changes (prefer w/o sending new books every time a change is made)?

In powerpoint we have something called a master slide.  I want the same idea for excel.  I want to create a template that I can work on with formulas and I want it to update all children files.  Example: I have a budget template.  This template has a budget listing all required equipments and their cost for a project.  We then have a formula that calculates the total cost of all equipment. I want to update only the template file with equipment and formulas, but I want the actual files (children) to contain the costs (because they might be different costs for different locations, but the rest of the budget and its formulas are shared).  Its pretty much exactly what a master slide in powerpoint is, if you've ever used that you should understand what I'm trying to do pretty easily.  One master file to store formulas, and a bunch of children files that store the data to be accessed by those formulas.  This way if a formula needs to be changed, the templates is adjusted and all other files update accordingly.  Any ideas?  I'd prefer not to have to use VB, and I'd also like a solution that works for both mac and windows.  Found  question but no answers.  I've already created a template, but that doesn't seem to update the other files when I modify it.


While inserting List to Realm  NullPointerException thrown.  Please help me anyone.   Can you suggest me for best practice in Realm DB Management in Android   My Code:  public class DrinksFragment         extends Fragment {      private Realm realm;      @Override     public View onCreateView(             LayoutInflater inflater, ViewGroup container,             Bundle savedInstanceState) {         View view = inflater.inflate(R.layout.fragment_drinks, container, false);         Realm.init(getActivity());         realm = Realm.getDefaultInstance();         return view;     }      public boolean drinksToDB(final List<ProductModel> productModel) {         realm.executeTransactionAsync(new Realm.Transaction() {             @Override             public void execute(Realm bgrealm) {                 RealmList<ProductModel> realproductList = new RealmList<>();                 realproductList.addAll(productModel);             }         }, new Realm.Transaction.OnSuccess() {             @Override             public void onSuccess() {                 Log.d("REALM_DB_INSERT", "Data Inserted");             }         }, new Realm.Transaction.OnError() {             @Override             public void onError(Throwable error) {                 Log.d("REALM_DB_INSERT", error.getMessage());             }         });          return true;     } }

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?


Is $2^\sqrt{2}$ irrational? Is it transcendental?

The fact that there exists irrational number $a,b$ such that $a^b$ is rational is proved by the law of excluded middle, but I read somewhere that irrationality of $\sqrt{2}^{\sqrt{2}}$ is proved constructively. Do you know the proof?


I have the following bash script, which starts a program several times in parallel and passes a control variable to each execution.  The program is utilizes several resources, so after it was started 10 times in parallel I want to wait till the last 10 started, are finished.  I am currently doing this very roughly, by just waiting after 10 iterations for the longest time possible that 10 parallel started programs are finished.   Is there a straight forward way to implement this behavior?   steps=$((500/20))   echo $steps START=0  for((i=START;i < steps; i++)) do         for((j=START;j < steps;j++))         do                 for((k=START;k < steps;k++))                 do                         n=$(($j*steps +$k))                         idx=$(($i*$steps*$steps + $n))                           if ! ((idx % 10)); then                                 echo "waiting for the last 10 programs"                                 sleep 10                         else                                   ./someprogram $idx &                         fi                 done         done done

Lets say I have a loop in Bash:  for foo in `some-command` do    do-something $foo done   do-something is cpu bound and I have a nice shiny 4 core processor. I'd like to be able to run up to 4 do-something's at once.  The naive approach seems to be:  for foo in `some-command` do    do-something $foo & done   This will run all do-somethings at once, but there are a couple downsides, mainly that do-something may also have some significant I/O which performing all at once might slow down a bit. The other problem is that this code block returns immediately, so no way to do other work when all the do-somethings are finished.  How would you write this loop so there are always X do-somethings running at once?


Regarding this thread:    Why is the idea that the total energy in the universe "zero" so popular (re: Laurence Krauss) and why is the flatness of the universe used to back this up when, according to that post, an open universe would not conserve energy so the total energy of the universe cannot be "zero", can it? What's the energy being defined as zero and why is that energy used to predict things about the universe when "the" energy (as the term is used in that post) is not zero?  Additionally, I found one very good explanation here for this,    This seems to indicate that in flat space (the sort of space used in these zero energy universe theories) the mass can NOT be positive thus contradicting the notion that mass is positive and gravity negative and the whole thing winds up being zero. Did I interpret that correctly?  The MO question is cross-posted to Physics.SE here,

In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field".  But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero!  So, my questions:   What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?


I have to create a script to check if the current user has write permission on a file. If not, an error should appear.   I wrote this:  if [namei -m /path/to/textfile.txt | grep w]; then    echo "message"   But I seem to get a syntax error.

I'm trying to write a script that will look for a certain .txt file saved to my desktop.  I want the script to be able to check if this file exists and then check to see if it is readable and writable.  Any hints?


This picture is from L.C.Epstein's book Thinking Physics. The upper can is filled with compressed air, and, when an opening is made on the right, the air comes out and the can shoots left. The question is what happens to the lower can, filled with vacuum, when we similarly make an opening. Does it move left - right - not at all?  Epstein says that the lower can doesn't move at all, "except for a momentarily slight oscillation about the center of mass". I'm not sure I understand this. The explanation is that the air incoming into the bottle provides force on the left inner wall to compensate for the lack of force on the opening, and this balances the force on the left outer wall from the outer air. Which seems convincing, but opens a path to more questions:   Shouldn't the can still start moving from the moment we make the opening and until the air pressure inside the can is equalized with the outside air? If that in fact happens, why would it stop and return ("a momentary slight oscillation about the center of mass") and not simply continue moving right with the constant velocity it's acquired?

Suppose you put wheels under a compressed air tank    so that it can move horizontally to the right and to the left. Suppose there is a nozzle on the right hand side of the tank (in the picture on the backside, if you like).  If the tank is filled with high pressured air and you open the nozzle, the tank will move to the left. This is how rockets work and one can easily imagine that.   What happens when the tank is filled with a vacuum and you open the nozzle?  My first impression was, that the tank is moving to the right but someone told me, that it would be stand still. Is this true? What is an intuitive explanation for that?


CPA attack means the attacker can send in his own plaintext to the oracle and receives some sort of ciphertext back.  CCA attack means the attacker can send in his own ciphertext to the oracle and return some sort of plaintext back.  When we talk about CPA and CCA secure, what exactly are we referring? All this time I just think of it as " if it's CPA secure, then the attacker cannot perform a CPA, which means when the attacker sends in his own plaintext he will not receive some sort of ciphertext back"  That makes logical sense to me, but I really don't feel like I am understanding CPA/CCA secure correctly.   I thought the whole point is so that the attacker can send in whatever ciphertext / plaintext he desires, the attacker will get something back, and the system will not leak information. Does that mean that I can also think of it as " the attacker can send in whatever cipher/plaintext he wants, but he will not receive informative outputs" ?

There are many schemes that can advertise themselves with certain security notions, usually IND-CPA or IND-CCA2, for example plain ElGamal has IND-CPA security but doesn't provide IND-CCA security.  The most common ones are the "IND-" ones, advertising security against specific classes of attackers. Now these notion may not be that well-understood by many people so I ask hereby for a canonical answer, that explains what the following security notions mean. A (simple) description of the formal attack scenario is preferred. Please don't restrict the answer to "you can chose this and if you can break it with this it isn't IND-CCA2". Please at least outline the formal attack (like f.ex. real-or-random). Relations between the "IND-" are explained (f.ex. IND-CCA implies IND-CPA). The notions in question are:   IND-CPA IND-CCA IND-CCA1 IND-CCA2 IND-CCA3


Let $G$ be a group. Prove that $o(xy) = o(yx)$ for all $x,y \in G$.  Edit:  I wanted to prove it with basic properties of groups and orders, not with isomorphisms.  I will write the answer I worked on my notebook using the answer by the user that solved my problem (please stop downgrading my question / reputation, I've started learning this 2 days ago by myself, and I believe this site is about helping people to learn):  Let $m = o(xy)$.  Then:  $(xy)^m = e_G$  As $G$ is a group, there exists inverse elements for $x$ and $y$. Let $y^{-1}$ be the inverse of $y$.  As $ye_G = y$, $e_Gy^{-1} = y^{-1}$ and $yy^{-1} = e_G$ we can multiply by $y$ (by the left) and $y^{-1}$ (by the right) obtaining:  $e_G = ye_Gy^{-1}$  Now, as we know that $(xy)^m = e_G$, we can substitute $e_G$ in the previous formula:  $ye_Gy^{-1} = y(xy)^my^{-1}$  Now, we know that $(xy)^m = \overbrace{(xy)(xy)\dots(xy)}^{\text{m times}}$  So, using the previous equation:  $y(xy)^my^{-1} = y\overbrace{(xy)(xy)\dots(xy)}^{\text{m times}}y^{-1}$  And because $G$ is a group, it's associative:  $y\overbrace{(xy)(xy)\dots(xy)}^{\text{m times}}y^{-1} = \overbrace{(yx)(yx)\dots(yx)}^{\text{m times}}yy^{-1}$  And this is:  $(yx)^myy^{-1} = (yx)^me_G = (yx)^m$  So we obtained:  $e_G = (yx)^m$  And as $(xy)^m = e_G = (yx)^m$, $o(yx) = m$, and we conclude:  $o(xy) = o(yx)$ for all $x,y \in G$  I find it interesting solving this kind of problems just by using properties. Using more math structures made the problem trivial.

I'm dealing with the following question: having a group $G$ (of which nothing else is specified, doesn't have to be abelian), prove that $|ab|=|ba|$ for any $a$, $b$. Since $G$ is not abelian I'm not sure what to use here. I was thinking that except the case where $b=a^{-1}$, the order of those would be $lcm(m,n)$ where $m$ and $n$ are the orders of a and b. But looking it up it seems not to be so simple, even if all the info I could find was for abelian groups, so I would like some help with this specific case.


Now that , do you think that some of the questions that are being migrated to this meta SE site should be migrated back to meta SO, especially if they are SO specific? I can see that from my end, there are a few SO specific questions that shouldn't really belong here in the first place:       Shouldn't they be migrated back to meta SO?

Since the split between Meta Stack Exchange and Meta Stack Overflow, my questions were all migrated to the new Meta Stack Exchange site.  However I remarks there is a tag  for those specific questions.   I can understand it was done like this for the migration, but should they not be moved back to the dedicated site Meta Stack Overflow?  I am particularly talking about retag requests, which I guess should be on the dedicated meta.XX for XX site as the tags are different and specific for each sites.


In my case should I use != as below, or is !== more appropriate, what is the difference.  private function authenticateApi($ip,$sentKey) {      $mediaServerIp = '62.80.198.226';     $mediaServerKey = '45d6ft7y8u8rf';              if ($ip != $mediaServerIp ) {         return false     }     elseif ($sentKey != $mediaServerKey ) {         return false     }     else {         return true;     } }  public function setVideoDeletedAction(Request $request) {     //Authenticate sender     if ( $this->authenticateApi($request->server->get("REMOTE_ADDR"),$request->headers->get('keyFile')) != true ) {        new response("Din IP [$ip] eller nyckel [********] är inte godkänd för denna åtgärd.");     }

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


I have a Javascript function that receives a string. that string may have URLs in it, with, or without http:// or http/s:  example string:     This is an example string with www.cnn.com and http://microsoft.com"   my purpose is to take that string and inject anchor tags for the URLs such that they are clickable when injected as HTML to an html document.  Is there anything I can use that does this? some Jquery function?

I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;     return text.replace(exp,"$1");  }


I want to prove the algorithm below produces all solutions of $x^2-2y^2=-1$. Although this algorithms have been already posted to another posts on mathstack exchange, they don't explain why it find all solution. This is the most important (and difficult) part to prove.  I want to get all integer solutions of  $$x^2-2y^2=-1$$ for $x,y>0$. This equation is known as Pell's equation. The minimum solution is $(x,y)=(1,1)$. If we consider the norm of the element of $\mathbb{Q}[\sqrt{2}]$, any $(1+\sqrt2)^k=x_k+\sqrt2y_k$ satisfies $N(x_k+\sqrt2y_k)=N(1+\sqrt{2})^k=(-1)^k$. Thus, we get $$x_k^2-2y_k^2=(-1)^k.$$ So, $(x_{2k-1},y_{2k-1})$ is the solution of $x^2-2y^2=-1.$ I want to know if there is any other solution or to prove this is the only solution.

I am assigned to find solutions to the Pell-type equation $x^2-2y^2=-1$. So far, I only have $(7,5), (41,29)$ and $(239,169)$.  My question is, is there a general formula to find all its solutions? Are there infinitely many solutions? If it's possible to write Mathematica code that would find its solutions, what would the code look like?  Thanks a lot.


Which is correct, a "two-year" program or "two-years" program?  The difference between two expressions is the absence/presence of "s", i.e., singular or plural.

Why is "letter" not plural in "two letter words"?  For me it's very strange as the equivalent in French would be plural but my English friend finds it totally normal.


I must use this patch http callout. Is any one has idea?    I get error      "Invalid HTTP method: PATCH"   Exception.  In our project need to use this callout.  Is any other way to update the record from salesforce to goformz record?  HttpRequest req= new HttpRequest();         req.setMethod('PATCH');         req.setHeader('Content-Type','application/json');         String username = 'username123@email.com';         String password = 'password123';          Blob headerValue = Blob.valueOf(username + ':' + password);         String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);         req.setHeader('Authorization', authorizationHeader);         req.setBody('{"name": "DE-111","fields": {"7f91803f-fed6-41cb-b506-a62d01500de0": { "text": "Test Street1111"  } }}');         Http http = new Http();          String url = 'https://api.goformz.com/v2/formz/4bc24f7f-bac8-4632-97b6-a640005becb8';         req.setEndpoint(url);         HttpResponse res = http.send(req);

I need to make a PATCH http request.  I made the rather incredible discovery today that I can't set an HttpRequest to use the PATCH method, as when sending the request I get a callout exception:     System.CalloutException "Invalid HTTP method: PATCH"   The work around I've found on Stack Exchange and elsewhere is only applicable to a Salesforce Rest API request:    This is therefore not helpful to me as I'm calling out to a third party.  By what manner of magic can I send a PATCH request from Salesforce?  The only work around I can think of is to not do it from Apex - this is not an option.


I am VERY new to the world of Linux.  I'm running Ubuntu 15.04 on a Lenovo laptop.  My terminal emulator is Gnome Terminal.  I know a few things.  Let's say I type cd Documents/terminalpractice/python_folder.  I then type, for example, touch askubuntu.py.  I then use the command, gedit askubuntu.py.  At this point in time the text editor gedit will open up on my screen and I am free to attempt to code as much as I like.  However, in the terminal window, I guess the gedit "process" is running?  So I cannot use the terminal until I close out of gedit (I save and then click the 'X' in the top corner).  Why does this happen?  I can use the graphical interface to open the folders, double click on my askubuntu.py, and that will open in gedit, without affecting what is going on in the terminal.  I would like to know why  this happens.

I recently installed 12.04. When I try to edit a file with gedit, I can't use the terminal until I close the editing file or I have to open a new terminal. But I think I didn't have this problem with 11.04, however I'm not sure. Is there anyway to avoid this and to use same terminal while editing files.


I have a Ranger3 Blood Hunter3 in a CoS campaign. The ranger multi-classed into bloodhunter for flavor and role play. He has chosen Order of the Lycan.   One of the abilities allows them to make 1d6(scaling with level) unarmed strikes. How should I handle the use of the spell Hunters Mark while using the unarmed strike?   I know that monks can make unarmed strikes in lieu of weapon attacks but would that trigger Hunter's Mark? Also would this roll over to the Blood Hunter homebrew class as well?  Hunter Mark reads "you deal an extra 1d6 damage to the target whenever you hit with a weapon attack" Can I concider the Blood Hunter unarmed strikes to be weapons?  Thank you both for your answers and insight on my inquiry. I guess this is being flagged a duplicate and in a way it may be. The other post didn't come up on my search regarding the Blood Hunter or Hunters Mark and unarmed strikes. I'm going to let this get mark duplicate and link over to the other page. Thanks again.

For the purposes of the fighter Battle Master archetype, whenever a maneuver calls for a "weapon attack" does that include an unarmed strike?