The following sequence has to be printed.    12345   2345   345   45   5     This can be done using one loops or two loops, but surprisingly when I use two loops, it takes a lot more time.  Here is what I have done. One loop way: //Prints are commented so that outputs are easily visible public void generateSequence1(int num){         long timeStarted = System.currentTimeMillis();         for(int j = 1, i= 1; i<=num && j<= num; ){             i++; //            System.out.print(i++);             if(i==num+1){                 i = ++j; //                System.out.println();             }          }         System.out.println("Using 1 loop, time taken: " + (System.currentTimeMillis() - timeStarted));     }  Here is the Two loop way public void generateSequencePlainWay(int num){         long timeStarted = System.currentTimeMillis();         for(int i = 1; i<= num; i++){             for(int j = i;j <= num; j++){ //                System.out.print(j);             } //            System.out.println();         }         System.out.println("Using 2 loop, time taken: " + (System.currentTimeMillis() - timeStarted));     }  Now when I call the methods TestConducts tc = new TestConducts();         tc.generateSequencePlainWay(50000);         tc.generateSequence1(50000);  The output is as follows.(I fluctuates a bit each time, but almost the same)  Using 2 loop, time taken: 668 Using 1 loop, time taken: 7  Both these methods have n*(n-1)/2 operations. Then why such a huge time difference? Am I doing something wrong? Or this is the way it should be?And which way is better?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I was writing an article and try to insert an image with a caption. So first I used the following codes,  \flashright \includegraphics[scale=0.25]{cantor.png}   which results in     Then I wanted to add a caption below the image, so I used the following codes  \begin{figure} \flushright \includegraphics[scale=0.25]{cantor.png} \caption{cantor set} \end{figure}   which gave me,    So my question is how can I fix this large gap and make the things look like the first image with the caption underneath the image?

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I would like to redirect to a certain folder based on the REMOTE_USER value, so:  http://example.com/files   would redirect to:  /data/files/charlie/uploads   if the REMOTE_USER value was 'charlie'.  I've tried many things, including this:  RewriteCond %{LA-U:REMOTE_USER} !^$ RewriteRule ^/files/(.*)$ /data/files/%{REMOTE_USER}/uploads/$1 [PT]   but nothing works. I get infinite loops and 404s.  I looked at <If> but it seems REMOTE_USER is not available during <If> evaluation.  [EDIT:]  Current attempt, which results in a redirect loop for http://example.com/files/ looks like this:  # if REMOTE_USER is not empty string RewriteCond %{LA-U:REMOTE_USER} !^$  # eg /files/foo -> /data/dev/uploads/charlie/foo RewriteRule ^/files/(.*)$ /data/dev/uploads/%{LA-U:REMOTE_USER}/$1 [PT,L]  #...  <Directory /data/dev/uploads>     AllowOverride all     AuthType Basic     AuthName "Restricted Content"     AuthUserFile /etc/apache2/.htpasswd_dev     Require valid-user </Directory>   Entire conf file:  <VirtualHost *:80>     ServerName example.com     ServerAdmin admin@example.com      DocumentRoot /usr/local/www/example.com/public_html      ErrorLog /usr/local/www/example.com/logs/error.log     CustomLog /usr/local/www/example.com/logs/access.log combined     ErrorLogFormat "%{c}t %M"      Header set Access-Control-Allow-Origin "*"     Header set Origin "http://example.com"     Header set Accept "Authorization"      ExpiresActive on      <FilesMatch "\.(html|htm|js|css|ico)$">         # Header set Cache-Control "max-age=31536000"         Header set Cache-Control "must-revalidate"         # ExpiresDefault "access plus 4 hours"     </FilesMatch>      WSGIScriptAlias /api /usr/local/www/example.com/server/server.py     WSGIPassAuthorization On     WSGIDaemonProcess example.com threads=15 python-path=/usr/local/www/example.com/server     WSGIProcessGroup example.com      Alias /files /data/dev/uploads     Alias /files/ /data/dev/uploads/      RewriteEngine On      # if REMOTE_USER is not empty string     RewriteCond %{LA-U:REMOTE_USER} !^$      # eg /files/foo -> /data/dev/uploads/charlie/foo     RewriteRule ^/files/(.*)$ /data/dev/uploads/%{LA-U:REMOTE_USER}/$1 [PT,L]      RewriteRule ^/play/(.*)$ /api/play/$1 [PT]     RewriteRule ^/screen/(.*)$ /api/screen/$1 [PT]     RewriteRule ^/static/(.*)$ /static/$1 [L]     RewriteRule ^/(list|edit|help|view).*$ /index.html [L]      <Directory /usr/local/www/example.com/public_html>         Require all granted     </Directory>      <Directory /usr/local/www/example.com/server>         Require all granted     </Directory>      <Directory /data/dev/uploads>         AllowOverride all         AuthType Basic         AuthName "Restricted Content"         AuthUserFile /etc/apache2/.htpasswd_dev         Require valid-user     </Directory>  </VirtualHost>   OK, this almost works:  RewriteRule ^/files$ /files/%{LA-U:REMOTE_USER} [PT,L]  Alias /files /data/dev/uploads  <Directory /usr/local/www/example.com/public_html>     Require all granted </Directory>  <Directory /usr/local/www/example.com/server>     Require all granted </Directory>  <Directory /data/dev/uploads>     Options +Indexes     AllowOverride all     AuthType Basic     AuthName "Restricted Content"     AuthUserFile /etc/apache2/.htpasswd_dev     Require valid-user </Directory>   This seems to work:  RewriteCond %{LA-U:REMOTE_USER} !^$ RewriteRule ^/files/?$ /files/%{LA-U:REMOTE_USER} [PT,L]  Alias /files /data/dev/uploads  <Directory /data/dev/uploads>     AllowOverride all     AuthType Basic     AuthName "Restricted Content"     AuthUserFile /etc/apache2/.htpasswd_dev     Require valid-user </Directory>   [PT] is to allow the Alias to pick up the redirection, although I'm not sure that's how it works...

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I had an older SSD that I installed Windows 8 on while waiting for a newer, larger SSD. I'd like to move the OS onto the larger SSD.  Windows Vista and Windows 7 came with a "Complete PC Backup" feature which essentially created a disk image, which could be restored using Windows installation media.  Does this feature still exist in Windows 8? If so, how can I access it?

In Windows 7 you could create a system image that you restore later on in the Backup and Restore options:    However Backup and Restore options have changed in Windows 8. They look like this now:    Is it still possible to create a system image so that I can restore it later on or has this  feature been removed?


