I teach at a school and I create PowerPoint presentations to use in my classroom.  I also need to upload the PowerPoints to my school website for my students to access.  Access is restricted and students must sign in with their school codes.  Can I use images I find on Google search?  Are all images copyrighted?  If they do not have an "ownership" stamp on them, are they ok to use in this manner?  Nothing is being sold and the presentations are taken down at the end of each year.

I am teaching a freshman science course for the first time and I am doing also outreach activities in high schools. To be able to attract the young generation to science one has to connect the concepts with everyday applications.  So I build my power point slides using pictures from the textbooks which we officially use. Unfortunately when one does a Google search on any subject by images, one gets much more appealing and fascinating pictures. Some of these pictures are even related to simple applications which are explained in popular science sites on very recent discoveries. The problem is that I cannot use those pictures from Google sites in my slides because they are copyrighted.  What should I do then? Should I stick to the boring-looking textbook pics to avoid copyright problems, or bring life to my course by using images Google shows up (but then I might go to the jail!)?  Is there something that says one can use images shown by Google for educational purposes with no copyright issues?


I have dedicated server for my personal projects on Hetzner and today was the second time I got email from them informing that they detected portscan coming from server (first time was in January). At the time I've read the email and logged in to the server it looked perfectly ok without any weird activity going on. I did some rootkit detection scans but with no luck.   What are my next steps here? Should I just ignore it, do clean system install or sth else?

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.


Seeing as Commander Riker was restored using the transporter pattern buffer, when assumed dead, why is this not always used when someone dies? I guess for dramatic purposes it wouldn't be very interesting if no one ever was under the threat of dying, but is there any explanation in the series itself?

I've always been a little confused by the fact that when a crew member dies they don't just use the transporter history to bring that person back. I'm aware that this wouldn't make for good TV, but I was wondering if there was a more technical reason.


I've been using Ubuntu 18.04 for about 3 days now and so far it runs smoothly. I now need to install a VPN for my work, and I got the following files from the sysadmin:   ca.crt VPNConfig.ovpn   I first ran sudo apt install openvpn. After that I wanted to install it using the GUI. So I went to the settings app and under "Network" I tried adding a new VPN. It gives the option to "Import from a file". So I selected the VPNConfig.ovpn file, but it says it can't import the file. I also tried importing the ca.crt file and importing the zip in which the two files came, but that didn't work either.   Could anybody help me out as to how I can make this VPN work?

I'm trying to setup OpenVPN using NetworkManager. The GUI seems buggy and unresponsive. Are there any other tools for setting up a VPN client?


well I'm new on ubuntu, I installed the 13.10 version because I heard it's faster and smoothly than 12.04. So, my problem is that I don't know how to change wallpapers in an automatic way (slideshow), but with my OWN pictures, I don't want pictures from flicker, etc. I want to have wallpapers of pictures that I have already downloaded. I searched some programs and I found Slidewall but I can't download it in ubuntu 13.10. Could anybody lend me some help? (sorry if there's a English confusion, I'm not too good at it)

I am unable to find any feature to make the desktop wallpaper autochange after an interval. If there is, please let me know. If not, then is there any app for the same?


How to change subitem bullets from square to minus in Beamer ? (setbeamertemplate) I'd like a small horizontal line, showing like a minus symbol. Just simple char: -.  I know that there are : triangle, square, and ball.  The question is a new question, and it is different compared to other ones. It is specific to given issue.  \documentclass[bigger]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx}    \setbeamertemplate{itemize items}[triangle] \setbeamercolor{itemize item}{fg=red}    \setbeamertemplate{itemize subitem}[square] \setbeamercolor{itemize subitem}{fg=red}  \begin{document}   \begin{frame}{Introduction} \begin{itemize} \item 1 \item 2 \item 3 \end{itemize} \end{frame}  \end{document}   The improved version looks like this but it has issue with page numbering:  \documentclass[12pt,t]{beamer}  \usepackage{url} \usepackage{hyperref} \usepackage{graphicx} \usepackage{grffile} \usepackage{color}  \usetheme{CambridgeUS} % %gets rid of bottom navigation bars, then reset with {} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{headline}{}{} \addtobeamertemplate{headline}{}{\textcolor{white}{\rule{\paperwidth}{5pt}} }  \setbeamertemplate{footline}[frame number]{} \usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{background.jpg}}   \newcommand{\unititle}[1]{\title{#1}} \newcommand{\uniauthor}[1]{\author{#1}} \newcommand{\uniinstitute}[2]{\institute[#1]{#2}} \newcommand{\unisection}[1]{\frametitle{#1}} \newcommand{\unimaketitle}[1]{ \begin{frame} \maketitle \end{frame} }  \usepackage{calc} \newcommand{\unifig}[2]{ \begin{center} \hspace{-1cm}\includegraphics[width=#2\textwidth*\real{0.91},keepaspectratio]{#1} \end{center} }     \usepackage{xparse,calc} \newlength\fitimageht \newlength\fitotherht \newsavebox\fitimagebox \NewDocumentCommand \fitimage { m m O {} }{%   \sbox\fitimagebox{%      \parbox{\textwidth}{%        #1\par        #3     }%   }%   \settototalheight{\fitotherht}{%      \usebox\fitimagebox   }%   \setlength\fitimageht{\textheight}%   \addtolength\fitimageht{-\fitotherht-\topskip-\footskip-3\baselineskip}%   #1\par    \centering    \includegraphics[width=\textwidth,height=\fitimageht,keepaspectratio]{#2}\par   #3}  \definecolor{UniRed}{RGB}{204,0,0} \setbeamertemplate{itemize item}{$>$} \setbeamercolor{itemize item}{fg=MyMadrid} \setbeamertemplate{itemize subitem}{$-$} \setbeamercolor{itemize subitem}{fg=MyMadrid}   \begin{document}  \section{Section} \begin{frame} \frametitle{\thesection.~\insertsection} \begin{itemize} \item Header \begin{itemize} \item this is an example \end{itemize} \end{itemize} \end{frame}   \section{Section Two} \begin{frame} \frametitle{\thesection.~\insertsection} \begin{itemize} \item Header \item Header \item Header \item Header \begin{itemize} \item this is an example \bigskip \end{itemize} \item Header \begin{itemize} \item this is an example \end{itemize} \end{itemize} \end{frame}    \end{document}   The improved solution isnt still working, because there is a red foot note (page numbering) :(  + TexMaker under Windows gives "beamerbasemodes.sty not found" !

I would like to change the bullets in the second itemize to arrows.  \begin{alertblock}{The Aim of this Research}      \begin{itemize}         \item Item 1         \item Item 2             \begin{itemize}                 \item Item 2-1                 \item Item 2-2             \end{itemize}     \end{itemize}  \end{alertblock}   Form above, I would like to make:  ・Item 1  ・Item 2    => Item 2-1  (change bullet to arrow)    => Item 2-2   I've tried inserting \renewcommand{\labelitemii}{$\rightarrow$} before and after the second \begin{itemize} and , but they don't work.


The Advanced Edition of FTL includes the ability to man your sensors and door subsystems. Why? What does it accomplish?

In FTL, you can place crew members in various subsystems to gain bonuses. However, I don't know how to actually quantify those bonuses. The two that are least clear to me are:   Manning shields increases shield recharge speed. Manning weapons increases weapon recharge speed.   While I understand the general effect, I'm not sure how much of an actual increase I'm actually getting from these.   Also, in FTL: Advanced Edition, it looks like you can man the sensors and doors.  Finally, does manning it with multiple crew members give a larger bonus?


I want to completely disable resetting root password! Is it possible? If yes, then how?

Recently one of my friends came over to my place, within 15 minutes he hacked my account using a Live CD and reset the password in front of me. I was baffled to see such a thing. Please guide me to prevent such a future attempt using a Live CD.


When my son was two he started letting me know when he wanted to go to the potty. He then started nursery and went back to old ways of not letting me know.   He's now three and I've taken him out of diapers however he still wont go. He will sit on the toilet but wont go until we've pulled his pants up.  How can I encourage him to (1) Tell us when he needs to us the bathroom and (2) Go to the bathroom when he IS sitting on the toilet.

My son is 3 years old and doesn't tell me when he needs to use the bathroom. It has been 5 months now that I took his diaper off him. I just do not know what I should do.  Should I put a diaper on him again?  I mean, is this normal? Please help. I get frustrated sometimes.  He doesn't want to potty at all! I did train him before but now that he understands, he doesn't want to go to potty.


The next Ubuntu stable version will be available within less than 2 months. But I want to install the "daily build" of this next version today. If I just keep doing the basic apt update & apt upgrade, will I have the stable version when the next Ubuntu version is officially released? Or should I format and perform a clean install of the stable version once it's released? Will there be a practical difference between just keep updating and performing a clean install of the officially released stable version?  PS: at the momment, I'm considering to install Ubuntu 2020.04 LTS daily build and update it until the stable version is released.

I installed an Ubuntu alpha or beta and have been keeping it up to date.   So, Should I presume that my system has automatically updated to the next alpha or beta, and will be running the official release when it's finished?


How can I print all matching lines between two files including the duplicates  sourcefile:  SNP value RS1 0.55 RS2 0.52 RS3 0.25 RS4 0.22   queryfile:  SNP RS1 RS2 RS2 RS3 RS4 RS4   Desired output:  SNP value RS1 0.55 RS2 0.52 RS2 0.52 RS3 0.25 RS4 0.22 RS4 0.22   At present I am using the following command to retrieve the matching lines but is removing the duplicates, while i need to print all lines including the duplicates,  Any suggestions please  Thanks  awk 'BEGIN{FS=OFS="\t"}NR==FNR{a[$1]=$0;next}a[$1]{print}' queryfile sourcefile > output

