So I have been trying to implment a simple tcp echo server, while compiling I am having this issue /usr/bin/ld: CMakeFiles/server.dir/main.cpp.o: in function `main': /home/linux/git_workspace/maga/main.cpp:11: undefined reference to `Server<Connection>::start()' /usr/bin/ld: CMakeFiles/server.dir/main.cpp.o: in function `std::_MakeUniq<Server<Connection> >::__single_object std::make_unique<Server<Connection>, int>(int&&)': /usr/include/c++/9/bits/unique_ptr.h:857: undefined reference to `Server<Connection>::Server(unsigned short)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/server.dir/build.make:114: server] Error 1 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/server.dir/all] Error 2 make: *** [Makefile:84: all] Error 2  The issue seems to be in the constructor of the Server class but can't really find what the issue is, I have checked if the functions definition matches with the signature in the header file and it does, I really can't find nothing wrong with my cmake file too. Here is the code main.cpp class Connection {};  int main(){     using Server_ = Server<Connection>;     auto server = std::make_unique<Server_>(8888);      server->start(); }  server.hpp template <typename Connection>  class Server{     using shared_connection = std::shared_ptr<Connection>;       private:     unsigned short port_;     boost::asio::io_context ios_;     boost::asio::ip::tcp::endpoint endpoint_;     boost::asio::ip::tcp::acceptor acceptor_;      void handle_new_request(shared_connection connection, boost::system::error_code &ec);      public:     explicit Server(unsigned short port);     ~Server() { if(acceptor_.is_open()) acceptor_.close(); }      void start(); };  server.cpp ... template <typename Connection> Server<Connection>::Server(unsigned short port)      : acceptor_(ios_)     , port_(port)     , endpoint_(asio::ip::tcp::v4(), port) { ios_.run(); }  template <typename Connection> void Server<Connection>::start(){     using namespace asio::ip;      system::error_code ec;      // creates an actual operating system socket     acceptor_.open(endpoint_.protocol(),ec);      acceptor_.set_option(tcp::acceptor::reuse_address(true),ec);     // binds to the endpoint     acceptor_.bind(endpoint_,ec);       if(!ec){         std::cout << "Listening for requests from port " << port_ << std::endl;         acceptor_.listen();     }else{         error::print(ec);         return;     }      shared_connection connection = std::make_shared<Connection>(ios_);     acceptor_.async_accept(connection->sock_,[this, connection](system::error_code ec){         handle_new_request(connection,ec);     }); } ...  CMakeLists.txt cmake_minimum_required(VERSION 3.1) project(maga VERSION 1.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17)  set(include_files     ${CMAKE_SOURCE_DIR}/includes/server.hpp     ${CMAKE_SOURCE_DIR}/includes/connection.hpp     ${CMAKE_SOURCE_DIR}/includes/error.hpp )  set(src_files     ${CMAKE_SOURCE_DIR}/src/server.cpp     ${CMAKE_SOURCE_DIR}/src/connection.cpp )  add_executable(server main.cpp ${include_files} ${src_files}) target_include_directories(server PUBLIC ${CMAKE_SOURCE_DIR}/includes)  #dependencies  find_package(Threads REQUIRED) add_library(boost INTERFACE) if(APPLE)     message(STATUS "This is an apple system")     target_include_directories(boost INTERFACE /usr/local/include) else()     target_include_directories(boost INTERFACE /usr/include) endif() target_link_libraries(boost INTERFACE Threads::Threads)  target_link_libraries(server PUBLIC boost)  Thanks!

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.)


As far as I can tell, a single line align renders identically to an equation.  So on that basis, I have just been using align everywhere, as it makes it easier later if I decide actually I need to add another line to expand out a formula, to enhance the explanation.  Is there any downside to this?

I always use align in my documents, and avoid equation. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?


I have a laptop with no cd/dvd drive. I want to remove win 8 and put ubuntu instead. I am not sure if there is UEFI in this laptop (its the cheapest). I don't want to buy a usb optical drive just for this. Is there a reliable and EASY way to install ubuntu from a USB drive onto my new laptop ?  I tried to install it on an external hard drive, but i saw no boot options. So, I got a new cheap laptop instead. Again, I am stuck. Is it really this hard to install ubuntu via usb ?

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?


I have two tables "Student" and "Lecturer" in my database but just want to use same login function for the both tables. Can i achieve it using prepared statement like this  function login ($username,$password,$table) { $query = $pdo->prepare('SELECT count(id) from :table where username=:username AND password=:password'); $query->bindParam(':table' , $table); $query->bindParam(':username' , $username); $query->bindParam(':password' , $password);   if ($count == "1") {       return true;   }else {       return false;   } }

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I have a piece of code in excel that modifies an embedded word document (displayed as icon) and saves it to a path. I have to convert it to late binding because of compatibility issues. How do i do it? What do I have to change? here is part of my code, as an example  Function Sport()  Dim wd As Word.Application Dim doc As Word.Document  Dim ole As OLEObject Dim EmbededFile As String  Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets("Sheet with the embedded file")  ' Change to suit your needs, or build with code EmbededFile = ThisWorkbook.path & "\Stuff.doc"  Set ole = ws.OLEObjects("Object") ole.Activate 'ole.Verb Verb:=xlOpen Set wd = ole.Object.Application With wd.ActiveDocument     .SaveAs EmbededFile, Word.wdFormatDocumentDefault     .Close End With Set doc = wd.Documents.Open(EmbededFile)  '' do stuff   wd.Activate doc.Close wd.Quit  Sport = 3 End Function   thanks in advance for the help

What is the difference between early and late binding?


Is there any PPA or repository available to install Firefox developer edition (stable and beta versions) in Ubuntu 16.04 ?

Mozilla released the Firefox Developer Edition! How do I install it on Ubuntu?  Source:


How can I force sound output on line out when headphones are plugged in? When I try to switch the output device to line out, sound only comes from the headphones as long as they're plugged in.

In Windows there is an option to disable auto detection of headphones so speakers won't auto mute but I am unable to find such option in Ubuntu. How can I activate such feature?


I am very new to programming, especially in C++, and am trying to build my first project on my own. A budget program. Criticism is welcome. I'm using a constructor in my main file to call my functions from a separate class file. However, I'm getting an error that says the object that I'm using is "of non-class type 'PromptUser().'" Here is my code.  Main.cpp  #include <iostream> #include "PromptUser.h"  using namespace std;  int main() {     PromptUser pu();     pu.prompt();     pu.addPay();     return 0; }   PromptUser.h  #ifndef PROMPTUSER_H #define PROMPTUSER_H   class PromptUser {     public:         PromptUser();         void prompt();         void addPay();         float netPay = 0.00; //net pay         float netPay2 = 0.00; //2nd net pay         float totalPay = 0; // sum of all paychecks         int decision = 0; // variable to hold int decisions  };  #endif // PROMPTUSER_H   PromptUser.cpp  #include "PromptUser.h" #include <iostream>  using namespace std;   PromptUser::PromptUser() {  }  void PromptUser::prompt(){ //prompting the user for input cout << "This is a budget program. \n\n"; cout << "Please enter your net pay for the week: $"; cin >> netPay; //user enters first net pay cout << "Your net pay is $" << netPay << endl; //program displays net pay 1 to user cout << "Would you like to add another paycheck? | 1 = YES 2 = NO : "; //prompts user       to add another check cin >> decision; //user chooses yes or no  }  void PromptUser::addPay(){     //This needs to be in it's own function so it can be recursive     switch (decision) {      case 1://user enters a second net pay         cout << "Please enter the net pay for the second check: $";         cin >> netPay2; // user enters 2nd net pay         totalPay = netPay + netPay2; // total for pay is calculated         cout << "This is your total pay for this week: $" << totalPay;         break;      case 2:// user continues         break;      default:         cout << "Please enter a valid response | 1 = YES 2 = NO : ";         addPay();     } }   The error is being thrown in the main file. It will not progress past line 9 were it reads pu.prompt();   Not sure where I'm going wrong here.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


When Belters in The Expanse speak English, they do so with a particular accent. It sounds vaguely familiar to me, but I cannot identify it. I'm not a native English speaker myself. Is that accent based on any non-fiction accent? Which one? Ideal answers would quote the artists involved, but lacking that, your opinion as a listener is welcome. I'm aware of  with a great answer about their language, but nothing about the accent.

In the show The Expanse (and I presume in the books, but I haven't read them), the inhabitants of the Asteroid Belt, aka Belters, all speak a separate language with a distinct accent. The subtitles refer to the language simply as Belter Creole.  Is there any information about what the language is based on and how it has evolved?


I am trying to create a simple Scanner test program which will exit once the user inputs "Quit".  I have the variable being output to console and it will output Quit but when I am trying to compare the variable to the raw string it doesn't see it as true.  public static void main(String[] args) {      String input;     Scanner sc;      System.out.println("Enter 'Quit' to exit.");      while (true) {         sc = new Scanner(System.in);         input = sc.nextLine();         if (input == "Quit") {             break;         }         System.out.println(input);     }      sc.close(); }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm trying to write an essay for university using LaTeX and BibLaTeX but it's my first time using it so I think I may have messed up somewhere as I can't find any real beginner's guide!  \documentclass[12pt,twocolumn]{article} \usepackage{times} \usepackage{filecontents} \usepackage[style=authoryear]{biblatex}  \begin{filecontents}{refs.bib} @ONLINE     {arstechnica,     AUTHOR = "Jon Brodkin",     TITLE = "{Yahoo IP lawsuit: We patented “Facebook’s entire social network model}”,     URL = "http://arstechnica.com/tech-policy/2012/03/yahoo-patent-lawsuit-we-invented-facebooks-entire-social-network-model/",     URLYEAR = 2012 } \end{filecontents}  \addbibresource{refs.bib}  \begin{document}  \title{Title}  \author{Author} \date{\today} \maketitle  \cite{arstechnica}  *(text...)*  \printbibliography \end{document}   The output for the text looks correct but trying the references looks like [arstechnia ] and the errors are:  Package biblatex Error: File 'positionpaper.bbl' not created by biblatex \begin{document} Citation 'arstechnica' on page 1 undefined Empty bibliography There were undefined references. Please (re)run Biber on the file:(biblatex) positionpaper(biblatex) and rerun LaTeX afterwards.   Any help would be appreciated!

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


I've submitted a sitemap (XML) of my Drupal (7) site to Google Webmaster Tools and it says that my sitemap contains 285 pages and that only 87 pages were indexed.  There are no errors and no additional info or problems. There are no duplicates.  Any idea why most of my pages weren't indexed?   When I Google my site ( i.e.: search the following in Google : site:www.mysite.com/),  I get ~200 pages (results) which is better, but not perfect.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


How to check if my code is subject to sql injection . I am new to php,I followed the code from w3schools php tutorial,But i think this code is subject to sql injection.Please help me by telling how can i avoid sql injection in the following script.Any help will be appreciated   $conn = =mysqli_connect("localhost","root","123456","db");     $conn->set_charset("utf8");     // Check connection     if ($conn->connect_error) {       die("Connection failed: " . $conn->connect_error);     }     $i=0;     for($i=0;$i<count($_SESSION['storecart']);$i++){     $sql = "INSERT INTO cart( fname, email, mobile, commaddress, city, zipcode,state, country, vazhipaduuser, mainlist, price, date, nakshatram) VALUES ('".$_SESSION['user']['fname']."','".$_SESSION['user']['email']."','".$_SESSION['user']['mobile']."','".$_SESSION['user']['commaddress']."','".$_SESSION['user']['city']."','".$_SESSION['user']['zipcode']."','".$_SESSION['user']['state']."','".$_SESSION['user']['country']."','".$_SESSION['storecart'][$i]['name']."','".$_SESSION['storecart'][$i]['mainlistdata']."',".$_SESSION['storecart'][$i]['price'].",'".date('Y-m-d', strtotime($_SESSION['storecart'][$i]['date']))."','".$_SESSION['storecart'][$i]['nakshatram']."');";     //echo $sql;          if ($conn->query($sql) === TRUE) {      // echo "New record created successfully";     } else {       //echo "Error: " . $sql . "<br>" . $conn->error;     }     }     $conn->close();

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


I was reading an answer on a SE site where I wasn't yet registered. It was unhelpful, so I register to downvote the answer. I couldn't, because you need 125 reputation to downvote.  The association bonus should be adequate for this privilege, so I'm asking to either lower the reputation requirement to 100, or up the association bonus to 125.

I'm pretty sure the whole reputation system is put in place so that newcomers learn the different concepts before actually being allowed to use them, and that as a member of one of the other sites in the group you get a higher initial reputation score when you first register to one of the sister sites (like the new Stack Exchange sites that come out of private beta).  That said, why do I get 100 initial rep score for registering, but need 125 to be able to downvote?


I was wondering if it's possible to define tables and columns names and use them in different sql queries in a php script.  I tried some combinations like:  define("USERS_TABLE", "users"); define("COLUMN_NAME", "username");  function getUserName() {     $dbh = new DBHandler();         if ($dbh->getInstance() === null) {         die("No database connection");     }     try {         $sql = "SELECT".COLUMN_NAME."FROM".USERS_TABLE"where id=1";         $stmt = $dbh->getInstance()->prepare($sql);         $stmt->execute();         return $number_of_rows = $stmt->fetchColumn();     }     }   I also tried:  try {     $sql = "SELECT :column FROM :table where id=1";     $stmt = $dbh->getInstance()->prepare($sql);     $stmt->bindParam(':column', COLUMN_NAME, PDO::PARAM_STR);     $stmt->bindParam(':table', USERS_TABLE, PDO::PARAM_STR);     $stmt->execute();     return $number_of_rows = $stmt->fetchColumn(); }   And:  define("USERS_TABLE", "users"); define("COLUMN_NAME", "username");  $tablename= USERS_TABLE; $columnname = COLUMN_NAME;  function getUserName() use ($tablename,$columnname) {     try {         $sql = "SELECT :column FROM :table where id=1";         $stmt = $dbh->getInstance()->prepare($sql);         $stmt->bindParam(':column', $columnname, PDO::PARAM_STR);         $stmt->bindParam(':table', $tablename, PDO::PARAM_STR);         $stmt->execute();         return $number_of_rows = $stmt->fetchColumn();     }  }    but without any success. Maybe it's not possible to do such kind of things? Thanks

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


are there any benefit of using log4net (or any other logging framework) vs just writing to file with native .net  until now I used my utility class to write to file because I didn't know that such frameworks exits so basically my question is there a point to ditch my class(which works fine for me) and convert to some logging framework my class  class FileUtils {      string mPath;     private static object locker = new Object();      public void createNewLogFile(string path)     {         try         {             lock (locker)             {                 mPath = path;                 string backUpPath = path + @".bak";                 FileInfo MyFile = new FileInfo(path);                   Directory.CreateDirectory(Path.GetDirectoryName(path));                  if (File.Exists(path))                 {                     if (new FileInfo(path).Length > Math.Pow(2, 20))                     {                         if (File.Exists(backUpPath))                         {                              File.Delete(backUpPath);                         }                         File.Copy(path, backUpPath);                      }                 }              }           }         catch (Exception ex)         {         //    outputFile.Close();             var t = ex;             throw;          }     }        public void log (string fileLocation ,bool newLine, params  string[] input)     {         createNewLogFile(fileLocation);         using (StreamWriter outputFile = File.AppendText(mPath))         {             outputFile.AutoFlush = true;              try             {                 if (newLine)                     outputFile.Write(Environment.NewLine + DateTime.Now.ToString("dd-MM-yy HH:mm:ss "));                   for (int i = 0; i < input.Length; i++)                 {                      outputFile.Write(input[i] + "  ");                                         }               }             catch (Exception ex)             {                 throw new Exception(ex.Message);             }             finally             {                 outputFile.Close();             }         }       }  }

I think I might be missing the point of having a logging framework for your application.  In all the small apps I've always written a small "Logging" class and just pass log messages to a method in it which is written to a file.    What is the purpose of a 3rd party logging framework like log4net?  Is it thread safety with logging write operations or am I missing something?


im reading a arm based mcu board schematic and there is 100R resistor (R30) at external 25MHz oscillator source. What is the main reason of using serial resistor at clock line ?

A lot of times in circuits I see a resistor placed in series in a signal line and sometimes even in series with an MCU's VDD line. Is the intention of this to smooth out noise in the line? How is this different from using a small cap, like a .1µF to do the same thing?


I am considering a summer job in a camp, but part of the job description is to make signs, announcing events/trips etc.  This is well within my ability to do, but I'm not sure where to start. I am fairly good with computers, but currently lack the knowledge to do what I need to do.  I could use Microsoft Word/WordArt, but I think they're looking for something more professional. (Who can't use WordArt??)  Therefore, I ask:   What tools/programs are suitable for beginners and powerful/flexible enough to produce quality signs? Where can I find (preferably free!) courses in both graphic design in general and sign-making in particular (i.e., not web-design, CAD, or 3D imaging. I'm not up to those... yet) What books should I read? Any tips for the beginner?

Thanks to the internet, graphic design and programming are becoming increasingly overlapping fields.   As a programmer, I constantly find myself needing basic knowledge of Graphic Design, but have trouble locating thorough yet concise graphic design learning resources, and instead usually find bits and pieces of knowledge applicable to the task at hand.  Can you guys offer some tips or recommend some good books, tutorials, blogs, and websites which provide a beginner level overview of web design that have been, in your experience, effective and high quality learning materials. I'm not looking for tips on how to use image editing tools, but assuming a basic grasp of those, which resources and advice will best help a new designer create professional looking designs?


I have already searched how to disable this... "feature". I have no idea whats the actual name of... this, so I just uploaded a gif so you guys can see what I'm talking about.    Every time when I'm using the pen and when the mouse gets closer to the workplace border it automatically moves. Most of the times this annoys the hell out of me.   Anyone knows if you can disable it or change its sensivity?

Sometimes, when I'm drawing a vector path with the pen tool, I need to drag the line further than I have screen space, and this makes the screen scroll down, which makes me lose focus on what I'm looking at.   Is there a keyboard shortcut or some way to prevent the screen from automatically scrolling downward (or whatever direction) and just allow me to drag it as far as I want?


I'm just starting off as a data scientist and i need to understand how regression, random forest and much more.. algorithms function under the hood, the maths behind them and when to use them. I started with some MOOC courses but not a fan, it's just not my style of learning as i need practical examples or books i can dive into with detailed examples i can just apply myself after understanding how each algorithm works and some 20 mins vids with scarce maths explanation is not what i aim for, i've done some research and ended up with these books:  -python for data analysis  -Python Crash Course  -oreilly hands on machine learning with scikit learn and tensorflow  -automate the boring stuff with python  kindly note that i have some python experience(less than a year) and  unfamiliar with tensorflow , keras, scikit-learn etc..   Kindly also note that i didn't mention any maths books to explain how the machine learning algorithms work so i'm open to suggestions  .

I'm a Computer Science engineer with no background in statistics or advanced math.  I'm studying the book  by Raschka and Mirjalili, but when I tried to understand the math of the Machine Learning, I wasn't able to understand the great book that a friend suggest me .  Do you know any easier statistics and math books for Machine Learning? If you don't, how should I move?


Certain spinning tops flip upside-down once spun sufficiently high, as shown in .   Suppose I have the following:   A cylindrically-symmetric top The principal axes of a given top's moment of inertia tensor $I_1$ and $I_2=I_3$ (by cylindrical symmetry) An estimate of the local gravitational acceleration $\vec{g} =    -g\hat{z}\quad$ (e.g. $g=9.8 \; \text{m/s}$) The ability to spin the top up to any initial angular velocity $\vec{\omega} = | \omega_z | \hat{z}$, without imparting any initial horizontal velocity (i.e. it doesn't spin out of control across the table or floor)   What equation governs this behavior and determines 1) whether it is possible for a given top to be flipped, and if so 2) what minimum angular speed will cause the top to flip?   This is similar to , except I am looking for limits of behavior based on the equations of motion, rather than on simpler, "intuitive" explanations of why a top flips.

A friend showed me a  (a special kind of spinning top) lately and asked me about the physics behind it. I thought about it for a while but cannot quite figure it out. So I will throw the question to SE. Below is a picture of tippe top:                                           So basically the strange effect is that when you spin such a top fast enough with its round surface touching the table, the top will wobble and eventually invert itself. There is a  and here is an illustrative picture:                             So my questions are:   Why is the top so unstable? Why does it invert? Why does the initial angular velocity of the top matter? (Why do we have to spin faster than a certain velocity in order for the top to invert?) What other shapes will lead to inversion?   I am looking for some intuitive explanations that do not involve too much mathematics. Heuristic approaches are welcomed!


This is not really expected or very reassuring from a package manager.  brew search postgres  gets me this credentials access request:    if I refuse, it does search and eventually provides the output:  2020-05-21 13:36:58.473 defaults[94976:1504467] The domain/default pair of (kCFPreferencesAnyApplication, AppleLanguages) does not exist ==> Formulae check_postgres               postgresql@10                postgresql@9.4               postgresql@9.6 postgresql                   postgresql@11                postgresql@9.5               postgrest ==> Casks navicat-for-postgresql                postgrespreferencepane                homebrew/cask-versions/postgres-beta postgres                              sqlpro-for-postgres   Is this linked to brew somehow linking itself to github, as it seems to be saying in the version info?  How do I get rid of this behavior?  I suppose I can try updating brew, but it is already behaving in a risky-seeming fashion, so I thought I'd check here first.  (venv) jluc@sql$ brew --version Homebrew 2.2.9 Homebrew/homebrew-core (git revision 79b2f; last commit 2020-03-05) Homebrew/homebrew-cask (git revision efcf9; last commit 2020-03-05)

I got a mail from GitHub:     You recently used a password to access an endpoint through the GitHub   API using Homebrew/2.2.2 (Macintosh; Intel Mac OS X 10.15.2)   curl/7.64.1. We will deprecate basic authentication using password to   this endpoint soon:            We recommend using a personal access token (PAT) with the appropriate   scope to access this endpoint instead. Visit    for more information.      Thanks, The GitHub Team   The mail came after I searched for formula:  ~ brew search test Warning: Cask 'sqleo' is unreadable: undefined method `method_missing_message' for Utils:Module Warning: Cask 'squirrelsql' is unreadable: undefined method `method_missing_message' for Utils:Module Warning: Cask 'yiddish-klal' is unreadable: undefined method `method_missing_message' for Utils:Module ==> Formulae cpptest                      cxxtest                      memtester                    phoronix-test-suite          slowhttptest                 testdisk                     unittest                     vttest cpputest                     git-test                     minetest                     shelltestrunner              speedtest-cli                testssl                      unittest-cpp  ==> Casks aja-system-test                                colortester                                    emacs-pretest                                  nsregextester                                  sqlitestudio clementine-latest                              eclipse-testing                                latest                                         socket-io-tester                               synology-note-station-client   Always a prompt like this pops up:    It look like I have some kind of misconfiguration? I don't like that brew uses my GitHub credentials.


What is a sequence $\{a_n\}$ that diverges and $\displaystyle\lim_{n\to 0} |a_n-a_{n+1}| =0$

Give an example of a sequence $(x_n)$ of real numbers, where $\displaystyle\lim_{n\to+\infty}|x_n-x_{n+1}|=0$, but $(x_n)$ is not a Cauchy sequence


These difference are "formal" or "informal"?  Actually, by E-mail, I often use "discuss" in case of private and work. I've never used "debate" and "argue".

These words seem to have similar meanings, possibly with different connotations.


Blender Cycles. I have lamp type sun and i want have strongest shadow (blacker) but emission must stay. I have sun "size" = 0 and still not strong for me. Any idea?

I want to make certain shadows more prominent (using Cycles) without further illuminating the rest of the scene.  Example: I have a simple studio with a bowl of fruit and 3-point lighting.  The light looks great so I don't want to change it but I want the bowl to cast a darker shadow on the ground (without dimming the back-light).  Alternatively, and this would be really cool, an anti-light source.  Like a spot light that throws darkness instead of light. (Am I crazy for wanting this?)  Thanks!


I saw this movie a long time ago and I remember only bits of it. There is this pond where few friends go swimming and there will an algae like creature. It is like a blanket spread on water. Two people a boy and a girl get stuck in the middle of the pond on a log-boat and this creature consumes the girl from underneath the boat and meanwhile the guy escapes and reaches the bank. He then standing at the end of the bank makes this victory signs and expressions. The creature then jumps out of the pond and drags him in as well. The camera then moves away from the pond and it shows a sign "NO SWIMMING" covered in bushes and at this point the frame goes comic-book style. Drawings, black and white and all. I vaguely remember this as one of the three stories in the movie but am not sure of this last statement.

In the spirit of all the story identification today, I'm looking for some kind of TV episode about some teenagers who were at a lake.  Slowly, one by one, they get swallowed up by some kind of oil slick looking thing.  It was some kind of dumb creature that lived in a lake swallowing up kids and looked like a black oil slick.  I remember it being part of a show of shorts.  Maybe something like Tales from Crypt possibly?  It was probably around 15 - 20 minutes long.  It was pretty cheesy from what I remember; probably something produced in the late 80's or early 90's.  It's something I remember making fun of with my brother when we were young.


Unfortunately, I don't know how to do draw commutative diagrams in TeX so I'll hope you're familiar with the statement of the lemma.   We want to show of course that $$0 \rightarrow \ker(f) \rightarrow \ker(g) \rightarrow \ker(h) \rightarrow \newcommand{\coker}{\operatorname{coker}}\coker(f) \rightarrow \coker(g) \rightarrow \coker(h) \rightarrow 0$$ is exact (where $f, g, h$ are as usual as in the statement of the lemma). The challenge of the snake's lemmma is to find the map $\ker(h) \rightarrow \coker(f)$ and show exactness at this step. But I'm afraid to say I don't see how even $0 \rightarrow \ker(f) \rightarrow \ker(g) \rightarrow \ker(h)$ and $\coker(f) \rightarrow \coker(g) \rightarrow \coker(h) \rightarrow 0$ is exact. As I stated, I would like to see the proof WITHOUT using elements, so without using Mitchell's embedding theorem, working in a general abelian category.   I know it arises 'naturally' from the fact that the sequences in the hypothesis of the lemma are exact, but I'm not sure when I actually try.

Suppose we have two short exact sequences in an abelian category $$0 \to A \mathrel{\overset{f}{\to}} B \mathrel{\overset{g}{\to}} C \to 0 $$ $$0 \to A' \mathrel{\overset{f'}{\to}} B' \mathrel{\overset{g'}{\to}} C' \to 0 $$ and morphisms $a : A \to A', b : B \to B', c : C \to C'$ making the obvious diagram commute. The snake lemma states that there is then an exact sequence $$0 \to \ker a \to \ker b \to \ker c \to \operatorname{coker} a \to \operatorname{coker} b \to \operatorname{coker} c \to 0$$ where the morphisms between the kernels are induced by $f$ and $g$ while the maps between the cokernels are induced by $f'$ and $g'$.  It is not hard to show that the morphisms induced by $f, g, f', g'$ exist, are unique, and that the sequence is exact at $\ker a, \ker b, \operatorname{coker} b, \operatorname{coker} c$. With the use of a somewhat large diagram shown , we can even construct the connecting morphism $d : \ker c \to \operatorname{coker} a$. However, I'm stuck showing exactness at $\ker c$ and $\operatorname{coker} a$. I thought Freyd might have had an element-free proof in his book, but it turns out he proves it by diagram chasing and invoking the Mitchell embedding theorem [pp. 98–99]. Is there a direct proof?


I need to prove that -1 is a quadratic residue of an odd prime p iff p = 1 (mod 4)  Any Ideas? Thanks

I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks.


I need help with my dedicated Ubuntu server. How can I reboot my server every 4 hours?

My pc runs a program when it boots. Sometimes the program stops working after a few hours, but it will work fine when it reboots. So, I want to schedule my pc to reboot every 3 hours to prevent the program to be stopped. I'm using Ubuntu 14.04.  edit: The program doesn't stop, it just doesn't work with the maximum power of the pc but I need it to work with full power.


Let $D$ be a , and let $a,b,x \in D \setminus \{0\}$. Then is it true that $\gcd (ax,bx)=x \cdot \gcd (a,b)$ ?    Let $c=\gcd (a,b)$ and $d=\gcd(ax,bx)$, then as $cx|ax$ and $cx|bx$ so $cx|d$. We would be done if we could show $d|cx$, but I am unable to show that. Please help me to solve this problem.

In my algebra class I was given as homework assignment to prove that:     Given an integral domain $A$ and $a,b,c,d,e \in A$. Then if $d = \gcd(b,c)$ and $e = \gcd(ac, ab)$ then $e = ad$.   It is easy to see that $ad \mid ab$ and $ad \mid ac$, so this implies that $\exists q \in A; e = q(ad)$. Now I'm having problems showing that $q = 1_A$. Working through some equalities, I proved that $\forall n\in \mathbb{N}, q^n \mid d$ so this gives me the light suspicion that I might be going the right way, but I'm pretty positive that this does not imply $q = 1_A$.  Does anyone want to give me a hint?  Thanks in advance :)


In the Terminal is there a way to search for a command you previously entered?  Say you typed something in just a moment ago, you can press the up arrow.  But if you typed it in hours ago, or a day ago, is there a way to search for keywords that existed in this command, then to retrieve the command?

Can I search history in bash and run the result?


I am writing a code for image upload and want to implement AJAX for real time preview. As I have to upload an images with a specific row[id] and  image file to upload in respective directory eg (images/).  My code is only working when inserting data in database with this code below.  function add() { var valid = validate(); if(valid) {     $.ajax({         url: "add.php",         type: "POST",         data:  {image:$("#add-image").val(),fname:$("#add-fname").val(),image_text:$("#add-image_text").val(),address:$("#address").val(),price:$("#price").val(),contact:$("#contact").val()},         success: function(data){ getresult("getresult.php"); }        });     } }   My problem is I am trying to insert image file to specific folder and into database with id,fname,image_text,etc...How do I go about changing this{image:$("#add-image").val(), so that i can upload into database to folder target.  Please help me out and provide solution.  Below is the code -  <form name="frmToy" method="post" action="" id="frmToy">
     Name
     <input type="text" name="image" id="add-image" class="demoInputBox">

     Name
     <input type="text" name="fname" id="add-fname" class="demoInputBox">

     image_text
     <input type="text" name="image_text" id="add-image_text" class="demoInputBox">

     address
     <input type="text" name="address" id="address" class="demoInputBox">

     Price
     <input type="text" name="price" id="price" class="demoInputBox">

     Contacts
     <input type="text" name="contact" id="contact" class="demoInputBox">

     <input type="button" name="submit" id="btnAddAction" value="Add" onClick="add();" />
     </form>   My script   function getresult(url) {     $.ajax({     url: url,     type: "POST",     data:  {rowcount:$("#rowcount").val(),image:$("#image").val(),fname:$("#fname").val(),image_text:$("#image_text").val()},     success: function(data){ $("#toys-grid").html(data); $('#add-form').hide();}    }); } getresult("getresult.php"); function add() { var valid = validate(); if(valid) {     $.ajax({         url: "add.php",         type: "POST",         data:  {image:$("#add-image").val(),fname:$("#add-fname").val(),image_text:$("#add-image_text").val(),address:$("#address").val(),price:$("#price").val(),contact:$("#contact").val()},         success: function(data){ getresult("getresult.php"); }        });     } }   Add.php  require_once("dbcontroller.php"); $db_handle = new DBController(); $result = mysql_query("INSERT INTO cls_vehicles(fname, image_text, address,  price, contact) VALUES('".$_POST["fname"]."','".$_POST["image_text"]."', '".$_POST["address"]."','".$_POST["price"]."','".$_POST["contact"]."')");

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723

I am having an issue with wifi; it seems when I'm trying Ubuntu without installing, it only detects connection via the ethernet cable.  I can't connect and none of the available wifi networks are detected.  $ lspci 00:00.0 Host bridge: Intel Corporation Device 5904 (rev 02) 00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02) 00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 02) 00:08.0 System peripheral: Intel Corporation Sky Lake Gaussian Mixture Model 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI (rev 21) 00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21) 00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1) 00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1) 00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1) 00:1f.0 ISA bridge: Intel Corporation Device 9d4e (rev 21) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) 00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21) 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21) 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev 83) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723     $ lspci -knn | grep Net -A3 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723]     DeviceName: Hanksville Gbe Lan Connection     Subsystem: Hewlett-Packard Company Device [103c:8319]


One day I was playing and I thought if I could play more. So I thought of a scenerio in which I would play for 15 minutes but 5 minutes time would be passed in the whole universe. So anyone except me won't know about my extra time.  So how can I do that? By using relativity, if I go faster, then my time will go faster which I don't want. I want my time go slower than the whole universe.  Now suppose  if the universe is speeding from me in a certain , than universe's time will go faster which means my time going slower. But if this happens, then it is same that I am also going from the universe in the certain velocity too. So my time will go faster too.  So how can I solve this problem and play more?

Imagine a room in your basement with a very special property: The time inside this room runs 60 times faster compared to the outside world. That means when you enter the room and spend there 1 day with working, reading, etc., only 24 minutes are gone in the outside world. Wouldn't such a place be wonderful:   You would be done with all your university exercises in just a few hours. You could read so many books and become one of the most educated people. You could practice many skills... you could become a great musician and learn any instruments in just a week (1 week = 14 month), or become expert in any other skill... You could run your simulations on a computer in this room and they would be done in little time. You could maybe even grow some food in such a room.   The concept of such a room sparked my imagination, so my first question is:     For what would You use such a room? What great possibilities are there?   However, I study physics and I am very curious for the (theoretical) ways to actually build such a room. Of course this room is more like a thought experiment, but: Is it possible to build such a place in accordance with the laws of physics? Or:     How to build such a room?   Thank you for your answers.   Note: Before I asked this question I checked if it matches the physics category, but according to  it should be fine: "For example, a question that proposes a new concept or paradigm, but asks for evaluation of that concept within the framework of current (mainstream) physics is OK."


The country that will end up destroying itself is the U.S..   The country that will end up destroying itself is the U.S.  Does it take an extra dot at the end or not?

What if an abbreviation is at the end of a declarative sentence? Should I duplicate a full stop sign? If the following sentence begins with a proper noun, not putting two periods may be confusing, in theory. Edit: It used to be 'contraction' instead of 'abbreviation'.


How can I get this recycled plastic material with a procedural shader?

is it possible to create this kind of material with the standard textures? The Voronoi texture (set to cells) is coming close but I don’t know if it is possible to a) set the single cells apart from each other and b) to give them seperate colors.


I studied Java for a long time and am well acquainted with the operation of generic types in the language : I know there are only at compile time , suffering type erasure at the end of it ( so that at runtime this information is not available ) and have some notion of the difficulties when applying polymorphism on generic types .  Now I am learning C # , and I noticed that although this language use similar notation ( Type  ) semantics does not seem the same . For example , to see that question did the C # runtime stores the information of the generic types instead of discarding it , unlike Java, is that correct? Also, I have never seen an example in C # that utilizes " jokers " ( wildcards ) and type < ? extends TipoGenerico > . This is possible ( or even necessary ) in that language ?  Finally , C # supports individual methods ( not just classes ) generics ? If yes , what is the equivalent syntax of this construction in Java :  public <T> void method (T parameter1 , parameter2 <T> List ) {   If there are any additional details that deserves emphasis , or maybe some reference material to learn more , will also be welcome.

I have heard that the Java implementation of Generics is not as good as the C# implementation. In that the syntax looks similar, what is it that is substandard about the Java implementation, or is it a religious point of view?


The racist remark is not only a careless utterance, it is also detrimental to the school's reputation.    Is it grammatically correct to use "it is also" after the comma, or do I need to use the structure "not only..., but also..."?

As far as I understand, this structure is grammatically correct:      Not only would it provide ..., but it also would...   Can we omit "but" without introducing a mistake?     Not only would it provide ..., it also would...   I've found the following explanation here but I think this example has slightly different meaning:     Usually, a "not only" feels lost without a "but also" to pal around   with. However, it is idiomatically possible and acceptable to omit the   "but also." Burchfield gives this example: "Rowers not only face   backward, they race backward." Authority: The New Fowler's Modern   English Usage edited by R.W. Burchfield. Clarendon Press: Oxford,   England. 1996. Used with the permission of Oxford University Press.   (under "not")


I've been reading about black holes, and I keep coming across the fact that time runs slower near a them.  My questions are: Does this mean that if you left Earth at age 30 and spent 30 years near the black hole, then you would be 45 years old?  Do you get older more slowly, because if it's all the same what is the point of travelling near a black hole?

How exactly does time slow down near a black hole? I have heard this as a possible way of time traveling, and I do understand that it is due in some way to the massive gravity around a black hole, but how exactly does that massive gravity slow down time?


In Avengers: Age of Ultron, while the Avengers are invading the Hydra base to get Loki's scepter, Tony finds a hidden passage, and then takes off his suit to explore, leaving it to guard the entrance.  But why would he take off the suit, leaving himself defenseless if anyone was in the room?

In Avengers: Age Of Ultron, Tony Stark is the first member of the Avengers to get inside Baron von Strucker's castle, where he takes down a room full of soldiers before stepping out of his suit and travelling down a secret passage.  Why does he take off his suit in the middle of an enemy base when it might have protected him against Scarlet Witch's magic, or at the very least helped him better search the passageway with Jarvis' HUD?


Definition: $\mathbb CP^n$  is defined as the space of lines through origin in $\mathbb C^{n+1}$.  Definition: $\mathbb CP^n= \frac {S^{2n+1}}{S^1}$     How to prove formally that above two definitions of $\mathbb C P^n$ are same?   Intuitively i can see that both definitions are same but i am struggling in proving formally.Any ideas?

We represent an element $(x_1,y_1,...,x_n,y_n,x_{n+1},y_{n+1})\in S^{2n+1}$ as an element $(z_1,...,z_{n+1})\in \mathbb C^{n+1}$ where $z_k = x_k+iy_k$. Now I'm considering the action of $S^1$ on $S^{2n+1}$ as $e^{iθ}·(z_1,...,z_{n+1}) = (e^{iθ}z_1,...,e^{iθ}z_{n+1})$. Under this action we identify any two elements as $(z_1,...,z_{n+1}) ∼ e^{iθ} ·(z_1,...,z_{n+1})\forall (z_1,...,z_{n+1})\in S^{2n+1}\subseteq \mathbb C^{n+1}$ and $e^{iθ}\in S^1$. For the resulting quotient space $S^{2n+1}/S^1$, I'm trying to prove that $S^{2n+1}/S^1$ is homeomorphic to $\mathbb CP^n$. How do I prove this? Any solution will be highly appreciated.


I started to think about this problem and then factored $n^5 - n$ to $(n^2 - 1)(n^2 + 1)(n)$, and later to $(n-1)(n)(n+1)(n^2 + 1)$. I know that $(n-1)(n)(n+1)$ is divisible by $6$, but it is not that case $5$ divides $n^2 + 1$ for any integer $n$, so i can´t use the multiplication property. Can anyone help me finish this proof?

I need to prove by induction if ${n^5 - n}$ is divisible by 5 and I have no idea how I would do it.   I am trying to prove it for several hours now, I started with ${n^5 - n} \mod  5 = 0$ but then I realized that I have no idea how to use modulo for transformations.  The next thing I tried was $(5 + n)\frac{n^5 - n}5 = \frac{(n+1)^5 - n+1}5$ but it didn't get me anywhere.  How would you do it?


Recently there are two new gold badges added in meta site.    Sheriff : Served as an elected moderator for at least 1 year Constable : Served as a pro-tem moderator for at least 1 year or through site graduation   I understood the requirement of Sheriff badges that it can be awarded once a user get elected in election as Moderator and does service for at least 1 year.   The definition of  Constable badge says "Served as a pro-tem moderator for at least 1 year or through site graduation", here what is the meaning of pro-tem moderator ?

The description says "Served as a pro-tem moderator for at least 1 year or through site graduation". I do not know what the phrase "pro-tem" means. In what situation would this even occur? Does it warrant a badge? I feel that it is akin to Area 51. It wouldn't occur nearly enough to warrant having a badge.  Also: The Sheriff badge description ends with a period. No other description has ending punctuation. The badge-earners page has two periods now.  at least 1 year..


I get a 404 error upon php7 update from url   Err ppa.launchpad.net wily/main amd64 Packages   404  Not Found  Err ppa.launchpad.net wily/main i386 Packages   404  Not Found Fetched 10.4 kB in 4s (2,397 B/s) W: Failed to fetch ppa.launchpad.net/ondrej/php-7.0/ubuntu/dists/wily/main/binary-amd64/Packages  404  Not Found  W: Failed to fetch ppa.launchpad.net/ondrej/php-7.0/ubuntu/dists/wily/main/binary-i386/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead.   Would anyone know what I should do? Is there another/new PPA for php7?  I removed the http before the ppa.* links because I'm not reputable enough to post more than two links. Thank you for reading.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


Is this possible with Nividia GeForce GT 520MX graphics card?  One monitor is connected to VGA port, another monitor to HDMI. But in the Display -> Screen resolution menu, one of the 3 monitors is always grayed out.  The laptop is Samsung NP 300E7A.

I have a HP dv9830us laptop. It has a vga-out and a hdmi-out port.  I want to know if it's possible to use 3 devices, each one with different displays, using just one graphic card - NVIDIA GeForce 8600M GS? (Original, vga with an external monitor and hdmi with a full hd tv). Where I can find this kind of information?  If not possible, I would like to know alternatives like:   "Usb" solutions to be possible to connect to the external lcd or to a TV. The TV should be flawless, but the second monitor can have slow response times; (I've found some , do these units really work?) Cheap PCMCIA video cards to be possible to connect to an external monitor, so I would use the hdmi with the tv and this second video card to output to another monitor.   I'm using Windows 7 and Ubuntu 10.04. Is this possible in both systems?


In a multi-tenant only one DB, one column is used to isolate customers data, that is customer_id.  Is it possible to get the storage size of a certain customer in all tables?

I have a PostgreSQL table. select * is very slow whereas select id is nice and quick. I think it may be that the size of the row is very large and it's taking a while to transport, or it may be some other factor. I need all of the fields (or nearly all of them), so selecting just a subset isn't a quick fix. Selecting the fields that I want is still slow. Here's my table schema minus the names: integer                  | not null default nextval('core_page_id_seq'::regclass) character varying(255)   | not null character varying(64)    | not null text                     | default '{}'::text character varying(255)   |  integer                  | not null default 0 text                     | default '{}'::text text                     |  timestamp with time zone |  integer                  |  timestamp with time zone |  integer                  |   The size of the text field may be any size. But still, no more than a few kilobytes in the worst case. Questions  Is there anything about this that screams 'crazy inefficient'? Is there a way to measure page size at the Postgres command-line to help me debug this?


I'm learning about astrodynamics on my own and I was wondering why the $r$ is cubed in the vector notation for of Newton's Law of Universal Gravitation:  $$\vec{F}_g=\frac{Gm_1m_2}{|\vec{r}|^3}\vec{r}$$  I am familiar with Newton's Law of Universal Gravitation of the form:  $$F_g=\frac{Gm_1m_2}{r^2}$$  Is there something obvious I'm missing?

I am reading an older physics book that my professor gave me. It is going over Coulomb's law and Gauss' theorem. However, the book gives both equations with an $r^3$, not $r^2$, in the denominator. Can somebody please explain why it is given as r^3? An image is attached for reference.  Also for equation 1-24, can somebody please explain how the middle side is equal to the right side with the del operator?


How do I call the method convertName in main? When i tried other ways, it came up with the error    cannot reference non static method from static area.  /* This program will take a name string consisting of EITHER a first name followed by a last name  (nonstandard format) or a last name followed by a comma then a first name (standard format).  Ie. “Joe Smith” vs. “Smith, Joe”. This program will convert the string to standard format if  it is not already in standard format. */ package name;  public class Name {      public static void main(String[] Args){             boolean flag1 = hasComma ("Alex Caramagno");      }     public static boolean hasComma(String name) {             // indexOf will return -1 if a comma is not found             return name.indexOf(',') >= 0;      }      public String convertName(String name) {             if (hasComma(name)) {                     return name;             }              int index = name.indexOf(' ');             String first = name.substring(0, index);             String last = name.substring(index+1);             String convertedName = last + ", " + first;             return convertedName;        }      }

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


I'm trying an example from "The C programming language" on Windows with CodeBlock and I don't know how I can get user input without having to press enter. This program counts the number of lines in the input using getchar() and so when I run it "enter" only works as a \n and doesn't allow me to send my input. Is there an alternative way to do it?  EDIT  the problem was with the compiler. Figured it out after looking into it for some time

I can never remember how I do this because it comes up so infrequently for me. But in C or C++, what is the best way to read a character from standard input without waiting for a newline (press enter).  Also ideally it wouldn't echo the input character to the screen. I just want to capture keystrokes with out effecting the console screen.


My question is derived from a few contradicting pieces of information but I have no direct answer with an example.  I'll first describe the information:  Goodberry, has no cast at higher level footnote in its description:      Up to ten berries appear in your hand and are infused with magic for the duration. A creature can use its action to eat one berry. Eating a berry restores 1 hit point, and the berry provides enough nourishment to sustain a creature for one day.   The berries lose their potency if they have not been consumed within 24 hours of the casting of this spell. (P. 246 PHB)   The rules of casting a higher spell level for a spell with no higher spell level footnote say:     When a character casts a spell, he or she expends a slot of that spell’s level or higher, effectively “filling” a slot with the spell. You can think of a spell slot as a groove of a certain size—small for a 1st-level slot, larger for a spell of higher level. A 1st-level spell fits into a slot of any size, but a 9th-level spell fits only in a 9th-level slot.   Now the Contradicting:  From Disciple of Life (Cleric):     Also starting at 1st level, your Healing Spells are more effective. Whenever you use a spell of 1st level or higher to restore hit points to a creature, the creature regains additional hit points equal to 2 + the spell’s level.   And Sage Advice:     If I’m a cleric/druid with the Disciple of Life feature, does the goodberry spell benefit from the feature?    Yes. The Disciple of Life feature would make each berry restore 4 hit points, instead of 1, assuming you cast goodberry with a 1st-level spell slot.   So The first part tells me I could use a Level 2 spell slot on a 1st level spell that does not have a empower spell footnote and the spell will be cast at the description of the spell and no more.  The contradiction of the Sage Advice says assuming they use a level 1 spell slot.  And the Life cleric says 2+ spell's level.   Does this mean a Level 1 Spell Slot Goodberry gives 1hp per berry + 2hp Life Domain +1 Spell Level = 4 hp per berry, and a Level 2 Spell Slot 1hp per berry + 2hp Life Domain +2 Spell Level = 5 hp per berry?  Or because the Life Domain clause doesn't say + Spell Slot level and only Spell level, that a Life Domain Cleric's Goodberry never gets higher then 4hp per berry?

How are Goodberries affected by the cleric class features from the Life domain, if at all? I read somewhere that the Life domain's healing bonuses apply to each berry created by the spell — do they? Are there any official answers to this question?


I recently opened up a new credit card with a company called "Final". That company has decided to close down (they did not go into details on why). In response to this, I have 2 questions:  1) How will this closure affect my credit score?  2) If this negatively affects my credit score, is there anything I can do to minimize that?  Update:  In response to RonJohn's answer, I wanted to provide  for where "Final" has communicated that it is shutting down.  Included as a screenshot for when the webpage is taken down.

I have a bunch of credit cards with no balance, while others have fairly high balances. I'd like to close the 0 balance cards, but I know that will reduce my overall balance and hurt my credit rating, since my ratios of used to unused credit will rise.  Is it ever a good idea to close credit cards?


If $X\sim N(0,1)$, I need find the generating function of $Y=X^2$. The exercise says me that I should not solve the integral (which is I presume $\int e^{tx^2}f(x)dx$). It also says:  $$E(e^{tY}) = E(e^{tX^2})$$  and that any probability distribution function $f(x)$ has $\int_{-\infty}^{\infty}f(x)\ dx = 1$  How should I solve it? I know I must find $M_{X^2}(t) = E(e^{tX^2})$. I can't, however, solve the integral. Which methods are left? I don't know any.

If $X\sim N(0,1)$, integrate to find the moment generating function of a random variable $X^2$ and identify the distribution of $X^2$ using the moment generating function. $$E\left[e^{tX^2}\right]=\int_{-\infty}^{\infty}{e^{tx^2}e^{-x^2}\over{\sqrt{2\pi}}}dx$$ which reduces to $$=\frac1{\sqrt{2\pi}} \int_{-\infty}^{\infty}{e^{tx^2}e^{-x^2}}dx =\frac1{\sqrt{2\pi}} \int_{-\infty}^{\infty}{e^{x^2(t-\frac12)}}dx$$ and thus I am stuck. I'm sure there must be some trick to this (like completely the square for the mgf of a standard normal variable X) but I can't figure out what it might be. Any hints?


Chemistry major here, let preface this by saying I don't know anything about anything. That being said, as a student attending a school that is not very well known for its academics, I always figured that I needed to do whatever I could to be competitive. My fear is that I'll get into the world of academia and find out that I'm leagues behind my peers in terms of education. I'm probably overthinking things, but I just don't have enough information to know where I stand. So the honor's program sounded like the obvious decision at the time. In addition to the sweet-sounding benefits listed on the program page, it would maybe help close the gap between the difficulty of my school's chemistry program vs a top 50 program. I did some looking around, and it seems that at most schools, an honor's program is something that students are jumping to get into. It's considered a pretty big deal to be part of it. But from asking around my school, the sentiment seems to be the exact opposite. Most students here don't tend to respect the honors program from what I can tell. They say that the extra work isn't worth it, so most tend to drop out after sophomore year. And I think that's because the benefits aren't as meaningful to, say, a CS major. I think to one entering the workforce immediately after graduation, honors college holds much less weight. My guess is that because my peers are here to put in their 4 years and join the workforce, they don't really care about things like prestige or standing out. Which makes sense for them, but coming from someone who has different goals, I don't know if their opinions are applicable to me. I have yet to talk to a hard science major about this, so I don't know how much importance something like honors college carries to us. To be perfectly honest, a lot of what honors college entails just sounds like fun to me. I would love the opportunity to do it. But I can't say it's worth it if the extra workload has the possibility of tanking my GPA. Does anybody have any experience with an honors program at school, and how it's affected their career and their enjoyment of college? Thanks in advanced.

This is a something I'm really concerned about. I am an undergraduate physics major, and I've been in the honors program at my university for a little while now, and that means certain things. I must take at least 1-2 honors courses (or do an honors-contract in a normal course) every semester, I must make a yearly update to a personal portfolio/e-portfolio, I must obtain a sufficient amount of research-group credit hours before I graduate, and I must defend an undergraduate thesis.  I do like all of this, but what starts to bother me is one other requirement, as well as a few things within the program. We must attend at least one 'Honors Student Council' event per semester (not a big deal, but these are ridiculous/stupid most of the time). Also, most of the other students in the program are snobs and stuck-up compared to other non-honors students. I do like the chance to learn a lot more about the material presented in my classes through honors and course-contracted classes, but I'm starting to think that I could just do that on my own - that is, set that up with professors on my own.  However, I don't really know how useful having an 'honors' distinction on a degree will be. Is it very useful? I've been thinking of quiting the honors program, but I wouldn't want to do it if it will drastically hurt me later on. For example, how much of an impact does having an honors distinction have on graduate school/job applications?


When using the command \movie in beamer, from the package multimedia, it appears that the movie itself appears on top of every other content, so that it seems impossible to display any content over it.  For instance, I've tried to use a tikzpicture workaround as shown below. But can't manage to have any content superimposed.  \documentclass[12pt]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{multimedia} \usepackage{tikz}  \begin{document}  \begin{frame}{Test frame} \begin{tikzpicture}[remember picture,overlay] \node (movie) at (current page.center) { \movie[width =\paperwidth, height=0.599\paperwidth, poster, autostart, loop]{}{videoTest.mp4} }; \node (test) at (current page.center) { Content that should appear over the movie }; \end{tikzpicture} \end{frame}  \end{document}   The movie works well, therefore my question focuses on layer management.

I want to have a  video background that will loop on some frames of my presentation. Can anyone help me to do that?


The exponential function $y=e^x$ is its own derivative, the hyperbolic functions $y=\frac{e^x+e^{-x}}{2}, y= \frac{e^x-e^{-x}}{2}$ are equal to their own second derivatives, and the trigonometric functions $y=sin(x)$, $y=cos(x)$ are equal to their own fourth derivatives. Is there a function that is equal to its own third derivative?

I'm looking for a function $f$, whose third derivative is $f$ itself, while the first derivative isn't.  Is there any such function? Which one(s)? If not, how can we prove that there is none?  Notes:   $x\longmapsto c\cdot e^x, c \in R$ are the functions whose derivative is itself. $x\longmapsto \cosh(x)={e^x+e^{-x}\over 2}$ and $x\longmapsto \sinh(x)={e^x-e^{-x}\over 2}$ have their second derivatives equal to themselves. $x\longmapsto f(x)$, has its third derivative equal to itself. $x\longmapsto \cos(x)$ and $x\longmapsto \sin(x)$ have their fourth derivatives equal to themselves.


Prove that $\frac{1}{a^{3}(b+c)} +\frac{1}{b^{3}(a+c)} +\frac{1}{c^{3}(a+b)} \ge \frac{3}{2}$ if abc=1  My approach A= $\frac{1}{a^{3}(b+c)}$,B= $\frac{1}{b^{3}(c+a)}$ &C=$\frac{1}{c^{3}(a+b)}$  A.M$\ge$G.M  $\frac{A+B+C}{3} \ge ({ABC})^{\frac{1}{3}}$  As abc=1  $\frac{A+B+C}{3} \ge ({\frac{1}{(b+c)(a+c)(a+b)}})^\frac{1}{3}$  I am struck after this step, I even tried to compare G.M$\ge$H.M but not able to eliminate the terms

$a,b,c$ are positive reals with $abc = 1$. Prove that    $$\frac{1}{a^3(b+c)}+\frac{1}{b^3(a+c)}+\frac{1}{c^3(a+b)}\ge \frac32$$   I try to use AM $\ge$ HM.  $$\frac{\dfrac{1}{a^3(b+c)}+\dfrac{1}{b^3(a+c)}+\dfrac{1}{c^3(a+b)}}3\ge \frac{3}{a^3(b+c)+b^3(a+c)+c^3(a+b)}$$ Then how I proceed.


I've got raw files using Magic Lantern on a Canon 5D Mark II. I've converted them to DNG files then I've converted those DNG files using adobe DNG converter. But I've now don't know how to edit the images?   Is this possible in Blender somehow? At the moment when I go to the image tab to import the images Blender can't see the DNG files what can I do to actually benefit from obtaining raw files?

I have to work with .dng files and it looks like you can do it in Blender, somehow.   As stated in , it seems that you can import them but I don't know how; how do I do this?


What is a WeakHashMap and when should one be using it? What are the differences between a WeakHashMap and a HashMap?

The use of weak references is something that I've never seen an implementation of so I'm trying to figure out what the use case for them is and how the implementation would work. When have you needed to use a WeakHashMap or WeakReference and how was it used?


When does 1=2 I once saw a proof that 2=1. Of course there was an error in the proof. (some where in the proof they were dividing by 0 - a/a) Does anybody remember seeing this proof. It was a very simple thing but it has been years and I don't remember how it went.

I'm reading Spivak's Calculus:  2 What's wrong with the following "proof"? Let $x=y$. Then $$x^2=xy\tag{1}$$ $$x^2-y^2=xy-y^2\tag{2}$$ $$(x+y)(x-y)=y(x-y)\tag{3}$$ $$x+y=y\tag{4}$$ $$2y=y\tag{5}$$ $$2=1\tag{6}$$  I guess the problem  is in $(3)$, it seems he tried to divide both sides by $(x-y)$. The operation would be acceptable in an example such as:  $$12x=12\tag{1}$$ $$\frac{12x}{12}=\frac{12}{12}\tag{2}$$ $$x=1\tag{3}$$  I'm lost at what should be causing this, my naive exploration in the nature of both examples came to the following: In the case of $12x=12$, we have an imbalance: We have $x$ in only one side then operations and dividing both sides by $12$ make sense. Also, In  $\color{red}{12}\color{green}{x}=12$ we have a $\color{red}{coefficient}$ and a $\color{green}{variable}$, the nature of those seems to differ from the nature of $$\color{green}{(x+y)}\color{red}{(x-y)}=y(x-y)$$ It's like: It's okay to do the thing in $12x=12$, but for doing it on $(x+y)(x-y)=y(x-y)$ we need first to simplify $(x+y)(x-y)$ to $x^2-y^2$.


Can someone show me how to draw this quiver? Thank you very much

I tried to draw this in latex.     But not successful. How could I draw this quiver in latex? Thank you very much.


I want to force ssh to always use the program specified by SSH_ASKPASS. In my case the program is just a bash script returning the passphrase.  The problem is, as the ssh documentation says:     If ssh needs a passphrase, it will read the passphrase from the current terminal if it was run from a terminal.   So if I run ssh from a terminal, SSH_ASKPASS is ignored.   There is a similar question:    which proposes create an alias for ssh, like this  $ alias ssh="setsid ssh"   but doesn't work for me, because I don't call ssh directly, is called from git or rsync.   I also found an  in the OpenSSH Bugzilla asking for a fix, but was opened in 2002, so I don't believe is going to be implemented.  I'm thinking on probably weird solutions:   Make a fake ssh agent, which calls the script and returns the passphrase.  Create a process looking for new ssh processes and detach them from the    terminal before ssh asks for the password.   Any better sugestion?

says:  SSH_ASKPASS    If  ssh needs a passphrase, it will read the passphrase from the    current terminal if it was run from a terminal.  If ssh does not    have  a  terminal associated with it but DISPLAY and SSH_ASKPASS    are set, it will execute the program  specified  by  SSH_ASKPASS    and open an X11 window to read the passphrase.   I'd like SSH to use an askpass program even if it was run from a terminal.  On occasion, I have to connect to servers, where there's some delay in showing a password prompt (maybe due to network issues, maybe due to attempted reverse DNS lookups, …). I get annoyed and switch to something else, and forget about the attempted connection. (Insert joke about attention span of a goldfish.) When I finally get back to it, the prompt's timed out and even a correct password would just result in a closed connection.  Keys would be one solution, but not every system I use has my usual SSH keys. However, I usually use Ubuntu systems, and Ubuntu has an SSH askpass program installed by default.  If an askpass window popped up, however, I'd be immediately aware of it. That's a good enough compromise for me, if only I can get it to work.


We are a team of N developers, say. One of us starts up Eclipse for the first time, sets up some IDE preferences, creates a new project, adds source files (which are physically located elsewhere, just symbolic links added to Eclipse project), sets up build and run configurations and whatever else might be needed to flush the flow pipeline.  Now, what all files do I need to check-in to our repository, so that everyone gets those files automatically and all they need to do is launch Eclipse and they are good to go?  From my understanding, there are settings stored at "workspace" level, "project" level and then there are IDE preferences (which also need to be shared in our case, to maintain same IDE environment). But where are these files, and are they generic in a way that if I check them in, and other folks check them out, they are all set?  Hope the question makes sense :)

Which Eclipse files is it appropriate to put under source control, aside from the sources obviously?  In my project, specifically, I'm wondering about:     .metadata/*   project-dir/.project   project-dir/.classpath   project-dir/.settings/*     If there are any of these for which it depends, please explain your guidelines.


The book Principles of Programming Analysis contains a weird sentence that I do not fully understand:     Returning to the discussion of safe approximation note that if we modify Table 1.1 to include the pair (z,2) in RDentry(5) and RDexit(5) we still have safe information about reaching definitions but the information is more approximate.   I am confused about the more approximate part. Does this mean it is a more, or less precise approximation than before? I can read it both ways and both make sense to me.

An approximate answer is one which is close to the correct answer.  Likewise, we can talk of an approximate model, or approximate methods in mathematics.  The etymology is from the Latin ad, "to" and proximus, "closest", see e.g. .  I don't think this can be disputed.  Occasionally proximate is used as a synonym, though that word has a different meaning in legal English.  So if an approximate answer is close, a very approximate answer should be very close.  In practice, "very approximate" or "very approximately" is overwhelmingly used with the opposite meaning of "roughly", indicating that an answer or estimate is not necessarily accurate.  For examples,   Is there any justification for this use? Is there any justification for my suggested use?  Should we avoid the phrase altogether?


I hope some of you can help me understand what's going on here, cause i'm puzzled.  I have two cells BH284 and BH287 in an Windows Excel sheet.  When I look at the two cells the values are identical down to last digit (20+ digits)  = BH284 ;output=46.25165516264020000  = BH287 ;output=46.25165516264020000  When I subtract them, I get zero:  = BH284-BH287 ;output=0  My problem is that I have this IF-statement in a cell which outputs a different value when subtracting the two cells:  = IF((BH284-BH287)<0,0,(BH284-BH287)) ;output=7.105427357601E-15  Is there something I'm missing? Is it related to numerical precision somehow? Thanks in advance.  Excel version 14.0.7214.5000 (32-bit) running on Windows 7 Enterprise, service pack 1.

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


I use java, tomcat, jsf and primefaces    and I have a field "image" in my product table and I 'd like to ask you which is better : save the image in the database or in one directory in the server  if the second case is the best, please explain me more how to manage it (I never had the opportunity to meet this case)  thank you in advance

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons?


I have a workflow pattern that crops up quite often and I wondered how to achieve this in git.  I have a file which has changed over time. I may have deleted a method or changed it in some way but I now realise some of the code could be useful.  How do I check the history of individual files and checkout and compare this previously committed file?

How can I view the change history of an individual file in Git, complete details with what has changed?  I have got as far as:   git log -- [filename]   which shows me the commit history of the file, but how do I get at the content of each of the file changes?  I'm trying to make the transition from MS SourceSafe and that used to be a simple right-click → show history.


How does it happen that if I enter: cat /dev/urandom  then it will take forever to output data, but with: cat /dev/urandom | head -c 10  the output ends after 10 random bytes, does head instructs somehow cat to finish its output?

If I run these commands:  dmesg | head -n 10   I presume the OS sends back some kind of signal to dmesg once head has read 10 lines. How does this work? What does head tell the kernel?  This is different from a program dying since this is a normal, 'clean' stop.


In my website's root folder i already have a robots.txt file with some rules for the domain name www.example.com.  My website is multilingual so i have setup with drupal de.example.com, fr.example.com & es.example.com  I want to exclude the subdomain es.example.com from google's search results.  Because there is only one root, will the following rules work in the only one robots.txt?    User-agent: *   Disallow: es.example.com/     EDIT: I have updated the robots.txt and submitted to Google's webmasters tools (robots.txt Tester). It didn't gave me any errors or warnings, so i will wait for the results!

I have a subomain which I do not want to be listed in any search engine result. Let say I have:   http://www.example.com http://child.example.com   How can I hide all URLs of child.example.com domain which are currently showing in the search engine results?


In the University repair shop I work for, we see a lot of the same viruses/spyware/adware/ransomware in a lot of cases.  Is there any way we can trace back to where a file or software package originated from in order to advise customers away from that location, whether that be on the Internet or a file share of some sort?

Is there any method with which you can determine the origin for a given piece of malware in Windows?  One of my PCs was recently infected with the  password stealing trojan. Is there any way to tell from what source this virus was downloaded from?


I am sick of the new Windows 8. I just want to get rid of it completely and run Ubuntu.  I have a live CD. What do I need to do?

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?


While looking at an intuitive explanation for the Heisenberg Uncertainty Principle (related question below), there was a mention of an axiomatic approach to establishing the uncertainty principle. Could someone please point out a source with detailed steps and explanations from first principles? Related Question  Some (re)-search will reveal the below proof (and others) which are perhaps not immediately grasped by people unfamiliar with certain terminology / concepts. Related Proof  In the above answer, It is not clear  How the product of vectors, $PQ$, is decomposed into real and imaginary parts?  How the expected value of $PQ$ squared is the square of the imaginary and real parts separately?  How both square things are positive since a complex portion is involved?  How square things being positive means that the left hand side is bigger than one quarter the square of the commutator?  Why the commutator is unchanged by the shifting $[P,Q]=[p,x]=ℏ$ ?   Please note, I was a decent physics student (perhaps not, but am still deeply interested) who has wandered off into the social sciences for graduate studies. Hence, I am a bit rusty on the notation and terminology. Any pointers to brush up the concepts and fill the gaps in existing explanations would be much appreciated. I understand my questions might seem very trivial or obvious to experts, hence please pardon my ignorance of any basic concepts. EDIT: Please note, this is not a duplicate question. The question to which the reference is made to mark this question a duplicate is linked into this question. This present question originated as a result of a few doubts regarding the other question. I will remove this edit once this is clear.

states that:    $$\sigma(x)\sigma(  p_x )\ge \frac {\hbar}{2}.$$  What is the scientific proof of this principle?


I am not sure if I am understanding this problem correctly. It says;     Two six-sided dice are rolled. Let X1 and X2   denote the outcomes of the first and second die roll respectively.   Define a new random variable Y such that:       Y = max{X1 , X2}   Does this mean I am supposed to roll the two dice and find the largest roll?   From my own understanding, if I am supposed to find the largest roll from the two dice roll, is this example of mine correct?  ex: the outcomes are {2,3} then Y=3  Moving on to what is asked of me:     Find the probability distribution of Y   For this part, do I need to find all the possible outcomes of the two dice? For example;   {1,1} {1,2} {1,3} {1,4} {1,5} {1,6}  {2,1} {2,2} {2,3} {2,4} {2,5} {2,6}  {3,1} {3,2} {3,3} {3,4} {3,5} {3,6}  etc....  And do I need to find the probability of the sum of two dice? For example;  Sum = 2 , Prob = 1/36  Sum = 3 , Prob = 2/36  Sum = 4 , Prob = 3/36  etc....  After this, what do I do from here to find the probability distribution of Y?   If I am totally off track, explanation from you guys will be great. Sorry if it looks like I'm asking too much. Please feel free to correct me on anything!

Say you take a dice and you roll it twice so that you have a pair (X,Y) where X represents the first roll, Y represents the second.   When you have a distribution like max(X,Y), what type of distribution is that? It's not uniform, obviously, because the outcomes of max(X,Y) are clearly more favorable towards the higher numbers. I'm being asked to "describe" the distribution. I know that we can look at each distinct outcome, like:  max(1,1) = 1  max(1,2) = 2  max(1,3) = 3  max(1,4) = 4  max(1,5) = 5  max(1,6) = 6  max(2,1) = 2  max(2,2) = 2  max(2,3) = 3  max(2,4) = 4  max(2,5) = 5  max(2,6) = 6  max(3,1) = 3  max(3,2) = 3  max(3,3) = 3  max(3,4) = 4  max(3,5) = 5  max(3,6) = 6  max(4,1) = 4  max(4,2) = 4  max(4,3) = 4  max(4,4) = 4  max(4,5) = 5  max(4,6) = 6  max(5,1) = 5  max(5,2) = 5  max(5,3) = 5  max(5,4) = 5  max(5,5) = 5  max(5,6) = 6  max(6,1) = 6  max(6,2) = 6  max(6,3) = 6  max(6,4) = 6  max(6,5) = 6  max(6,6) = 6  But is that the most effective way to look at a distribution like this? Is there a faster and more concise way to describe this distribution other than saying the probability of each outcome?  i.e.,  P(max = 1) = 1/36  P(max = 2) = 3/36 = 1/12  P(max = 3) = 5/36  P(max = 4) = 7/36  P(max = 5) = 9/36 = 1/4  P(max = 6) = 11/36  So, obviously, I understand how to LOOK at a discrete distribution and see what the probabilities are, but not until I look at each possible outcome. But what does it mean to "describe" a distribution? This isn't uniform or any sort of discrete distribution we're taught. Can someone provide clarity?


I need to take backup but I am not able to login due to expired license

I have an expired version of SQL Server 2016 RC2 with SSRS installed as well. The developer decided he didn’t get all the RDL from the SSRS before it expired and now needs to recover those. I tried to run the installation to upgrade it, but it fails because the services are not started. I tried to run the Edition Upgrade and it only upgrades a few components of which is not the engine.  How can I recover this?  When the developer installed and configured SSRS they did not save the encryption key, so I don’t believe I can do a new install and restore the mdf.  Is there anything else I can do.


General relativity prevents light from escaping a black hole, but does it also apply to gravitational waves?

My understanding is that light can not escape from within a black hole (within the event horizon).  I've also heard that information cannot propagate faster than the speed of light.  It would seem to me that the gravitational attraction caused by a black hole carries information about the amount of mass within the black hole.  So, how does this information escape?  Looking at it from a particle point of view: do the gravitons (should they exist) travel faster than the photons?


public void onResponse(Call<User> call, Response<User> response) {                             waitingDialog.dismiss();                             User user = response.body();                                 if (TextUtils.isEmpty(user.getError_msg())) {                                     Toast.makeText(MainActivity.this, "User has been registered successfully.", Toast.LENGTH_SHORT).show();                                     //start new activity.                                 }                         }   //And logcat is: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.example.asus.drinksdeliverysystem.Model.User.getError_msg()' on a null object reference

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


I am struggling with understanding if and how the following is possible.  Say that I have a machine T (target) which I want to access from remote (ideally via ssh).  T is behind a router/firewall R and I cannot forward port (e.g.) 22 of R to port 22  of T.  In a word, no direct ssh access to T is possible.  Now say that    I have a machine A on which I have full control.  I can ssh from T to A, i.e.    T:  ssh user@A   succeeds.   Q1: can I use this to access shell of T from A? I.e., can I use the connection created from T to A, to use T from A?     T ---> ssh ----> A          # this is possible                    T <--- ? shell ? <---- A    # is this possible?   Q2: If Q1 is possible:  Let's say that I have a third machine L (e.g. my laptop), and I aim at having access to the shell of T from L. Can I ssh-tunnel A access to L?     T ----> ssh ----> A <---- ssh < ---- L     T <-------  ?? %&£€ ?? <------- L       # is this possible?   any help appreciated.

I want to be able to route a portion of my traffic through another machine over SSH. For example, is it possible to browse the web through the ssh tunnel and also browse the web through your LAN connection without much effort? (i.e. I want a seamless transition from using tunnel to using LAN)   Thus it is not a simple how do I tunnel ALL web traffic through ssh tunnel, but moreso how can I setup a tunnel that I can use at my discretion but not impeded my normal traffic flow. (Kind of on an as-needed basis)    I would like the filtered traffic to be encrypted when leaving the LAN and it could be ftp, ssh, web, mail whatever traffic.    Some questions I think I need to answer/address:   Does this require multiple nics?  Does this require setting up a proxy?  Can I even do this the way I want it to function?    Are there other options aside from a tunnel to achieve the result of having some traffic (user decides) encrypted through another machine (outside the LAN) and have other traffic use the normal flow through the LAN and out into the internet world?   Edit: If some of the answers depend on specific traffic types I can be more specific and say that web traffic is a primary focus of this. However, other traffic such as IM/Email traffic would be desirable.


There are ten girls and four boys in Mr. Fat's combinatorics class. In how many ways can these students sit around a circular table such that no boys are next to each other? (Source : Titu Andreescu Combinatorics Textbook).  Here is my solution to this problem, however the number I got as an answer was extremely large and I felt I might have made a mistake so I need MSE to help verify and (probably) point out the error(s) in my solutions. Solution 1. Let us use the Subtraction Principle in this case. There are 10 + 4 persons to be sitted around a circle, there are at most 13! ways to carry out this task.  Now.  Let us find all such sitting arrangements in which it is compulsory for two boys to sit next to each other, in this case, we can regard the two boys as an entity,  say boys $B_1$ $B_2$ as  $X$ and boys $B_3$ $B_4$ as $Y$. Then in this case, the problem is this reduced to finding the number of possible cyclic permutations of the set P = {X, Y,  1, . . 10}, where 1, 2, 3, ... 10 denotes the girls.  The number of such cyclic permutations is at most 11!. But since we can permutate 2 boys from 4 boys in at most $_4P_2$/2 = 6 ways.  The number of such cyclic permutations is at most 11!$\cdot 6$ ways.   Hence,  by the Subtraction Principle, there are at most 13! - 6(11!) = 5987520000 ways to arrange 10 girls and 14 boys in a circle such that no two boys are sitted together.   Solution 2. In this case I used a direct approach by considering possible cases.  Case 1. A boy sits between every two girls. In this case we can select 7 out of 10 girl occupy the first 7 sits around the circle. The number of ways to permute 7 girls from 10 is at most $10P_7$/7 = 240 ways.   Since 6! Was is the number of ways to sit them around a circle,  these 7 girls can occupy this sit in at most 240(6!) ways. Now the remaining 4 boys can sit anywhere provided that no two persons occupy the same seat, their sitting arrangements can be done in at most 6! ways. Hence for this case, we have a total of 240(6!)(6!) ways possible sitting arrangements.   Case 2. A boy sits between every two girls, in this case,  we treat the two girls as a single entity like before, say X and Y.  And we can permute two girls from 10 in at most $\10P_2$/2 =45ways. These 5 entities can sit around the 5 available sits in at most 4! Ways.  This leaves us with a total of 45(4!) ways to execute the task. Now. The remaining 4 boys can sit on the remaining four sits around the circle in at most 3! ways.  This leaves us with a total of 45(4!)(3!) ways.  Obviously these are the only two cases we consider, hence for this solution, the answer is thus 240(6!)(6!) + 45(3!)(4!) = 12448080. But this answer doesn't correspond with my initial answer.  What's my mistake?

Problem (1.8): There are ten girls and four boys in Mr. Fat's combinatorics class. In how many ways can these students sit around a circular table such that no boys are next to each other.   My Attempt: Total number of ways in which both boys are girls can be arranged on a circular table is $13!$ and the number of ways in which any two boys can be together is $2!*12!$. Therefore the answer is $13!-2*12!=11*12!$. Is this answer correct? I am asking this because I am confused about the exact meaning of the line "no boys are together." Does this mean that no two/three/four boys are together?   Note: Meanwhile I have made another attempt on the problem. We can place the $10$ girls on the circular table in $9!$ ways. Then we are left with $10$ spots which need to be filled with $4$ boys. This can be done in $P^{10}_4$ ways. Thus, the number of ways is $9!P^{10}_4$.


I am trying to append a div with a button so that when when it is clicked I can execute a function.   I am currently appending a div like this.   $('.window').append('

<textarea type="text" class="inputChatText" id="message" name="message" placeholder="enter your message" data-required/>

');   It appends and everything looks right on the page but when I click the button/img nothing happens. For starters i'm just trying to console log the click but eventually want a function to run but cant do this until its clickable.  $('.test').on('click', function() { console.log("The test button was clicked"); });     As you can see here its appending even according to the console   Anyone have any ideas of what I need to do to actually get this to be a clickable event after I append it? Thanks

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.


Proving that the unit square $\{(x,y) \in \mathbb{R^{2}} | 0<x,y<1\}$ is open in the metric topology on $\mathbb{R^{2}}$  What I know so far is that for a Metric space with (X,d) where X is a set and d is the metric, the following properties must hold:   i) $d(x,y) = 0$   ii) $d(x,y) = d(y,x)$  iii) $d(x,z)\leq d(x,y) + d(y,x)$ (which is the triangular inequality)   I know that the metric topology is  the topology on X generated by the basis $\{B_{\epsilon,d}(x): \epsilon > 0, x \in X\}$  I know what all these things mean distinctly but I don't know how I would be able to start a proof like this. Can someone please help?

I need to show that $(a,b)\times (c,d)$ is an open set in $\mathbb{R}^2$ with the Euclidian metric. I know that a set $U$ is open if for $x\in U$ there exists an open ball $B_\epsilon(x)$ such that $B_\epsilon(x)\subset U$ for some $\epsilon >0$. The euclidian metric in $\mathbb{R}^2$ is given by $d_2(x,y) = \sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2}$, so I need to show that for $x\in (a,b)\times (c,d)$ there exists $B_\epsilon(x) = \{y\in\mathbb{R}^2:\sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2} < \epsilon\}$ such that $B_\epsilon(x)\subset (a,b)\times (c,d)$ for some $\epsilon >0$, but I have no idea how!  Question: How do I show that $(a,b)\times (c,d)$ is an open set in $\mathbb{R}^2$ with the Euclidian metric?


I am developing a football game and I want to know if it is legal to name teams after real football teams. What about their logos?

I'm writing a sports management simulation game. Like most sport management games, it makes heavy use of statistics. I would like to use real players, teams and league names.  i) Am I running the risk of getting into legal battles if I should use the real names? ii) Also what about team colours and emblems etc?    Update Much thanks for all the input!


If 0% = 900 and 100% = 1800, how do you find the percentage of 1200? Question: 1200 = ?% ms = milliseconds In other words, on a timeline from 0ms to 1800ms, if an object weren't to move until 900ms passed, and it would have moved exactly 0% during that time. What percent would it have moved until it stopped at 1200ms? This formula would be used on a website :)

Edit:   I made a mistake or someone did. The a and b and max and min is swapped in the formula I used. Upon switching the a for min and b for max, the algorithm worked as I expected.   Previously I had   a = -180, b= 180, and then min -100, max = 100  instead it should've been   a = -100, b= 100, and then min -180, max = 180  And based on the answer below, I figured out that the x is the series I'm working with.   After that it was just matter of pulling the (x-min) out of the fraction to make it easier to realize what to do next.  $$f(x)=(x - min)\frac{(b-a)}{max - min} + {a}$$  Since x was my series, all I had to do with subtract min (the right number this time), and then the rest was just simple routine.    I posted this in a wrong group, but I think this is more of a simple math problem, which I jut can't wrap my mind around.   Let's say you have 2 lists of real numbers.   list_1 ranges from -100 to 100 over time.   list_2 ranges from -80 to 80 over time. (exact same time as list_1)   And then I have a third list, which is a sum of the list_1 and list_2, (let's call it list_sum) thus can range from -180  to 180.   I would like to come up with a formula to scale the sum of the lists, list_sum, to the min and max of either list_1 or list_2.   So basically, I'm trying to come up with   list_sum * factor    or  function(list_sum)   that should give me the list_sum's min and max to be within the range of list_1 or list_2.   It's gotta be related to (based on some search i've done)  $$f(x) = \frac{(b-a)(x - min)}{max - min} + {a}$$  How so?   If given the list_sum (gives me min and max of my list) and list_1 (gives me a and b of the scale) to be scaled to,   a = -100, b= 100, and then min -180, max = 180  that gives me   $$\frac{(100-(-100))(x - (-180))}{180- (-180)} + {-100}$$  or   $$\frac{(200)(x + 180)}{360} {-100}$$  Does that seems right to anyone?   if so, how do I use that if my list_sum is to be transformed?   Thanks for the help.