I have a javascript code (business logic) runs on client side, i want the same logic to execute from windows service (C# code), instead of re-writing those complex javascript code to C#, is there any way to execute it from C# class itself. Because i want to run this code inside windows service

just wondering if anyone has ever tried embedding and actually integrating any js engine into the .net environment. I could find and actually use (after a LOT of pain and effort, since it's pretty outdated and not quite finished) spidermonkey-dotnet project. Anyone with experience in this area? Engines like SquirrelFish, V8..   Not that I'm not satisfied with Mozilla's Spidermonkey (using it for Rails-like miniframework for custom components inside the core ASP.NET application), but I'd still love to explore a bit further with the options. The command-line solutions are not what I'd need, I cannot rely on anything else than CLR, I need to call methods from/to JavaScript/C# objects.  // c# class public class A {     public string Hello(string msg)     {         return msg + " whatewer";     } }  // js snippet var a = new A(); console.log(a.Hello('Call me')); // i have a console.log implemented, don't worry, it's not a client-side code :)   Just to clarify - I'm not trying to actually program the application itself in server-side javascript. It's used solely for writing custom user subapplications (can be seen as some sort of DSL). It's much easier (and safer) to allow normal people programming in js than C#.


I have a lot of data objects, and I want to be able to generate a String representing each object, without implementing a toString method for each one.  I'm thinking of reflection for getting the fields and its values.  any other ideas?  thanks.

I was writing a toString() for a class in Java the other day by manually writing out each element of the class to a String and it occurred to me that using reflection it might be possible to create a generic toString() method that could work on ALL classes. I.E. it would figure out the field names and values and send them out to a String.  Getting the field names is fairly simple, here is what a co-worker came up with:  public static List initFieldArray(String className) throws ClassNotFoundException {      Class c = Class.forName(className);     Field field[] = c.getFields();     List<String> classFields = new ArrayList(field.length);      for (int i = 0; i < field.length; i++) {         String cf = field[i].toString();         classFields.add(cf.substring(cf.lastIndexOf(".") + 1));     }      return classFields; }   Using a factory I could reduce the performance overhead by storing the fields once, the first time the toString() is called. However finding the values could be a lot more expensive.  Due to the performance of reflection this may be more hypothetical then practical. But I am interested in the idea of reflection and how I can use it to improve my everyday programming.


So I'm trying to make a testfor command, here is the command:  /testfor @p[7586,198,698,r=1,name=BrodieBolt]   My problem is that the output says:  Invalid selector argument: '7586'   Can anyone help me with this?

I've been making a map for 1.10 and it's going great, but 1.11 shows great mobs to use for it. However, most things have channged in command syntax. For example, /kill @e[type=ArmorStand,r=6] is now /kill @e[type=Armor_Stand,r=6]  What about /testfor? I can't find a way to testfor a player to stand on a block and give them an effect.   What's is going on in this image is that a redstone clock is running into this command /testfor @a[1117,20,507,r=1] (if I was to stand on them cords the comparator would turn on and power that command block), but it only works in 1.10... from 1.11 snapshots, I've seen some errors of it, like it now needs to have {} at the beginning and end of it. (e.g. /testfor @a{[1117,20,507,r=1]})   It's still not working, though, so does anyone know how to get it to work?


If 2 copies of  are on the board would that mean that +1/+1 counters would bounce back and fourth to infinity?

Is a +1/+1 counter I get from, say Unleash or Undying different than +1/+1 from something like  or ?


Is it somehow possible to use a string as an actual variable name? Sothing like this:  $a = '$myvariable[\'subitem\']';   How can I convert variable $a in order to actually work with a variable   $myvariable['subitem'] ?   EXAMPLE:  $myvariable['subitem'] = "hello";  $a = '$myvariable[\'subitem\']';  // do somenthing with $a  echo $a  // outputs "hello" instead of $myvariable['subitem']

I've got a multidimensional associative array which includes an elements like  $data["status"] $data["response"]["url"] $data["entry"]["0"]["text"]   I've got a strings like:  $string = 'data["status"]'; $string = 'data["response"]["url"]'; $string = 'data["entry"]["0"]["text"]';   How can I convert the strings into a variable to access the proper array element? This method will need to work across any array at any of the dimensions.


I only have ubuntu 16 installed and I have somewhere along the line of formatting external drives, formatted what i think is my boot partition. Now when I boot my laptop i just sent straight to bios. I have tried boot-repair but to no avail and ran a smart(desktop utility) test and results can back as disk ok. Anyone have any suggestion as to how to recover this so I can boot ubuntu again, without a complete reinstall?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I'm supposed to instantiate an object by passing a double array containing values and invoke some methods and the results should come out on the console. My code:  public class Client {      public static void main(String[] args) {         RainLog log = new RainLog(1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0);         double[] inRangeValues = log.getInRange(0,0);         for(int i=0; i<inRangeValues.length; i++)         System.out.println(inRangeValues[i]);   } }   after running this appears on the console:   Exception in thread "main" java.lang.NullPointerException at comp125.RainLog.getInRange(RainLog.java:73) at comp125.Client.main(Client.java:7)   I click on:  at comp125.RainLog.getInRange(RainLog.java:73)   it directs me to my loop:  for(int i=0; i<data.length; i++)   which passed the JUnit test which I am not sure why. I am new to java and programming so not really sure where the problem is at.

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?


#!/bin/bash #... exec >> logfile #cmd   I guest it's save output. Could you expand it with the same example? Thank you very much!  I often use this command to list txt files:  find / -type f -exec grep -l "bash" {} \;   but I can't very understand too.    How can there be such good people in the world.very very moved!

Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to "foo" exec 3>&1 4>&2 >foo 2>&1  # ...  # restore stdout and stderr exec 1>&3 2>&4


I am trying to find the sum of the following series  $$\sum_{n=1}^{\infty} \frac{1}{n \cdot (n+1) \cdot (n+2)}$$  I've already figured it out that it converges and, as it looks like a telescoping series, I also tried decomposing it into partial fractions, which would be  $$\frac{1}{2n}-\frac{1}{n+1}+\frac{1}{2n+4}$$ But that doesn't seem to be helping me at all... Any ideas?

I got this question in my maths paper     Test the condition for convergence of $$\sum_{n=1}^\infty \frac{1}{n(n+1)(n+2)}$$   and find the sum if it exists.   I managed to show that the series converges but I was unable to find the sum. Any help/hint will go a long way. Thank you.


I've seen a few posts on the topic of "How to Increase Your Reputation" (e.g.  ), which say that editing is an important reputation-affecting factor, for example:     For users who don't have a lot of experience in programming and rarely answer questions, try editing posts.   However, I can't find any detail on that. I see that we get 2 reputation points when a suggested edit is "accepted" (approved), but I have some question apart of that:   Does the +2 rep apply to any edit that I do to someone else's question, answer, or comment? Does editing (or deleting) my own questions/answers/comments affect my reputation? In terms of reputation, why is it important to "Edit, But Don’t Edit Too Much"?  As far as I know the only action of mine that can readily reduce my reputation is down-voting someone else's question/answer/comment...?

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


A number of sites have grown large enough and of high enough quality to warrant a full graduation, but due to bottleneck issues haven't gotten the shiny new coat of a fully fledged site yet. Where can I find a list of sites that fit in this category?  In particular, I'm curious whether the Music Stack Exchange site is on that list, but I would be interested in seeing a full list as well.

is now a Full Fledged Site! With a fancy new design! Congratulations to them.  Now we all want to know what the order of the remaining sites is...right? Who's next to get their fancy design out of the beta sites that are already scheduled for graduation?  There was some mentioning of the graduation queue by an SE employee in a comment thread under  a while ago, as well as the fact that this queue is ordered somehow:     Current list in the queue is: Salesforce, Expression Engine, Anime, Computer Science, Japanese, Cryptography, Movies, Blender, and English Language Learners.   ...   As far as I'm aware, it's ordered. Salesforce and Expression Engine are currently in progress.   From which Salesforce and Expression Engine already graduated in order, and now Movies & TV.  However, this comment is already some months old and the recent graduation of Movies & TV suggests that this ordering is not entirely strict. I'd thus like to know if there is any information how the graduation process proceeds. Which site will be next? Is this queue still valid or has it changed? Is it a reasonable hint at the order of graduation at all?  I am sure that the list has been updated as of right now it appears that these are the beta sites that are waiting on design:   Anime and Manga Code Review Computer Science Chemistry Japanese  Cryptography Blender English Language Learners Music   Is there an order?    Is there a timeline?    has been pointing to the idea that Design is something that floats on the wind and lands whenever the wind stops blowing.


Here is the formal statement:     Let $\lambda_1, \lambda_2, \lambda_3$ be distinct eigenvalues of $n\times n$ matrix $A$. Let $S=\{v_1, v_2, v_3\}$, where $Av_i = \lambda_i v_i$ for $1\leq i\leq 3$. Prove $S$ is linearly independent.    Many resources online state the general proof or the proof for two eigenvectors. What is the proof for specifically 3? I tried to derive the 3 eigenvector proof from the 2 eigenvector proofs, but failed.

Prove:     If $v_1,...,v_r$ are eigenvectors that correspond to distinct eigenvalues $\lambda_1, ...,\lambda_r$ of an $n \times n$ matrix $A$, then the set $\{v_1,...,v_r\}$ is linearly independent.   Please give an example and tell me how this theorem works!


I've written a function that turns a string into a vector. Now I want to make a template of the types, because I also want to use wstrings and wchar_t. Because they are in a csv file. Here are my files ... main.cpp #include <iostream> #include <fstream> #include "trans.h" #include "vector_to_string.cpp"  using namespace std;  int main() {     wifstream tstream("translation.csv");     wstring s;      while (getline(tstream, s)){         vector<wstring> vec = vector_from_string(s, ',');         wstring ws = vec[0];         Trans<wstring> t(ws);         wcout << t.translate(Spanish) << endl;      } }  vector_to_string.cpp template <class T, typename U> std::vector<T> vector_from_string(T to_vec, U delimit) {     int pos = 0, len = 0;     std::vector<T> vec;     for (int i = 0; i < to_vec.length(); i++) {         U c = to_vec.at(i);         if (c == delimit) {             vec.push_back(to_vec.substr(pos, len));             len = 0;             pos = i + 1;         } else if (i == to_vec.length() - 1) {             int end = to_vec.length() - pos;             vec.push_back(to_vec.substr(pos, end));         } else {             len++;         }     }     return vec; }  translation.csv # English , French, German, Spanish a,une,ein,UNE aa,aa,aa,Automóvil club británico aaa,aaa,aaa,aaa aaron,aaron,aaron,Aaron ab,un B,ab,Un B abandoned,abandonné,verlassen,abandonné abc,abc,ABC,a B C aberdeen,aberdeen,aberdeen,Aberdeen abilities,capacités,Fähigkeiten,capacités ability,aptitude,Fähigkeit,aptitud able,capable,imstande,capaz aboriginal,Aborigène,Ureinwohner,aborigène abortion,Avortement,Abtreibung,avortement about,à propos,Über,Al respecto above,au dessus de,über,au dessus de abraham,abraham,abraham,Abrahán abroad,à l'étranger,im Ausland,en el Extranjero abs,abdos,Abs,abdos ...  The problem is in vector_to_string () but I can't find the problem, and I get this syntax error ... undefined reference to `std::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > demonic::vector_from_string<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, wchar_t>(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, wchar_t)'  What is the problem and how can I best solve it?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm going to pick up someone from JFK terminal 1. I wanted to know whether I can use the AirTrain from any terminal on JFK to Jamaica station? Can I go through the terminal and use the AirTrain even if I'm not flying in or out of JFK?

I'm seeing a show in NYC on Sat. (driving in from Virginia) and looking for the best place to park, i.e. not NYC. My husband suggested parking at JFK Airport. Can I park there and take AirTrain to Howard Beach subway station if I'm not flying from JFK?


Everytime i render an image some if the render turns a little black is there a fix to this? If so please tell me!

When blender is rendering I can see my model but at the very end the render goes black and the image saves as a black image. I am using cycles. Any help would be awesome!


The German languages adds the uppercase form of the versal ß to it's alphabet now and I was wondering, how this specific letter is supported in LaTeX as well as what types of fonts provided in LaTeX can be used to print it.  Research only provides information about how to code the lowercase ß and not much else.  Is it actually supported yet or does it need to be implemented?

I am trying to get a ẞ in my LaTeX document. How can I do this? I already tried:   Using other fonts: dejavu and libertine Using \MakeUppercase{ß}, which sometimes produces nothing, sometimes produces "SS" Using {\sc ß}, which sometimes produces nothing, sometimes produces "SS" Using XeTeX and lualatex: Just leaves out ẞ and warns about the Glyph that it could not find Using \symbol{"1E9E}, which also produces nothing   How can I do this?


I want to create a simple function that returns a boolean value when the word "website" appears in a specific cell. When I run the debugger, matches returns undefined.   function myFunction() {   var url = ss.getRange(8,1).getValue().toString();    var matches = url.includes("website");   return matches;  }   Why doesn't my function return a boolean value?

I have successfully created . Handy to avoid multiple calls to GAS services whit ordinary getRange calls.  While the code perfectly works in javascript, it throws an error in Google Apps Script upon saving.  The offending code is:  return matrix.slice(startRow, endRow + 1).map(i => i.slice(startCol, endCol + 1))   GAS seems rejecting code in the .map function.


Many snap applications are on my ubuntu 1804. For a snap gimp, I edit and save the file to the /tmp/Untile.xcf. Meanwhile, a 1.jpg is also export to /tmp directory. The issue is that I can not find any 1.jpg, nor *.xcf, in the directory /tmp directory after saving. This is also the case for the donwload directory with snap chrome browser(It is the same when restting the download directory).

I have just upgraded to a recent version of Ubuntu that uses snap apps, and I have trouble understanding how I'm supposed to use them to work with files outside of /home. I have three disks in my machine, a large photo library on sdb, backup drives, and other things; as snap apps are thus confined, they can not access any of them.  Only solution I can think of, is to bind mount everything to some folder under /home but that seems like a terrible thing to do every single time I want to look at a file. Searching the web brings up blog posts about snap interfaces and snap connections but it is unclear to me if that could be helpful.  So the question is: what is the intended method for using snap apps to work with files stored outside of /home?


Let $x, y, z, a, b, c, d$ be vectors, and $t,s$ be scalars.  Let line segments be $y = a + bt, \ t \in [0,1]; \ \ z = c + ds, \ s \in [0,1]$.  The distance $d(z(s), y(t)) = \sqrt{(z(s)- y(t))\bullet (z(s) - y(t))}$.  How do I minimize the distance and output two points one for each segment.  If there are an infinite number of solutions, make a "nice-looking" line between the segments, such that if they are paralell and form the sides of a rectangle, then the line is just the line that splits the rectangle.  Then choose the output points to be the ends of this beautiful line.  Algorithm?  How do I solve this?  Calculus?

I am looking for a general formulation to find the closest points on two line segments. What I was thinking about is to define our lines as:  $$ P1 + s  (P2-P1)$$  $$ Q1 + t  (Q2-Q1)$$  Where $P1 , P2, Q1$ and $Q2$ are the beginning and the end points on each segment.  Now we should go through an optimization problem as: $\min f(s,t)$ such that $0<s<1$ and $0<t<1$.  Where $f(s,t)$ is the point-to-point distance function.  Is there any straight forward solution?


What if we are so used to the curvature of space caused by mass and the range of its effects that we totally ignore the possibility of the existence of "opposite" curvature1, i.e. objects that bend space opposite to mass and cause repulsion by creating local space anisotropy?   What if we are so used to space curvature caused by mass that we invent a force that has no charge to explain possible effects of opposite curvature (repelling force - diamagnetism)?   What if the oscillating electric field has the ability to cause tiny local (anisotropy) fluctuations in space and its effects on objects are interpreted as "magnetic field"?  Could magnets be just an example of objects with anomalous gravitational fields due to their ability to distort the isotropy of space?  I guess my question boils down to:   How do we know that the force at the poles of a magnet is not gravitational (large but local curvature caused by anisotropy) with opposite signs, rather than what we call magnetic?  Can space curvature arise from something else different than mass?  What would change on the r.h.s of the Einstein's equation (components of stress-energy tensor) if we assume a connection with torsion?    1. Same size of the volume element $dV$, but with stretch in one element, say $dx$ and proportional compression in the other two $dy$, $dz$.

Electric monopoles do exist, but why cannot magnetic monopoles exist?    The question is closed because I need to clarify it, but I don't know how I could ask it another way. However, I've recieved many answers that were appropiate and added something to my knowledge, so I consider it answered.


This question is not about the reopen reviews, from which we have 20 (in the improbable case of a review queue size > 1000, we would have 40). This question is not about the close votes (from which we have 24, except SO where we have 50), and also not from the close reviews, from which we have 20 (if the queue size >1000, we have 40). Although it seems possible that the reopen votes are handled similarly to the close votes, there is no guarantee for that.   Although most of the reopen votes are cast in the frame of a reopen review, it is not always the case. As we know, reopen votes can be cast also from any reopen view independently. It is not clear, how many time is it possible. I suspect, it could have a similar limit as we have with the close votes.  How many reopen votes do we have per day?

What limits are there on how I can vote?  How often can I vote? How do my votes become locked/unlocked?


How can I evaluate the following? $$\int_0^1 \frac {\arcsin(x)}{x}dx.$$   Could not find a primitive, so I went for some other methods like arranging it as a double integral or introducing a parameter, but it was in vain...

$$\int_0^1 \frac{\arcsin(x)}{x}dx$$  This is a proposed for a Calculus II exam, and I have absolutely no idea how to solve it. Tried using Frullani or Lobachevsky integrals, or beta and gamma functions, but I can't even find a way to start it. Wolfram Alpha gives a kilometric solution, but I know that cannot be the only answer. Any help appreciated!


i start a learning JSP from a few days and then i face a problem at useBrean when i run my prog the console show this problem .i saw many solution and i tried all but any solution did not solve that prob . so, i requested to everyone please give me solution as soon as possible. SEVERE: Servlet.service() for servlet [jsp] in context with path [/Bean_Example] threw exception [/userDetails.jsp (line: [10], column: [0]) The value for the useBean class attribute [ begineerbooks.com.Details] is invalid.] with root cause org.apache.jasper.JasperException: /userDetails.jsp (line: [10], column: [0]) The value for the useBean class attribute [ begineerbooks.com.Details] is invalid. package begineerbooks.com;  public class Details {           private String name,password;     private int age;     public String getName() {         return name;     }     public void setName(String name) {         this.name = name;     }     public String getPassword() {         return password;     }     public void setPassword(String password) {         this.password = password;     }     public int getAge() {         return age;     }     public void setAge(int age) {         this.age = age;     } }   and then <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title>   <form action="userDetails.jsp"> Name : <input type= "text" name = "name">
 Password: <input type= "password" name = "password">
 Age: <input type = "text" name = "age">
 <input type = "submit" value = "Submit">  </form>    and <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title>   <jsp:useBean id="userinfo" class = " begineerbooks.com.Details"></jsp:useBean> <jsp:setProperty property="*" name="userinfo"/>
your enry sid here
 <jsp:getProperty property="name" name="userinfo"/> <jsp:getProperty property="password" name="userinfo"/> <jsp:getProperty property="age" name="userinfo"/>

I want to use a Java file SaveProp which is written in a package user. The class file has been placed in WEBINF/classes. Below are the two lines which cause the issue.  jsp:useBean id="user" class="user.SaveProp" scope="session"  jsp:setProperty name="user" property="*"   It throws:  The value for the useBean class attribute user.SaveProp is invalid   I'm using Tomcat 6.0.


I recently (an hour or so ago) downvoted  (which had been at a score of 0 before my downvote, in case that's relevant), and I saw my Meta.SE rep go from 101 to 100 (and got a notification in the "trophy" menu that I had lost 1 rep point).  This is contrary to what I had previously believed: that downvotes in Meta cost no rep either for the votee or for the voter. Did that change recently?

After spending some time on Meta Stack Overflow, I realized the voting system here is . The votes are used for agreement or disagreement toward the question/request and the answer itself instead of quality. However, by downvoting a post, it will also decrease one's reputation at the same time, which will result in a lost of privileges such as downvoting other's post. This behavior of the system seems to tie "how many people agree to you" and "what you can do" together. It is basically saying if many users do not agree to you, you will not be able to express your opinion and disagree with other's idea. I don't see any logical relation between these two. Furthermore, .  Voting up or down does not affect reputation. You are now free to vote purely based on post content, without worrying about how your vote might positively or negatively affect someone’s reputation score.  This makes sense because why on earth would reputation be tied with expressing opinion? Jon Seigel in  offered an "explanation" on why the rep system on meta SO shouldn't be changed:  ... there is a penalty for downvoting, but you get upvoted more here, too, so you have more rep to work with.  This clearly does not explain why downvoting causes a decrease in reputation. In the Stack Exchange system, reputation is an numeric indicator of how trusty and experienced a user is. So does this mean a person with more people agreeing is way more "trusty" than another person with people disagree his questions even though it is a completely good question? Clearly there is something wrong with the system in meta SO, and I believe that it should be modified to remove the rep decrease when voted down, for both voter and poster.


Proof conclusion: Let m,n,s $\in$ $\mathbb{N} $\ $\{0\}$. Prove that $s| \tau(m^{s}) - \tau(n^{s})$, where $\tau$ is the divisor function.  Hello so my question is that, I've gotten to the point in the proof where I had used the divisor function definition and have $\tau(m^{s})$ = $\prod$ something +1 , and $\tau(n^{s})$ = $\prod$ something +1.   I know, that since the last terms of both polynomials are equal to 1. Somehow this results that $s| \tau(m^{s}) - \tau(n^{s})$.   But I don't understand why the +1 would indicate that: $s| \tau(m^{s}) - \tau(n^{s})$ holds.

Proof conclusion to: Let m,n $\in$ $\mathbb{N}$ $\backslash$ $\{0\}$ . Prove that $s |\tau (m^{s}) - \tau(n^{s})$, where $\tau$ is a divisor function.   Hello, so I have a tiny question about the summarization of my proof.  I got to the point where I defined my $\tau$ divisor function and got them both $\tau(m^s)$= $\prod$ something +1 and $\tau(n^{s})$ = $\prod$ something +1.    I've noticed that the last terms of the polynomial are both one. Why is it with the +1 part, I can conclude with that:  s| $\tau(m^s)$ - $\tau(n^s)$.   The line for why that is, isn't quite clear.


In comparison with Beauxbatons Academy of Magic, I could not determine what the Houses are nor how the Sorting happens at the Durmstrang Institute Wizarding School. Does anyone have any ideas? If not, are there presumptions or have suitable names ever been created?

At Hogwarts, there are four houses: Slytherin, Gryffindor, Hufflepuff, and Ravenclaw.  Do any of the other wizarding schools, like Durmstrang or Beauxbatons, sort their students into separate houses?


My background : I'm currently in my junior year in college majoring in astrophysics. I have taken GR, and some intro cosmology here and there, but nothing in great depth.   I had my heart set on taking a full physical cosmology class this spring. As luck would have it, I can't take the physical cosmology class due to scheduling conflict ! I intend to proceed to graduate school in astrophysics, so I would have to take the graduate level cosmology then, but in the mean time, I was thinking of teaching myself undergrad cosmology out of Barbara Ryden's book.   My question is : any advise for undergrads teaching themselves this subject matter ? Are there any "go to" resources? is Ryden a good choice?

I have finished Carroll's general relativity book, Spacetime and Geometry. I am specifically interested in cosmology, so is there any book which goes more in depth into cosmology? I prefer a mathematically rigorous book, which goes beyond the cosmology chapter in Carroll's book. The Big Bang and inflation theory should be dealt with in depth.


I had my php_errors.log file fill up the system, I deleted the error logs, but when I type  df -h www/folder_name Filesystem      Size  Used Avail Use% Mounted on bindfs          7.8G  7.4G  379M  96% /www/folder_name   How do I clear it up

I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df tells me that the disk is 100% full. If I delete 1G this is correctly shown.  However, if I run a du -h -x / then du tells me that only 12G are used (I use -x because of some Samba mounts).  So my question is not about subtle differences between the du and df commands but about how I can find out what causes this huge difference?  I rebooted the machine for a fsck that went w/out errors. Should I run badblocks? lsof shows me no open deleted files, lost+found is empty and there is no obvious warn/err/fail statement in the messages file.  Feel free to ask for further details of the setup.


I don't know why the regex patterns was not working ! I couldn't find any error ! But when i run this with wrong input it just skips the pattern test line and moves to the next page !  <!DOCTYPE html>       <title>Validation</title>             <form name="myform" action="number.php" onsubmit="return validate()">     Email:<input type="text" name="email"/>
     Password:<input type="text" name="pass"/>
     Phone:<input type="text" name="phno"/>
     <input type="submit" value="submit"/>     </form>     I expect the alert validation failed, if I give any input that mismatch the pattern.

Is there a regular expression to validate an email address in JavaScript?


I would like to know how I could traverse back my navigating history. I remembered an old question I did not have an answer to, but I just discovered an answer about it and I cannot find it again.  Is there any feature similar to the history in Google Chrome, to explore recently visited questions?

On your user profile page there are six (6) tabs; stats, activity, reputation, favorites, prefs and accounts.  I would like to see in a new tab, maybe named 50 latest viewed questions, which would contain the 50 latest viewed questions.  This would help when I want to follow a question but don't want to bookmark it or add it to my favorites list.   Sometimes, or a few hours later, I can't even find it again. I think this would be good for when you're viewing questions at work and want to check it up at home but can't because it's not in the same browser history.


I am referring to the part of proof by mathematical induction where you show that "if it is true for one value k then it is true for the value k+1". Does proof by induction work over all real numbers? I mean by considering any arbitrary change, say "delta-x", and seeing whether (it is true for the value x) implies (it is true for the value x+"delta-x");  or is this flawed in some way.

One of my Fellows asked me whether total induction is applicable to real numbers, too ( or at least all real numbers ≥ 0) . We only used that for natural numbers so far.  Of course you have to change some things in the inductive step, when you want to use it on real numbers.  I guess that using induction on real numbers isn't really possible, since $[r,r+\epsilon]$ with $\epsilon > 0$, $r \in \mathbb R$ is never empty.  Can you either give a good reason, why it isn't possible or provide an example where it is used?


I uploaded a website 7 days ago. The website contains Arabic Language and other languages also(in DATABASE). I used <meta charset="UTF-8"> for encoding in php pages and the Database was also uploaded in UTF-8 Everything was fine and I edited the files and pages several times the last 7 days, everything was fine. But it's changed automatically as you can see some queries from database below:  INSERT INTO `languages` VALUES ('2', 'es', 'EspaÃ±ol', '1'); INSERT INTO `languages` VALUES ('3', 'sq', 'Shqiptar', '1'); INSERT INTO `languages` VALUES ('4', 'ar', 'Ø§Ù„Ø¹Ø±Ø¨ÙŠØ©', '1'); INSERT INTO `languages` VALUES ('5', 'be', 'Ð±ÐµÐ»Ð°Ñ€ÑƒÑÐºÑ–', '1'); INSERT INTO `languages` VALUES ('6', 'bg', 'Ð±Ð°Ð»Ð³Ð°Ñ€ÑÐºÑ–', '1'); INSERT INTO `languages` VALUES ('7', 'ca', 'CatalÃ ', '1'); INSERT INTO `languages` VALUES ('8', 'zh-CN', 'ä¸å›½ç®€ä½“', '1'); INSERT INTO `languages` VALUES ('9', 'zh-TW', 'ä¸åœ‹å‚³çµ±', '1'); INSERT INTO `languages` VALUES ('10', 'hr', 'Hrvatski', '1');   and so on...  But it was fine before but now it's like this, I opened the SQL file in notepad still got the same result.  Please help! :'(

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Is there a programmatic (or otherwise portable) way to convert E00 ArcInfo interchange files into ESRI format?

I can easily read e00 files with QGIS and it seems as if in older versions of ogr there was driver support for the arc/info e00 file format. Nowadays that seems to be deprecated, as running ogrinfo --formats doesn't list arc/info.  I also found this useful , a general description of the file format. Based on that information I would be able to write my own program to put all the pieces together. But hey, this must have been done before, right?  Can somebody point me into the right direction?


This question  is problem 562 taken from  from Lunts Aramovich and Volkovyskii: A Collection of Problems on Complex Analysis; the first hint is clear enough but I am stuck with the second hint: I want to prove that given $f(z) =\sum_{n \geq 0 } c_n z^n $ and $z_0$ verifying $f(z_0) = 0$, $|z_0| \geq \frac{\rho|c_0|}{M+|c_0|}$ if $M = \sup_{|z|=\rho} |f(z)|$ . First, the authors consider $D = \{ z / |f(z) - c_0| <|c_0| \}$ which is zero free for $f$; this is easy; then  $|f(z) - c_0|$ is to be evaluated using Cauchy's inequalities; I take $\zeta$ outside $D$; it is then possible that $f(\zeta) = 0$ and $M + |c_0| \geq |f(\zeta) - c_0| \geq|c_0|$. What to do next is a mistery for me.

Let $f(z)=\sum\limits_{n=0}^{\infty} a_n z^n$ be an analytic function in $|z|\leq R$, such that for all $z$, $|f(z)|\leq M$. Let $z_0$ be one of $f$'s zeros such that for all other zeros $z$, $|z_0|\leq |z|$. Let's write $d=|z_0|$. Show that $d\geq \frac{R|a_0|}{M+|a_0|}$.   I tried several directions here. For example, I used Cauchy's theorem to write out:  $$f(z_0)=\int\limits_{|z|=R}\frac{f(z)}{z-z_0}dz$$  such that: $$0=|f(z_0)|=\left|\space \int\limits_{|z|=R}\frac{f(z)}{z-z_0}dz\right|\leq 2\pi R\cdot \frac{M}{R-d}$$  I also tried looking at the circle $|z|<d$, such that since $z_0$ is $f$'s closest circle then, for all $|z|<d$, $f(z)\neq 0$. I used Cauchy's theorem here to show that:  $$\forall |z|<d, 0<|f(z)|=\left|\space\int\limits_{|\xi |=d}\frac{f(\xi)}{\xi-z}d\xi\right|\leq 2\pi d \cdot \frac{M}{d-|z|}$$  This didn't yield any results.  In order to get $a_0$ into this equation, I tried to say that this is in particular true for $z=0$, such that:  $$|a_0|=|f(0)|\leq 2\pi d\cdot \frac{M}{d}$$  But this didn't yield any results.   What would be a good direction for this type of question?


I want to select only One row of table using apex:selectRadio.. please share some code or helping link if any.. Thank You.. when i click or check one radio button other should be unchecked according to my requirements ..     Apex Controller    public class table {     public list  emp;     public table()     {         emp= [select id, name from employ__c ];     }     public list emp_p     {         get         {             return emp;         }     } }    VF Page      <apex:page controller="table">    <apex:form>  <apex:pageBlock>  <apex:pageblockTable value="{!emp_p}" var="e">  <apex:column headerValue="select">  <apex:selectRadio>  </apex:selectRadio>  </apex:column>  <apex:column headerValue="Name" value="{!e.name}"/>  </apex:pageblockTable>  </apex:pageBlock>  </apex:form>  </apex:page>

I have custom fields in contacts form named checkbox1__c, checkbox11__c, checkbox12__c, checkbox13__c.  When I check checkbox1__c then I want checkbox11__c,  checkbox12__c,  checkbox13__c to be unchecked.  When I unchecked checkbox1__c then I want checkbox11__c, checkbox12__c, checkbox13__c to be checked.  Is there any way to do this by using validation-rules? If not no way to this by validation-rules, then what is the best way to do this?


I have following time stamp in Integer form   1333125342   I can convert it using SQL:  select DATEADD(ss, FlOOR(1333089223/86400)*86400, '1970-01-01 00:00:00') AS Date     How to convert it in java? So that it would return value:  3/30/12 12:18:43 PM

I have a string containing the , and I need to convert it to a Java Date object.  String date = "1081157732"; DateFormat df = new SimpleDateFormat(""); // This line try {   Date expiry = df.parse(date);  } catch (ParseException ex) {   ex.getStackTrace(); }   The marked line is where I'm having trouble. I can't work out what the argument to SimpleDateFormat() should be, or even if I should be using SimpleDateFormat().


How  to install R software in ubuntu using terminal codes. I tried using sudo apt-get install R ?

I tried aptitude search r, but (unsurprisingly), there are waaaay too many results to sift through.


I'm trying to find a word that encompasses both these ideas. I thought pharisaic would be a bark up the right tree, but it appears to pertain more to hypocrisy and legalism.  Ideally the word should encapsulate the idea that some form of good is being displayed for the primary purpose of self-gain.  I understand that such an action could be hypocritical, but that word does not necessarily imply the act of doing good only for the praise it brings.  The Pharisees are a great example of this (with their ostentatious tithing), but the word named after them doesn't seem to have been applied to that aspect of their character.

There are many examples of this, and I'd like to give a few:   A person who puts a lot of effort to help the community and earns reputation points. But that reputation is the motivation behind helping the community, not because they really want to. A student approaches a professor, and helps them in their teaching and doing research in order to have a good LOR (letter of recommendation). To a SEO, the content of the website must be good (well, this one is a little tricky, but you get the spirit.)   I'm not saying that the reputation/LOR/high-ranked is not deserved. It is. I just want to focus more on the selfish reason(s) behind that.  Any kind of answer can be accepted: single word, phrase, proverb or idiom.


At installation it did not detect Windows. I mounted the Windows partition and have run os-prober with no results returning.  I am able to boot Windows or Ubuntu by specifying the partition in UEFI boot order. The bios does not appear to allow booting with legacy. SecureBoot is on.   This is with Ubuntu 12.04 LTS on a Inspiron 15.   Here is the gdisk:     1            2048         1026047   500.0 MiB   EF00  EFI system partition    2         1026048         1107967   40.0 MiB    FFFF  Basic data partition    3         1107968         1370111   128.0 MiB   0C01  Microsoft reserved part    4         1370112         2394111   500.0 MiB   2700  Basic data partition    5         2394112       544743423   258.6 GiB   0700  Basic data partition    6       606183424       625140399   9.0 GiB     2700  Microsoft recovery part    7       544743424       545230847   238.0 MiB   0700  (/boot)    8       545230848       556949503   5.6 GiB     8200  (swap)    9       556949504       606181375   23.5 GiB    0700  (/)   When installing ubuntu, I believe I specified that the bootloader be installed on /dev/sda.   I added the following to /etc/grub.d/40_custom but booting ubuntu did not offer a grub menu:  menuentry "Windows 8" { set root = "(hd0,4)"    chainloader +1    }   When booting I think I see "EFI Disk error" flash very quickly before Ubuntu starts booting.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Solve $$z^3 + 5z^2 + (9 - 5i)z + 10 - 10i = 0$$  I have never dealt with equations with complex numbers in them so this is interesting; first Ill expand.  $$ \implies z^3 + 5z^2- 5iz + 9z + 10 - 10i = 0$$  I am stuck again -_-  any ideas? Thanks!

For the complex polynomial $z^3 -5z^2 +(7-2i)z  +6i-3 = 0 $   $1)$ show that $2+i $  is a root.  $2)$ solve the given equation.  Attemp to solve: I'm not really sure how to solve this, but I considered using Vietes formulas to comstruct a system of equations with two unknowns, and from there to cacluate the roots.....I'm not sure how to do No. 1 though...  help with this would be appricated...


We have deleted a file by mistake, and now I don't know how to recover them.   How do I recover files from an SD card?

I have a 2 GB Kingston  card which is about three years old. I put it in a reader today in my Windows Vista computer, wrote a 32 MB file onto it, safely removed it, and then tried to read it elsewhere. Nothing. Putting it back in the Windows Vista computer it now says:     You need to format the disk in drive F: before you can use it.   What should I do? I have access to many computers and OSes if your recommendations need that. I would be very sad if I lost all the contents of the card. Most of the data is backed up, but there are a few things that aren't. :(  Doing a   # dd if=/dev/sdg of=~/tmp/sd.bin   gives me a 2 GB file, and  the file it seems like lots of my data is still there. How can I put it back together?


How to create folder shortcut in ubuntu 18.4  Do I need to install an app to do this?  thanks!

I am installing p4v in /opt, but /usr/bin is on my path.  Is it possible to create a soft or symbolic link for p4v from /opt to /usr/bin, so I can just type "p4v" since /usr/bin is in my path?


I am using either:  CAST( SUM(a.fieldmissed) AS decimal(18,8)) / SUM(a.fieldtotal) *100 AS [Deliveries Missed]   or  SUM(a.fieldmissed)*100.0 / SUM(a.fieldtotal) AS [Deliveries Missed]   to work out % values. However, is there a way I can restrict the output to two decimal places? Not essential but would be handy to know.  Any advice appreciated. Thanks very much.

How do you write a number with two decimal places for sql server?


consider the following sentence:  Once all data are collected, it is exported as ...  I am not sure whether it is correct to use the word 'it' in this context?

My non-native English speaking friend just asked me: "Data is..." or "Data are..."?  I said both but that's because I've been desensitized from reading/writing both (especially from writing code and adding quick comments).  My question: Is it acceptable to utilize either for a university paper? Or is one safer than the other (when confronted with stickler professors)?    Related questions:


I have a terribly limited download allowance and have multiple computers. So, my questions folks is. Would I be able to save what has been installed thru apt-get and any other terminal installations I attempt?

How can I store away the *.deb files from var/cache/apt/archives directory for future installation in case I need to reinstall the OS in ubuntu 11.10. I tried copying and saving  away but after OS reinstallation I tried reinstalling those deb files using "apt-get install file" but so many files were missed thought I copied everything. What am I missing, Please reply


MacOS Kindle version 1.12.0 no longer seems to keep downloaded books in the My Kindle Library location, no new files are showing up there. Does anyone know where they are being stored now? Without these files to find and remove the DRM for use on other non-kindle readers I'll probably just go back to finding my books on DRM free sites 8(

After I updated my Kindle for Mac app 2 mos. ago I can no longer find the azw book files on my Mac to convert them so I can read them on my KOBO ereader. I use to find them in a My Kindle Content file but that has disappeared. I have Ult. DRM & Calibre but they won't work without the azw files, and I can't find them on my mac anymore. Can anyone help me? The answers on this site about this are years old & do not apply to my problem.


I found this command line in a tutorial: gcc -o Client1 Client1.o CodeSample1.dll -lgdi32 -lm  and made me wonder when is possible to call a windows DLL from a linux client, or well, a Linux .so file from a windows client. Are there any constraints such as language, name decoration, etc?

We need to interface to 3rd party app, but company behind the app doesn't disclose message protocol and provides only Windows DLL to interface to. Our application is Linux-based so I cannot directly communicate with DLL. I couldn't find any existing solution so I'm considering writing socket-based bridge between Linux and Windows, however I'm sure it is not such a unique problem and somebody should have done it before. Are you aware of any solution that allows to call Windows DDL functions from C app on Linux? It can use Wine or separate Windows PC - doesn't matter. Many thanks in advance.


I want to use a method like this one:    public void A(Action<Action<string>> x) {     for (int i = 0; i < 10; i++)     {         x.Invoke(data => {              Console.WriteLine($"{data} --- {i}");         });     } }   The idea here is that the user (of this method) will input another method which can generate a string from a data source of preference. Let's say I want to provide the user with some built-in solutions as static methods:  public void B(string fileName, Action<string> y) {      // process fileName      string data = C(fileName);      // invoke inner action      y.Invoke(data); }   The use case would be:  A(B("/home/user1"));   The problem with this is B still needs another argument for fileName How do I do that?

Given a method DoSomething that takes a (parameterless) function and handles it in some way. Is there a better way to create the "overloads" for functions with parameters than the snippet below?  public static TResult DoSomething<TResult>(Func<TResult> func) {     //call func() and do something else }  public static TResult DoSomething<T0, TResult>(     Func<T0, TResult> func,     T0 arg0) {     return DoSomething(() => func(arg0)); }  public static TResult DoSomething<T0, T1, TResult>(     Func<T0, T1, TResult> func,     T0 arg0, T1 arg1) {     return DoSomething(arg => func(arg, arg1), arg0); }  public static TResult DoSomething<T0, T1, T2, TResult>(     Func<T0, T1, T2, TResult> func,     T0 arg0, T1 arg1, T2 arg2) {     return DoSomething(arg => func(arg, arg1, arg2), arg0); }


I have a sample size of 167.  In addition to DV, IV, and a moderator variable, I would like to use 6 variables.  Is it too many?  How do you determine acceptable numbers of covariates?   Also, fewer covariates can be a better study model or a worse model? I appreciate your opinions.  It is a hierarchical model, 1)covariates, 2)IV, moderator, 3)interaction.