I'm trying to retrieve the the matching lines from a file, however the file that has the "index" or list of matches to retrieve also has duplicate entries and I want to print out the duplicates as well.  Example:  File 1 (index file or list of strings to match)  abc tgf abc ggg aaa fff   File 2 (what I want to retrieve for each of the matches in file 1)  Fred   1   3   abc Amy    2   4   ggg Dan    5   6   tgf Mike   9   1   fff Steve  2   1   aaa   My desired result would be (order is not important, just that I match every line):  Fred   1   3   abc Dan    5   6   tgf Fred   1   3   abc Amy    2   4   ggg Steve  2   1   aaa Mike   9   1   fff   I'm familiar and have tried grep as follows, but it does not print the duplicate entries.  grep -Fwf file1.txt file2.txt  Fred   1   3   abc Amy    2   4   ggg Dan    5   6   tgf Mike   9   1   fff Steve  2   1   aaa


When calculating the standard deviation of a set of measurements of $X$, you use the formula $$\sqrt{\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar x)^2}$$ A common explanation I have found for the  $n-1$ factor is that it refers to the degrees of freedom. As I understand he degrees of freedom is the number of values you can pick, which is equal to the number of samples minus the number of relations between them.  Let's say $n=3$ and we pick values until our vector is fully determined. $$(x_1,x_2,x_3,\bar x)\\(4,x_2,x_3,\bar x)\\(4,9,x_3,\bar x)\\(4,9,x_3,7)$$ At this point we have enough information to calculate that $x_3=8$. We could also have picked $x_3$ to calculate $\bar x$. So why isn't the degrees of freedom $n$ since we had to pick $n$ values to fully determine the standard deviation?

I did not get the why there are N and N-1 while calculating population variance. When we use N and when we use N-1?      It says that when population is very big there is no difference between N and N-1 but it does not tell why is there N-1 at the beginning.  Edit: Please don't confuse with n and n-1 which are used in estimating.  Edit2: I'm not talking about population estimation.


Am writing spring boot rest api to fetch records from elastic search by id. While am getting response from elastic search few keys having null object. So, how I can do the null check while setting value for Product (POJO class).  Am handling this exception with the below line of code, but still the error is persisting product.setExpiration_date(sourceAsMap.get("expiration_date").toString() != null ? sourceAsMap.get("expiration_date").toString() : "");.  Am not sure whether my approach is correct or not.   Please find the full code below.  SearchResponse searchResponse = null;     try {          searchResponse = restHighLevelClient.search(searchRequest);     } catch (IOException e) {         e.getLocalizedMessage();     }     // read the response     String productName = null;     Product product = null;     SearchHit[] searchHits = searchResponse.getHits().getHits();     for (SearchHit hit : searchHits) {         // get each hit as a Map         Map<String, Object> sourceAsMap = hit.getSourceAsMap();         product=new Product();         product.setName(sourceAsMap.get("name").toString());         product.setCatalog_id(sourceAsMap.get("catalog_id").toString());         product.setCode(sourceAsMap.get("code").toString());     product.setExpiration_date(sourceAsMap.get("expiration_date").toString() != null ?                  sourceAsMap.get("expiration_date").toString() : ""); // Error throwing in this line.         product.setIs_visible(sourceAsMap.get("is_visible").toString());      }   Please find my error below :  2018-05-23 22:59:13.216 ERROR 9948 --- [nio-8594-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause  java.lang.NullPointerException: null at com.sun.searchengine.dao.ProductDao.getProductById(ProductDao.java:105) ~[classes/:na] at com.sun.searchengine.controller.ProductController.getProductById(ProductController.java:24) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]

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?


Please consider taking action (vote below) to re-open the question As good as the , it is NOT authoritative (issued by the authorities).  As such this question stands on its own is not duplicative of said community wiki.  Please consider taking action (vote) below) to re-open the question. On January 25, the Whitehouse issued a :  Section 1.  Suspension and Limitation on Entry.  (a)  The entry into the United States, as immigrants or nonimmigrants, of noncitizens who were physically present within the Schengen Area, the United Kingdom (excluding overseas territories outside of Europe), the Republic of Ireland, and the Federative Republic of Brazil during the 14-day period preceding their entry or attempted entry into the United States, is hereby suspended and limited subject to section 2 of this proclamation. (b)  The entry into the United States, as immigrants or nonimmigrants, of noncitizens who were physically present within the Republic of South Africa during the 14-day period preceding their entry or attempted entry into the United States, is hereby suspended and limited subject to section 2 of this proclamation.  Thus effectively prevent Dutch (Netherlands) nationals from entry.  This will obviously not be permanent:  How does one access the regularly updated list of COVID19 banned countries?  Is there a .gov website that is kept current, that enables European travelers to confirm that they can travel to the USA?   UPDATE:

This community wiki explains the current restrictions by the United States of America on the entry of individuals who may pose a risk of transmission of the SARS-Cov2, the virus which causes the Covid-19 disease.


I am having trouble getting good depth of field on close photos. My light is good. Lense is AF-S Micro Nikkor 40 MM 1:2.8 G

I have been messing around with some Macro Photography using the techniques (and a reversal ring) described in a  by @ My main issue is that I am having a hard time getting the subject into focus. There are times when the center is blurred and the outside is in focus or the center in focus and the outside out of focus. What are ways to get as much of the subject in focus?   I am using a Nikon D5100, I have a 18-55mm kit lens but I find the 55-200mm lens easier to use for shooting.


Related question: , but that is about the (deprecated) mobile web interface, not the new responsive design.  is related but , and I'm not asking for it to be implemented on desktops. Not as many people were using touch screens to browse Stack Exchange back then, and the new responsive design has been explicitly designed to accommodate touch screens.    Now to the feature request itself: I realized there that it's rather easy on desktop to discover how to interact with spoilers; when you point your mouse at it, the contents will appear on hovering over it. This might even happen accidentally; the animation will get your attention anyway. Many (new) users are using Stack Exchange on their smartphone or tablet, where this interaction is simply not possible. As  mentions, it just looks like somebody made a mistake and posted an empty blockquote.  Because the new responsive design will (eventually) replace the old  interface, can it show the "Click Tap to show spoiler" message as well if the  indicates it's a mobile device?

The spoiler      WELL HELLO!   currently reads on mobile devices "Click to show spoiler"    On desktop devices, the spoiler appears as an empty blockquote, like this:    Should the spoiler warning say "Tap to reveal" rather than "Click"? Or should I keep longer fingernails?


when I install Ubuntu with a USB-disk, following message occurred:    task swapper/0:1 blocked for more than 120 seconds.   And my computer have an CPU of core-i7-4710MQ and 12 GB memory.  But, if I install Ubuntu on a very old computer, I can success.It is a double core Intel CPU with a 2 GB memory.  The SSD I used on both computer is the same one. After I installed Ubuntu on that old computer with my SSD, I replace the hard disk of my computer with that SSD witch installed Ubuntu 16.04 successful already, it can't run.  My bios is legacy at first. When I change to UEFI mode, I can enter  . But, no matter what I choose, my screen becomes to be grey, and a cursor twinlkling. about 2 or 3 minutes later,  following message occurred:    task swapper/0:1 blocked for more than 120 seconds.   What I should do? or what information I should provide? thanks!

I would like to see a full how-to guide on how to install Ubuntu.


I am using Blender 2.91, and have found that there seems to be some "point" unrelated to the selected object, that I simply can't zoom away from. How can I fix this? I have seen a lot of similar questions that deal with being unable to zoom closer to a selected object, but this issue is not that. There is just some arbitrary point that I can not zoom more than a certain distance away from in any direction, regardless of what I might have selected. If I go into Top or Front view, I can move just fine, but when I go back to User Perspective, wherever I was when I left Top View seems to become my new "prison".

I often find that I can zoom in to a point, but then cannot zoom any more, even when there is a lot of room to zoom to the meshes on the scene.   This is particularly annoying in the following scenario:  I often land up left clicking on the scene and the 3D cursor shifts there. I use Shift+C to shift the 3D cursor back to the origin. However, this also centers the view on the cursor and shifts the view to show all objects, and sometimes this zooms things way out – at this point, if I try to zoom in, I can zoom in to a point (using the pinch/zoom on trackpad), but then it stops zooming in.   How do I zoom in after that? Is there anything else I am doing wrong in this case?


I am looking to do a cluster analysis in R with variables of mixed types (continuous, categorical). In the past I Have used SPSS's two-step cluster analysis to do this, but I need to now use R. Is there a way to conduct cluster analysis with variables of mixed types in R? I did find this thread:   however, it is 8 years old, so I'm not sure if there have been any new approaches since then. Thank you!

I wonder whether it is possible to perform within R a clustering of data having mixed data variables. In other words I have a data set containing both numerical and categorical variables within and I'm finding the best way to cluster them. In SPSS I would use two - step cluster. I wonder whether in R can I find a similar techniques. I was told about poLCA package, but I'm not sure ...


Consider a separable Hilbert space $H$, and $\{g_n\}$ is an orthonormal basis of $H$. Now there is an orthonormal set $\{f_n\}$ that satisfies $\sum_n\|f_n-g_n\|^2<1$. Show that $\{f_n\}$ is also an orthonormal basis of $H$.  I am not sure how to use the condition $\sum_n\|f_n-g_n\|^2<1$. It implies $\|f_n-g_n\|\rightarrow 0$, which looks like $f_n$ and $g_n$ are almost the same when $n$ is large. But I don't know how to utilize that property.  Thanks in advance!

Let $\{e_n\}$ be a complete orthonormal sequence in an Hilbert space $H$ and let $\{f_n\}$ be an arbitrary sequence of elements in $H$ s.t $$\sum_{n=1}^\infty\|f_n-e_n\|^2<1$$Show that $\{f_n\}$is a complete sequence   First I thought simplifying the last inequality:$$1>\sum_{n=1}^\infty\|f_n-e_n\|^2=\sum_{n,k=1}^\infty|(e_n-f_n,e_k)|^2=\sum_{n,k=1}^\infty|\delta_{n,k}-(f_n,e_k)|^2$$but I was stuck there.  Incorrect Solution: Another option I thought about was using parsevall's generalized identity on $f_n$ means: $$0=(f_n,f)=\sum(f_n,e_n)\overline{(f,e_n)}$$ and since the inner product is non-negative, if $(f,e_n)=0$ then $f\equiv 0$ and we are done and otherwise $(f_n,e_n)=0$ which means that $\forall n\in\mathbb N,f_n=0$ and then by definition of inner product $\{0\}$ is indeed a complete sequence.  What's incorrect in the 'incorrect solution' and how can I use the fact about the inequality?


