I have a problem in XML files. I searched through the internet and found lots of examples for my problem but I am not an expert on XML files and couldn't solve my problem. I want  to do and XML file and work like RSS FEED. So, I am taking my data from my database and try to create the xml-code. Here what I have in my php file (and it is not validated because of this problem: Undefined root element: channel)  <?php include "connection.php"; //create the table with the fields   $rss_table = array();    $query = mysql_query("SELECT * FROM rssfeeds");     while($values_query = mysql_fetch_assoc($query))     {         $rss_table [] = array(         'title' => $values_query['title'],         'description' => $values_query['summary'],         'link' => $values_query['link']         );     }  $doc = new DOMDocument();  $doc->formatOutput = true; $doc->encoding = "utf-8";  $r = $doc->createElement( "channel" );  $doc->appendChild( $r );      //$i=0;     foreach( $rss_table as $rss )      {      $b = $doc->createElement( "item" );         $title = $doc->createElement( "title" );          $title->appendChild(          $doc->createTextNode( $rss['title'] )          );      $b->appendChild( $title );        $description = $doc->createElement( "description" );      $description->appendChild(      $doc->createTextNode( $rss['description'] )      );      $b->appendChild( $description );      $link = $doc->createElement( "link" );      $link->appendChild(      $doc->createTextNode( $rss['link'] )      );      $b->appendChild( $link );      $r->appendChild( $b );     } echo $doc->saveXML(); $doc->save("rssfeeds.xml")  ?>   I want to have title - link - description  Simple one... nothing more  And here is what I get in rssfeeds.xml file:  <?xml version="1.0" encoding="utf-8"?> <channel>   <item>     <title>winter week</title>     <description>You can come as you are! </description>     <link>http://tdm2000international.org/tdm2000international/news.php</link>   </item>   <item>     <title>Greek night</title>     <description>elliniki bradua sto magazi</description>     <link>http://tdm2000international.org/tdm2000international/news.php</link>   </item>   <item>     <title>event website</title>     <description>first of december, how is it going?</description>     <link>http://tdm2000international.org/tdm2000international/news.php</link>   </item> </channel>   Nice format, but it has problem. I do not understand where the problem is. Any help would be appreciated  (I also check this website for any solution, but I could not found my solution..So, sorry about this post, if it is already exist)

I have to generate a xml file dynamically at runtime. Please help me in generating the below XML file dynamically using PHP.  <?xml version="1.0" encoding="UTF-8"?> <xml>  <track>      <path>song1.mp3</path>      <title>Track 1 - Track Title</title>  </track>  <track>      <path>song2.mp3</path>      <title>Track 2 - Track Title</title>  </track>  <track>      <path>song3.mp3</path>      <title>Track 3 - Track Title</title>  </track>  <track>      <path>song4.mp3</path>      <title>Track 4 - Track Title</title>  </track>  <track>      <path>song5.mp3</path>      <title>Track 5 - Track Title</title>  </track>  <track>      <path>song6.mp3</path>      <title>Track 6 - Track Title</title>  </track>  <track>      <path>song7.mp3</path>      <title>Track 7 - Track Title</title>  </track>  <track>      <path>song8.mp3</path>      <title>Track 8 - Track Title</title>  </track>


I have a excel file with entries that appear multiple times. Example:   A A A B B C C   How can I change this to a form that looks like this:   A 3 B 2 C 2

I have a list of items that looks like this:  A B C A A B D E A   Now I want to count the number of occurrences of each item. The result should look like this:  A 4 B 2 C 1 D 1 E 1   How can I do that? It is important to note that this should be flexible. That means if I add item F to the list, that item should also be considered in the result.