Within the context of a research proposal in the social sciences, I was asked the following question:  I have always gone by 100 + m (where m is the number of predictors) when determining minimum sample size for multiple regression. Is this appropriate?  I get similar questions a lot, often with different rules of thumb. I've also read such rules of thumb quite a lot in various textbooks. I sometimes wonder whether popularity of a rule in terms of citations is based on how low the standard is set. However, I'm also aware of the value of good heuristics in simplifying decision making. Questions:  What is the utility of simple rules of thumb for minimum sample sizes within the context of applied researchers designing research studies? Would you suggest an alternative rule of thumb for minimum sample size for multiple regression? Alternatively, what alternative strategies would you suggest for determining minimum sample size for multiple regression? In particular, it would be good if value is assigned to the degree to which any strategy can readily be applied by a non-statistician.


We learned expression of deduce, i.e. =>.  But now I dont have capable reason for I agree I represent True if assumption is False.  Anybady there having to explain reason for its deduce?  Best regards,

I am studying entailment in classical first-order logic.  The Truth Table we have been presented with for the statement $(p \Rightarrow q)\;$ (a.k.a. '$p$ implies $q$') is: $$\begin{array}{|c|c|c|} \hline p&q&p\Rightarrow q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  I 'get' lines 1, 2, and 3, but I do not understand line 4.      Why is the statement $(p \Rightarrow q)$ True if both p and q are False?  We have also been told that $(p \Rightarrow q)$ is logically equivalent to $(~p || q)$ (that is $\lnot p \lor q$).  Stemming from my lack of understanding of line 4 of the Truth Table, I do not understand why this equivalence is accurate.       Administrative note. You may experience being directed here even though your question was actually about line 3 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 4, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