Let $k$ be a field, $A=k[t,s]$, and $C=A[z]/(tz-s)$. How can I prove, using the ideals $tA$ and $sA$, that $C$ is not flat over $A$? (Liu, Algebraic Geometry and Arithmetic Curves, Exercise 2.6(c).)   I know that if $A$ is a Dedekind domain then $A$-module is flat if and only if it is not torsion-free over $A$. But Dedekind domains are new structures for me so I'm not sure if $k[t,s]$ is a Dedekind domain. Or do I have to show that not both of $tA$ and $sA$ can't be maximal or prime over $A_{tA}$ or $A_{sA}$?

Why isn't $M = \mathbb{C}[x,y,z]/(xz-y)$ a flat $R = \mathbb{C}[x,y]$-module?   The reason given on the book is "the surface defined by $y-xz$ doesn't lie flat on the $(x,y)$-plane". But I don't understand why this can be a reason.  Since     An $R$-module $M$ is flat if and only if for any ideal $S$ of $R$, the map $1_M \otimes i: M \otimes_RS \rightarrow M \otimes_RR$ is injective. Here, $i: S \rightarrow R$ is the inclusion map.   I tried to find an ideal $S$ in $R$ such that $M \otimes_RS \rightarrow M \otimes_RR = M$ is not injective, but I didn't succeed. Please give me some help. Thank you.


Here is the code i have written, it works fine until i get to the loop, it crashes showing NullPointerException  Looks like i am missing something very basic here.. but when i run the algorithm on pen & paper i don't see any problem at all.  What am i doing wrong please help !  package lesson.datastructure;  public class MergeSort {      public static Node getSortedNode1(){         Node n1=new Node();         n1.value=2;         Node n2=new Node();         n2.value=76;         Node n3=new Node();         n3.value=98;         n1.next=n2;         n2.next=n3;         n3.next=null;         return n1;     }     public static Node getSortedNode2(){         Node n1=new Node();         n1.value=23;         Node n2=new Node();         n2.value=65;         Node n3=new Node();         n3.value=87;         n1.next=n2;         n2.next=n3;         n3.next=null;         return n1;     }     public static void printNode(Node head,String name){          System.out.println(name);         while(head!=null){             System.out.print(head.value+"->");             head=head.next;         }         System.out.println("\n\n");     }      /* Main method ignore all other methods */     public static void main(String[] args){          Node head1,head2;         head1=getSortedNode1();         head2=getSortedNode2();          printNode(head1, "List 1");         printNode(head2, "List 2");          Node sortedMergedList=null;          if(head1.value<head2.value){             Node nextNode=head1.next;             Node isolatedNode=null;             isolatedNode=head1;             isolatedNode.next=sortedMergedList;             sortedMergedList=isolatedNode;             head1=nextNode;         }         else         {             Node nextNode=head2.next;             Node isolatedNode=null;             isolatedNode=head2;             isolatedNode.next=sortedMergedList;             sortedMergedList=isolatedNode;             head2=nextNode;         }           while(head1!=null || head2!=null){        //Null pointer here while accessing head1 or head2             if(head1.value<head2.value){                 Node nextNode=head1.next;                 Node isolatedNode=null;                 isolatedNode=head1;                 isolatedNode.next=sortedMergedList;                 sortedMergedList=isolatedNode;                 head1=nextNode;             }             else             {                 Node nextNode=head2.next;                 Node isolatedNode=null;                 isolatedNode=head2;                 isolatedNode.next=sortedMergedList;                 sortedMergedList=isolatedNode;                 head2=nextNode;             }          }             printNode(sortedMergedList, "merged sorted list");      }       }

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


I came across this question in my math workbook, but wasn't able to solve it. Prove that the sequence $a_n = \frac{x^n}{n!}$ is bounded. This is my definition of bounded: $\exists M>0 \hspace{-1mm}: \hspace{5mm} |a_n|<M \hspace{5mm} \forall n\in\mathbb{N} $. UPDATE: I am aware I could prove convergence and then prove all convergent sequences are bounded, but I assumed there exists a direct method to prove boundedness using the definition (Hence this question was not meant as a duplicate).

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


in my system there was windows 7-32 bit and linux tamil (Govt laptop) I deleted the linux partition from windows by Disk Management in windows. when i rebooted the system i get the follwing Thing,  GRUB loading. Welcome to GRUB!  error: unknown filesystem. Entering rescue mode... grub rescue>  Pls help me to solve this issue and access me to Windows

I have Windows 7 installed in my internal HDD and wanted to try out Ubuntu so I have an USB to put Ubuntu LiveUSB on and installed Ubuntu on a external HDD and everything worked out fine.  Now the problem. If I remove the external HDD and try to boot Windows normally it shows the grub rescue screen. The only way to boot into Windows is by having the external HDD attached.  Is there any way I can make it so I won't have to have the external HDD attached to be able to boot my Windows 7?


I remember a book in which the main protagonist is a human male and after witnessing alien activities he was forcibly whisked away. After being taken away he joins a type of galactic patrol type organization where one of his instructors/head instructor is described like an alien Big Bird.   Of the various scenes in the book, I remember the scene where the human man discovered the bird instructor literally "feeding the toilet". I also remember scenes with heavy drug use and scenes to make a sailor blush at least heavily implied if not described to some extent.  I read this book in middle school, so these scenes stick out the most in my memories. I have already checked and it is not a Steve Perry book. If I remember correctly, the one I read was paperback with a human male on the cover with a spaceship or space station behind him over a planet.  Could someone identify this book?

Some things I remember:   Pretty sure the author was female The novel had won some award or other The title was one word (I think) and it started with "I" (I think) It would have come out in the mid to late 90s or early 2000s It was a paperback or trade paperback, in English.  The book was originally written in English as far as I know. The cover, if I remember correctly, had an orangish background.   The plot involved a sole human representative to what was effectively an alien "United Nations" type of organization.  There were myriad types of aliens, many of whom were completely biologically incompatible.  Even the ones that could live in the same conditions generally found each other either repugnant or incomprehensible.  The main character ended up feeling incredibly lonely and was "set up" with a superficially similar humanoid female, but found their pheromones were incompatible and it was still difficult to communicate.


I tried some ideas but in the end, noticed that I was assuming that $n=mk$ and $(m,k)=1$, this was not assumed in the question. Now I am stuck as to how to proceed.

I saw the answer to  and it is the same problem, but i didn't get how to use the tip S.C.B gave. This was the tip: $"$First, assume that it is not $a$ primitive root $(\text{mod m})$. Then we have that there exists such $r<\phi(m)$ such that $$a^r\equiv 1(\text{mod m})$$ Now use that, if $n=mk$ $$ϕ(mk)=ϕ(m)ϕ(k)\frac{d}{ϕ(d)}≥ϕ(m)ϕ(k)>rϕ(k)$$ where $d=gcd(m,k)"$ and i saw the answer to this question using group theory, but i want an answer using elementary number theory, if you have a different answer, or tip, it would be good as well. What i tried was this: $n=mk$, then $$a^{\phi(n)}\equiv 1(\text{mod n})\Rightarrow a^{\phi(mk)}\equiv1(\text{mod mk}) \Rightarrow a^{\phi(mk)}\equiv1(\text{mod m})$$ But i don't know how to follow from here