I'm using the  package to get some frames into my document output (the how-to about the partial frame was ). I'm also using  to output margin notes, both from the framed text and from the running text.  I noticed that if I specify a left offset, the margin note gets displaced horizontally by that offset (it also gets displaced by specifying a nonzero leftrule thickness, and probably by other measures as well, but I didn't experiment much more than that).  I haven't found a way to prevent this, other than saying \hskip-10pt in the margin note. Obviously this is not ideal, as the frame parameters may change over time.  I have tried fiddling with \marginnoteleftadjust and \marginnoterightadjust, but as the marginnote docs suggested this had no effect, as I'm using a current pdfLaTeX version.  I'd appreciate any ideas how to get the notes from within the tcolorbox at the correct horizontal position, probably it's (again) something I don't see ...  MWE:  \documentclass{scrartcl} \usepackage[most]{tcolorbox} \usepackage{marginnote} \newtcbox{\one}[1][]{%     enhanced,%     frame hidden,%     colback=white,%     boxsep=0pt,%     left=10pt,% <---marginnote displacement!     top=0pt,%     bottom=0pt,%     right=0pt,%     leftrule=0pt,%     rightrule=0pt,%     left skip=20pt,%     after skip=\baselineskip,%     overlay unbroken={%         \draw[thin,black,double] (interior.north west)--(interior.south west)--(interior.south east);         },#1} \parindent0pt \begin{document} regular text\marginnote{correct}.  \one{tcolorbox text\marginnote{wrong}}  \one{tcolorbox text\marginnote{\hskip-10pt manual}} \end{document}   Output:

The marginnote package offers the \marginnote macro. I use this inside a tikzpicture environment to place notes into the margin.  While this works without problems when compiling with pdfLaTeX, this gives horizontal shifts when compiling with XeLaTeX.  Consider the following MWE:  \documentclass{article} \usepackage{marginnote} \usepackage{tikz} \usepackage[showframe]{geometry}  \begin{document}  This line\marginnote{ABC} contains a margin note.  \begin{tikzpicture}   \fill[red] (-1,-1) rectangle (1,1);   \node[right] at (1,0) {This line\marginnote{ABC} contains a margin note.}; \end{tikzpicture}  \end{document}   Compilation (twice) with pdfLaTeX (using MiKTeX on Windows) gives the expected result:    Compilation with XeLaTeX (using MiKTeX on Windows) gives shifts the second note inside the tikzpicture:    Can this code be modified to compile correctly for pdfLaTeX and XeLaTeX?


I've been developing a website and since the beggining I've been thinking of how to solve this problem.  So here it is:  My website as alot of input fields, and with that, I came to notice that if a user uses ' there's an SQL error.     I've search for similiar problems and i did not find any, but I believe I might be searching the wrong way.   This is how I execute my queries:  I created a function for my queries:  function query($sql) {       $stmt = $conn->prepare($sql);     $stmt->execute(); }   And then I use it like this:  $sql = "INSERT INTO users(fname,lname,username) VALUES('$fname','$lname','$username')"; $stmt = $dbconn->query($sql); // $dbconn is the variable of my db connection class   I thought about using str_replace to replace the ' with a \ but then if a user uses \ then it will be converted to a ' and it's not that great of a solution.

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


Define $X$ ~ Pareto($a$) and $Y$ ~ Pareto($b$), meaning $f_X (x) = ax^{-a + 1}$ for $x \geq 1$ and $f_Y (y) = by^{-b + 1}$ for $y \geq 1$.   Assuming that $X$ and $Y$ are independent random variables, how would I find the density of $Z = X + Y$ and $W = Z - Y$.

I'm wondering what distribution results in adding two (or more) type-one Pareto distributions of the form $x^{-\alpha}$. Experimentally, it looks like a two-mode power-law, asymptotic to the difference of alphas.


In regular math, you cannot get the square root of a negative number. Likewise, you cannot divide by zero. Both dividing by zero and taking the square of a negative have no place in real life.  However, we have systems in place to deal with the square root of a negative number (hence, imaginary numbers). Why does an option for divide by zero not exist?

We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero?


I'm getting this odd error in my Java and I'm completely stuck.  private List<byte[]> sharedWorlds = Collections.synchronizedList(new ArrayList<byte[]>());  Byte[] y = sharedWorlds.toArray(new Byte[0]);  try{      //this line won't compile!     Utilities.writeByteArray(outStream, sharedWorlds.toArray(new Byte[0]));  }catch(Exception e){     System.out.println("Error!"); }      Type mismatch: cannot convert from Byte[] to byte[]   The second parameter to "writeByteArray" needs to be a byte[] and not a Byte[]...  I could loop through a new byte[] and copy every element, but this seems unclean and inefficient?  I tried casting  (byte[]) sharedWorlds.toArray(new Byte[0])   but this errors with      Cannot cast from Byte[] to byte[]   My Java is rusty, but I have no idea what's going on here.

If you have an array of Java objects which have a primitive type (for example Byte, Integer, Char, etc).  Is there a neat way I can convert it into an array of the primitive type?  In particular can this be done without having to create a new array and loop through the contents.  So for example, given  Integer[] array   what is the neatest way to convert this into  int[] intArray   Unfortunately, this is something we have to do quite frequently when interfacing between Hibernate and some third party libraries over which we have no control.  It seems this would be a quite common operation so I would be surprised if there's no shortcut.  Thanks for your help!


I have made a simulation of voltage divider, and that give me the same value like on this calculator:   But when I soldered my board I have measured voltage and It was around 4.5 V, but with that calculator should be around 12 V.  My two resistors have value 2000 Ohm (2 kOhm).  I was want to make 24 V to around 12 V with voltage divider, and then 12 V pass to LM7805 so my Atmega328 will work on 5 V.  Here is my PCB how works, really I'm not sure how is it possible to voltage to be 4.5 V but should be 12 V.

When would you use a voltage regulator vs a resistor voltage divider?  Are there any uses for which a resistor divider is particularly bad?


In  with standard rules (Draw 3 cards, Re-Deal infinite), a 'null' hand is a hand where you cannot play any card. Statistically, is it more common to win the game, or have a null game?

I play a lot of Solitaire games on my Android phone and love to keep an eye out for the statistics.  Given that the Solitaire version lets you restart the game endlessly, I usually play until I solve it. But I never managed to solve more than 80% of the games played (1000+).  So now I wonder, is every Solitaire game solvable?


Today I came across a scenario, Where I edited post came in review. After few minutes it was got accepted as edit and I got +2 reputations. But After reading the post i realized I missing few characters to change. So went back to edit page of post and edited the post with original post which user posted. And after few minutes I got +2 reputation again for same Post.   My question is should twice editing a same post given reputation twice?  I am not saying its a bug or its to be implemented. i just wanted to discuss.

On Stack Overflow, I saw some users editing the same question multiple times, and getting the 2 point reputation bonus for each time.  I saw it during review of a suggested edit (some months ago, I forgot the question that's why I'm unable to paste the link here). I rejected it and gave the reason in the "Other" reason field.  Most of the time I saw that users first formats the code, and then after approval they edit the title and fix the grammar.  Why is this allowed?  My point is, if an user gained 2 reputation points for a particular edit, then why give another 2 points again for the same post? Because the second edit on same question/answer means that there were some mistakes or misses in their previous edit.


I've just run:     sudo apt-get upgrade   And at the end I get the following error:  Setting up liboxideqtquick0:amd64 (1.4.2-0ubuntu0.14.04.1) ... Setting up liboxideqt-qmlplugin:amd64 (1.4.2-0ubuntu0.14.04.1) ... Processing triggers for libc-bin (2.19-0ubuntu6.5) ... Errors were encountered while processing:  update-notifier-common  update-notifier  update-manager  ubuntu-release-upgrader-gtk E: Sub-process /usr/bin/dpkg returned an error code (1)

I've seen this message several times whenever someone has a problem installing, upgrading or removing some piece of software, but I wonder, what does it mean, and more importantly, is possible to solve it?  (Reading database ... 81657 files and directories currently installed.)  Removing mongodb-10gen ...  arg: remove  invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.  dpkg: error processing mongodb-10gen (--remove):   subprocess installed pre-removal script returned error exit status 100  invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.  dpkg: error while cleaning up:   subprocess installed post-installation script returned error exit status 100  Errors were encountered while processing:   mongodb-10gen  E: Sub-process /usr/bin/dpkg returned an error code (1)   (the above is just an example, not my actual problem)


I am traveling to my home country Kosovo. I am Permanent Resident of Canada and have Kosovo passport. My flight will have 2 layovers in Schengen area. Do I need to apply for Airport Transit Visa?

I am an Indian citizen travelling from New York to Delhi with a layover in Paris where I need to transfer between Paris Orly Airport (ORY) and Paris Charles de Gaulle Airport (CDG).  Do I need to have a visa to make this transfer?  I didn't notice that while booking the ticket.


thank you for taking the time to help me with the question. I am struggling to use proof by induction for this formula:  $$\sum_{k=0}^{n}k\times k! = (n + 1)! - 1$$  So far, I came up with:  $$S(n) = (n + 1)! – 1$$  Base case: When $n = 0$,   $(n + 1)! - 1 = (1)! - 1 = 0 = S(0)$, thus the base case is proved.  Inductive step: Suppose S$(n) = (n + 1)! – 1$, and n > 1 Then we have... $$S(n + 1) = ((n + 1) + 1)! - 1$$  I don't understand what is required of the proof by induction. What am I supposed to do?

Use induction to prove that    $\displaystyle\sum_{r=1}^n r\cdot r! =(n+1)! -1$   I first showed that the formula holds true for $n=1$.  Then I put n as $k$ and got an expression for the sum in terms of $k$.  I then found the sum till the $(k+1)$th term by adding the $(k+1)$th term to both sides of the equation and compared it to the sum expression I get by plugging $k+1$ into the sum expression given in the question - they don't match.


In order to convert coordinates to geohash I need to know the precision as well but unable to figure how to do so..  Any suggestions?  ** EDIT **  What I try to do is to find the precision in leaflet using VueJS based on zoom level or even using leaflet itself. I don't want to show the geohash squares on the map. Just use them somewhere else.  It's not really a duplicate since the given solution is in python and I try to do it in Javascript using VueJS.

I'm using Elasticsearch's  to plot clusters on a map (using Leaflet). I understand that for larger areas a lower precision setting should be used to limit the number of buckets created/returned.  How should I determine the appropriate precision value to request?  Is there a standard or recommended formula for calculating the optimal precision based on a bounding box and/or zoom level? Is it better to just map zoom levels to precision values (I know that's probably easiest.)


I've got a txt file with thousands of words separated by a ";", but it could change for another special character in the future.  How can I use that txt file as input into an SQL query so I create a mass insert?, is it possible?.

I need to import a csv file into Firebird and I've spent a couple of hours trying out some tools and none fit my needs.  The main problem is that all the tools I've been trying like  and  expect that my CSV file contains all the information needed by my Table.  I need to write some custom SQL in the insert statement, for example, I have a CSV file with the city name, but as my database already has all the cities in another table (normalized), I need to write a subselect in the insert statement to lookup for the city and write its ID, also I have a stored procedure to cread GUIDS.  My insert statement would be something like this:  INSERT INTO PERSON (ID, NAME, CITY_ID) VALUES((SELECT NEW_GUID FROM CREATE_GUID), :NAME, (SELECT CITY_ID FROM CITY WHERE NAME = :CITY_NAME)   How can I approach this?


In 1967 , Edgerton's side-scan sonar systems revealed a large , unusually shaped object , which Mckee believed WAS the Mary Rose.  Shouldn't this be "Mackee believed TO BE the Mary Rose"?  Can somebody please explain the grammar?

It is the doctrine I believed to be right .      It is the doctrine I believed was right.      It is the doctrine I believe is right.   What is the difference between "to be right," "was right," and "is right" used in this sentence? And why using "was right" and "is right" possible? Is it because it is used the same way as "doctrine which I think was right"?  Also, is it possible to change this question     What would you predict the mass of rocket to be?   to this     what would you predict the mass of rocket is?    since the answer would usually be "I predict that the mass of rocket is...", not this: "I predict the mass of rocket to be." Is it possible? Thank you!


I have two programs progA and progB  ./progA outputs a list like this :  a1 a2 a3 a4   and ./progB take the result of progA as an argument and also outputs a list :  b1 b2 b3 b4   I can pipe them like this : ./progA | ./progB  Now I want to paste the two lists, something like this :   a1  b1 a2  b2 a3  b3 a4  b4   With a temporary file I can do  ./progA > tmpA ./progB tmpA | paste tmpA /dev/stdin  but I don't want to write in a file or call progA twice.  How can i do this ?

Considering a routine such as this one:  alpha() { echo a b c |tr ' ' '\n'; }   which outputs a stream, I would like to take the output stream, transform it, and paste it with the original output stream.  If I take use upcasing as a sample transformation, I can achieve what I want with:  $ mkfifo p1 p2 $ alpha | tee p1 >( tr a-z A-Z > p2) >/dev/null & $ paste p1 p2 a       A b       B c       C   My question is, is there a better way to do this, preferably one not involving named pipes?


I'm looking for the short story I read when I was teenager or above (before 2000). Maybe it is from Philip K. Dick.  It's about a man that is thinking to be controlled by the electrical devices in his home. I remember he starts a relation with a girl with t-shirt, big tits, a dental appliance (tooth brace) and very clever. Later in the story she tried to kill herself by putting her head inside a micro-wave oven.  A very melancholic story.

Does anyone know this story? It was a novelette published with another one (I don't remember what it was) in . The premise was that the narrator is an old man whose neighbor, a hacker, dies under mysterious circumstances. A younger woman who is an expert in computer security is hired by the police to investigate what happened, and she has a fling with the narrator. After a while she dies as well, and the narrator realizes that it is an evil force that comes through electric lines is responsible for the killings. The title has interesting formatting in that it ends with a square (much like a command prompt cursor: [_] )


The ratio test gives $$|x|\cdot\lim_{n\rightarrow\infty}\left|\frac{((n+1)!)^k\cdot(kn)!}{(k(n+1))!\cdot(n!)^k}\right|=|x|\cdot\lim_{n\rightarrow\infty}\left|(n+1)^k\cdot\frac{(kn)!}{(k(n+1))!}\right|.$$  I'm having trouble simplifying $\frac{(kn)!}{(k(n+1))!}$, so far I have:  $$\frac{(kn)!}{(k(n+1))!}=\frac{kn(kn-1)...}{(kn+k)(kn+k-1)...(kn)(kn-1)...}=\frac{1}{(kn+k)(kn+k-1)...(kn+1)}.$$  This means that I have $$|x|\cdot\lim_{n\rightarrow\infty}\frac{(n+1)^k}{(kn+k)(kn+k-1)...(kn+1)},$$  since the highest power after expansion of the denominator and numerator are $1$ and $k^k$ respectively, the above is asymptotically equal to  $$|x|\cdot\lim_{n\rightarrow\infty}\frac{(n+1)^k}{(kn+k)(kn+k-1)...(kn+1)}\sim|x|\cdot\lim_{n\rightarrow\infty}\frac{n^k+\text{lesser powers}}{k^kn^k+\text{lesser powers}}=|x|\frac{1}{k^k},$$  thus the radius is $R=k^k$.  I feel really insecure here using these vauge arguments. Is it mathematically correct to reason like this?

I'm reviewing some calculus concepts right now, and this series stumped me. I'm trying to figure out what its radius of convergence is, but it's not falling for any of my old tricks. Using the root-test, I want to compute: $$ L_1=\lim_{n\rightarrow\infty} \left|\sqrt[n]{\frac{(n!)^k}{(kn)!}}\right| $$  where $k$ is some positive integer. Passing the limit through the absolute-value bars and $n$th root symbol, I now want to compute the simpler (?) $$ L_2 = \lim_{n\rightarrow\infty} \sqrt[n]{\frac{(n!)^k}{(kn)!}}$$  Which I can't seem to pin down. Numerical tests indicate it goes to 0, and that jives with an intuitive notion I have that there are always $k$ terms on the numerator, but $kn$ terms in the denominator. But since all of these terms themselves depend on $n$, proving that $L_2 = 0$ escapes me. Once we get this result (if it's correct), then clearly $L_1$ is also 0, and the radius of convergence of the series is $\mathbb{R}$. Thanks for any ideas you may have.


File name: Test.sh  #!/bin/bash  ZDir="$(echo /usr/src)" cd "$ZDir"   When I execute the script ./Test.sh, the command cd doesn't do anything.  If I try to do it directly in the bash terminal, it works like a charm. Also, echo, used inside and outside the script, returns me the correct value (/usr/src).  Does anyone know why this happens? Again: cd $ZDir works if used outside the script, directly in the terminal...  Edit: Could'nt find the answer on the "duplicate" one but that G-Man user right there answered exactly what i needed to do. Just included a && followed by the next command i needed to do and worked. Functions can also be used for this... cdZDir() {     cd /usr/src;     make;     make install; }  Then just call in the function.

I want to run a script to simply change the current working directory:  #!/bin/bash cd web/www/project   But, after I run it, the current pwd remains unchanged! How can I do that?


i got this class where i have to define a map< Integer,Double >   public class ExpConfig {      public static final int LEVEL_MIN = 1;     public static final int LEVEL_MAX = 100;     public static final int FACTOR = 50;     public static final double BASE_EXPONENT = 1.8D;      public static int level = LEVEL_MIN;     public static double exponent = BASE_EXPONENT;      private static final Map<Integer, Double> myMap;     static {         Map<Integer, Double> aMap = new LinkedHashMap<Integer,Double>();         aMap.put(20, 0.01D);//From level 1 to 20         aMap.put(50, 0D);//From level 21 to 50         aMap.put(100, 0.01D);//From level 51 to 100         myMap = Collections.unmodifiableMap(aMap);     }      ExpConfig(){         populateExponentMap();     }      private void populateExponentMap()     {         Map<Integer, Double> exponentMap = new LinkedHashMap<Integer,Double>();          ExpConfig.myMap.forEach((k,v)-> {             for(int counter=level;counter<=k;counter++,level++){                 exponent+=v;                 exponentMap.put(level, exponent);                 System.out.println(level + " : " + exponent);             }                 });       }      //@TestMethod Run As Java Application     public static void main(String[] args) throws IOException     {         ExpConfig asd = new ExpConfig();     } }   when i run the class as java application, i the construction i got a System.out.Print that verify the map values.  but actually the values are not expected.  1 : 1.8 2 : 1.81 3 : 1.82 4 : 1.83 5 : 1.84 6 : 1.85 7 : 1.86 8 : 1.87 9 : 1.8800000000000001 10 : 1.8900000000000001 11 : 1.9000000000000001 12 : 1.9100000000000001 13 : 1.9200000000000002 14 : 1.9300000000000002 15 : 1.9400000000000002 16 : 1.9500000000000002 17 : 1.9600000000000002 18 : 1.9700000000000002 19 : 1.9800000000000002 20 : 1.9900000000000002 21 : 1.9900000000000002 22 : 1.9900000000000002 23 : 1.9900000000000002 24 : 1.9900000000000002 25 : 1.9900000000000002 26 : 1.9900000000000002 27 : 1.9900000000000002 28 : 1.9900000000000002 29 : 1.9900000000000002 30 : 1.9900000000000002 31 : 1.9900000000000002 32 : 1.9900000000000002 33 : 1.9900000000000002 34 : 1.9900000000000002 35 : 1.9900000000000002 36 : 1.9900000000000002 37 : 1.9900000000000002 38 : 1.9900000000000002 39 : 1.9900000000000002 40 : 1.9900000000000002 41 : 1.9900000000000002 42 : 1.9900000000000002 43 : 1.9900000000000002 44 : 1.9900000000000002 45 : 1.9900000000000002 46 : 1.9900000000000002 47 : 1.9900000000000002 48 : 1.9900000000000002 49 : 1.9900000000000002 50 : 1.9900000000000002 51 : 2.0 52 : 2.01 53 : 2.0199999999999996 54 : 2.0299999999999994 55 : 2.039999999999999 56 : 2.049999999999999 57 : 2.0599999999999987 58 : 2.0699999999999985 59 : 2.0799999999999983 60 : 2.089999999999998 61 : 2.099999999999998 62 : 2.1099999999999977 63 : 2.1199999999999974 64 : 2.1299999999999972 65 : 2.139999999999997 66 : 2.149999999999997 67 : 2.1599999999999966 68 : 2.1699999999999964 69 : 2.179999999999996 70 : 2.189999999999996 71 : 2.1999999999999957 72 : 2.2099999999999955 73 : 2.2199999999999953 74 : 2.229999999999995 75 : 2.239999999999995 76 : 2.2499999999999947 77 : 2.2599999999999945 78 : 2.2699999999999942 79 : 2.279999999999994 80 : 2.289999999999994 81 : 2.2999999999999936 82 : 2.3099999999999934 83 : 2.319999999999993 84 : 2.329999999999993 85 : 2.3399999999999928 86 : 2.3499999999999925 87 : 2.3599999999999923 88 : 2.369999999999992 89 : 2.379999999999992 90 : 2.3899999999999917 91 : 2.3999999999999915 92 : 2.4099999999999913 93 : 2.419999999999991 94 : 2.429999999999991 95 : 2.4399999999999906 96 : 2.4499999999999904 97 : 2.45999999999999 98 : 2.46999999999999 99 : 2.4799999999999898 100 : 2.4899999999999896   the key is correct but the value is not, the expected result would be with only 2 decimal numbers.  I know the solution is rounding the values, but why is this happening?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Let $A$ be a ring and $f:A \to A$ a surjective homomorphism. If $A/\ker f \cong A$ then is $f$ injective?? I know how to prove the other direction, but this one I don't know how to solve. Do you have any idea? Of course, if $A$ is finite then the exercise is trivial.

If $A$ is Noetherian, the surjectivity of a homomorphism from $A$ to itself is necessarily injective.   Thus, it's clear that if $\phi: A \to A$ is surjective, but not injective, the ring in question would have to be non-Noetherian.  Reformulating the question using the first isomorphism theorem. Given $\phi:A \to A$, we know that $A/ \ker \phi \cong \textrm{im} \phi \cong A$. When is it the case that the kernel is nontrivial?   Related Question: If every surjective homomorphism $A \to A$ is an isomorphism, does it follow that $A$ is Noetherian?


I have €77,000 in my bank account. My mortgage has €75,000 left on it (without interest) and a term of 14 years remaining. The current interest rate is 4%, but of course this can change.  Should I pay off this mortgage? Or would there be much smarter things to do with the money, i.e. investing or buying a second home?  I want to actually get some return on the money, but paying interest on money I don't need to borrow anymore seems unnecessary to me.

I have a mortgage of 30 yrs amortization and have 290k left on the mortgage. It suddenly hit me that with my bi weekly payment of 620, it would take forever to pay it off. I need some help deciding if when i have some 'disposable' income, i should pay toward mortgage or i should pay towards a high value savings account. In other words, how to decide between paying off mortgage and investing in high value saving account,bond etc(not stock)


In a book I saw this statement.  Before words beginning with h and not accented on the first syllable, an is often used ; as,   An historical , an hotel.  I want to know whether h in hotel is pronounced or not. I would be really grateful if someone can explain this more.

Consider the following sentences:  I am staying in a hotel nearby. I am staying in an hotel nearby.  I know that both are correct. But I would like to know why? I do not see any proper reason for the second one as the 'h' is not silent as in French. So, what could be the reason?


Here is the problem 4-2 in John Lee's introduction to smooth manifolds:          Suppose $M$ is a smooth manifold (without boundary), $N$ is a smooth manifold     with boundary, and $F: M \to N$ is smooth. Show that if $p \in M$ is a     point such that $dF_p$ is non-singular, then $F(p)\in$ Int$N$.      To approach this problem, let's assume conversely that $F(p)\in$ $\partial N$, then there are two charts $(U,\varphi)$ and $(V, \psi)$(a boundary chart) centered at $p$ and $F(p)$ respectively. I can't see how the non-singularity of  $dF_p$ contradicts to the fact that $F(p)$ is in the boundary chart. Maybe the proof by contradiction is not the right way? Thanks in advance!

Let $M$ be a smooth manifold and let $N$ be a manifold with boundary, both with the same dimension $n$. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}N  $.  I am trying to prove this theorem to prove a result about smooth embeddings.  Here is how I am thinking the problem could be solved. Assume thet $F(p)$ is a boundary point of $N$. Then there exists a chart $(V,\psi)$ at $F(p)$ such that $\psi(V) $ is an open subset of the upper half space $\mathbb{H}^{n}$. I guess we have to use some fact about $M$ having no boundary and the the fact that $dF_p$ is an isomorphism to show that there is a contradiction, but I cannot figure that out.


I am getting this crash from multiple users when trying to get fragment manager. Any idea why the crash?   @Override  public void onNoInternetError() {    Log.i("base", "no internet error!");    final FragmentTransaction ft = getFragmentManager().beginTransaction();    final NoInternetFragment fragment = new NoInternetFragment();    ft.replace(R.id.content_frame, fragment, "noInternetFragment");    ft.addToBackStack(null);    ft.commit();   Error  Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.p android.support.v4.app.k.a()' on a null object reference        at com.abc.abc.fragments.ABCFragmentBase$1.onNoInternetError(ABCFragmentBase.java:112)        at com.abc.abc.ui.components.NoInternetListener.showNoInternetFragment(NoInternetListener.java:14)        at com.abc.abc.ServerManager.handleFailure(ServerManager.java:1875)        at com.abc.abc.ServerManager.access$100(ServerManager.java:54)        at com.abc.abc.ServerManager$33.onFailure(ServerManager.java:1220)        at com.abc.sdk.JsonObjectRequest.deliverError(JsonObjectRequest.java:70)        at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:108)        at android.os.Handler.handleCallback(Handler.java:789)        at android.os.Handler.dispatchMessage(Handler.java:98)        at android.os.Looper.loop(Looper.java:164)        at android.app.ActivityThread.main(ActivityThread.java:6944)        at java.lang.reflect.Method.invoke(Method.java)        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

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 have this function to format monetary values:  function formatMonetary(v){       v = v.replace(/\D/g,"");    v = v.replace(/(\d{1})(\d{15})$/,"$1.$2");    v = v.replace(/(\d{1})(\d{11})$/,"$1.$2");    v = v.replace(/(\d{1})(\d{8})$/,"$1.$2");    v = v.replace(/(\d{1})(\d{5})$/,"$1.$2");    v = v.replace(/(\d{1})(\d{1,2})$/,"$1,$2");    return v;    }   When I input just a number 1 or 1,1 this function assume the value:  0,01  0,11  With a value alignment in the right way, is possible this function assume a value in the left way, when I input a number 1 or 1,1 :  1,00  1,10

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


I've been trying to make a 3d game and for some reason my code is throwing a NullPointerException. The error I'm getting is:   Exception in thread "Thread-3"  java.lang.NullPointerException at Display_3d.render(Display_3d.java:73) at Display_3d.run(Display_3d.java:55) at java.lang.Thread.run(Unknown Source)   This program is supposed to just display pixels of a random color as a test in order to make 3d graphics later. There are two other classes it uses and even though those two don't throw errors they still could be the issue so I'll post them as well. The class Below is the one that throws the errors  import java.awt.Canvas; import javax.swing.JFrame; import java.awt.image.BufferedImage; import java.awt.image.BufferStrategy; import java.awt.image.DataBufferInt; import java.awt.Graphics;  public class Display_3d extends Canvas implements Runnable { private static final long serialVersionUID = 1L;  public static final int width = 800; public static final int height = 600; public static final String title = "Scott's Game Pre-Alpha 0.01";  private Thread thread; private Screen screen; private BufferedImage img; private boolean running = false; private Render render; private int[] pixels;  public Display_3d(){   Screen screen = new Screen(width,height);   img = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);   pixels = ((DataBufferInt)img.getRaster().getDataBuffer()).getData(); }  private void start(){   if (running){      return; } running = true; Thread thread = new Thread(this); thread.start();  System.out.println("start() has been called sucessfully");  }  private void stop(){ if (true != running){   return; } running = false; try {   thread.join(); }catch (Exception e){   e.printStackTrace();   System.exit(0); } }  public void run(){   while (running){     tick(); /*Line 55*/render();  } }  private void tick(){  }  private void render(){   BufferStrategy bs = this.getBufferStrategy();   if (bs == null){     this.createBufferStrategy(3);      return;   }     /*Line 73*/ screen.render();    for (int i = 0; i<width*height-1; i++){   pixels[i] = screen.pixels[i];   }    Graphics g = bs.getDrawGraphics();   g.drawImage(img,0,0,width,height,null);   g.dispose();   bs.show();   }    public static void main(String[] args){  Display_3d game = new Display_3d();  JFrame frame    = new JFrame();  frame.add(game);  frame.pack();  frame.setTitle(title);  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  frame.setSize(width,height);  frame.setLocationRelativeTo(null);  frame.setResizable(false);  frame.setVisible(true);   System.out.println("Running...");   game.start();   }  }   My Render Class    public class Render{   public final int width;   public final int height;   public final int[] pixels;    public Render (int width, int height){   this.width = width;   this.height = height;   pixels = new int[width * height]; }  public void draw(Render render, int xOffset, int yOffset){   for (int y = 0; y<render.height; y++){     int yPix = y + yOffset;    for (int x = 0; x<render.width; x++){     int xPix = x + xOffset;     pixels[xPix + yPix * width] = render.pixels[x+y * render.width];    }   }   }   public static void main (String[] args){}  }   My Screen Class   import java.util.Random;  public class Screen extends Render{  private Render test;   public Screen(int width, int height){    super(width,height);    Random random = new Random();    test = new Render(256,256);     for (int i = 0; i <256*256; i++){     test.pixels[i] = random.nextInt();    }   }    public void render() {     draw(test,0,0);   }    public static void main (String[] args){} }


I want to create an XML file with the files of a directory, creating an element with "File name" and "File path" elements for each of the files in that directory. I have already done that, the problem is I that all the files on that directory have the .lnk extension, and I want to get the real path of the file that .lnk is pointing to.               foreach (var file in dir.GetFiles())             {                 xmlInfo.Add(new XElement("file", new XAttribute("name", file.Name), new XAttribute("path", file.FullName)));             }   So the file.FullName gets the full path to that .lnk file, i want to change it to get the path to the original file.  Is there any way to do this?

I need to find out the file/directory name that a .lnk is pointing to using c#.  What is the simplest way to do this?  Thanks.


I want to change my current bibsytle to mla but it won't work:  \usepackage[numbers]{natbib}  \begin{document} \bibliography{test-bib.bib} \bibliographystyle{dinat}  This my text \citep{Saussure1995} text  \end{document}   I tried the following by using TeXnixCenter but it won't work:  \usepackage{csquotes} \usepackage[style=mla,backend=biber]{biblatex}  \addbibresource{test-bib.bib}  \begin{document} This is a citation. \autocite{Saussure1995}. Another citation \autocite{Kavanaugh1976} \printbibliography \end{document}

When using the backend=biber option, I get a warning:     package Biblatex warning: Please (re)run  Biber on the file:   (biblatex) myproject   Result: References are not recognized.   Yes. A similar question does exist - but no solution is provided: .  - as a MWE.   backend=bibtex works like charm.  Question: What are the detailed steps to get backend=biber working? (When people say run that command or another there is a need of context.)  So my editor is .  And I have no clue how to run Biber on my file under TeXnicCenter... or any other environment.  Consider me as a simple mortal that really would like to get this solved, save forever and never come back again.   In TexnicCenter I don't have to do anything fancy with the MWE using backend=bibtex except creating a .bib file. Then I press Build current file - and get valid pdf with my references, which is a way it should be - simple and concise. If there is a tendency to recommand biber for utf-8 support, then we should get fast deployment so this will be adopted faster.  The problem inherently is the same as this one: .


If $(X,Y)$, $(X,Z)$, and $(Y,Z)$ are all Gaussian, does it follow that $(X,Y,Z)$ is also Gaussian? I'm having trouble coming up with a counterexample...

Somebody asked me this question in a job interview and I replied that their joint distribution is always Gaussian. I thought that I can always write a bivariate Gaussian with their means and variance and covariances. I am wondering if there can be a case for which the joint probability of two Gaussians is not Gaussian?


Does a US citizen who has lived in Ghana for 5 years have to have 3 to 6 thousand dollars in hand to fly out of the country to return to the US?

On Travel.SE we often see questions about a person (usually a love interest) asking for money to pay for airfare, visas, permits and other expenses. For example        What general advice can be given in such situations to the person asking the question? Is it all a scam or can there be legitimate situations in which an online friend could be asking for money?


I see this:  GRUB loading. Welcome to GRUB!  error:file not found. Entering rescue mode... grub rescue> _   I tried using the Windows installation disk but it didn't work.  I also tried reinstalling Kali or Debian but they didn't boot to the installation part and it also doesn't want to boot the original operating system.

I just installed quite a lot of 12.10 updates, was prompted to reboot, and then found that I couldn't boot.


I build a microserver to access my personal data and web services from my client machines. Since this is all the stuff I collected in the past 15-20 years, I'd like to keep it safe, so I'd like to use RAID this time. I have already checked that only 3.5" HDD-s have rational prices, so using 2.5" hdd or ssd is not an option. The motherboard supports RAID 0/1/5/10. I am currently selecting a case, but I am not sure whether it should have 3 or 4 drive bays for 3.5" hdd-s. The case I really like (Tt Core V21) has only 3 x 3.5" drive bays. The other case which is not that good if we are talking about cooling and air flow (BitFenix Phenom Micro-ATX) has 4 x 3.5" drive bays. What are the pros and cons using 3 or 4 disks if we are talking about RAID? (I guess it is something general, but if not, then I'd like to know it by each RAID version.)  Conclusions:   I think 3 drives with RAID-5 is sufficient for my needs. I need a self-healing filesystem like ZFS or BTRFS (I chose the latter one), which can fix data degradation using RAID parity data. These filesytems can make incremental snapshots too, so they are great if you want a fast backup without halting the system. Using an event storage can do the same on application level, so that part does not really matter in my case. People here never heard that backup does not protect against , but a self-healing filesystem with RAID most of the time does. Probably they are too focused on their RAID is not a backup mantra to learn new things...

This is a  about RAID levels.    What are:   the RAID levels typically used (including the RAID-Z family)?  deployments are they commonly found in? benefits and pitfalls of each?


I am trying to show that for any positive integer m,  $$\sum_{i=0}^{2m} (-1)^{i}\binom{2m}{i}^{2} = (-1)^m\binom{2m}{m}$$  Intuitively this seems to be true, $m = 0$ both sides evaluate to $1$, $m = 1$ both sides evaluate to $-2$.   I was looking at this identity for a potential connection, but it seems not applicable here $$\binom{2n}{n} = \binom{n}{0}^{2} + \binom{n}{1}^{2} + \binom{n}{2}^{2} + ... + \binom{n}{n}^{2}$$  Also I was trying to find connections between this and the binomial theorem, but no luck

How can I prove the identity:  $$ \sum_{k=0}^n\binom{2n}{2k}^2-\sum_{k=0}^{n-1}\binom{2n}{2k+1}^2=(-1)^n\binom{2n}{n}? $$  Maybe, can we expand $$ f(x)=(1+x)^{2n}? $$  Thank you.


I tried solving it. By substituting $\sin x$ with $t$ then $dt=\cos xdx$ but I am stuck after that. Where to go next?

Show that   $$\int_{0}^{\pi} xf(\sin(x))\text{d}x = \frac{\pi}{2}\int_{0}^{\pi}f(\sin(x))\text{d}x$$  this is so confusing. i have no idea how to even start. im thinking integration by parts but that doesnt seem right.  hope you guys can help!!


I was wondering how I can change my game difficulty and how to change my game to creative. Every time I type in /gamemode 1 or /gamemode creative it comes up with:      I am sorry but you do not have permission to perform this command.   Please contact the server administrators if you believe that this is   an error.   I thought this was weird because I am the server administrator.

I have started a server in 1.5 and was wondering how to op myself. The /op <player> command does not work and in 1.4.7. I used to open up the ops.txt file but I cannot find it in 1.5. Can anyone help as this would be useful to teleport my friend to me.


is there a way to pass in parameters to a class when creating it dynamically using Type.forName(classname).newInstance().  global with sharing class ManagerBatch implements Database.Batchable<sObject>{          Boolean isIndependent = true;          global ILM_AddressSharingManagerBatch(Boolean indep) {                isIndependent = indep;         }     }     global with sharing class ILM_BatchController implements Database.Batchable<sObject>, Database.Stateful{      // implementation     global void finish(Database.BatchableContext BC) {        DMT_Batch_Setting__mdt batchSetting = (DMT_Batch_Setting__mdt)pq.dequeue();        String batchClassName = batchSetting.Batch_Class_Name__c;        Type batchType = Type.forName(batchClassName);        Database.Batchable<sObject> batchToExecute =                     (Database.Batchable<sObject>)batchType.newInstance();        Database.executeBatch(batchToExecute);             }         }     } }   I tried to create an abstract batch class and created a setIndependence method for it however i have a problem casting the type properly: source:()  public abstract class AbstractBatch  {     Boolean isIndepedent;     public AbstractBatch setindependence(Boolean indepedent)     {         isIndepedent = indepedent;         return this;     }  }   global with sharing class ILM_BatchController implements Database.Batchable<sObject>, Database.Stateful{      // implementation     global void finish(Database.BatchableContext BC) {        DMT_Batch_Setting__mdt batchSetting = (DMT_Batch_Setting__mdt)pq.dequeue();        String batchClassName = batchSetting.Batch_Class_Name__c;            (AbstractBatch) batchType = ((AbstractBatch)Type.forName(batchClassName)).setindependence(false);        Database.Batchable<sObject> batchToExecute =                     (Database.Batchable<sObject>)batchType.newInstance();        Database.executeBatch(batchToExecute);             }         }     } }      Error: incompatible type since system.type is never an instance of abstractBatch.

I have created an Apex InterfaceFactory that the user can use to get an instance of a specified implementation of an interface. For this I use the System.Type class. The actual name of the class can be set in a custom setting. I wanted to be able to pass some parameters to the constructor of the dynamically instantiated class. In short; this is the code I'm talking about:  public static MyInterface GetMyInterfaceImplementationByClassName(String settingName){     String implementationClassName;     Type t;     MyInterface implementation = null;      //get the actual class name from the custom setting     Interface_Implementations__c settings = Interface_Implementations__c.getInstance(settingName);      //just make sure there actually is a className found     if (settings != null && settings.Class__c != null) {         implementationClassName = settings.Class__c;         //get the type object for the class name retrieved from the custom setting         t = Type.forName(implementationClassName);         //this line is where my question comes in; how can I pass parameters here         implementation = (MyInterface)t.newInstance();     }      return implementation; }


I need to split a country-scale river network (polyine) at certain barriers (point) so the length of (branched) river sections that have a certain minimum length. I used the following procedure:  1) Merge/Unsplit river network to one long line (only one row in the attribute table).  2) Split line at Point.  The problem is now that it not only splits the lines at the barriers, but also at intersections/branchings within the river network. I also tried Xtool's split line feature with similar results, and gvSIG's sextante toolbox didn't work at all for me. Any suggestions?  I am using ArcGIS 10 SP5, but also open to solutions in Qgis or gvSig

I am on ArcGIS Desktop 10.2. I have a line feature class of a stream network. I also have a point feature class along the main stream (line) where a catchment enters that stream. I have dissolved my whole streams layer into one line feature and want to split this feature at the points.    However, when I use the  tool, the lines that don't have a point splitting them are still being split at the intersection of two streams.    Why did this line not stay as one feature with the other lines on that side of the splitting node and how can I prevent this from happening?


I have following JSON Format  lstSelectedIds-->     [{"Id":"a0k1k000000QTPrAAO","Name":"00006144","User__c":"0051k000000wvYAAAY","User__r":{"Name":"Wissam Mahmassani","Id":"0051k000000wvYAAAY"}},{"Id":"a0k1k000000QTQcAAO","Name":"00006191","User__c":"0051k000000wvhqAAA","User__r":{"Name":"Nischitha Devaraj","Id":"0051k000000wvhqAAA"}}]    [     {     "Id":"a0k1k000000QTPrAAO",   "Name":"00006144",   "User__c":"0051k000000wvYAAAY",   "User__r":{        "Name":"Wissam Mahmassani",      "Id":"0051k000000wvYAAAY"   }  },   {     "Id":"a0k1k000000QTQcAAO",   "Name":"00006191",   "User__c":"0051k000000wvhqAAA",   "User__r":{        "Name":"Nischitha Devaraj",      "Id":"0051k000000wvhqAAA"   }  },   {     "Id":"a0k1k000000QTfXAAW",   "Name":"00007116",   "User__c":"0051k000000wvuXAAQ",   "User__r":{        "Name":"Ranjan Vasudeva",      "Id":"0051k000000wvuXAAQ"    } } ]   cOMPONENT:  <aura:attribute name="LstOfAddedUser" type="List" description="Hold the list of added userUser Data"/>   Passing value in JS:      action.setParams({         "selectedIds":JSON.stringify(cmp.get("v.LstOfAddedUser")),         "pageNumber": pageNumber,         "pageSize": pageSize,      });   Following Line causes error:  List<String> lstSelectedIds = (List<String>)System.JSON.deserialize(selectedIds, List<String>.class);   Class:  public static UserDataTableWrapper NextPagination(string selectedIds,Decimal pageNumber, Decimal pageSize){     System.debug('lstSelectedIds-->'+selectedIds);     List<String> lstSelectedIds = (List<String>)System.JSON.deserialize(selectedIds, List<String>.class);     wrapper class:   public class UserDataTableWrapper {            @AuraEnabled            public Integer pageSize {get;set;}           @AuraEnabled           public Integer pageNumber {get;set;}           @AuraEnabled           public Integer totalRecords {get;set;}           @AuraEnabled             public Integer recordStart {get;set;}             @AuraEnabled             public Integer recordEnd {get;set;}             @AuraEnabled              public List<GSS_User_Data__c> contactList {get;set;}         }   Error:  Illegal value for primitive

I'm running a REST API which is returning the below:  "id" : "fdgsdgsdsdgsdg",    "pageevents" : [ {        "name" : "test",        "number" : "0123442",        "homepage" : "www.test.com"     } ],     "goals" : [ {        "name" : "test",        "number" : "0123442",        "homepage" : "www.test.com"     } ] } ]   Im using the below code to de-serialize it, so i can display it as a pageblocktable on a visualforce page however im getting the error :      System.JSONException: Illegal value for primitive   public List<maMoments> getMomentsActivity() {     Id contactId;     if (contactId == null) {         contactId = '0030O00001sqXJr';     }      String contactIdString = String.valueOf(contactId);     String jsonResponse = this.AutomationDetailsMoments(contactIdString);     system.debug(jsonResponse);     List<maMoments> mAutomation = (List<maMoments>) JSON.deserialize(jsonResponse, List<maMoments>.class);     system.debug(mAutomation);     for(maMoments emailStructure : mAutomation){      }      return mAutomation; }  public string AutomationDetailsMoments(String contactId) {     contactId = '0030O00001sqXJr';     Http h = new Http();     HttpRequest req = new HttpRequest();     req.setEndpoint('https://virtserver.swaggerhub.com/mickjdavies/Example/1.0.0/interestingmoments');     req.setMethod('POST');     req.setBody(contactId);      // Send the request, and return a response     HttpResponse res = h.send(req);     system.debug(res.getBody());     return res.getBody(); }  private class maMoments {     public String contactId;     public String id;     public List<String> goals;     public String name;     public String homepage;     public String phone; }


Which is the best App Cleaner for Mac. I'm using  at the moment.  Have you other preferences?

I'm trying to decide on an uninstaller that does before and after system scans.  So far, I've come across these three:   CleanApp (syniumsoftware.com/cleanapp/) - which I saw someone recommend in  Yank (matterform.com/mac_software/uninstaller/index.html) Uninstaller (macmagna.com/)   So I was hoping if anyone on here has any tips or recommendations on these or any others.  Thanks!


So, I decided to build an underwater glass dome to try and recreate Atlantis. It worked fine, but only one problem: It's filled with water! How do I remove all of it?

I've sectioned of this area in the sea near my base, and I need to get rid of all the water from it.  From what I've tried the only way I can see to clear it is fully cover one layer, delete the blocks, then go down to the next layer. Is that the only way I can clear the area or is there a better approach?  Ideally I'd like a survival method (if there is a better one), but any commands what could be used I'd like to hear just so I can learn more commands :)


How do I recover data from an external hard disk? I used the dd command by mistake on the disk. Specifically, I used: dd if=xyz.iso of=/dev/sdb  Please help me retrieve the lost data.

About two weeks ago I had a problem with my PC that my brother wrote a question about at .  I still haven't solved the problem, so my PC is unusable now.  Now I think that it would be simpler to re-install both Win7 & Ubuntu than repair them, but there're some data on their partitions. I want to recover this data.  These partitions are not mountable for some reason. I don't know why.  sudo fdisk -l about the problematic partitions:     Device    Boot      Start         End      Blocks   Id  System /dev/sda1            2048     147912703    73955328   83 Linux /dev/sdb2            206848   174079999    86936576    7  HPFS/NTFS/exFAT   And in GParted:      And the error of the mount command:  Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   And the exact same message for /dev/sda1  How can I recover my data from those HDDs?  EDIT     I have tried to specify the type of the drive:  $ sudo mount -t ext4 /dev/sda1 /olddisk mount: wrong fs type, bad option, bad superblock on /dev/sda1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so $ sudo mount -t ntfs /dev/sdb2 /olddisk NTFS signature is missing. Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   EDIT     sudo ntfsfix /dev/sdb2 returns:  Mounting volume... NTFS signature is missing. FAILED Attempting to correct errors... NTFS signature is missing. FAILED Failed to startup volume: Invalid argument NTFS signature is missing. Trying the alternate boot sector Unrecoverable error Volume is corrupt. You should run chkdsk.


My credit card on file expired and I will not be replacing it.  I selected the "None" payment option as per this .  However, none of the apps (all free apps) will update anymore as it reports a billing problem.  I have:   Checked all devices on my account and confirmed they only have free apps Never used subscriptions of any sort   How can I get iOS to once again update my apps?    It'd be nice to identify whatever the billing issue is and get it corrected (as there shouldn't be any billing going on whatsoever).  The biggest thing is though, apps (even though they're free!) won't update.

I'm trying to update 3 apps on my iPad and 3 things happen that never usually happen.   It asks me to sign in. It asks for my billing information. My card gets denied.   Now I know my card still works fine so that isn't the problem. The same thing happens when I try to install previously downloaded apps (that cloud button) or install new free apps.  I have no outstanding payments (is it even possible to have outstanding payments with Apple?) so why is this happening?  In case it's needed, I'm using an iPad Air running the latest version. 16GB Harddrive and Wi-Fi only.  I should also make it clear that "None" isn't an option for payment.


I am learning to use the Task Parallel Library(TPL) in C#, and wrote the following code (you can copy-past it and run it).  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks;  namespace parallelTaskLibrary {     class Program     {         static void Main(string[] args)         {             for (int i = 0; i < 6; i++)             {                 var t01 = Task.Factory.StartNew(() => Console.WriteLine("in loop: i = {0}", i));             }              Console.WriteLine("press any key to terminate...");             Console.ReadKey();         }           } }   in the for loop, the counter index i cannot start an iteration with a value of i = 6. However, the output i got is this:  press any key to terminate... in loop: i = 6 in loop: i = 6 in loop: i = 6 in loop: i = 6 in loop: i = 6 in loop: i = 6   However, in another launch(didn't change in the code), i got this:  in loop: i = 1 in loop: i = 1 in loop: i = 2 in loop: i = 3 in loop: i = 4 in loop: i = 5 press any key to terminate...   which is plausible...  I Debugged the code, and found that i value is: 0,1,3,4,5,6   How did that happen?  Why i got (i = 6) in the loop?  is there anything wrong in my code?  Note: I'm using visual studio 2010

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I'm trying to solve this question:    Let $\psi:\mathbb P^1\times \mathbb P^1\to \mathbb P^3$ be the Segre embedding given by $\psi([a_0:a_1],[b_0:b_1])\to [a_0b_0:a_0b_1:a_1b_0:a_1b_1]$. This corresponding to the ring homomorphism $\theta:k[z_{00},z_{01},z_{10},z_{11}]\to k[x_0,x_1,y_0,y_1]$ which maps $z_{ij}$ to $x_iy_j$ (see question 2.14 Hartshorne).  I need help to prove that $\ker\theta=\langle z_{00}z_{11}-z_{01}z_{10}\rangle$. If I prove that, I think I solve the question.  Thanks a lot.

This is a problem in Hartshorne concerning showing that the image of $\Bbb{P}^n \times \Bbb{P}^m$ under the Segre embedding $\psi$ is actually irreducible. Now I have shown with some effort that $\psi(\Bbb{P}^n \times \Bbb{P}^m)$ is actually equal to $V(\mathfrak{a})$ where $\mathfrak{a}$ is the ideal generated  by the set of all monomials   $$\Big\{z_{ij}z_{kl} - z_{il}z_{kj} \hspace{1mm} \Big| \hspace{1mm} i,k = 0,\ldots, n; \hspace{2mm} j,l = 0,\ldots,m\Big\}.$$          My main problem now is in showing that $\mathfrak{a}$ is actually equal to the kernel of the ring homomorphism $$\varphi : k[z_{ij}] \to k[x_0,\ldots,x_n,y_0,\ldots,y_m]$$     that sends $z_{ij}$ to $x_iy_j$.      I have spent quite a few hours playing around with monomial orderings and trying to show that $\mathfrak{a} \supseteq \ker \varphi$ but to no avail. Of course the other inclusion is immediate.   Is there anything I can do apart from playing around with monomial orderings to try and show that the kernel of $\varphi$ is equal to $\mathfrak{a}$? Perhaps maybe something along the lines of inducting on $n$, those this does not look promising.  Note: Please do not close this question; my question is different from the other questions on this site concerning the Segre embedding. Also, I can show my work concerning how I arrived at the conclusion that $V(\mathfrak{a}) = \psi(\Bbb{P}^n \times \Bbb{P}^n)$.


Let $R$ be a commutative ring with unit.  On the elements of $R$ we can define the following relations:$$a\sim_1b\iff a=ub\text{ for some unit }u$$  and:$$a\sim_2 b\iff r,s\in R\text{ exist with }a=rb\text{ and }b=sa$$  It is clear to me that both relations are equivalence relations and that $a\sim_1b\implies a\sim_2b$.  Also it is clear to me that the opposite of this is true if $a$ or $b$ is not a zero-divisor.  Questions:     1) Do we always have $a\sim_2b\implies a\sim_1b$? (I suspect not)      2) If not then can you provide a counterexample?      3) Is the condition "$R$ has no zero-divisors" (sufficient for $a\sim_2b\implies a\sim_1b$) also a necessary condition for $a\sim_2b\implies a\sim_1b$?   Thank you in advance and sorry if this question is a duplicate.

Recall the following relevant definitions. We say that   $b$ is divisible by $a$ in $R$, or $a\mid b$ in $R$, if $b = r a$ for some $r\in R$. $a$ and $b$ are associates  in $R$ if $a\mid b$ and $b\mid a$, (or, equivalently, if $aR = bR$). $u\in R$ is a unit if it has a multiplicative inverse (a $v\in R$ such that $uv=vu=1$). $a$ and $b$ are unit multiples in $R$  if $a = ub$ for some unit $u\in R$.   Given these definitions, my question is,     If $R$ is a commutative ring with unity and $a,b\in R$ are associates in $R$, are $a$ and $b$ unit multiples in $R$?   I was told that this not always true. But I encountered some difficulties in finding a counterexample.


Im trying to define a class which (its minimal version) would look like this: class Base{     int i; public:     Base(int i_): i(i_){}     int& at(size_t index) {return i;}     const int& at(size_t index) const {return i;} };  (Yes. It has an index because the class that i really want to create always need it, so lest imagine that it is necessary) And i want to inherit class like this: class SonClass : public Base{ public:     SonClass(int i): Base(i){}     int& at(size_t index){         do_something_more();         return Base::at(index);     }     const int& at(size_t index) const {         do_something_more();         return Base::at(index);     } };  It seems like the versions of the at function are both the same. Is anyways to avoid this? Or any better way to do it? It seems basic, but i have like 5 functions that are all the same because of this.

Let's say I have the following class X where I want to return access to an internal member:  class Z {     // details };  class X {     std::vector<Z> vecZ;  public:     Z& Z(size_t index)     {         // massive amounts of code for validating index          Z& ret = vecZ[index];          // even more code for determining that the Z instance         // at index is *exactly* the right sort of Z (a process         // which involves calculating leap years in which         // religious holidays fall on Tuesdays for         // the next thousand years or so)          return ret;     }     const Z& Z(size_t index) const     {         // identical to non-const X::Z(), except printed in         // a lighter shade of gray since         // we're running low on toner by this point     } };   The two member functions X::Z() and X::Z() const have identical code inside the braces.  This is duplicate code and can cause maintenance problems for long functions with complex logic.    Is there a way to avoid this code duplication?


I am trying to delete a few sections of a video using FFmpeg.  For example, imagine if you recorded a show on television and wanted to cut out the commercials. This is simple with a GUI video-editor; you just mark the beginning and ending of each clip to be removed, and select delete. I am trying to do the same thing from the command-line with FFmpeg.  I know how to cut a single segment to a new video like so:  ffmpeg -i input.avi -ss 00:00:20 -t 00:00:05 -map 0 -codec copy output.avi   This cuts a five-second clip and saves it as a new video file, but how can I do the opposite and save the whole video without the specified clip, and how I can I specify multiple clips to be removed?  For example, if my video could be represented by ABCDEFG, I would like to create a new one that would consist of ACDFG.

I need to cut one video into multiple pieces with ffmpeg.  When I cut just one episode  ffmpeg -i 001.mp4 -vcodec copy -acodec copy -ss 00:00:00.000 -t 00:00:25.500 -strict -2 out1.mp4   or  ffmpeg -i 001.mp4 -vcodec copy -acodec copy -ss 00:00:25.500 -t 00:00:33.750 -strict -2 out2.mp4   my video is cut instantaneously.  But when I chain markers where I'd like to cut  ffmpeg -i 001.mp4 -vcodec copy -acodec copy -ss 00:00:00.000 -t 00:00:25.500 -strict -2 out1.mp4 -ss 00:00:25.500 -t 00:00:33.750 -strict -2 out2.mp4   it still works, but it takes considerably more time (about 10 sec), and I see the same output as when I convert something.  Is something wrong with my ffmpeg-command, or it is better to execute ffmpeg-commands one by one?


Which is the limit of the fllowing sequence $$\frac{(n!)^{1/n}}{n}$$

I need to find the limit for:   $ \lim_{n\to\infty} \frac {(n!)^\frac{1}{n}}{n} $  I know the answer is $\frac {1}{e}$ but I have no idea how to get that answer. I'd appreciate some help.


I started with this based off of another question I had:  find -type f -iname '*.png' -exec rm   that clearly didn't work, but am I atleast warm?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.


I know that frequency means a complete wave produced per second. But when the wave gets refracted, it's wavelength decreases. If the wave's wavelength has decreased doesn't it means that the wave has been produced more which causes the frequency to increase? Please explain in simple words :)

They say the frequency of a wave is its fundamental character, thus remain constant throughout its propagation regardless the medium through which it travels. Could anyone explain why frequency of wave is fundamental character but its wavelength isn't?


I am aware of two definitions of canonical transformations which I state below. Definition $1$ We go from old set of $\{q_i,p_i,t\}$ of $2n$ phase space variables to a new set $\{Q(q_i,p_i,t),P(q_i,p_i,t),t\}$ of $2n$ phase space variables such that  the determinant of the Jacobian of the transformation is $+1$ and the functional form of the old hamiltonian $H(q,p,t)$ changes to new hamiltonian $K(Q_i,P_i,t)$ but Hamilton's equations in the new variables remain preserved in form $\dot Q_i=\frac{\partial K}{\partial P_i},~ \dot P_i=-\frac{\partial K}{\partial Q_i}$. Definition $2$ We go from old set $\{q_i,p_i,t\}$ of $2n$ phase space variables to a new set $\{Q(q_i,p_i,t),P(q_i,p_i,t),t\}$ of $2n$ phase space variables such that the the determinant of the Jacobian of the transformation is $=+1$ and the funadamental Poisson bracket relations remain unchanged i.e.$\{Q_i,P_j\}=\delta_{ij};~\{Q_i,Q_j\}=\{P_i,P_j\}=0.$  Are these two definitions related? I mean, does 1 imply 2 and 2 imply 1? How to show/see this, if true?


I am a newbie photographer and had a question that has been plaguing me for some time now.  My NIKON D3100 camera's brightness meter (the lines that change on manual mode when one adjusts shutter speed) is clearly not working correctly.  The reason I say this is because whenever I take a normal photo (manual mode) using 400 IS0 and 5.6 F-STOP, my shutter speed must be 1/10 to attain "normal" brightness, or brightness in the middle of the lines.  This is unusual because 2 months ago, I was using manual mode, and taking photos at 400 ISO, 5.6 F-STOP, and 1/640 shutter speed; the brightness meter displayed "normal" brightness.  Can someone provide insight into what has occurred, please? All my photos now turn out dark and I really just want to shoot like I was 2 months ago!  Help is appreciated, thanks! UPDATE: SPOT METERING IS OFF, MATRIX METERING IS ON.  ALSO, ISO IS AT 400 AND IS NOT SET TO AUTO ISO.

I have a most vexing problem.   I have a Nikon d5100 (roughly a year old) which up until two days ago handled exposure and metering just fine. However, at night, in a well lit room (florescent bulbs) in which I NEVER had problems capturing images at reasonable shutter speeds, apertures and ISOs (< 400), here's what's happening now:   In Manual, even at low shutter speeds (1/90 and lower) and relatively open apertures (3.5) - ISO 640 and less - my pictures are almost completely black. Pointing the camera at a bright lightbulb just barely captures the light with heavy shadows all around it. Exposure compensation no longer has ANY effect on the exposure Shooting in Aperture Priority mode at f/3.5 at anything lower than ISO 1000 reduces my shutter speeds to 1/2 or lower to compensate.   Yes, I know. ISO. Keep in mind, the room is quite brightly lit and I never had this issue prior to last night. That being said, the only way I can capture a reasonably exposed picture here is at ISOs 6400 and above. But even a picture at 1/125, f/5.6, ISO 6400 (manual) is still ridiculously dark.  I have taken the following step to troubleshoot, to no avail:   Turned exposure compensation up to the max +5.0 - no effect Turned shutter speeds down to 1/40 and below - extremely limited effect Turned ISO up to 6400 and beyond - limited effect Update the camera's firmware (1.01 > 1.02) - no effect Reset the camera using the buttons with the two green dots - no effect, multiple tries Messed with the metering modes - no effect Turned it off and on again - no effect Stared pointedly at the camera - camera didn't even flinch   I am at an absolute loss here and I really, truly, need help.  Images:  ISO 100, f/3.8, 1/3   ISO 100, f/3.8, 1/90    ISO 1000, f/3.8, 1/90


I'm contemplating upgrading from Windows 8 to the new Windows 8.1 Preview, but I've been unable to find whether it will be technically possible to upgrade from the preview to the full release. It apparently is with Windows RT, but I've found nothing about Windows 8 Pro.

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


Trying to find the principal value of the above equation I've done the first couple lines \begin{align} &e^{(1+i)(\log(-1+\sqrt{3}i)}\\ &e^{(1+i)(\ln(2)+\frac{2\pi}{3})} \end{align} How would I further simplify this?

How do I compute the principal value of a these complex numbers? I have 2 examples I'm not sure how to calculate One being $$\frac{1}{(1+i)^i}$$ the other is $$(-1+i\sqrt{3})^{1+i}$$ Can anyone help please? Anything appreciated


Prove that the series $\displaystyle \sum_{n=1}^{\infty}\frac{|\cos n|}{n}$ diverges.   I knew that the series $\displaystyle \sum_{n=1}^{\infty}\frac{|\sin n|}{n}$ diverges, but it seems the proof for the case of sine cannot be applied to the case of cosine.  Thanks so much.

As far as I know, the textbook approach to determining the convergence of series like $$\sum_{n=1}^\infty\frac{\cos n}{n}$$ and $$\sum_{n=1}^\infty\frac{\sin n}{n}$$ uses Dirichlet's test, which involves bounding the partial sums of the cosine or sine terms. I have two questions:   Are there any other approaches to seeing that these series are convergent? I'm mostly just interested to see what other kinds of arguments might be made. What's the best way to show that these two series are only conditionally convergent? I don't even know the textbook approach to that question.


I want to connect the HDMI socket on my newish laptop to the VGA socket on a pretty old monitor screen. I shan't want to bother with any audio. I've briefly looked but found reference only to DVI to HDMI. Is there a solution to this or is VGA obselete ?

I just bought a new HP Pavilion dv7t Quad Edition laptop that has HDMI out. I already have a couple of monitors that are VGA and I'd like to hook up one of these to dual monitors.  I've read some sketchy reviews of products that try to convert directly from HDMI (digital) to  VGA (analog), so I was wondering if someone has a good recommendation on how to hook these two together.


I'm reading Thomas Calculus now but I don't think it includes Mellin transform or  Riemann-Stieltjes integration... Can you recommend an advanced calculus book which includes all of this stuff?

This question is a  of the common question asking for calculus references. It is here to  away the repetition, and give a canonical resource for calculus references.      I'm looking for a resources to learn single-variable calculus.


How do I report this as a bug in 19.04? when I don't find which package it belongs to

I found a problem with an application on Ubuntu.   Questions :   How do I best report the issue?  What sort of information should I provide?


My mother was raised in a family that had  placed extreme importance on filial piety.   Is had superfluous, wrong, or correct?  I can see arguments in both directions:   Perfect past (raised) requires pluperfect (had placed). Reflexive participle makes raised imperfect, even though it's a completed action, therefore placed is sufficient.

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


macOS High Sierra (10.13.6)   How to login again in Users and Groups Also before with old username, I could access sudo. How to gain back sudo access. I went into Users and Groups --> Unlocked successfully --> Changed Account Name --> Restarted mac.   tried to get sudo access to one of the hidden files.     got error [myname] is not in the sudoers file.  This incident will be reported. cant logo in my Users and Groups again   I have also tried su -, vi /etc/sudoers, sudo -v, sudo dscl .   -merge /Groups/admin GroupMembership <username> Password: <username> is not in the sudoers file.  This incident will be reported.     dscl . -append /groups/admin GroupMembership USERNAME <main> attribute status: eDSPermissionError <dscl_cmd> DS Error: -14120 (eDSPermissionError)   ok just found out i have two users   su OLACCOUNTNAME     bash-3.2$ sudo dscl / -append /Groups/admin GroupMembership OLACCOUNTNAME     OLACCOUNTNAME is not in the sudoers file.  This incident will be reported. dscl . -read /groups/admin GroupMembership GroupMembership: root   su NEWACCOUNTNAME Password: su: Sorry   *It never asked me to change password or add a new one for this user.  su OLDACCOUNTNAME id -a uid=501(OLDACCOUNTNAME) gid=20(staff) groups=20(staff),701(com.apple.sharepoint.group.1),12(everyone),61(localaccounts),100(_lpoperator)  dscl . list /Users | grep -v '_' daemon blindshot nobody root

On my mac I have 2 accounts and the both are normal account. So in this moment I don't have a Administrator account, only one that was in the past a administrator, but now is not.  How I can have again a Administrator account?


I have read somewhere that when an object is approaching the speed of light then its relative mass is increasing by the formula $m=\frac{m_0}{\sqrt{1-(\frac{u}{c})^2}}$. Is this true? If yes then why this happens? Does an object really increase its mass when it has bigger velocity or it has to do with the mommentum? I am confused.If here on earth we measure 1 kg and then accelerate it at $u=c/2$ then its mass will be bigger?

I learned recently that when an object moves with a velocity comparable to the velocity of light the (relativistic) mass changes. How does this alteration take place?


I just installed Ubuntu on my MSI ge60-20c and recognized the wireless-driver not working well. After some searching I found out it's a common problem and some people managed to get a proper driver working. Though I couldn't find any driver working for 3.8.0-19-generic :(  Can you help me please?  PS: Ubuntu 13.04 - 64 bit  Greets

After lot of searching I found out that my Linux Kernel is 3.5.0-37-generic and I am unable to install my Wireless Lan Card Driver which is Realtek RTL8723AE. For some reason when I try to command make after downloading all those file by wget it shows 2 errors. I just upgraded my linux headers files last night. But it still did not worked for me right from the beginning even before the upgrade by the Update Manager. Can anyone help on this please??  It's really problematic as I need to login from other's computers to make this posts. If It still does not work, I guess I have to quit using Linux as I a PC is worthless without Internet.  Thanks in advance.


The issue with a title for a page in WordPress for categories (Displaying CategoryName Archives). If the category is Aptitude then page title shows Aptitude Archives. How to remove Archives from the title.

How I can remove word "Archives" in head title in category page? I'm using the Twenty Twelve theme and WordPress 4.   <head> <title>"name of category" Archives  | "name of sites"</title> </head>


It has happened a few times that I installed a tool through apt or by downloading a package, but I cannot figure out what the command is to use the new software. For instance, I recently installed openmcdf. I tried the command openmcdf to run the newly installed software, but of course that was not the right command. The right command as it turns out was structuredstorageexplorer which I found after much searching on the internet. So is there a tool for displaying the commands that have been enabled by installing a package? Something like:  list-programs-from-package openmcdf

I would like to know what some specific package installs, for example, when installing ncurses, I have found that TAB key expands:  sudo apt-get install ncurses-   to show:  ncurses-base      ncurses-doc       ncurses-hexedit ncurses-bin       ncurses-examples  ncurses-term   How could I know what, say, ncurses-term installs? I am interested mainly in programs, but libraries and any other filetypes could be useful too.  Command-line method, if possible, would be preferred (any others accepted too).


I want to know the difference between associate and assistant professor in terms of contract length, status and salary. And also how both positions are published and what's the recruitment process of each one mainly in Europe and Canada? What about lecturer positions in the US, could European PhDs land lecturer position in the US ? Thanks

What's the difference between an associate professor and an assistant professor?  What can one of them do that the other can't? and which is a higher level? can any of them supervise a PhD student?


I have a project with a material I want to add to my sphere. I want to add this logo onto the sphere. I have tried various ways of uv mapping but I keep messing up :/   This is my current material setup:    And here is what I would like to have:     EDIT:  I have now changed my setup like the answer stated, but my material still changes with the PNG, so it becomes black although my material is red  MY SETUP (NEW):  Something (probably a small setting) is stil wrong, but I can't figure it out.

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


How could I go about creating a heat distortion effect behind a jet in cycles? This is what I'm trying to achieve:

How can I make a  effect, like you might see around the exhaust of a jet engine?


I am trying to validate a phone number with the international validations. I am working on the french one currently. Here is what I have, it's not working. Any suggestions  <html> <head>  </head> <body> <form id="myFormId" method="post">     <label for="phoneId">Phone number</label>     <input type="text" name="phone" id="phoneId" maxlength="19" value="" />      <input type="submit" value="Submit" onClick="isValidPhonenumber()"/> </form>      <script> function isValidPhonenumber(value) {     return (/^\d{7,}$/).test(value.replace(/[\s()+\-\.]|ext/gi, '')); } </script> </body> </html>

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Trying to find the answer to this but all of the people I've contacted can't answer it. So I entered the Schengen zone on June 11th and then left June 23rd.  Now I'm living in Italy until December 8th--I will reach 90 days as of the 8th of December.  Technically, 180 days from June 11th is December 7th.  Does that mean I get another 13 days in Schengen zone after the 7th?   How does this work with the rolling 180 days?

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


Suppose $f(x)$ is continuous on $[a, b]$ with $f(x)\geq 0$ and such that $f(x) > 0$ for some $x\in\mathbb [a,b]$. Show that $\int_a^b f(x)\,dx>0$.

Let $a<b$ be real numbers. Let $f:[a,b]\to\mathbb{R}$ be a continuous non-negative function. Suppose $\int_{[a,b]}f=0,\text{ then }f(x)=0 \forall x\in[a,b]$    Proof: Suppose for the sake of contradiction $\exists x_0\in[a,b] \text{ such that } f(x_0)= D> 0$  Since the function is continuous at $x_0$, we have $$\forall \epsilon>0, \exists \delta>0 \text{ such that } |f(x)-f(x_0)|\leq\epsilon\text{ whenever } x\in[a,b]\cap(x_0-\delta,x_0+\delta)$$ choose $\delta=\delta_1$ such that $\epsilon=D/2$, then we can say: $$-D/2 \leq f(x)-f(x_0)\leq D/2$$ $$-D/2 \leq f(x) - D$$ $$f(x)\geq D/2>0$$ This implies that $\int_{[a,b]\cap(x_0-\delta_1,x_0+\delta_1)}f >0$  Now since $\int_{[a,b]} f = 0$. we have  $$\int_{[a,b]}f=\int_{[a,x_0-\delta_1]}f+ \int_{(x_0-\delta_1, x_0+\delta_1)} f + \int_{[x_0+\delta_1,b]}f=0$$ $$\int_{[a,x_0-\delta_1]}f+\int_{[x_0+\delta_1,b]}f<-D/2,$$ but this is a contradiction since $f(x)\geq 0$ and hence $\int_{[a,x_0-\delta_1]}f+\int_{[x_0+\delta_1,b]}f\geq 0$  Is my proof correct?


Pakettitietoja ei voitu alustaa  Pakettitietoja alustettaessa tapahtui virhe jota ei voitu korjata.  Ilmoita tästä virheraportilla paketille "update-manager", ja sisällytä raporttiin seuraava virheviesti:  E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/fi.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en, E:Pakettiluettelonn tai tilatiedoston avaaminen tai jäsennys epäonnistui.  English translation (using Google Translate) -     Package information could not be initialized      Initializing the package information An error occurred that could not   be repaired.      Report this error report package "update-manager", and include in the   report the following error message:      E:Encountered a section with no Package: header, E:Problem with   MergeList   /var/lib/apt/lists/fi.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en,   E:The package lists or status file could not be parsed or opened.

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


Is there a finite monoid with two elements $a$ and $b$ such that $ab = e$ but $ba \neq e$?

A  is a set $S$ together with a  $\cdot:S \times S \rightarrow S$ such that:   The binary operation $\cdot$ is associative, that is, $(a\cdot b) \cdot c=a\cdot (b \cdot c)$ for all $a,b,c \in S$. There is an identity element $e \in S$, that is, there exists $e \in S$ such that $e \cdot a=a$ and $a \cdot e=a$ for all $a \in S$.      Question:  Suppose, $x,y \in S$ such that $x \cdot y=e$.  Does $y \cdot x=e$?   This question was motivated by the question , where the author attempts to prove a special case of the above in the context of matrix multiplication.  It was subsequently proved, but the proofs require the properties of the matrix.  I attempted to use  to prove the statement.  Here's the input:  formulas(assumptions).  % associativity (x * y) * z = x * (y * z).  % identity element a x * a = x. a * x = x.  end_of_list.  formulas(goals).  x * y = a -> y * x = a.  end_of_list.   and it returned sos_empty, which, I guess, implies that no proof of the above statement is possible from the axioms of monoids alone.  I ran Mace4 on the same input, and found no counter-examples for monoids of sizes $1,2,\ldots,82$.  A comment by Martin Brandenburg  regarding K-algebras might also apply here.  For example, the property might be true for finite monoids, but not all infinite monoids.  A counter-example would (obviously) need to be non-commutative.


I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


What does "Play On Realms" mean? Does it need an Internet connection?  How can we play Realms? It asked me to sign up but when I did it said "Unable To Connect World."

How do I visit worlds on the 0.7.1 version of Minecraft PE?  I signed up for Realms and so did my friend and I want her to visit my world there but it says there is no available servers. What is Realms anyway – is it the new way to connect servers? Do we need to be on the same wifi system anymore?


I ran into an issue where bc does not have boolean expressions in the AIX system. Wondering if there is a replacement command so I don't have make my code any longer? This is in a bash script.   Here is what I had:  percent=-0.17 max=0.20 if [[ $(bc <<< "$percent <= $max && $percent >= -$max") -ge 1 ]]; then     echo "Under the $max acceptable buffer: File ACCEPTED"  else     echo "Over the $max acceptable buffer: File REJECTED"     exit 1 fi   This is my output:  ++ bc syntax error on line 1 stdin + [[ '' -ge 1 ]]

To compare float values below command is working fine in bash, But not working in ksh on AIX.  if (( $(bc <<< " 5.3 >= 5.3") ));then echo "hi";else echo "bye";fi`,   I had tried in so many ways, can someone suggest me to achieve this.


Whenever I try to play media file, it says "required plugins couldn't be found"..... I installed Ubuntu via flash drive...how can I install MPEG-1 Layer 3 (MP3) decoder? I just installed Ubuntu and still am rookie at it.

I'm new to Ubuntu. I tried installing it with Windows 8.1, but failed I lost all my files.  I have successfully formatted my PC and installed Ubuntu, but how do I install codecs to play audio and videos files ?


A Solid-state drive consists of Flash-EEPROM (electrically erasable programmable read only memory) which is is build up of FGMOS (Floating-Gate metal–oxide–semiconductor field-effect transistor). With the MLC (multi-level-cells) technology a cell can be changed  until the isolation of the floating gate is destroyed. If a cell is ruined there are about 10% extra cells which will will be selected by the SSD-control unit to replace the broken cells.   So is there a way to find out how many cells have been replaced (are broken) and how many cells for replacing broken cells are left? (Windows/Linux)

As far as I know, the only con against switching to an SSD except its price is the tendency to fail soon (relatively to conventional HDDs) in case used in active read-write operation. Is there an efficient way to predict the failure?


From everywhere I’ve read, they say that I’m suppose to uncheck the “Prefer opening messages in split view when in full screen” option and it’ll go away but it doesn’t. Any help?

When I am doing some work on my macbook pro, Mail app's main window keeps popping up in the background, it even pops up when I watch movies by interrupting full screen. This is so frustrating, I can't find out solution to this, googled and went to many discussion forums, no luck, suggestions that I found are very old and outdated. Has anyone faced similar issues or does anyone knows solution to this?


According to , the way to search is     Enter search terms in the search box that appears in the upper right corner of every page   However, the search box in the new top bar is in the center-left, not on the right. .

The page  says:      Enter search terms in the search box that appears in the upper right corner of every page    But the box is not there.


I have found this list of densities here:   and I am looking for the density of quarks but I have not found it. I was wondering if Black Holes could be some kind of quark plasma (QGP). Is this possible?

I heard on a podcast recently that the  at the centre of some galaxies could have densities less than water, so in theory, they could float on the substance they were gobbling up... can someone explain how something with such mass could float?  Please see the below link for the podcast in question:


So I'm learning Servlet and JSP and I'm trying to send a String name to my jsp using RequestDispatcher but I'm getting java.lang.NullPointerException DemoServlet.java package com.shubhankar;  import java.io.IOException;  import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/DemoServlet") public class DemoServlet extends HttpServlet {          protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException     {         String name ="Harmless";         request.setAttribute("label", "Harmless");         RequestDispatcher rd= request.getRequestDispatcher("index.jsp");         rd.forward(request, response);              }    }    index.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <%          String name=request.getAttribute("label").toString();         out.println(name); %> </body> </html>

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?


How would one solve for x in the following equation:  $x^{x^{x^{x^{\cdots}}}} = 4$  The exponent continues forever... So what is the value of x?  Thank you for helping

What is  $x$ when is satisfies $x^{x^{x^{\dots}}}=2$ ?   I am really confused with this; the root is $\sqrt{2}$, but why does the equation $x^{x^{x^{\dots}}}=4$ have the same root?


I am planning to travel India on march 30 through Lufthansa airlines via Munich and and I will return on April 16, the thing is, my F1 visa valid till June 30,2020 only. are we OK to travel to India via Germany with 80 days of visa validity and I have valid I-20 with Sevis active, I would be more helpful if some one helps.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I usually see this one when it comes to probability.  What notation is this and how can I do it on latex?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


So Rey and Finn are being attacked by the First Order storm troopers and they are running away. They first go for a spaceship that gets blown up, then they head for the Millennium Falcon and proceed to steal it (despite Rey calling it "garbage").                                  But after they steal it, Unkar Plutt runs out and screams "THAT'S MINE!!!!"  So if the ship was actually worth something, did it have any sort of anti-theft device? Because they seemed to just walk on the ship and fly away. Considering what kind of place Jakku was, it is a wonder it was not stolen earlier.

Throughout both continuities, we see many times that stealing ships is exceptionally easy, as they appear to only rarely be locked, and to not require keys, passcodes, etc. to fly them.  A few examples:   In the Knights of the Old Republic series, the Ebon Hawk is infiltrated or broken into by a stowaway, the Handmaiden and a gang of criminals, respectively. In The Phantom Menace, Anakin and R2-D2 are able to jump in a starfigher that apparently features a security system so weak that they accidentally fly it away.  In the Star Wars: The Clone Wars pilot movie, Anakin and Ashoka are easily able to take over The Twilight, granted the door was already open. In the episode Twilight if the Apprentice, of Star Wars: Rebels, Chopper is able to enter and pilot the Eighth Brother's ship and      Maul is able to steal a TIE Advanced.  In The Return of the Jedi, Luke is able to take an Imperial Shuttle and fly it away.     (Anakin was dead at this point, so he wouldn't have been able to help.)  In The Force Awakens, Finn and Poe were able to steal an Elite TIE-Fighter (though this one was at least connected by a cable, it still apparently had no security systems more advanced than that of a pen at a bank). We also learn that the Millennium Falcon has been stolen four separate times since Return of the Jedi.    Why aren't ships in Star Wars locked? And why can just about anyone fly them? Wouldn't people like Han, who obviously cares immensely about his ship, add some advanced security systems, or at least make the ship require keys or something?


I have a constructor looks like this:  MyClassName(File f) throws Exception;   and a txt file looks like this:  . . . . . . . . . . . x . . . . x x . . . . . . . . . . . .   When open the file, how do I convert it to a String?   Like this:  ". . . . .\n . . . . .\n . x . . .\n . x x . .\n . . . . .\n . . . . .\n"

I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited.  Is there a better/different way to read a file into a string in Java?  private String readFile(String file) throws IOException {     BufferedReader reader = new BufferedReader(new FileReader (file));     String         line = null;     StringBuilder  stringBuilder = new StringBuilder();     String         ls = System.getProperty("line.separator");      try {         while((line = reader.readLine()) != null) {             stringBuilder.append(line);             stringBuilder.append(ls);         }          return stringBuilder.toString();     } finally {         reader.close();     } }