could anyone help with this problem below: Show that if $P(A|E) \geq P(B|E)$ and $P(A|E^c) \geq P(B|E^c)$, then $P(A) \geq P(B)$. I have been trying to apply Bayes' Rule and the law of total probability to this question but have not been able to solve it successfully. Thanks!

If $P(A \mid E) > P(B \mid E)$ and $P(A \mid  \neg  E) > P(B \mid \neg E)$, then is $P(A) > P(B)$ true? If it is, how to prove it?  Intuitively, I'm thinking it should be true, but I don't know how to prove it.


Is there a difference between are here also and are also here?     In this street you see 2 trees, 1 mithril rock and 1 patch of wheat.   You look around and notice that Bob, Sara and Tom are also here.   This is my actual use case, but I wonder if one of the two makes it more implicit. My intention is to say "besides all these resources, you also see some users". Or perhaps there's even better wording..

What is the correct position of the word 'also'?     I would like to also talk about ...      I would also like to talk about ...


I have a simple click event using the on function:  $('#listnav li').on({     click: function(event) {         console.log('hello world')                   },      mouseover: function(event) {         // do something     }  });   This is working for the ul list with id "listnav". But when I am adding new entries to the ul using jQuery's append function, this function is not called on the new added list items. How can I fix this?

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


for the code below, why is the first result a small decimal number but the second results in 0? My main question is why that extra decimal place makes the second result a 0. Does python have a limit in its decimal places when calculating floats?  x =5.000000000000001 y =5 print(x-y) x =5.0000000000000001 y =5 print(x-y)

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


I have hit one of those globs that looks like a supper mutant gore bag over and over again with a hammer. Does anything happen if I keep hitting it?

I came across a crimson altar in Terraria, and have spent 26 minutes looking this up with no results: how, in the world, do I use it? I seriously do not understand. And this has been a common theme with this game from the get-go, like the Extractinator with its bizarre place the silt into the machine like you're placing a block interface. It's occurring to me that Terraria is very unintuitive and kind of all over the place with its user interface.  The wiki says the suspicious-looking eye can be crafted with it, but despite all my frantic clicking, I can't get the thing to work. I've tried standing on it, hitting it, clicking every button on the mouse, and throwing the whole stack of lenses on top of the altar with no results.  I hope this doesn't have to do with expert/normal mode. Cause if so, well, why did it even spawn, first of all, but if so, then I wasted an hour beating a dead horse.  To say this is frustrating would be an understatement.


How do I find defective RAM sectors and where? I have tried memtest, but where it does describe the sectors (if). And how to solve them exactly. First, i have tried this :  but i don t think it's working cause I have written the wrong adresses.  Next thing, i will attach the memtest scrs.    If I got them right(bad adresses from memtest), can you help me convert RAM to pages so I can block them properly in BCD?  Thank you.

Is it possible to run Windows (7, x64) with a defective RAM module? More precisely, is there some way to tell Windows not to allocate a known bad address or block of addresses?  For Linux, there is . Is there an existing implementation for Windows? Is that even possible with Windows' kernel (NT 6.1)? Maybe a kernel mode driver?


My computer (Windows 7) is equipped with two hard disks. One is for the system partition, Windows and the applications while the other contains the Users folder. Now I'd like to encrypt my volumes with TrueCrypt. No problem for the system partition but how about the second volume?  Windows needs access to the user profiles on the second drive when logging in. But it cannot get access until the volume has been mounted in TrueCrypt.  Is there any way of using TrueCrypt with a Users folder on another drive?

I am currently running Windows 7.  My User folder is mapped to a different drive then the drive that my OS in installed on.  I mapped the users folder to the other drive while installing windows.    I want to encrypt the whole drive with the "Users" folder.  Is there any way I can use TrueCrypt to encrypt the whole drive, but make it so Windows can still have access to it upon booting?


If you have good GRE scores, is it a good idea to put them on the resume that you submit with your grad school application?

If my score is good and if I'm applying for an MS program in Europe, can it give me any kind of edge? The university I'm applying to requires GRE scores for certain programs but not the one I'm applying for. And if it won't be advantageous, can it hurt my prospects in anyway?


I recently  to  that did nothing but add a single highly relevant tag:    It scraped through with . Two reviewers voted to reject on the basis that:     This edit is too minor; suggested edits should be substantive improvements addressing multiple issues in the post.   Is using a suggested edit to add tags (or a single tag) to a post acceptable (assuming the tags are correct, obviously)? A canonical answer that can be referenced in edit descriptions by future edit suggesters (or in rejection reasons by reviewers) would be helpful.

Say, there's a Java (C#, Javascript, etc) question involving array and tagged only 'java'. Two months ago nobody would lift a finger to add 'arrays' tag: the benefit is tiny, if it exists at all.  Yet, last few days I've been noticing a lot of such edits and not sure what to do. Some users even go on retagging rampage, updating every question they can lay their hands on (you can see them repeatedly in the list of pending edits).  I don't mind those guys getting their lousy 1000 reputation this way (well, only a little), but somehow I feel that the system was intended for slightly more substantial changes.    What would you do in this case? Approve or reject?  PS Some examples from the last few minutes


Suppose $u,v,w \in \mathbb{Q}$ with $u,v,w \neq 0$. Show that the determinant of the following matrix is nonzero. $$M = \begin{bmatrix} u & 2w & 2v \\ v & u & 2w \\ w & v & u \end{bmatrix}$$ Hint: Argue by contradiction, reduce to the case when $u,v,w$ are integers and use some number theory over $\mathbb{Z}$.  I know that the determinant is given by $$ \det M = u^{3} + 2v^{3} + 4w^{3} - 6 \,u\,v\,w $$ It is unclear to me how to utilize the hint. How to convert the problem over $\mathbb{Z}$?

I have $a,b,c\in\mathbb{Q}$ not all zero. ($a^2+b^2+c^2\ne 0$), I want to show that the following determinant is then non-zero. I failed to arrive at an appropriate form of the polynomial. Help please. $$\left|\begin{bmatrix} a & 2c & 2b\\b & a & 2c\\ c & b & a\end{bmatrix}\right| = a^3+2 b^3-6 a b c+4 c^3$$    Second question, what is the easiest way to argue that $\{1,\sqrt[3]{2},(\sqrt[3]{2})^2\}$ is linearly independent in $\mathbb{Q}$?    Motivation: Prove that $\mathbb{Q}[\sqrt[3]{2}] = \{a+b\sqrt[3]{2}+c(\sqrt[3]{2})^2\;|\;a,b,c\in\mathbb{Q}\}$ forms a field.   Proof: Since $\mathbb{Q}[\sqrt[3]{2}] \subset \mathbb{R}$, we prove $\mathbb{Q}[\sqrt[3]{2}]$ is a subfield of $(\mathbb{R},+,\cdot)$    $\forall (a+b\sqrt[3]{2}+c(\sqrt[3]{2})^2)\in \mathbb{Q}[\sqrt[3]{2}]\backslash\{0\}.$ We want to find $(a+b\sqrt[3]{2}+c(\sqrt[3]{2})^2)$ such that    $(a+b\sqrt[3]{2}+c(\sqrt[3]{2})^2)(d+e\sqrt[3]{2}+f(\sqrt[3]{2})^2) =$ $ (ad+2ec+2bf)+(ae+bd+2cf)\sqrt[3]{2}+(af+cd+be)(\sqrt[3]{2})^2 = 1$    Since $\{1,\sqrt[3]{2},(\sqrt[3]{2})^2\}$ is linearly independent (?) over $\mathbb{Q}$, we show there is unique solution to: $$\begin{bmatrix} a & 2c & 2b\\b & a & 2c\\ c & b & a\end{bmatrix} \cdot \left[\begin{array}{l l} d\\e\\f \end{array}\right] = \left[\begin{array}{l l} 1\\0\\0 \end{array}\right] $$ Which is equivalent in showing the determinant is non-zero $$\left|\begin{bmatrix} a & 2c & 2b\\b & a & 2c\\ c & b & a\end{bmatrix}\right| = a^3+2 b^3-6 a b c+4 c^3=(?)$$    By subfield test, 1)2)3)4) is enough to say that $(\mathbb{Q}[\sqrt[3]{2}],+,\cdot)$ is a subfield of $(\mathbb{R},+,\cdot)$ therefore a field.  EDIT: If you have shorter way that prove the proposition without touching my 2 questions, that is even better.