I've read though many examples of this on StackOverflow but can't quite get it working.  I'm simply trying to execute a piped command using subprocess.Popen.  The challenge is that I don't know the command being submitted so need to loop as needed if it contains pipes (all the examples I've found know ahead of time how many Popens are needed..).  For example, using this command (ls | grep .py) does the following:   The first command appears to run correctly.  It's return code is 0 and I can see the expected data in stdout but the 2nd Popen always exits with a returncode of 1 with no useful information in either stdout/stderr as to the problem.   Here is the code I have:      def run_powershell_command(command, timeout_in_secs):     try:         cmd_split = command.split('|')         if len(cmd_split) > 1:             processes = []             for x, next_cmd in enumerate(cmd_split):                                                     next_cmd = "powershell -command \"{}\"".format(next_cmd.strip())                 if x == 0:                     processes.append(subprocess.Popen(next_cmd, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE))                 else:                     prev_stdout = processes[len(processes)-1].stdout                     processes.append(subprocess.Popen(next_cmd, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=prev_stdout))              try:                 # kick off the LAST processes which has all sub-processes chained                 output.stdout, output.stderr = processes[len(processes)-1].communicate(timeout=int(timeout_in_secs))                  # wait for each processes to complete                 for process in processes:                     process.wait()                  output.returncode = processes[len(processes)-1].returncode             except subprocess.TimeoutExpired as e:                 for process in processes:                     process.kill()   (Note: This is an internal tool so I'm not concerned with using the shell=True)

How do I execute the following shell command using the Python  module?  echo "input data" | awk -f script.awk | sort > outfile.txt   The input data will come from a string, so I don't actually need echo.  I've got this far, can anyone explain how I get it to pipe through sort too?  p_awk = subprocess.Popen(["awk","-f","script.awk"],                           stdin=subprocess.PIPE,                           stdout=file("outfile.txt", "w")) p_awk.communicate( "input data" )   UPDATE:  Note that while the accepted answer below doesn't actually answer the question as asked, I believe S.Lott is right and it's better to avoid having to solve that problem in the first place!


I don't won't to use swap file (due to some bug in kernel or AMD driver).  I wan't to have some util running and monitoring free system memory and alerting me when it becomes less than some specified limit.  This will notify me that I need to close some applications (or browser tabs) to avoid system freeze due to some strange kswapd0 I/O activity (probably another bug).  Is there any appropriate software?  UPDATE:  I've redesigned script provided by Gary for my need and want to share it  #!/bin/bash  #Minimum available memory limit, MB THRESHOLD=400  #Check time interval, sec INTERVAL=30  while : do      free=$(free -m|awk '/^Mem:/{print $4}')     buffers=$(free -m|awk '/^Mem:/{print $6}')     cached=$(free -m|awk '/^Mem:/{print $7}')     available=$(free -m | awk '/^-\/+/{print $4}')      message="Free $free""MB"", buffers $buffers""MB"", cached $cached""MB"", available $available""MB"""      if [ $available -lt $THRESHOLD ]         then         notify-send "Memory is running out!" "$message"     fi      echo $message      sleep $INTERVAL  done

This is a follow-up to : ulimit and cgroups are not user friendly, and besides, wouldn't work with applications that spawn separate processes, such as Chrome/Chromium for each new (group of) tabs.  The simple and effective solution, used by Windows 7 actually, is to warn the user that the OS is running low on memory. This simple warning pop-up has prevented me from having any low-memory-caused system freeze in Windows, while I kept running into them on Ubuntu distros that I was testing live (where the RAM-mounted disk would eat up 2GB alone).  So, is there some way to automatically warn the user that the available RAM is nearing zero, without the user having to keep an eye on some memory monitoring gadget? Surely  could be configured to do that?


I have a Sapphire 5850 GPU.  When I install any drivers in ubuntu for it my games run very heavy - with some strange glitches in the video.  I went back to the default driver and the games in steam run perfectly - but I can'tt control my fan speed with any command or tool.  All ask for CCC and the ati driver. Is there any solution for my problem?

I know this is a common problem and have read other topics but couldn't resolve. Anyways yesterday I found a solution - I have 2 graphic cards (hybrid) and they were both on. So I turned one off and installed Jupiter for power management and from there on the fans were quiet and I was happy as hell.  However (:)), yesterday evening I also updated the system and the fan and it's noise came back. I checked whether I am using only 1 graphics card and I am.  c0dehunter@mintBox ~ $ sudo lshw -c video [sudo] password for c0dehunter:    *-display                       description: VGA compatible controller        product: RS780M/RS780MN [Mobility Radeon HD 3200 Graphics]        vendor: Hynix Semiconductor (Hyundai Electronics)        physical id: 5        bus info: pci@0000:01:05.0        version: 00        width: 32 bits        clock: 33MHz        capabilities: pm msi vga_controller bus_master cap_list rom        configuration: driver=radeon latency=0        resources: irq:18 memory:c0000000-cfffffff ioport:c000(size=256) memory:fbcf0000-fbcfffff memory:fbb00000-fbbfffff   Maybe the problem is (false) temp reading from GPU?  c0dehunter@mintBox ~ $ sensors acpitz-virtual-0 Adapter: Virtual device temp1:        +44.0°C  (crit = +105.0°C)  k10temp-pci-00c3 Adapter: PCI adapter temp1:        +47.0°C  (high = +70.0°C)                        (crit = +115.0°C, hyst = +110.0°C)  radeon-pci-0200 Adapter: PCI adapter temp1:       +127.5°C     The thing that is weird is that if I boot into Windows the fan is still at full power (previously it wasn't). Did I f--- up my hardware with software? :)  //OH, yes - I forgot to mention that my laptop is not hot at all. The temps are about 50°C.


How do I efficiently count the zero padded six digit numbers where the first three digits equal the last three?  My solution is like this. But this is not efficient solution. I have to find best way  public class TicketNumber {    public static void main(String[] args) {     int i1, i2, i3, i4, i5, i6, count = 0;     String str="";     for (i1 = 0; i1 <= 9; i1++) {        for (i2 = 0; i2 <= 9; i2++) {           for (i3 = 0; i3 <= 9; i3++) {              for (i4 = 0; i4 <= 9; i4++) {                 for (i5 = 0; i5 <= 9; i5++) {                    for (i6 = 0; i6 <= 9; i6++) {                       if ((i1+i2+i3) == (i4+i5+i6)) {                          count++;                       }                   }                }             }          }       }    }    System.out.println(count);   } }   I should print all numbers between 000000-999999 which compatible with i1+i2+i3 = i4+i5+i6 condition

How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).


Why is Math.Round(0.125, 2) rounding to 0.12?  Dim foo As Decimal foo = Math.Round(0.125, 2)   foo is now 0.12 but it should b 0.13  I heard it's because some standard in .Net rounds to the nearest even number, but that's just bad math. 12.5 will round down to 12, but 13.5 will round up to 14.  Is there a way to fix this?

According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals < 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) < number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead.