Has any one installed successfully Ubuntu 16.04 or any other version on a  Micro SD with a card reader?  I tried all possibilities and never succeded?  How much partion for swap, root /, home and what kind of partition primary or logical? Nothing clear, I tried with all possibilities. It always give error saying the partion could not be created.  I could install say in a 8 GB usb drive. not in 128 Micro SD drive. Because installing in a higher capacity drive is the only useful thing. What is the use of installing in a low capacity drive? Can't do much work?  Any one giving successful method is highly appreicated.  I nearly spent two weeks in getting this done. NO success.  Thanks in advance.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


I have a Lenovo IdeaPad U410 laptop running windows 8.1. I tried Ubuntu from a live USB and I liked it so much that I think I want to replace it as my OS.   I have two questions:   If I install Ubuntu completely, will I still keep windows/all my windows data? How can I import my windows data to Ubuntu?(photos, videos, documents, apps, etc.)   also, how good is Libre Open Office? Is it worth trying to re-install the Windows office suite?  thanks :)

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


i'd like to itemize a list of properties for my experiment protocol. What I want is:    there is some nice way to align itemized entrys in  and in  but I can't get it properly done in the 2nd level itemize. Here is what I got at the moment  \documentclass{book}  \begin{document}    \begin{itemize}     \item Analysewaage     \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}  \begin{itemize}   \item Topic Apple:  \item Topic Watermelon:   \end{itemize} & \begin{itemize}   \item[] Something to say about it   \item[] Something to say about it \end{itemize} \\  \end{tabular}  \end{itemize}   \end{document}

I want to describe the variables involved in an equation in an itemized environment such that every item begins with the variable name and subsequently comes the description for it. I'd like to have all the descriptions left aligned.  Here is a MWE that of course does not produce what I am looking for.  \documentclass{standalone} \begin{document} $E[g(x)] = \int_{-\infty}^{+\infty} f_X(x) \, g(x) \, \mathrm{d}x$. % where, % \begin{itemize}     \item $x$      \quad is a continuous random variable.     \item $f_X(x)$ \quad is the PDF of $x$.     \item $g(x)$   \quad is a function of $x$. \end{itemize} \end{document}


I have a Samsung TV, with the following specifications:   The AC/DC adapter broke and I need to buy a new one but I haven't found any adapter with 66W, the closest one was 65W. So I want to know:   1 - Is it ok to use a 65W dc once the TV says 66W? 2 - What does it means the "Typical power"?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I try to join a polygon layer and a multipoint layer. When the model runs, it keeps saying:     Failed to execute. Parameters are not valid. ERROR 000840: The value   is not a Layer.   How could I solve it?

I am doing some arcpy -functions and afterwards I'm trying to add the calculated results from one table to another table. I'm using the arcpy.AddJoin_management() function.   As input table I'm using a table which is stored in a personal geodatabase. The personal geodatabase is not the workspace environment! As "JoinTable" a Table of a file geodatabase is used. This file geodatabase is the workspace geodatabase environment.  The initialized function looks like this:  (%self.getWorkspaceEnvironment => "W:/a18fb/data/mypersonalgeodatabase.mdb" and tFactsheetHochwasser => table in the personal geodatabase)  arcpy.AddJoin_management("%s/tFactsheetHochwasser"%self.getWorkspaceEnvironment(),"KPG", "GebaeudeKtn_BWVred1Stat","KPG","KEEP_ALL")  If the code is executed the following error-message appears:  Failed to execute.Parameters are not valid. The value cannot be a table     ERROR 000840: The value is not a Raster Layer.      ERROR 000840: The value is not a Raster Catalog Layer.      ERROR 000840: The value is not a Mosaic Layer.      Failed to execute (AddJoin)`.