I have a button that shows and hides comments using jquery: <button type="button" class="com-btn"></button> <div class="com-list" style="display: none;">     <!-- comments are displayed here --> </div>  <script>     $(document).ready(function() {         let display = false         $('.com-btn').click(function () {             if (display === false) {                 $(this).next(".com-list").show("slow");                 display = true             } else {                 $(this).next(".com-list").hide("slow");                 display = false             }         });     }); </script>  It was working fine until I introduced Waypoints infinite scroll to the page, and then it would only work on the first set of loaded posts. So I changed the first line of the script to $(document).click(function() {. Now it is affecting all posts, but the .com-list begins to slide up and down, showing and hiding continuously on a single click. I've also tried, $(document).on('click', function(){ and received the same result. Is anyone aware of another way to solve this?

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.


this is my code .. please i can't find why it's not working..  (MyTriangle Class:)  public class MyTriangle { private MyPoint v1; private MyPoint v2; private MyPoint v3;  public MyTriangle(int x1,int y1,int x2,int y2,int x3,int y3){   v1.setPointXY(x1, y1);   v1.setPointXY(x2, y2);   v1.setPointXY(x3, y3); }  public MyTriangle(MyPoint v1,MyPoint v2,MyPoint v3){   this.v1.setPointXY(v1.getPointX(), v1.getPointY());   this.v2.setPointXY(v2.getPointX(), v2.getPointY());   this.v3.setPointXY(v3.getPointX(), v3.getPointY()); }   public String toString(){ return "Triangle @ " + v1.toString()+ ", " +   v2.toString() + ", " + v3.toString() ; } public double getPerimeter(){return v1.distance(v2) + v2.distance(v3)+ v3.distance(v1); } public void printType(){   if(v1.distance(v2) == v2.distance(v3) && v2.distance(v3) == v3.distance(v1))  System.out.println("equilateral\n");   else if(v1.distance(v2) == v2.distance(v3) || v2.distance(v3) == v3.distance(v1) || v1.distance(v2)==v3.distance(v1))   System.out.println("isosceles\n");   else System.out.println("scalene\n");   } }   (MyPoint class:)     class MyPoint{  private int x; private int y; public MyPoint(int x,int y){ this.x=x; this.y=y; } public void setPointXY(int x,int y){ this.x=x; this.y=y;  } public void setPointX(int x){ this.x=x; } public void setPointY(int y){ this.y=y;} public int getPointX(){return x;} public int getPointY(){return y;} public double distance(int x,int y){ return Math.sqrt(Math.pow(this.x - x,2.0)     + Math.pow(this.y - y   ,2.0)        );     }     public double distance(MyPoint p){    return Math.sqrt(Math.pow(this.x - p.x,2.0)     + Math.pow(this.y - p.y      ,2.0)    );     }     public String toString(){ return "("+x+","+y+")";}  }   (the test class:)     public class TestMyTriangle {  public static void main(String[] args){ MyTriangle t1=new MyTriangle(2,3,4,1,3,5); MyPoint p1=new MyPoint(2,2); MyPoint p2=new MyPoint(3,3); MyPoint p3=new MyPoint(1,1); MyTriangle t2= new MyTriangle(p1,p2,p3); System.out.print(t1.toString() +  " With perimeters " + t1.getPerimeter() +  " of type: "); t1.printType(); System.out.print(t2.toString() +  " With perimeters " + t2.getPerimeter() + " of type: "); t2.printType(); }     }   that is the error it's giving:  Error:  Exception in thread "main" java.lang.NullPointerException at MyTriangle.<init>(MyTriangle.java:7)     at TestMyTriangle.main(TestMyTriangle.java:3)

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


I registered in the   and followed some of the Interested Technologies but still not able to get Precognitive badge.

Possible Duplicate:          In Stack Overflow, I saw  badge saying that its awarded to "Followed the Area 51 proposal for this site before it entered the commitment phase". What do this mean? No user is there having this badge.


Say I have the follow code:  class Outer {    int n;    class Inner {    } }   Is it possible for an object of type Inner to access the instance variable n of its Outer object? (When I say its, I mean the Outer object that its associated with.) I understand that within a method of an inner class you can access outer class instance variables and also within the body (for example an instance variable for Inner could initialize to the value of an instnace variable of Outer), but is it possible to more directly access the Outer instance variables? For example, if inner were an object of type Inner, is there anything like inner.n given the code above?  Sorry for the block of text: basically, if inner were an object of type Inner, is there anything like inner.n given the code above?

In the following snippet:  public class a {     public void otherMethod(){}     public void doStuff(String str, InnerClass b){}     public void method(a){         doStuff("asd",             new InnerClass(){                 public void innerMethod(){                     otherMethod();                 }             }         );     } }   Is there a keyword to refer to the outer class from the inner class?  Basically what I want to do is outer.otherMethod(), or something of the like, but can't seem to find anything.


I have downloaded shapefiles from open street map. I want to apply different stylings to a single vector file(i.e different colours to highways, street roads, pathways etc). Is there any way to obtain SLD styles so that it look similar to open street map?

We have downloaded OSM data for our region and loaded them into PostGIS using osm2pgsql. So far so good. On top we have GeoServer and we would like to expose the OSM data using WMS. We would as well like to style data like in "standard" OpenStreetMaps (e.g. osm.org) as this cartography is well designed. We have tried to download som standard SLD for OSM data, but there seem to all sorts of problems using these SLDs (XML parsing errors, invalid content, etc.).  Any good ideas how to reuse an OSM SLD to style OSM through WMS?


Why is that a massless string has same tension throughout its length provided the string is inextensible. Similarly in spring block problems we take spring as massless as well and here too we consider spring force to be uniform throughout it's natural length. I actually want the derivation of how do we get this. Thank you.

There is always one point in introductory mechanics that has been continuously bothering me ever since I had taken my freshman physics course - Why does a massless rope have its tension equal on both ends?  I have been searching for a good explanation on various textbooks at different levels, but none of them provided me a satisfactory explanation. They either   State directly "we assume the string is massless and the pulley has no friction, therefore the tension must be the same throughout the string" without further any elaboration and continue the calculation, Claim without any reasons that "whenever the rope and the pulley are massless and frictionless, the tension will be the same on both sides", or Explain using a lot of hand-waving arguments regarding infinite acceleration, non-zero moment of inertia, etc. , in one line or two.   Although those hand-waving arguments of type $(3)$ do sound quite reasonable to me and will convince me for a while every time I review them. But after a while, I will start feeling not well about this whole tension concept again.  Therefore, I am looking for a rigorous (in the physicist's sense) proof of exactly why and when do the tension in rope will be uniform, and hopefully from that I can clean up all of my conceptual difficulties.


How do I get access to create a file in C:\Program Files in Python? I have compiled my program to exe.  My console is showing:  Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC  v.1914 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.  >>> fl = open('C:\\Program files\\example.example', 'w')  Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> fl = open('C:\\Program files\\example.example', 'w') PermissionError: [Errno 13] Permission denied: 'C:\\Program files\\example.example'   I mean that how can I create a file in there? Or how can I get permission as a admin? Without right clicking and selecting run as admin? Like other applications do?

I want my Python script to copy files on Vista. When I run it from a normal cmd.exe window, no errors are generated, yet the files are NOT copied. If I run cmd.exe "as administator" and then run my script, it works fine.  This makes sense since User Account Control (UAC) normally prevents many file system actions.  Is there a way I can, from within a Python script, invoke a UAC elevation request (those dialogs that say something like "such and such app needs admin access, is this OK?")  If that's not possible, is there a way my script can at least detect that it is not elevated so it can fail gracefully?


calculate (find the type of isomorphism) of $ℤ_{p^n}/pℤ_{p^n}$ where p is prime.  I know that $ℤ/pℤ$ isomorphic to $ℤ_p$  and that  $ℤ_p/pℤ_p$ isomorphic to $Z_p$  any help and explanation on how to continue will be appreciated

Calculate (find the type of isomorphism) of $\mathbb Z_p/p\mathbb Z_p$ where p is prime.   I know that $\mathbb Z/p\mathbb Z$ isomorphic to $\mathbb Z_p$ by showing    $\phi : \mathbb Z \rightarrow \mathbb Z_p$  $\phi(x) = x  \bmod p$   $\ker \phi = p\mathbb Z$  and by isomorphism $1$ theorem.  So I get  $\mathbb Z_p/p\mathbb Z_p$ isomorphic to $(\mathbb Z/p\mathbb Z)/p(\mathbb Z/p\mathbb Z)$.   Not sure if I'm writing this in a correct way and if so then how to continue from here.    Any help and explanation will be appreciated.


I am developing a plugin that calls a web-service with a security header. Can anyone recommend a best practice for storing those credentials on the WordPress site? Right now my best option seems to be storing the username, password, etc as admin options belonging plugin in the db. Other options would require the site admin to edit the plugin code or config file directly. I do not want these credentials traveling with the plugin should it somehow become distributed to other users. Any thoughts?

I'm currently developing a plugin and the chances are that I will more than likely release it on the public plugin repository so others can use it.  The plugin will be using an API and to use this API you need to pass a username and password. So my plugin needs to store these login credentials in the database. I don't want to store these in plain text although the API needs them in plain text.  So my question is how do I store these sensitive bit of information? Hashing is out, so it has to be some sort of encryption.  In WordPress is there a unique key that can be used that will differ from blog to blog? What php functions should I use to encrypt and decrypt? I'm looking for functions that will more than likely work on all WP installs.


Let a matrix A be an arbitrary matrix of size n by n in $\mathbb{C}$. Prove that for vectors $x, y \in \mathbb{C}$, the dot product of $<Ax, y>=<x, \bar{A^T}y>$ (note that the dot product is expressed as "<>", and $\bar{A^T}$ is the conjugate of the transpose). I think we can use the fact that in general$<x,y>=x^T\bar y$. And I also know that $\bar{Zy}=\bar Z \bar y$, where $x, y$ are vectors, and $Z$ is a matrix (of course this only works in complex numbers). Can someone show the steps to proving this? Thanks.

I'm trying to prove that for a certain matrix $A$, and its conjugate transpose $A^*$, we have $⟨Ax,y⟩=⟨x,A^*y⟩$, where $⟨⟩$ represent the inner product. So here it's simply the dot product in $R^n$.  Does anyone have an idea of how to prove this?  Thank you!


I want to know how to find SQL Server edition and version details from SQL Server setup without installing it. I have been in situations where sysadmins put SQL Server setup files on a file server without proper file names. So it confuses me a lot of time of which version and edition the setup file is.  I tried to find txt/word files having those details in setup but didn't get any. Please let me know if it is possible to find that out.  I am looking for details like SQL Server 2005/2008/2012 X64/X86 STD/ENT/DEV Edition.  The related question  does give me version details (like 10, 10.50, 11, etc.); however, how to find the edition? It doesn't give that.

We are going through a downgrade process from SQL Server 2008 R2 Enterprise to Standard edition.  To kick off the above activity, we were looking for available Standard Edition of SQL Server. We found one, but got confused on below points:   The setup files (saved by an earlier team member) are in a folder that says it is SQL Server 2008 R2, but just to cross check before we start installing, we went through the default.ini file, which says:   SQLSERVER2008 Configuration File [SQLSERVER2008]    This created a doubt if this is the correct version of SQL Server required. So is there any other way, in case above mentioned method is incorrect to determine the version, before we actually go ahead and try installing? Can we also check the edition of that available SQL Server, because on the set up, we can hardly figure out if it is really Standard Edition?   We cannot simply download new media, per our security policies. Also, we have no rights to download.


Delete from employee_salary where emp_id in(           select emp_id from           employee_salary            group by emp_id,project,salary            having count(*)>1 ); ERROR 1093 (HY000): You can't specify target table 'employee_salary' for update in FROM clause   How to solve this problem and why this query is nor running?

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


I have two floating point number a and b. I want to check if they have different signs. The easy way is to see   bool b = a * b < 0;   But the two numbers are very small and a * b might be underflow. Any other simple way to check it?  Anyone thinking it is a duplicate question please give me an answer that exactly matches the condition a * b < 0. Note here the sign of 0 is undefined in my question.

Which is the simplest way to check if two integers have same sign? Is there any short bitwise trick to do this?


How do I get my non-Windows (Linux, Mac) computers to properly register their IP address into my DNS server?  Server Name: AD1 OS: Windows Server 2008 R2 Roles: DNS, AD, DHCP  DNS SETTINGS Dynamic Updates: Secure Only  DHCP SETTINGS Checked - Enable DNS dynamic updates according to the settings below.  Always dynamically update DNS records.  Checked - Discard A and PTR records when lease is deleted  Disabled - Name Protection  I've tried setting a DNS dynamic update registration credential user and then added that user to DNSUpdateProxy.  However, when I connect a Mac/Linux computer to the network, it'll get an IP from the DHCP server, but it will not add it's IP into the DNS.  I cannot add these computers to the Windows domain.  I've searched around but can't seem to find a definitive solution.  Any ideas?  EDIT I changed from secure only to unsecure and secure to see if it would resolve the problem.  It does not.  EDIT Okay so I look at my DHCP logs here is what I see:  10,04/30/14,12:15:52,Assign,10.10.3.58,m-pro.domain.local,28GFE112B263, 11,04/30/14,12:16:19,Renew,10.10.3.58,m-pro.domain.local,28GFE112B263, 11,04/30/14,12:16:36,Renew,10.10.3.58,m-pro.domain.local,28GFE112B263, 11,04/30/14,12:16:53,Renew,10.10.3.58,m-pro.domain.local,28GFE112B263,  The first number indicates the Event ID.  10        A new IP address was leased to a client. 11        A lease was renewed by a client. 30        DNS update request to the named DNS server 31        DNS update failed 32        DNS update successful  On Windows clients you'll see something like this:  30,04/30/14,10:14:38,DNS Update Request,50.3.10.10,court.domain.local,, 11,04/30/14,10:14:38,Renew,10.10.3.50,court.domain.local,8CA9830B1060, 32,04/30/14,10:14:38,DNS Update Successful,10.10.3.50,court.domain.local,, 30,04/30/14,10:14:43,DNS Update Request,50.3.10.10,court.domain.local,,  So it looks like the DHCP doesn't even initiate and update request to the DNS server.

I've a network which is mainly Windows: Windows 2008 server (with DNS/DHCP as well as AD), and various mainly Windows machines (servers, XP, 7). I know trying to add few Linux boxes, and can't make them appear on the DNS server.  I'm using Ubuntu 11.04 (both client and server). The Ubuntu boxes are NOT part of the Domain though Samba or anything.  I've seen many conflicting answers on the Internet, including this site: is the registration done by the Linux box or by the DHCP server?  I've tried on the following:   On the Linux box, on /etc/dhcp/dhclient.conf, I had: send host-name "ubuntubox". Also tried fully qualified domains i.e. send host-name "ubuntubox.mydomain.local (side question: which one is correct?) On the Windows Server, in the DHCP configuration, right click on the zone -> properties -> DNS tab -> ticked the last checkbox (Dynamically update ...).   Anyway ... nothing helped.   Another side question: Why do I have both /etc/dhcp3 AND /etc/dhcp on my Linux box? Only the latter folder has dhclient.conf (despite common remarks on the web).  Also, is sudo dhclient -r really the equivalent of ipconfig /renew? As far as I can say it does nothing.


I know this question would have been asked time and time again, I'm new to this blog so i haven't seen it yet. I'm a beginner with great interest to learn photography. I don't have any desire to pick this as my profession but for passion. Where do I start and what camera should i pick to kick start? Advice on question is appreciated


I applied for a Georgian visa at the embassy and I was denied. I don't understand why it was denied, but I got my file from them saying this statement. I am from Nigeria and studying an MBA Program in Malaysia. I don't know if I should appeal or just forget about it.

I applied for German Schengen visa as a medical escort to my relative in a different country from  where I reside, but my visa application was refused and the refusal letter  was written in German as the following:        Ein oder mehrere Mitgliedstaaten sind der Auffassung, dass Sie eine Gefahr für die öffentliche Ordnung, die innere Sicherheit, die   öffentliche Gesundheit gemäß Artikel 2 Absatz 19 der Verordnung (EG)   Nr 562/2006 (Schengener Grenzkodex) oder die internationalen   Beziehungen eines oder mehrerer Mitgliedstaaten darstellen.      I was in Germany for nearly a year with my relative during his treatment; I extended my stay there 3 times; and I returned back home two months ago in order to renew my passport. I applied again using the same documents that I used for my extension in Germany.    First, can anyone tell me what the refusal means? Next, is there any possibility that there is a mistake in the assessment?    Note: In English this reason is...     One or more member state(s) consider you to be a threat to public   policy, internal security, public health as defined in Article 2(19)   of Regulation (EC) No 562/2006 (Schengen Borders Code) or the   international relations of one or more of the member states).


Im having trouble adding a shadow to my scene. I have one scene of the main object (pic 1) and one scene with the ground (pic 2) But when I render them together, the result is just the main object with no floor or shadow. When rendering the floor is invisible. Im using Blender render and I would prefer it to stay that way. If you need more information you can comment below. Any help would be appreciated and thanks in advance!

In most of my models, I usually end up setting a world background using an HDRI image of some kind or another. This has always been really useful for lighting in general or as a background for my final render.  But what if I want my model to look like it is interacting or touching part of the background? For example, in the image below that I found, the modeled objects look like they're part of the scene, and even appear to cast shadows on the ground. How can I do this?


Is there a built-in command for downloading a file using the command line on Windows? I know I can get cygwin and install wget, but I would like a solution that works on any windows PC.

I know I can download and install the aformentioned library (wget for Windows), but my question is this:   In Windows PowerShell, is there a native alternative to wget?  I need wget simply to retrieve a file from a given URL with HTTP GET. For instance:  wget http://www.google.com/


When I watched Prince of Persia, it really seemed I was playing a video game. The Game was released before the movie was.   The question was: Was the movie based off the video game, or was video game just out before the movie. Making the the game based on the movie.

I heard that  was based on the . However in the wiki article it is said:     Prince of Persia: The Sands of Time is a film loosely based on the game.   I also found that the writers of the movie are Jordan Mechner, Boaz Yakin, Doug Miro. I am not aware of the story of the game. So is the story of the film not the same as that of the game? Also I could not see any attribute in the film to the game. So did the producers not buy the story legally from Ubisoft? What is the back story?


Suppose I have a block like this:  \begin{block}{My awesome block} It really is awesome! It has a header and a body, both areas filled with fancy colors! \end{block}   I want to use the background color of the block's body (that is, the area of the block, not the text within the block) OUTSIDE the block, because it's such a nice one. I know I can get the beamer color of any element by   \usebeamercolor[bg]{block}   however, using this I get white for the background and black for the foreground...which are probably the colors for the text within the block, but not the colors of the block structure itself.

How would I go about finding the actual colour (like the RGB/HSV/etc) of a particular element in a given beamer colour theme (e.g., block title bg in orchid)?  I would like to use these colours in creating graphics with external programs. For example, I made a map in ArcGIS, and since it's quite a simple map, there's no reason not to choose colours which are consistent with the beamer theme I'm using.  From  and , I know that you can directly call the colours within a LaTeX document, but I'm asking about getting colour values for use outside of LaTeX.  EDIT Both answers below are great, thanks so much. I wasn't sure how to pick the accepted answer, so I just chose the one which seemed to accomplish the goal in fewer lines of code.


I am curious about the value of   $$\sum_{n=0}^\infty e^{-n^2}.$$   It comes to my mind by observing Gauss integral that it is equal to  $$\int_{0}^\infty e^{-t^2}dt=\dfrac{\sqrt{\pi}}{2}.$$

Most of us are aware of the classic Gaussian Integral   $$\int_0^\infty e^{-x^2}\, dx=\frac{\sqrt{\pi}}{2}$$  I would be interested in evaluating the similar sum  $$\sum_{x=0}^\infty e^{-x^2}$$  Now, because $\exp(-\lfloor x \rfloor^2) \ge \exp(-x)$, we find   $$\sum_{x=0}^\infty e^{-x^2}= \int_0^\infty e^{-\lfloor x \rfloor^2}\, dx \ge \int_0^\infty e^{-x^2}\, dx=\frac{\sqrt{\pi}}{2}$$  Does a closed form for this sum exist?  If so, what would it be?  I would be very interested in how a closed form would be found for this function.


I have a the following strings defined which are specifying a python module name, a python class name and a static method name.  module_name = "com.processors" class_name = "FileProcessor" method_name = "process"   I would like to invoke the static method specified by method_name variable.  How do i achieve this in python 2.7+

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


I am looking at a Christmas ale to brew and found this recipe (I am still learning to brew, so I am using malt extracts)  . I am guessing 5 gallons of water and steep the grains for 20 minutes?

My recipe calls for a pound of DME at the beginning of the boil and 6 pounds at 15 minutes to go.  What's the point of that?


I'm trying to extract id from a url, below my code:  $text = '/news/35555555555-title-of-the-article'; $text = eregi("news/(.*)-",$text,$regs);  echo $regs[1];   I want to echo only   35555555555   but above code is printing:  35555555555-title-of-the

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


If both dependent and independent are continuous then we can find correlation and we know which column can be more influential. But if independent variable is categorical, how will i know how much it is influencing dependent variable?

I would like to find the correlation between a continuous (dependent variable) and a categorical (nominal: gender, independent variable) variable. Continuous data is not normally distributed. Before, I had computed it using the Spearman's $\rho$. However, I have been told that it is not right.  While searching on the internet, I found that the boxplot can provide an idea about how much they are associated; however, I was looking for a quantified value such as Pearson's product moment coefficient or Spearman's $\rho$. Can you please help me on how to do this? Or, inform on which method would be appropriate?  Would Point Biserial Coefficient be the right option?


Hi I am a quite beginner in java.  Is it a good way to create construcors with many parameters like in my BookLibrary program?  public class Book implements Serializable {  private String title; private String directorName; private String directorSurname; private String type; private int issueYear; private List<String> actorNames; private List<String> actorSurnames; private Tuple<String, String> directorFullName;   public Book(String title, String directorName, String directorSurname, String type, int issueYear,             List<String> actorNames, List<String> actorSurnames, Tuple<String, String> directorFullName){     this.title = title;     this.directorName = directorName;     this.directorSurname = directorSurname;     this.type = type;     this.issueYear = issueYear;     this.actorNames = actorNames;     this.actorSurnames = actorSurnames;     this.directorFullName = directorFullName; }   Or is there any better idea to create such a constructor?

In some of our projects, there's an class hierarchy that adds more parameters as it goes down the chain. At the bottom, some of the classes can have up to 30 parameters, 28 of which are just being passed into the super constructor.  I'll acknowledge that using automated DI through something like Guice would be nice, but because of some technical reasons, these specific projects are constrained to Java.   A convention of organizing the arguments alphabetically by type doesn't work because if a type is refactored (the Circle you were passing in for argument 2 is now a Shape) it can suddenly be out of order.  This question might be to specific and fraught with "If that's your problem, you're doing it wrong at a design level" criticisms, but I'm just looking for any viewpoints.


I am creating a new schematic library in Altium Designer and will add different "New Components" on it. Since I already have similar components in another library, so I want to copy some components into the new library and start to edit it instead of redraw it from the begining.   Is it possible !! How to do that in safe way ?

I downloaded a library from the internet and I want to create a new  PCB component using the ones in the downloaded library with little editing/changes (such as the footprint). Is that possible? How?


Show that $$n!=1+\left(1−{1 \over 1!}\right)n+\left(1−{1 \over 1!}+ {1 \over 2!}\right)n(n−1)+\cdots$$ I can't figure out how this can be solved . I tried to use binomial theorem but I couldn't prove it . I think that it can be solved using the gamma function but it's not immediately obvious

Show that $\displaystyle{n!=1+\left(1-\frac1{1!}\right)n+\left(1-\frac1{1!}+\frac1{2!}\right)n(n-1)+\cdots}$. I can't figure out how this can be solved. I tried to use the binomial theorem but I couldn't prove it. Any help will be greatly appreciated.


How do I go about finding the last digit of $7^{100}$ or the two last digits of $3^{885}$?  what is the general method to solve problems like these?

I am doing this problem mentioned above and I know the answer because I know Euler's Theorem that $$a^{\varphi{(m)}}\equiv{1}\pmod{m}.$$  I used 100 as my modulus and got that the last two digits of $7^{355}$ are $43$.  My question is this.  What prime should I pick to solve this problem using Fermat's theorem $$a^{p-1}\equiv{1}\pmod{p}$$  As a precursor problem, the author (Dudley; Elementary Number Theory) asked to find the last digit of the number above; so using a modulus $5$, $7^4\equiv{1}\pmod{5}$ by Fermat.  Since the answer is $7^{355}\equiv{3}\pmod{5}$, the last digit is either $3$ or $8$.  Since $7$ is odd, the answer will clearly be odd, so $3$ is it.  The book is working linearly, building from the previous chapters and Euler's Theorem isn't mentioned for another two chapters (I remembered Euler from a problem solving class in college).    So again, what prime would be best?  How should I procede?    EDIT: I've seen a bunch of problems on the site and none that I looked at did it using Fermat.  If there is one, that could be posted and I would be happy.  EDIT 2:  it seems that the problem of finding of finding the last two digits using is rather difficult because of the implication that we need something mod 100.  Is there a way around this , like adding a step or complexifying, in order to finish the problem with Fermat?


Prove that any continuously differentiable function $f : [a,b] \rightarrow R$ for which $f(a) = 0$ satisfies the following inequality $$\int^b_a f(x)^2dx \leqslant (b-a)^2 \int_a^b f^{'}(x)^2dx$$ By looking at it, I think we need to apply the Cauchy-Schwarz inequality but I am unable to go any further. Any help is appreciated. Thanks in advance.

Let $u\in \mathcal{C}^1[a,b]$ be such that $u(a)=u(b)=0$. Show that  $$\int_a^b u^2(x)dx\leq (b-a)^2\int_a^b (u')^2(x)dx$$   using the Schwarz's inequality.


I think "were" is the right answer, but still I want an opinion on this. So is it "was" or "were" in the sentence given below?     There ...... only fifty rupees in my pocket.

Are the two sentences correct or is one of them incorrect?     1) Five billion dollars is earmarked for the project.   2) Five billion dollars has been earmarked for the project.   I know dollars are countable. So I think both 'is' and 'has been' are correct here.   Also, do they differ in meaning?


I had Ubuntu on a partition with important files and I accidentally deleted the partition with Ubuntu and installed Windows on that partition.  I used disktest in live Ubuntu to get files from different partitions back but the one with Windows currently installed I had no luck. Should I uninstall Windows and then try to get files from the partition back that had Ubuntu installed?  Please help, these files are really important! The Windows installation is on the drive I need to return!

I was installing ubuntu 12.04 on my system. There were 4 partitions on my system and I selected one of the four partition for the installation and chose the option of resizing the partition. Initially my partition was of size 100+GB and i created another partition out of it of size 15GB (EXT4). Now the moment I changed this partition structure my original partition got lost along with its data and I am left with 50GB partition and 50GB unallocated free space.   Now the data that I have lost is meant a lot to me and I want to recover that data. So is there any way I can recover it? And I haven't checked "format" option while resizing the partition.


I need to prove by induction that $3^n\geq n^2$  What I have so far:   Basis: $n = 1 \rightarrow 3^1 \geq 1^2 \rightarrow 3 \geq 1$ Condition: $3^n\geq n^2$ Assumption: $3^{n+1}\geq (n+1)^2$ Basis: $3^n\geq n^2$   $3^{n+1}\geq (n+1)^2  = 3(3^n) \geq n^2+2n+1 $  That's where I got stuck. I have no idea how to continue from there.

Prove this inequality $3^{n}\geq n^{2}$ for  $n\geq 1$ with mathematical induction.  Base step: When $n=1$  $3^{1}\geq1^{2}$, statement is true.   Inductive step: We need to prove that this statement $3^{n+1}\geq (n+1)^{2}$ is true.   So, to get the left side of this statement is easy. We can get it by multiplying $3^{n}\geq n^{2}$ with $3$.  After this step we have $3^{n+1}\geq 3n^{2}$.  What we now have to get is the right side and we can transform it like this:  $3n^{2}=  (n^{2}+2n+1)+(2n^{2}-2n-1)$ which is same as  $(n+1)^{2}+(2n^{2}-2n-1)$.  So now we have $(n+1)^{2}$ and $(2n^{2}-2n-1)$ and my question is how should i use this to prove inequality?


I have the following question for homework.  Fix positive integers $a$ and $b$ .  Here’s an inductive definition of a set $S$ :  Foundation rule: $a,b ∈ S$. Constructor rule: If $m,n ∈ S$ , then $m − n ∈ S$.  (a)  Suppose $h$ is a common factor of $a$ and $b$ .  Use the exclusion rule to prove that for every $n ∈ S$ , $h$ divides $n$ . (b)  Suppose $k ∈ S$ is  a  positive  integer  which  is  not  a  factor  of $a$ . Prove that there is some $l ∈ S $ such that $0 < l < k$ . (Hint:  Consider the sequence $a,a − k,a − 2 k,...$ and use the fact that $\mathbb{N}$  is well-ordered.) (c)  In  the  same  way  that  you  proved  (b),  we  may  also  prove the following fact:  if $k ∈ S$ is a positive integer which is not a factor of $b$ , then there is some $l ∈ S$ such that $0 < l < k$ . Use (b) and the above fact to prove that there is some positive integer in $S$ which is a common factor of $a$ and $b$ . (Hint:  Use the fact that $\mathbb{N}$ is well-ordered.) (d)  Use (a) and (c) to conclude that S contains gcd($a,b$).  I'm unsure about how to even start (a) and (b). For (a) I thought something along the lines of "because $h$ is a common factor of $a$ and $b$, as $n ∈ S$, $h$ must be a divisor of $n$" yet apparently this is quite far off what we are supposed to do. I have literally no idea how to even start (b). Any help would be appreciated.

Here is my proof of $\gcd(a,b)=ax+by$ for $a, b, x, y \in \mathbb{Z}$. Am I doing something wrong? Are there easier proofs?  $a,b \in \mathbb{Z}, g=\gcd(a,b)$ and suppose $g \neq ax + by$. Let $c$ be a common divisor of $a$ and $b$. Then   $$\forall x', y' \in \mathbb{Z}: c | ax' + by'\Longrightarrow\exists q_1, q_2 \in \mathbb{Z}\,\,\, s.t.\,\,\, c q_1 = ax' + by'\,\,,\,\,cq_2 = g$$   So   $$gcd(a, b)=g=c q_2 = c q_1 \frac{q_2}{q_1} = \left(\frac{q_2}{q_1}x'\right)a + \left(\frac{q_2}{q_1}y'\right)b$$ So if we have $q_1|q_2$ then we found $\gcd(a,b)=ax'+by'$ for all $x', y' \in \mathbb{Z}$.  Now   $$\frac{q_1}{q_2}=\frac{c q_1}{c q_2} = \frac{ax'+by'}{g}$$ but $g|a$ and $g|b$ so $\exists q_3 \in \mathbb{Z}: \frac{q_1}{q_2}=q_3 \Rightarrow q_1=q_2 q_3 \Rightarrow q_1 | q_2\,$ . QED.


I parented a mesh to an armature with no topology issues or anything. My mesh has been parented with automatic weights, and it's ready to be animated.    However, for some reason I cannot select the armature.    I decided to select it manually from the outliner. I switched from object mode to pose mode. But then when I try to select a bone, the armature suddenly switches to a weird version object mode, which seems to be synched with the object mode of the mesh - even though it looks like only the armature is selected.    Currently, the only way for me to select bones to pose them is by manually selecting them in pose mode from the outliner armature tree, which I feel is gonna get old really quickly. Has anyone else found a solution to this issue? Is it a bug or am I doing something wrong?  Thanks in advance for any help.

I have set my armature to pose mode, and now want to select the rigged mesh so that I can weight paint it. The only way I can select the mesh as the active object is to set the armature back to object mode, which I don't want.  Using blender 2.8


I would like to print a photo on an A0 poster, and was wondering if its resolution is OK. Its specs are below:  Dimensions: 1152x2048 Horizontal and Vertical resolution: 72 dpi Bit depth: 24  If this is not going to work. what size do you recommend me to print it on?  What if the dimensions were 3264x1836?  Your help is highly appreciated.  Cheers, Zohair

What size images do I need for common print sizes, such as wallet size, 8x10, and 16x20?  Is there a general formula?  How could that size change if, for example, a 16x20 was printed on canvas rather than photopaper?


I am practicing writing down random algebraic numbers and finding their degrees over $\mathbb Q$ and have fumbled when coming to $\sqrt[3]{2} + \sqrt[3]{3}$. Mathematica tells me the minimal polynomial is $x^9-27 x^6-135 x^3-729$, which is a polynomial in $x^3$. I figured by cubing the element I could show that the cube has degree 3, which is some partial progress, but I have failed to even do that. If anyone has any neat tricks up their sleeves about these kinds of results, I would be forever indebted to you.

What is a polynomial $P(x)\in \mathbb{Q}[x]$ with root $\sqrt[3]{2}+\sqrt[3]{3}$?   I write $x=\sqrt[3]{2}+\sqrt[3]{3}$, so $(x-\sqrt[3]{2})^3=3$, but the expansion of the left side contains two cube roots again. What can we do?


Please excuse me if my wording is bad. I am trying to get a hold of the concepts. To minimize the loss function for real values, we can use SVD to solve the following:  $\arg \min_{A, B \in \mathcal{B}} \sum_{i,j} (A[i,] \times B[,j] - X[i,j])^2$  To minimize a logistic loss function, however, I am not sure how to handle it:  $\arg \min_{b} \sum_{i=1}^n \log(1+\exp(b^T a_i)) - x_i b^T a_i$  Since it is not the same form as above due to the exponential, we can't just use the solution analogously. I have tried taking the derivative and setting it to 0, but I am just stuck now. Any ideas?   EDIT: Please note that I am not necessarily looking for an analytical solution. A numerical one is fine. For instance, I have heard of alternating minimization, but how do I use it in this context?

Take $x \in \{0,1\}^d$ and $y \in \{0,1\}$ and suppose we model the task of predicting y given x using logistic regression. When can logistic regression coefficients be written in closed form?  One example is when we use a saturated model.  That is, define $P(y|x) \propto \exp(\sum_i w_i f_i(x_i))$, where $i$ indexes sets in the power-set of $\{x_1,\ldots,x_d\}$, and $f_i$ returns 1 if all variables in the $i$'th set are 1, and 0 otherwise. Then you can express each $w_i$ in this logistic regression model as a logarithm of a rational function of statistics of the data.   Are there other interesting examples when closed form exists?


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

Looking to create a 100 images that would have their appropriate numbers written on them.  Since I`ll be most likely making changes to the template in the future I figured it would be better to automate it somehow.  Is there a simple solution to this problem?


If the live wire in above illustration touches to the metal case, a high short circuit current will flow to the earth through the safety earth wire and the fuse will trip.  Now imagine a 9V battery staying on a wooden table. If now its plus terminal is tied to the earth through a wire almost no current will flow.  Above two points shows that it is not the case that the earth is a reservoir that sucks all electrons, but simply current needs a loop to flow.  In the battery case it is obvious that there is no loop because the negative terminal is floating.  But what is the loop in the first AC case? Is that the AC generator star connection? Can you draw this loop to illustrate better?

Current flows through a conductor connecting points at different potentials.  Leaving aside multi-phase details, common/conventional AC systems use a 3-wire setup:   Wire-1: a line/live/hot/phase wire presenting a point that oscillates between 2 potentials. Wire-2: a neutral wire presenting a point of unknown/unspecified and varying potential, that nevertheless presents some fixed/specified potential difference to Wire-1 at least some of the time. Wire-3: a ground/earth wire presenting a point at 0V potential difference to its immediate physical surroundings.   Wire-1 and Wire-2, in addition to some device that is to be powered, are used to construct a closed electrical circuit. Wire-3, leaving aside EMI/shielding concerns, is used to ensure that current will flow through it, rather than the device's user, if there ever occur any faults and the device's user comes in contact with Wire-1 or Wire-2.  Additionally to this however, Wire-2 and Wire-3 are at some point connected. This is done to ensure that Wire-2's potential remains close to that of Wire-3 .. which seems to be important for some reason.  Now the part I don't understand is why there needs to be a distinction between Wire-2 and Wire-3 at the power socket, if there is none a few meters further down the line.  I have tried to look this up, but all answers I could find so far seem incomplete. The answers depend on how the question is phrased:   If the question is phrased as "Why do we need Wire-3 in addition to Wire-2" the answer is because "Wire-2 may be at a substantial potential difference to its surroundings/user and thus endanger him/her if he/she ever comes in contact with it or Wire-1". If the question is phrased as "Why do we need Wire-2 in addition to Wire-3" the answer is because "Wire-2 is needed to form a closed electrical circuit" or phrased somewhat differently "Wire-2 is needed to create a potential difference to Wire-1 and thus for current to flow" .. with the argument further being that when taking practical considerations into account Wire-3 can't provide a reliable/stable potential difference to Wire-1 like Wire-2 can.   This doesn't really answer why there's a need to differentiate between Wire-2/Wire-3 though, considering how    Wire-3 remains Wire-3 and maintains 0V potential difference to its surroundings/user, regardless of whatever else happens around it .. since that is what it's supposed to do, or phrased differently, since that is the reason for Wire-3 being useful in the first place .. right?   and   Wire-2 is connected to Wire-3   What am I missing here?    Why is it safe to touch Wire-3 but not Wire-2, or why can Wire-3 provide a level of protection that Wire-2 can't?  Why differentiate between Wire-2 and Wire-3 at the power socket but then connect them further down the line?


I own a Samsung Galaxy Note 3 (N900). I am fed up of the bloatwares that Samsung has added. Also I am unable to get an OTA update to Android 6. I want the pure Android experience on my smartphone. I don't know, if there are different ROMs for different devices; but I have grown tired of Samsung TouchWiz UI and I just want the super fast Android Marshmallow. I couldn't find any website links for obtaining these ROM's. Any help regarding how to obtain the pure Google android ROM and intsall it would be great.

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


I have a Python script (worker.py) that I'd like to be running all the time. I searched for other options to make this work (such as daemonizing the process), but can't get that to work with my current Linux knowledge. So I figured that I could use cron to run pgrep to check if it was running, and if not, start it.  I've added a line to my crontab (crontab -e) as this:  * * * * * pgrep -lf worker.py || /usr/bin/python /home/debian/hypermaq/scripts/worker.py   Running pgrep -lf worker.py from the command line returns an empty line if the script isn't running, and returns the correct PID if it is started in the other SSH session. So that makes me think the command is fine.  However, this doesn't work from cron. I've tried to find more info by piping the output of the pgrep command (added >> /home/debian/templog.txt 2>&1), and I get a new PID on each line in that file. If I run the pgrep -lf worker.py command with sudo, I do get a PID as well, which I think is the command I am running with sudo itself.  I have enabled the logging for cron, and can see that it starts the job each minute. I read that cron has a minimal path definition, so I used absolute paths.  I'm not sure how to interpret what I see, and thus, why it doesn't work as I expect. One specific thing I don't understand is why running the same pgrep  -lf worker.py command has no return when ran as regular user (and when the script isn't running), but returns a PID when ran with sudo, also when the script isn't running.

I am looking for a simple and generic solution that would allow you to execute any script or application in crontab and prevent it from running twice.  The solution should be independent on the executed command.  I assume it should look like lock && (command ; unlock) where lock will return false if there was another lock.  The second part would be like if it acquired the lock, run command and unlock after command is executed, even if it returns error.


I'm studing the UWP coding in C#. I've done a little Grid with some rectangles:  Rectangle r = new Rectangle();   I've done it in many methods of class. I would create a generic type (for example as class or a variable) to fast change all Rectangles in Ellipse (for example), not at runtime. I mean something like:  Type ShapeType = typeof(Rectangle);   and create:  ShapeType figure = new ShapeType(); ...   but tomorrow be able to change  Type ShapeType = typeof(Rectangle);   in  Type ShapeType = typeof(Ellipse);   and change all the shapes in my code. Is this possible? How can I create a class "Rectangle-like" or "Ellipse-like" ?  Thank you  Marked as duplicate of:  "Get a new object instance from a Type One may not always know the Type of an object at compile-time, but may need to create an instance of the Type. How do you get a new object instance from a Type?"  Where I've written that I want create an object at runtime? Or also only that i want create an object?  My question is about "How to change (from code) easily the type defined in many line of code creating a generic type?"


I have exception in onDestroy()  public class FragmentList extends Fragment {      private ListView listView;     private FloatingActionButton fab;     private Cursor cursor;     private SQLiteDatabase db;     boolean isAvatar;     String nameText;      public FragmentList() {         // Обязателен открытый/публичный пустой конструктор     }      @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {          View v = inflater.inflate(R.layout.fragment_list, container, false);         fab = (FloatingActionButton) v.findViewById(R.id.fab);         listView = (ListView) v.findViewById(R.id.listView);           //обработка добавления человека - нажатие на fab         fab.setOnClickListener(new View.OnClickListener() {             @Override public void onClick(View v) {                 //TODO добавление!!!                 Toast.makeText(v.getContext(), "Новая запись добавлена", Toast.LENGTH_SHORT).show();             }         });          //создание курсора         try{             SQLiteOpenHelper databaseHelper = new DatabaseHelper(v.getContext());             SQLiteDatabase db = databaseHelper.getWritableDatabase();             Cursor cursor = db.query("PEOPLE", new String[] {"_id", "NAME", "CHECKBOX"}, null, null, null, null, null);             CursorAdapter listAdapter = new SimpleCursorAdapter(v.getContext(), R.layout.list_item, cursor, new String[]{"NAME", "CHECKBOX"}, new int[]{R.id.name, R.id.checkBox}, 0);             listView.setAdapter(listAdapter);          } catch (SQLiteException e){             Toast.makeText(v.getContext(), "База данных недоступна", Toast.LENGTH_SHORT).show();         }            return v; }        //обработка нажатия пункте списка     public void onListItemClick(){      }      //закрытие базы данных и курсора     @Override     public void onDestroy(){         super.onDestroy();         if (cursor!=null) cursor.close();         if (db.isOpen()) db.close();     } }   log  E/AndroidRuntime: FATAL EXCEPTION: main                                                    Process: ru.bunakov.testapplication, PID: 30583                                                    java.lang.NullPointerException                                                        at ru.bunakov.testapplication.fragments.FragmentList.onDestroy(FragmentList.java:85)                                                        at android.app.Fragment.performDestroy(Fragment.java:1913)                                                        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1013)                                                        at android.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1167)                                                        at android.app.BackStackRecord.run(BackStackRecord.java:654)                                                        at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)

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?


What I tried to do: Today I tried to install Ubuntu on a laptop and it would complete the installation process but when it asks you to restart, it just comes up with the installation process again as if it wasn't installed. I have previously installed Ubuntu on a different laptop with the same method (Downloading ISO image from the Ubuntu website, using Rufus to make USB into bootable device (or whatever it does I'm not completely sure) and plug it into the laptop, making sure that it is the 1st bootable device in the priorites list in the BIOS. What I think the issue is and why What I am suspecting is that, Ubuntu is not being installed on the laptops hard drive because whenever I unplug the USB when it restarts it just says "Operating System not found". Info about laptop A friend of my mums, had left this laptop and said my mum could have it. It wasn't until today we realised that it did not have an OS installed. When I booted it up it just said "Operating System not installed (or "found" i don't remember). This laptop by the looks of it is quite old, since it has a Windows 7 sticker, and an Intel Atom sticker. I thought that obviously Windows 10 is not going to run on this thing, since it has 1GB RAM. I find that Ubuntu is a nice OS and is pretty lightweight. TLDR I got old laptop that had no operating system, tried installing Ubuntu but it isn't actually installing even though it successfully goes through the installation process until it asks you to restart so that you can use the installation or something. then once it restarts it just asks if I want to install or try ubuntu (aka the start of the installation process)  again. Any ideas what could be going on?

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?