Suppose $(X,d)$ is compact and we have a mapping $T:X \rightarrow X$ such that $d(Tx,Ty)<d(x,y)$ for every $x,y\in X$ with $x\neq y$. The question is that to show $T$ has a unique fixed point.   Our professor gave us the following hint: Consider $inf d(x,Tx)$.   What I tried:   I defined $f: X\rightarrow \mathbb{R}$ such that $f(x)=d(x,Tx)$. Since $X$ is compact, it attains its infimum. But, I could not show that the infimum of this function must be zero. Can you help me to verify this?  Thanks for any help.

Assume $K$ is a compact metric space with metric $\rho$ and $A$ is a map from $K$ to $K$ such that $\rho (Ax,Ay) < \rho(x,y)$ for $x\neq y$. Prove A have a unique fixed point in $K$.  The uniqueness is easy. My problem is to show that there a exist fixed point. $K$ is compact, so every sequence has convergent subsequence. Construct a sequence ${x_n}$ by $x_{n+1}=Ax_{n}$,$\{x_n\}$ has a convergent subsequence $\{ x_{n_k}\}$, but how to show there is a fixed point using $\rho (Ax,Ay) < \rho(x,y)$?


How can I setup an Android Development Environment?

What all needs to be done to install Android SDK / ADT Bundle on Ubuntu?  Each of the steps in the answer was found on some different forum as I encountered obstacles getting started with my Android SDK and posted questions in appropriate forums thereafter. So I thought this would be useful in that it is a one stop solution available, in case one ever needs to re-install Ubuntu and install the Android SDK / ADT Bundle from scratch!


If FOO is mentor to BAR, what term describes BAR's end of that relationship — specifically as “a person to whom FOO is mentor”?  Analogously:   FOO is employer to BAR, ⇒ BAR is employee to FOO.   What is the equivalent term for the recipient of a mentor relationship?  Terms already considered  “mentee”  Some people, recognising a need for a term, use “mentee”. I'm pretty sure that is incorrect – there is no “ment” verb, so a mentor is not “one who ments another” and a “mentee” is not “one who is mented by another”.  So if that's your answer I'd like some strong support for its normal use more than any other.  “student”, “pupil”  A mentor is not the same role as a teacher. To describe BAR as a pupil of FOO would incorrectly imply that FOO is a teacher. So this term doesn't meet the required meaning.  Already answered  “protégé”  As later discovered, the  on this site. The correct term is “protégé”.

What do you call someone who is being mentored? Is it mentoree or mentee? Does the term student or pupil imply a context outside the business environment?


I plan to buy an  board, with an  (without graphic). Now I don't know if the Asus board uses an integrated graphics or the graphics from my CPU, in the comp-list the CPU is listed, but there is no info about the graphics.  Can anyone explain the iGPU and integrated graphics difference? This is a block diagram of the Z97 chipset, I can't find integrated graphics.

I plan on building a computer with  which has no GPU:     Graphics Specifications      Processor Graphics:   None   on a  motherboard which has an onboard integrated graphics processor:     Integrated Graphics Processor:         1 x D-Sub port, supporting a maximum resolution of 1920x1200@60Hz   1 x DVI-D port, supporting a maximum resolution of 1920x1200@60Hz   1 x HDMI port, supporting a maximum resolution of 4096x2160@24Hz or 2560x1600@60Hz   Support for up to 3 displays at the same time   Maximum shared memory of 512 MB      I have asked  and know that even if the CPU has no GPU, I can still get video as long as the motherboard has onboard graphics. However, when I went to buy the parts at a computer center yesterday, the technician said motherboards nowadays use CPU's GPU to display, including this Gigabyte GA-Z97X-UD5H motherboard (which he meant this board has no real onboard graphics).  So for Xeon E3 1231v3 + Gigabyte GA-Z97X-UD5H to display, do I need a video card or not?  (I don't really care about the graphics quality. I use the computer mostly to write programs, web browsing, and Photoshop, and seldom play games or watch videos.)


I am trying to write a program that finds the common numbers in 2 integer arrays.  Here is my code:  public static Integer[] commonElements(int[] array1, int[] array2) {         Queue<Integer> q = new LinkedList<Integer>();         ArrayList<Integer> list = new ArrayList<Integer>();         for(int i: array1){             q.add(i);         } //O(N)         int j = 0;         while(j < array2.length){             if(array2[j] == q.peek()){                 list.add(q.peek());                 q.poll();                 j += 1;             }             else if(array2[j] > q.peek()){                 q.poll();             }            else{             j += 1;            }         }         Integer[] resultInArray = list.toArray(new Integer[list.size()]);         return resultInArray;      } }   But I keep getting the null pointer exception on this line here if(array2[j] == q.peek()), I know that the null pointer exception occurs when one of the two objects I am comparing is null, but I don't see how in this circumstance which one it is. Can anyone see what is creating the null here? Thank you!

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 want to change LaTeX engine from PdfLaTeX to XeLaTeX.  There are a lot of formulas and equations with Russian text inside. And it used without any commands.  MWE for pdflatex:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[russian]{babel} \usepackage{mathtext}  \usepackage[T2A]{fontenc}   \begin{document}      Формула: $F_{подпись} = Ф$      Уравнение:     \begin{equation}     X_{первый} = Y_{второй}     \end{equation}  \end{document}   I tried the same example with XeLaTeX. There is no errors, but Russian characters are displayed only with \textup command, like it was said in this answer:  \documentclass{article} \usepackage{unicode-math} \usepackage{polyglossia}   \setdefaultlanguage{russian}   \setmainfont{Liberation Serif}  \setmathfont{Asana Math}  \begin{document}      Формула: $F_{подпись} = Ф$      Уравнение:     \begin{equation}     X_{первый} = Y_{\textup{второй}}     \end{equation}  \end{document}   Are there any ways to do it without \textup?

I am trying for about a week to launch unicode-math package with XeLaTeX and got nothing. PDF is created well but all Cyrillic symbols in math mode are skipped. I tried using different math fonts - no progress at all. In log file, I found low-level error:  Missing character: There is no [cyrillic letter from input] in font cmmi12!   But all fonts used in document are Unicode ones.  Here is a file I want to be processed well (of course it is UTF-8).  \documentclass[12pt]{book} \usepackage{polyglossia} \setdefaultlanguage[spelling=modern]{russian} \setotherlanguage{english} \defaultfontfeatures{Ligatures={TeX}} \setmainfont{CMU Serif} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text}    \usepackage{amsmath, amssymb} \usepackage[russian]{hyperref}  \usepackage{unicode-math} \setmathfont{Latin Modern Math}  \frenchspacing  \begin{document} Просто буквы % Plain letters $$Память: M_{доп}(n) = \Theta(N)$$ % Memory: M_add(n) = \Theta(n) \end{document}   Looking for your help.


This comes from Lang's algebra, chapter $5$ exercise $23$ $(b)$. Part $(a)$ asks to find a rational function to represent  $$Z(t) := (1-t)^{-1} \prod_p (1-t^{\deg p} )^{-1}$$ Where $p$ ranges through all monic irreducible polynomials of a finite field of cardinality $q$ (which I will denote $F_q$). I can solve this - you find $$Z(t) = \frac{1}{1-qt}$$ $\textbf{Main question:}$ Part $(b)$ asks the following: Let $\pi_q (m)$ denote the number of monic irreducibles with degree $\leq m$. Prove $$\pi_q (m) \sim \frac{q}{q-1} \cdot \frac{q^m}{m}$$ I assume that it is worthwhile to use the result of part $(a)$; use the notation $\psi (d)$ to denote the number of monic irreducibles of degree $d$ so that $\pi_q (m) = \sum_{d=1}^m \psi(d)$. If I take the natural log of both sides I see $$\log (1-qt) = \sum_{d=1}^\infty \psi(d) \log(1-t^d)$$ I did this because I get pretty close to having the sum of my $\psi (d)$ terms occur, but if I continue doing standard power series manipulations I essentially do the solution for part $(a)$ backwards and get nowhere.  Another attempt is to "brute force" it. I can look at $\sum_{d=1}^m \psi (d)$, and using the standard formula for $d \psi (d) = \sum_{d \ | \ n} \mu (d) q^{n/d}$, I can manipulate my sum to get it into the form $$\pi_q (m) = \sum_{d=1}^m \frac{\mu (d)}{d} \sum_{k=1}^{[m/d]} \frac{q^k}{k}$$ where $[\cdot]$ denotes floor function. I confess that I am not terribly familiar with asymptotic properties of the Mobius function, so that this form is not particularly enlightening to me, either. Is there any other way to see this relation more clearly? Any help is appreciated.

This is Exercise 23(b) of Chapter V (Algebraic Extensions) from Lang's Algebra.     Let $k$ be finite field with $q$ elements, and let $\pi_q(n)$ be the number of monic irreducible polynomials $p \in k[X]$ of degree $\leq n$. Prove that   $$ \pi_q(m) \sim \frac{q}{q-1} \frac{q^m}{m} \quad \text{for} \quad m \to \infty. $$     I have tried a few things but I'm not making any progress at all.   The hint given in class was to take the logarithmic derivative of the zeta function that was defined in part (a) of the same problem. We defined the zeta function to be $$ Z(t) = (1-t)^{-1} \prod_p (1-t^{\deg p})^{-1}. $$ I computed this to be equal to the rational function $$ (1-t)^{-1}(1-qt)^{-1} $$ on the region $|t| < q^{-1}$. Taking the logarithmic derivative of $Z(t)$, I get $$ \frac{Z'(t)}{Z(t)} = \frac{1}{1-t} + \frac{q}{1-qt} = \frac{1+q-2qt}{(1-t)(1-qt)} = (1+q-2qt)Z(t). $$ I am not getting any further ideas at this point in how to use this to describe $\pi_q(n)$. From Exercise 22 I know that if $\psi(d)$ denotes the number of monic irreducible polynomials of degree $d$, then the total number of polynomials of degree $n$, which is $q^n$, can be expressed as $$ q^n = \sum_{d \mid n} d \psi(d). $$ Using the Möbius inversion formula, I can deduce that $$ n\psi(n) = \sum_{d \mid n} \mu(d) q^{n/d}, $$ where $\mu$ is the Möbius function. Since $\pi_q(m) = \sum_{k=1}^m \psi(k)$, I can use the above equation to write $$ \pi_q(m) = \sum_{k=1}^m \frac{1}{k} \sum_{d \mid k} \mu(d) q^{k/d}. $$ My intuition is that the highest power of $q$ will dominate the sum, so the RHS is approximately $$ \frac{q^m}{m}, $$ so I get roughly what I'm asked to show in the problem. I'm having trouble refining my ideas any further. I have also looked at , which asks the same problem, but no answers or comments have been posted there. Lang remarks after stating the problem, "This is the analogue of the prime number theorem in number theory, but it is essentially trivial in the present case, because the Riemann hypothesis is trivially verified." I have tried looking at the proof of the prime number theorem on the internet, but I haven't really understood it; and I certainly can't see how to deduce it from the Riemann hypothesis even in this case.   Any help in solving this problem would be appreciated.


I have two ubuntu machines (machineA and machineB)connected through a wired Ethernet cable. I'm asking how I can give full permission and access of machineA to a certain folder Folder1 in the machineB over the network using terminal?

I have to computers running Ubuntu and I want to share files between those computer. these computers are already connected through a cross cable and sharing internet connection using firestarter. Both computers have samba installed.   In Desktop computer I have a shared folder How do I access it on the other one.


If I have abcxyz.doc for example and want to return the extension minus the dot, so just doc as a substring. I cannot rely on the extension always being 3 chars.  <?php $x = 'abcxyz.doc'; ltrim(strrchr($x, '.'), '.');   Is this the best I can do, or is there a more elegant way to do this?

This is a question you can read everywhere on the web with various answers:  $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);  $exts = split("[/\\.]", $filename); $n    = count($exts)-1; $ext  = $exts[$n];   etc.  However, there is always "the best way" and it should be on Stack Overflow.


I'm getting this exception:  java.lang.IllegalArgumentException: Resource location must not be null     at org.springframework.util.Assert.notNull (Assert.java:193)     at org.springframework.util.ResourceUtils.getURL (ResourceUtils.java:130)     at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSslKeyStore (SslConnectorCustomizer.java:133)     at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSsl (SslConnectorCustomizer.java:92)     at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.customize (SslConnectorCustomizer.java:58)     at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.customizeSsl (TomcatServletWebServerFactory.java:317)     at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.customizeConnector (TomcatServletWebServerFactory.java:300)     at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer (TomcatServletWebServerFactory.java:166)     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer (ServletWebServerApplicationContext.java:179)     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh (ServletWebServerApplicationContext.java:152)     at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:544)     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:140)     at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:759)     at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:395)     at org.springframework.boot.SpringApplication.run (SpringApplication.java:327)     at org.springframework.boot.SpringApplication.run (SpringApplication.java:1255)     at org.springframework.boot.SpringApplication.run (SpringApplication.java:1243)     at com.tsystems.iberia.tdev.wsecsccs.WsecSccsApplication.main (WsecSccsApplication.java:12)     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)     ....   As you can see is telling me that:Resource location must not be null  My spring configuration related issue is:  server.ssl.trust-store: file:keystore.jks server.ssl.trust-store-password: secret   Obviously, keystore.jks exist and contains certificate. This is how I've built the ketstore:  $ keytool -importcert -trustcacerts -file ra-sec.pem -alias vault.ra-sec.svc -keystore keystore.jks   Any ideas?


I have a Java 8 application running on a remote Linux server and need to attach a JConsole to it for debugging purposes.  From my local machine I set up a tunnel to the remote machine:   ssh -fN -L 9999:localhost:9999 myuser@1.11.11.111   On the remote machine I run the application with the following system properties:  java -Dcom.sun.management.jmxremote.port=9999 \ -Dcom.sun.management.jmxremote.authenticate=false \  -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.local.only=false \ -cp foo.jar:config com.foo.bar.Main config/blah.properties   but when I start the JConsole I get Secure connection failed.     If I click on "Insecure connection" I get    How can I get around this?

It seems that I've never got this to work in the past. Currently, I KNOW it doesn't work.  But we start up our Java process:  -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6002 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false   I can telnet to the port, and "something is there" (that is, if I don't start the process, nothing answers, but if I do, it does), but I can not get JConsole to work filling in the IP and port.  Seems like it should be so simple, but no errors, no noise, no nothing. Just doesn't work.  Anyone know the hot tip for this?


<!DOCTYPE html>         <meta charset="utf-8">     <title>I need Help</title>

The event in the console was worked but remove Attribute is not work!!
I just need the advice or if you can told me why is not working?

       Book Now!
               Dear All,  The event in the console was worked but remove Attribute is not work!!  I just need the advice or if you can told me why is not working? Thanks in Advance, Mustafa

How can I change the class of an HTML element in response to an onclick or any other events using JavaScript?


This doesn't work:
Dinosaurs are cool.
        <button class='change-text'>Change Text</button>   But this does:
Dinosaurs are cool.
    <button class='change-text'>Change Text</button>       Any idea why? I've been told to link my javascript's at the top of the head, and that doesn't make this work either.   I'd love some help, thank you so much =)

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


In java collections, Since List is an interface and how the "new" keyword is used to declare it without any anonymous class.  Please explain how the following line works. List listTry= new ArrayList();  How the instance is created for ArrayList interface.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


No, I am not talking about selfies. This person misses no opportunity to be in each and every photo shoot at a gathering.   Last time, I remember, at a function we had a choice of getting her for a particular task or her sister in law. She hurried to get the task done (pretending she was very much interested in doing that). She in fact knew that the photographs would be taken and that was the actual reason that was hurrying.  Word for a person who is very much interested in having his photographs clicked?

I am trying to figure out if there is a word to describe a person who loves to be photographed.


Consider the differential equation, $$ y'' - 10y' + 25y=0$$ Suppose $ y = e^{rx}$, we will find $r=5$ as solution. THis suggests: $$ y = A e^{5x}$$ But it can also be found that the family of functions of form $Bxe^{5x}$ also solves this differential equation. What exactly is the intuition behind this happening? i.e: repeated root equations having $xe^{rx}$ also as solution?

Consider the following differential equation with constant coefficients: $$ y'' + 2ky' + k^2y = 0 \, . $$ The auxiliary equation is \begin{align} m^2 + 2km + k^2 &= 0 \\[4pt] (m+k)^2 &= 0 \\[4pt] m &= -k \, . \end{align} This means that the solutions of the differential equation are $Ae^{-kx}+B\color{red}{x}e^{-kx}$, where $A$ and $B$ are arbitrary constants. The $x$-term highlighted in red is what confuses me. Generally speaking, if the roots of the auxiliary equation are $\alpha$ and $\beta$, then the solutions to the differential equation are $Ae^{\alpha x} + Be^{\beta x}$. However, if $\alpha=\beta$, then the solutions are not $Ae^{\alpha x} + Be^{\alpha x}$—or at least, this solution is incomplete. I can verify that $y=xe^{-kx}$ is a solution of the differential equation by plugging it back in to the equation, but I'm looking for a deeper reason for why this occurs.


I’m just curious on this, if you can tell me then please do. Also don’t shame me for my bad question I’m just a curious little fella!

A black hole and white hole experience a direct collision.   What happens? What shall be the result of such a collision?


I've noticed this *~ file gets created (hidden) whenever I edit a file; usually text document, scripts. Is it some kind of backup?!? as it seems so... However, I don't have a backup service configured for such...   So, are those files backup files? ...like for contents or attributes? If yes, how can use to restore/recover what the file has to offer?

In Windows, I believe that files with a tilde in the file name represent files that are currently open in an application. For example, Microsoft Word creates a file with almost the same name as the file you currently have open, but with a tilde in the name. It's icon is also partially faded. As far as I'm aware, this signifies a temporary file that exists   in case the application crashes and you didn't get a chance to save your file, or to allow the original file to remain unlocked by the file system and accessible to other applications.   In Linux, I ran into a *.log file with a tilde at the end of the file name (scan.log~). Does that mean the log file is currently open in another application that is potentially writing to it?


I need assistance to solve the double integral $$ \int_{0}^1 \int_{y}^1 e^{x^2} \ dx \ dy.  $$ So far I have done some poor attempts to rewrite the integral $\int e^{x^2} \ dx$ where I let $t= e^{x^2}, \ $ which lead to $\ln(t)={x^2}$, differentiating then gives $\frac{dt}{t}\ = 2x \ dx$. After some back and forth I end up with the not so nice expression $\int e^{x^2} \ dx=\frac{1}{2} \int\left(\frac{1}{\ln(t)}\right)^{1/2} \ dt$.   The answer to the double integral is $$ \int_{0}^1 \int_{y}^1 e^{x^2} \ dx \ dy=\frac{1}{2}(e-1),  $$ but I would like some one to give me a hint on how to reach the conclusion.  Any assistance is appreciated./Pablo

Evaluate: $$ \int_0^1  \int_y^1 e^{x^2 }dxdy=?$$   MyTry :  $$\begin{align} \int_0^1  \big(\int_y^1 e^{x^2 }dx\big)dy=?\end{align}$$  Now what ?   $$I=\big(\int_y^1 e^{x^2 }dx\big)=?$$