undefined reference to `Server::Server(unsigned short)'

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!


Power supply makes high frequency noise, is it damaging my battery? (or other parts of the computer)

I bought a new Lenovo laptop, but sometimes used the power supply for my old Lenovo laptop. I just found out that the old power supply was the source of a very irritating high frequency sound (). If I use the new power supply provided with my laptop, there is no sound. As it's rather convenient to have two power supplies, i would like to know the following:   Will using this old power supply damage my battery? (or some other parts of the computer? -- even though i can't see how that should happen)  (I have also tried to swap the cords going from the AC socket to the power supply -- it had no effect)    If you want to see the technical data for the two power supplies, see this image (old is left, new is right):


Let $(u_n)_{n \in \mathbb{N}}$ be an unbounded above sequence. Prove that it has a subsequence which diverges to $+\infty$   We have : $\forall k \in \mathbb{R},\exists n \in \mathbb{N};u_n>k$  So let $\phi$ such that $\phi(0)=n_0$ (for $k=0$) and $\phi(n+1)=\inf(p \in \mathbb{N};u_p>\max(u_{\phi(n)},n+1))$  then $u_{\phi(n)}>n$ and $\phi(n+1) \neq \phi(n).$  How can we prove that $\phi(n+1)>\phi(n)?$


Cast a simple (c++) struct to another derived (c++) struct containing same datatypes

Hello everyone,  I have a simple struct C which contains 3 variables. Then I have two structs, A and B, where B is derived from A. All in all, B contains the same 3 types of variables as in my simple struct C.  (Note: C++ structs are used)  My questions:   Can I cast between C and B as in my example below, i.e. is it allowed or do I have to look at something special (memory)? My example below produces no valgrind mem error. However, I want to be sure what you  think about it. Am I right, that if B inherits from A, the variables from struct A are put before (or afterwards - depending on architecture) the variables of B in memory, i.e. do I have everytime an "ordered" memory which  fits to struct C ordering/memory? Or can it happen, that e.g. the "type" variable from A is between the "str" and "value" variable?   Hope you can help me! Thanks in advance.  Example (C++11 style):  #include <memory> #include <string> #include <iostream>  struct a {     unsigned int type;      a(unsigned int t) : type(t)     {} };  struct b : public a {     std::string str;     unsigned int value;      b() : a(2), str("Hello"), value(1)     {} };  struct c {     unsigned int type;      std::string str;     unsigned int value;      c() : type(1), str("World"), value(42)     {}; };  int main(int argc, char*argv[]) {     // Bottom up     {         std::cout << "Bottom Up" << std::endl;          c* ptr2 = new c();          std::cout << ptr2->type << std::endl;         std::cout << ptr2->str << std::endl;         std::cout << ptr2->value << std::endl;          std::shared_ptr<b>ptr;         ptr.reset(reinterpret_cast<b*>(ptr2));          std::cout << ptr->type << std::endl;         std::cout << ptr->str << std::endl;         std::cout << ptr->value << std::endl;         std::cout << std::endl;     }      // Top down     {         std::cout << "Top down" << std::endl;         std::shared_ptr<b>ptr(new b());          std::cout << ptr->type << std::endl;         std::cout << ptr->str << std::endl;         std::cout << ptr->value << std::endl;          c* ptr2 = reinterpret_cast<c*>(ptr.get());          std::cout << ptr2->type << std::endl;         std::cout << ptr2->str << std::endl;         std::cout << ptr2->value << std::endl;     }       return 0; }


Network reputation graph becomes nervous when clicking quickly, backs away slowly

On the , when you either double-click on the legend or click quickly1, the graph lines seem sketched out by this, and move to the left, away from the action (also, they don't always all move the same distance, the one you're clicking on seems to become misaligned from the rest):    I can make this happen on:   Chrome 58, Windows (also in an incognito tab, also confirmed on OS X) Firefox 53, Windows IE 11, Windows Chrome Whatever, Android   Also, while the graph lines' trust can be earned back by clicking slowly (whereupon they will return to calmly grazing on the legend's grassy field), as Laurel noticed in , some of the X axis labels are far more timid, and e.g. 2013 and earlier simply run away entirely.    1 Say "click quickly" five times fast. I could barely type it.


How to install Windows 10 feature updates one by one?

I am using Windows 10 EN on a Dell XPS 13. I tend to install updates as soon as Windows asks me to but I've realized that it was not getting feature updates for some time. Don't know why and actually not important at this point. I am on 1803 and the latest is 1909.  I've tried installing the update through windows update and failed several times. Tried everything Windows Update Troubleshooter recommended, no luck. Contacted MS Support, they directed me to update with an ISO file, still failure.  MS Support says the latest update is 1909 and since I missed many major updates, I am having this problem. I should give up on trying an in-place update, backup my files and install a clean 1909. I don't want to do that.  The question is: How can I install feature updates since 1803 one-by-one, manually (1809, then 1903, then 1909) ?


If $a,b,c \in \mathbb{Z}$ and $a^2 - b^2 = c$ then $a = \frac{m+n}{2}, b = \frac{m-n}{2}$

Let $a,b,c \in \mathbb{Z}$.  Proove that if $a^2 - b^2 = c$ then exists $m,n \in \mathbb{Z}$ which are both even/odd such that  $a = \frac{m+n}{2}, b = \frac{m-n}{2}, c = mn$  I think I should use Fermat's theorem, but I'm not sure how to do it


Auto-refreshing div with jQuery - setTimeout or another method?

How exactly do you make an auto-refreshing div with JavaScript (specifically, jQuery)?  I know about the setTimeout method, but is it really a good practice ? Is there a better method?  function update() {     $.get("response.php", function(data) {         $("#some_div").html(data);     });     window.setTimeout("update();", 10000); }


How to run startx from non-login (e.g. ssh) session on Linux?

I have a Linux system which has a monitor plugged into it, but no keyboard. I would like to ssh into it and run startx as if I had typed this at virtual terminal 1. I have set up  for a non-root user on this terminal.  How can I do that?  $ ssh -x myhost Last login: Mon Dec  9 00:55:14 2019 from 192.168.42.3  # I have permissions to write to /dev/tty1 $ ls -al /dev/tty1 crw------- 1 myusername tty 4, 1 Dec  9 09:21 /dev/tty1  # but I need to tell startx how to use /dev/tty1 instead of /dev/pts/3 $ startx  /usr/lib/xorg-server/Xorg.wrap: Only console users are allowed to run the X server xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error Couldn't get a file descriptor referring to the console [1]  # redirecting doesn't work $ startx <> /dev/tty1 zsh: device or resource busy: /dev/tty1 [1]  # I can run startx as root, but that's not what I wanted to do $ sudo sh -c "startx <> /dev/tty1"  X.Org X Server 1.18.4 Release Date: 2016-07-19 X Protocol Version 11, Revision 0 ...   This is meant to be a question about "how can I run a command as if it had been typed in on /dev/tty1, with the same permissions etc.". For example, if I want to run a command in X, but from a remote login, I can run "DISPLAY=:0.0 xterm", and xterm will come up on the server's monitor. Can someone provide a script called for example run-on-tty, where run-on-tty /dev/tty1 startx will work as expected?  I'm pretty sure there must be a way to do this with ttys on Linux, either with ttysnoop or screen or openvt, but I can't figure it out, and the answers to other similar questions , , and  all seem to advocate working around the missing functionality.


Sum of series with addition: $\sum_{n=1}^\infty \frac{1}{n^2(n+1)}$

I am looking at some homework where I have:  $\sum_{n=1}^\infty \frac{1}{n^2(n+1)}$  How can I sum this?   I know that   $\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}$  and also that  $\sum_{n=1}^\infty \frac{1}{n(n+1)}=1$  But I just can't see or find the connection


Field extensions with(out) a common extension

Let $K$ be a field having two field extensions $L\supseteq K$ and $M\supseteq K$. Does there exist a field $N$ along with embeddings $L\to N$ and $M\to N$, such that the diagram $$     \require{AMScd} \begin{CD}     K @>>> L\\     @V  V V @VV  V\\     M @>>> N     \end{CD} $$ is commutative? To put it less formally, do $L$ and $M$ have a common field extension $N$ (with $K$ lying in the intersection)?  If yes, consider this side question (but do leave an answer even if you can only answer the main question!): Does the above property of fields generalise to the following, stronger property? Let $p$ be either $0$ or a prime number. Does there exist a sequence of fields $$ \mathbb F_p = L_0\subseteq L_1\subseteq L_2\subseteq L_3\subseteq L_4\subseteq\cdots$$ (where I use the convention $\mathbb F_0 = \mathbb Q$) such that any field $K$ of characteristic $p$ has an extension field among the $L_\alpha$? This sequence should be understood as enumerated by ordinal numbers. In other words, what I need is a function that assigns to each ordinal number $\alpha$ a field $L_\alpha$ containing all $L_\beta$ with $\beta < \alpha$. (Intuitively, I suspect that this might depend on the Axiom of Choice.)  If the second property holds, it shows that you can essentially only extend a field in one "direction." It also shows that the class (it is obviously not a set) $\mathbb M_p = \bigcup_\alpha L_\alpha$ is a field (class). We can define all the usual field operations (addition, multiplication, division) here since all pairs of elements lie in $L_\alpha$ for a sufficiently large $\alpha$. This "monster field" of characteristic $p$ then contains all other set fields of that characteristic.


Is there any way to see the last location with find my iphone before it was wiped?

I lost my iphone three months ago and it was dead so I could never locate it with the "find my iphone" app. Eventually I gave up and did the wipe feature next time it was turned on. I just got the notification that it was wiped. Is there any way to see where it was in that moment it was turned on and before it was wiped?


Where to find MSSQL ODBC driver .so file?

Ubuntu 14.04.1 LTS   From my Ubuntu machine I want to access an MS SQL 2005 server via ODBC. This MSSQL server is on our internal network. I've installed these packages: unixodbc, unixodbc-dev, unixodbc-bin, libodbc1, libtool, autotools-dev and several other dependencies. Also tdsodbc, freetds-bin, freetds-common, freetds-dev, libct4.   But I can't seem to find where the .so file is to use it in my DSN in /etc/odbc.ini. Which file do I use? Doing this: echo "select 1"|isql -v mydsn gives me this error:   [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so' : file not found [ISQL]ERROR: Could not SQLConnect   The 'mydsn' is trying to point to /usr/lib/libtdsodbc.so but it's not there. Which .so file do I set up in the /etc/odbc.ini file?  Thank you.


What does a buffer overflow in Java look like?

I have seen buffer overflows in other programming languages, but how does it look in Java?


java.lang.NullPointerException error with JSONObject

I got a java.lang.NullPointerException  on this line pdao.majPost(c); when I try to grab my posts from my API and trying to insert post my SQLite database.  My JSON Parser Class:  private PostsDAO pdao;  public void data() {      AsyncHttpClient client = new AsyncHttpClient();     client.get("http://twitter.192.168.1.38.xip.io/api/v1/posts", new AsyncHttpResponseHandler() {         @Override         public void onSuccess(String response) {              JSONObject data;             JSONArray posts;             try {                 data = new JSONObject(response);                  // Traitement des posts                 posts = data.getJSONArray("posts");                 for (int i = 0; i < posts.length(); i++) {                     JSONObject c = posts.getJSONObject(i);                     pdao.majPost(c);                 }              } catch (JSONException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }          }     });  }   My PostDAO file  public void majPost(JSONObject c) throws JSONException {     ContentValues values = new ContentValues();     values.put("id_post", c.getInt("id_post"));     values.put("id_user", c.getInt("id_user"));     values.put("content", c.getString("content"));     values.put("photo", c.getString("photo"));     values.put("masked", c.getInt("masked"));     values.put("deleted", c.getInt("deleted"));     values.put("created_at", c.getString("created_at"));     values.put("updated_at", c.getString("updated_at"));     db.insert("posts", null, values); }


How can I tell if I have Google Chrome 64-bit installed?

I think I just installed Chrome 64-bit, but I can't tell.  About Google Chrome screen shows only Version 37.0.2062.94 m and I don't have anything in my 64-bit Program Files folder.  Is there a way to tell if I am using 32-bit or 64-bit?


I follow the upgrade guide here   apt-get update apt-get dist-upgrade   to perform the kernel-level patches to Ubuntu 14.04LTS   However, I don't know how to check if the patches are successfully applied or not.  Is there a way to check and certify the patches?


Is chars[4] and 4[chars] the same in C? Why?

I've read this and don't believe it :) I've no compiler here to test.


I was trying to do this limit $$\lim\limits_{n\rightarrow\infty} \sqrt{n}(\sqrt{n+1}-\sqrt{n})$$  and I cant, I will be pleased if someone give me a hint to do it.


How does partial fraction decomposition avoid division by zero?

This may be an incredibly stupid question, but why does partial fraction decomposition avoid division by zero?  Let me give an example:  $$\frac{3x+2}{x(x+1)}=\frac{A}{x}+\frac{B}{x+1}$$  Multiplying both sides by $x(x+1)$ we have:  $$3x+2=A(x+1)+Bx$$  when $x \neq -1$ and $x \neq 0$.  What is traditionally done here is $x$ is set to $-1$ and $0$ to reveal: $$-3+2=-B \implies 1=B$$ and  $$2=A$$  so we find that   $$\frac{3x+2}{x(x+1)}=\frac{2}{x}+\frac{1}{x+1}$$  Why can $x$ be set equal to the roots of the denominator (in this case, $0$ and $-1$) without creating a division by zero problem?


Honestly I have no idea what this error could be or could stem from so I will just give as much information as possible.   I am trying to install Ubuntu alongside Windows 10, but the main issue I am having is I cannot boot into Ubuntu properly. I downloaded the iso from ubuntu.com, and installed it to a usb by means of Rufus and Universal usb installer, and I have even tried installing as a DD which I am not clear on what that means. I even redownloaded it thinking it might have an error, and used different ports on my computer and different thumb drives and I am still getting the same error.  Whenever I boot into Ubuntu it comes up and asks if I would like to try or install, no matter what I choose from there I get a bunch of graphical explosions which may not be errors and after some time I am presented with a login. There is my first problem, I do not believe I should have to login, should I not be setting my login? At any rate, I looked up the default login and it is ubuntu and blank on password. This seems to work but then a dialog box pops up saying "System Program Error" or something along those lines asking me to report, and then after a second it turns black and then disappears and takes me back to the login. Call for terminal does not work at all (not entirely sure it is supposed to) and then I were to wait on the login screen for more than five minutes, whether I try to log in or not, It will say authentication failed and be stuck with a retry button that seemingly does nothing. I have no idea what to do at this point. I would appreciate any help anyone can give.  Computer Specs if it is important:   Intel i7-6700k 4.0GHz Gigabyte GA-Z170XP-sli ATX motherboard Adata 16GB ddr4-24000 2 MSI Geforce GTX 960 4GB Video card in SLI Windows 10 (if it makes a difference)   Thank you so much for your time, I appreciate anything.   So upon suggestion I am able to get into the tty6 and log in in a way. I am still looking to install the OS, could it be that it is a graphical error and it has difficulty displaying things? Could it be I need specific drivers? I'm sorry you'll have to excuse me I have never used this screen before and I'm not quite sure how to fix it myself.   New edit: So I went in and I tried to update the drivers involved and then went back and tried to log in with the user friendly version, which I assume is tty7, and the whole screen went black. Then I tried to go back to where I was using the command suggested, CTRL+ALT+F6 and it did this:  Note: There was no key that was pressed, the command was being continually run I suppose.  The error says:  Error: Driver 'ebridge' is already registered, aborting... nvidia-nvlink: alloc_chrdev_region failed: -16


A cost estimation for a Java WAR using AppEngine

I read the following in the docs for Java appengine:     standard: Most cost-effective for applications that have significant   periods where they are not serving traffic.       flexible: No free tier. Application always has a minimum number of   running instances. Most cost-effective for applications that serve   traffic continuously.   What does "serve traffic continuously" means? I'm asking because my WAR will not serve traffic continuously but it will need to "stay up" all the time because of caching.  Also, for flexible, I saw the following pricing:     vCPU  per core hour   $0.0526      Memory    per GB hour     $0.0071      Persistent disk   per GB per month    $0.0400   Does the above means I should multiply each with *24*31 (month of uptime) in order to understand how much I'm going to pay?  For example:   2CPU = 0.0526 * 2 (cpus) * 24 (hours) * 31 (days in a month) = $78  2GB = 0.0071 * 2 (gb) * 24 (hours) * 31 (days in a month) = $10  1GB(disk) =  0.04 * 1 (month) = $0.04  A general question: Does Google cloud also serves a VPS-like computer where the user (me) can install what he wants? If so, where can I read about it?


Is there any rule for differentiating between the endings "th" and "ht"?

Some words end in th (length, width), and others end in ht (height, fight, tonight, caught).    I sometimes have difficulties in spelling such words because I don't know which ending to choose. Is there any rule or pattern (even localized) in choosing one or the other?


My motherboard has 2 ram slots . Why does CPU-Z and Speccy show that I have 4 slots?

My motherboard has 2 ram slots . Why does CPU-Z and Speccy show that I have 4 slots ?  Gigabyte GA G41 MT S2P


I'm unable to install wine in ubuntu 16.04.   sudo apt-get install wine   is giving me this error  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:   Please help soon  The following packages have unmet dependencies:  wine : Depends: wine1.6 but it is not going to be installed or                  wine1.8 but it is not going to be installed E: Unable to correct problems, you have held broken packages.


Google reports 404 errors on URLs that haven't existed for six months and are no longer linked to on my site

My Google Webmaster Tools account, shows that I have crawling errors that are caused by links to pages that do not exist (404 not found).   But when I look at the source pages that are accused of having these broken links, there are no such links in them.  As of now, I have 6 404 errors in sitemaps and 28 in the rest of my site.  E.g. the address  does not exist, yet Google indicates that I have 3 pages that link to this address:  http://www.webdesk.co.il/sitemapgen.php http://www.webdesk.co.il/articles.php?t=css http://www.webdesk.co.il/articles.php?id=17 //this address dont even exist   If you open each of these pages, you'll see that they don't have these links in them.  I thought this may be a result of an old crawling that was not yet updated, but those pages haven't existed for over than 6 months and Google indicates that all the crawling results are up to date (Dec 22 2012).  Why do I keep getting these 404 errors by Google?


Can a US Citizen work whilst travelling in UK?

I know that a US citizen could potentially remain in the UK for up to 6 months on travel. However, I'm also sure that this wouldn't allow them to work while here. If someone were to be visiting the UK for this long, are there legal ways to earn an income while in the UK for 6 months of travel?


How do I install the opus audio encoder?

I would like to try out the , but can't find it in the repositories.  Can anyone here help me get it installed on my computer?  I have some wav files which I would like to convert to the opus audio format.  However, I have found , but each time I click on the appropriate deb download, the package manager opens, but displays an error message saying that there are dependency issues (lib0gg0).


Anyone please suggest how can i get the present layout using beamer LaTeX. I want the style as marked (radio buttons for page by page) in yellow circle at the top of the page. Will be helpful if anyone can give best solution


I would like to create an Ubuntu package from a single  I wrote.  Is there a simple instruction how to build an Ubuntu package, that can be uploaded to launchpad? (I already ).  I already  (with Packages.gz and a PPA hosted at github itself) but that package is missing the needed files that are required in this Ubuntu manual: :   .dsc .changes .diff.gz or .debian.tar.gz and optionally the .orig.tar.gz (if you used debuild -S -sa to build your package)    How do those files have to look like and how do I create them? (examples, commandline tools?)


How precisely do I need to post close to 7:00 (somewhere) to get hero of time?

Timezones... are complicated. We have full hour offsets, half hour offsets...  And time keeping isn't always accurate. So does the Hero Of Time hat assume full or half hour offsets (or literally any timezone) and how close to 7:00 at somewhere do I have to post for my hat?


Why doesn't the tilde (~) expand inside double quotes?

According to  and my own understanding, the tilde expands to the home directory:  $ echo ~ /home/braiam   Now, whenever I want the shell expansion to work, i. e. using variable names such $FOO, and do not break due unexpected characters, such spaces, etc. one should use double quotes ":  $ FOO="some string with spaces" $ BAR="echo $FOO" $ echo $BAR echo some string with spaces   Why doesn't this expansion works with the tilde?  $ echo ~/some/path /home/braiam/some/path $ echo "~/some/path" ~/some/path


i was reading  after hearing about it on the news, while reading i saw the term "floaters" which made me remember of a recent Family Guy Episode in which there is a joke about them in Peter's vision.  I am wondering, what exactly are they? what is their technical term? and is it possible to remove them permanently (apart from the obvious gouging out your eyes).


I am still confused with the classifications of such nouns as area, spot, compound (which refers to a type of area), and area itself. Are they abstract or concrete nouns?


How can I get a count of files in a directory using the command line?

I have a directory with a large number of files. I don't see a ls switch to provide the count. Is there some command line magic to get a count of files?


Norm $N$ on $\Bbb Z[\sqrt d]$ is multiplicative, $N(x)$ prime $\Rightarrow x$ irreducible

For the ring $\Bbb{Z}[\sqrt{d}]=\{a+b\sqrt{d}\mid a,b \in \Bbb{Z}\}$ where $d$ is not divisible by the square of a prime, prove that the norm $N(a+b\sqrt{d})= |a^2-db^2|$ satisfies the assertions: $N(x)=0$ if and only if $x=0$; $N(xy)=N(x)N(y)$ for all $x$ and $y$; $x$ is a unit if and only if $N(x)=1$; and if $N(x)$ is prime, then $x$ is irreducible in $\Bbb{Z}[\sqrt{d}]$.


Where can I find the source for unix "file" command? Synaptic lists a "file" package but no file-src package. I'm not finding the source online either.


If $U\subset \mathbb{R^n}$ is open then $\dim U=n?$ I know this is true from open submanifolds but not sure if it works for any open set.


How many different ways do we have to encrypt a message?

I'm trying to answer this question. We want to exchange encrypted messages. A message consists of 12 different characters and the encryption method consists of adding a total of 45 white spaces to the message. Knowing that between any of the 12 characters and the next one there must be at least 3 white spaces, how many ways is it possible to encrypt a message to be sent?  Having a string of 12 characters, I have a total of 11 spaces between one character and another that I have to fill with white spaces to encrypt the message. Knowing that there must be at least 3 white spaces between one character and the next, I have $45-33=12$ spaces to distribute as I wish. So: ${22}\choose{12}$ ways to encrypt a message. Is my reasoning correct?


regex to allow string, string followed by numbers, and hyphen

I wanna regex which will allow the following samples  1) abcd 2) abcd123 3) abcd-123   which should not allow   1) 123abcd 2) 123 3) 123-123


How can I update my OpenGL to 3.0 or higher

I am trying to play a game called "Endless Sky" but the message it gives me is "Endless Sky requires OpenGL version 3.0 or higher. Your OpenGL version is 2.1 Mesa 19.2.8, GLSL version 1.20. Please update your graphics drivers." I am running LinuxMint 19.3 Cinnamon, processor is an Intel Core i5 CPU 650 @ 3.20GHz x2 (not sure what "x2" means) graphics card is a Intel Corporation Core Processor Integrated Graphics Controller.  Is it possible for me to update?


Can date format current time for GMT timezone?

When I run date +"%Y%m%d%H%M%S" I receive 20171225203309 here in CET time zone.   Can I use date to obtain a the current time in the same format, but for timezone GMT?


Why does QGIS 2.2.0 displaying triangles instead of rectangles?

When displaying the demographic datas from INSEE (), the results under qgis 2.2.0 is quite surprising :   instead of rectangles I just see triangles in the bottom right corner (so covering half the surfaces) the same shape file opened with MapInfo 10.0 seems correct with all the rectangles correctly displayed and filled.   I can't see the reason of such a difference, it seems for me to be a bug of Qgis ..


Installing Data Interoperability when already authorized on ArcGIS Administrator?

If data interoperability is authorized on ArcGIS Administrator but is not yet installed, how does one do so in ArcGIS 10.2.2?  I have the license, now how do I get the extension? I have already checked the Customize menu and data interoperability is not listed. Nor can I find it doing a very thorough search in Windows Explorer. My license has not expired, but I cannot figure out how to install the darn thing!  I forgot to say that I am looking for the executable file that installs the extension. Online help has just said that it is in my "media file".


Why is an empty function considered a function?

A function by definition is a set of ordered pairs, and also according the Kuratowski, an ordered pair $(x,y)$ is defined to be $$\{\{x\}, \{x,y\}\}.$$ Given $A\neq \varnothing$, and $\varnothing\colon \varnothing \rightarrow A$. I know $\varnothing \subseteq \varnothing \times A$, but still an empty set is not an ordered pair. How do you explain that an empty function is a function?


How can I get legal style indentation on section, subsection, subsubsec.. using titlesec?

So far, I've been trying code from various examples, and landed with:  \usepackage(titlesec) \titleformat{\section}[block]{\bfseries}{\thesection.}{1em}{}  \titleformat{\subsection}[block]{\hspace{2em}{\thesubsection}{1em}{} \titleformat{\subsubsection}[block]{\hspace{3em}}{\thesubsubsection}{1em}{}   to indent the headers and their numbering. But I don't know how to get the content within each section/subsection/subsubsection to have an indented margin. In other words, I'd like to have the section/subsection/subsubsection content to be in line with it's indented header.  Is titlesec able to do this? I've been battling with the documentation, but I think they assume some more tex knowledge than I have as everything I try doesn't seem to work.  I'd like to use titlesec because, according to my understanding, I won't have to make any further adjustments while writing the document. I'm using pandoc to generate that part from markdown, so I can't have inline formatting on my sections.  Added the following as per comment requests:  Here is what I have:    And, here is what I would like:    Or, I would like something like this:


Hi i want to put this simbol "%" in the tick labels only in the x axis how can i do?


Cut, Copy, Paste keyboard shortcut problem on Ubuntu Desktop 20.04

I am using Ubuntu 20.04 on my desktop and when I tried to use ctrl+x,ctrl+c, ctrl+v shortcuts to cut/copy/paste a file/text/folder etc. nothing happened. I have searched all of the related answered questions and videos but none of them applied to me. Any suggestions?


Getting java null pointer exception on cropImageView.setImageBitmap(bitmap);

mcrop.setOnClickListener(new View.OnClickListener() {  @Override public void onClick(View v) {      preview.buildDrawingCache();     bitmap=preview.getDrawingCache();     CropImage.activity(uri)             .start(Previewimage.this);     cropImageView.setImageBitmap(bitmap);     Bitmap cropped = cropImageView.getCroppedImage();     preview.setImageBitmap(cropped);   } };  java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.Bitmap com.theartofdev.edmodo.cropper.CropImageView.getCroppedImage()' on a null object reference


Can Anyone Identify This strange cockroach looking bug

I am looking for someone to identify this bug: location india. It flew from my window in my room, killed it by spraying cockroach killer spray, it could fly like cockroach.


How to prove that if the one sided limits are equal the general limit is that value?

My teacher proposed this question as a challenge proof to do on our own and I can't seem to get it. Was Wondering if anyone could give me a hint or help me on the process to completing it.  Let $a \in \mathbb{R}$. Let $f$ be a function defined, at least, on an interval  centred at $a$, except possibly at $a$. Let $L \in \mathbb{R}$.     If $\lim\limits_{ x→a-} f(x) = \lim\limits_{ x→a+} f(x) = L$   then $\lim\limits_{ x→a} f(x) $ = $L$.    We are supposed to prove this using the "delta-epsilon" proof style. Thanks in advance!!


A top on a string from the perspective of forces

You hang a rapidly spinning top on one end from a string and let it go.  It doesn't fall.  It rotates around the point where it is hung from the string.  Mathematically, I understand it.  Angular momentum is changed by torque, which is moment arm cross force.  So vertical gravity produces a horizontal change in angular momentum, etc.  I know the math and I can do it in my sleep!  I learned this years ago.  But still, after all this time, this system from the point of view of forces and acceleration, as opposed to angular momentum and torque, still makes no sense to me.  I still cannot "intuit" why the various forces involved somehow "conspire" to send the top in horizontal motion rather than pulling it down.  Anyone have an explanation?


If we use a prepositional "by phrase" then it is passive form but if we use other prepositions such as "to, with" etc., then is the verb in passive or active form?  For example:  Actives:   They told me a secret He tells me to come.   Passives:   A secret was told to me by them = I was told a secret to me by them. I am told to come by him.   My question is without the "by phrase" for example in    I was told a secret to me I am told to come.   Are these in passive or active voice?


Doesn't quantum uncertainty disprove string theory?

String theory states that the oscillations of little strings are responsible for all the particles in and the evolution of the universe. The specific type of particle created by a string depends on the energy and the shape of its vibrations. However, in order for a particle to have a definite identity, the string would need to have a definite energy and a definite rate of change. Since the Heisenberg uncertainty principle forbids this, strings would constantly be a random, uncertain jumble and particles could never retain their identities.


Use strong Principle of induction to prove that the amount of postage greater than or equal to 8cents cents can be made using a combination of 3 cent and 5 cent postage  this is what i have so far: Proof: let r(n):n=3p+5q,p,q∈N,n>0 Base case n=8,9,10 n=8,3(1)+5(1)..p(8) is true  n=9,3(3)+5(0)..p(9) is true  n=10,3(0)+10(1)..p is true  Assume p(k) is true for up to k≥10 k≥32  ⇒k+1≥10 ⇒(k+1)−3≥11  ⇒k−2=8  k-2=3p+5q  add 3 on both sides to get k+1  k+1=3p+5q+3  k+1= 3(p+1) +5q


I have a small doubt. Is $\sqrt{x^2}= |x|$ true? For, put $x=-1\implies x^2=1$. Now, $\sqrt 1=\pm 1$, whereas $|1|=+1$ only. $x\in\mathbb{R}$ P.S. This doubt came @Daniel's answer from  post. To quote-  The problem appears when you take square roots, since it is not still true that $\sqrt{(-1)^2}=-1$, in fact, $\sqrt{x^2}= |x|$ so in this case $\sqrt{(-1)^2}=|-1|=1$, which is not equal to $x-2$ when $x=1$.


Does Grim Harvest trigger when my Teleport causes a death?

Prompted by   I Teleport a large, flat rock into the air some dozens of feet above an enemy. My DM rules that the rock falling does damage, and thereby kills one of my enemies. Does Grim Harvest trigger?  Or the reverse: I Teleport myself and a target 50' above a large, flat rock. I survive* but the other dies. Does Grim Harvest trigger?  * - if you like, I've got Feather Fall prepared and cast it on myself as a reaction.


My wife is learning English and she wrote the following sentence.  "When highlighting the large profit losses, the author identified a decrease in sales at Tasty Cream that is the only ice cream store in town."   She believes that this sentence is grammatically correct. However, I believe that using "Tasty Cream, which is the only ice cream store in town" or "Tasty Cream, the only ice cream store in town" is grammatically correct. Can someone help to explain which usage is correct and why? Thank you!


Calculating the radius of convergence for $\sum _{n=1}^{\infty}\frac{\left(\sqrt{ n^2+n}-\sqrt{n^2+1}\right)^n}{n^2}z^n$

Calculate the radius of convergence for   $$\sum _{n=1}^{\infty}\frac{\left(\sqrt{ n^2+n}-\sqrt{n^2+1}\right)^n}{n^2}z^n.$$   Do I have to do a index shift so the sum starts at $0$? I tried it like here (without index shift) ,  and my solution for the denominator is $+\infty$ so in the end my radius of convergence should be $0$.   Is that correct?  Thanks!


Integrating $\int\frac{x^3}{\sqrt{9-x^2}}dx$ via trig substitution

What I have done so far: Substituting $$x=3\sin(t)\Rightarrow dx=3\cos(t)dt$$ converting our integral to  $$I=\int\frac{x^3}{\sqrt{9-x^2}}dx=\int \frac{27\sin^3(t) dt}{3\sqrt{\cos^2(t)}}3\cos(t)dt\\ \Rightarrow \frac{I}{27}=\int \sin^3(t)dt=-\frac{\sin^2(t)\cos(t)}{3}+\frac{2}{3}\int\sin(t)dt\\ \Rightarrow I=18\cos(t)-9\sin^2(t)\cos(t)+c$$ Which is where I'm stuck. I can substitute back in for the $\sin(t)$ terms but don't know hot to deal with the $\cos(t)$ terms and back out information about $x$.   edited: because I miswrote the problem, I am sorry.


System.ListException: Before Insert or Upsert list must not have two identically equal elements - Deep Dive

I had the following exception thrown at me when trying to process more than one selected records via a custom button in the list view.    Class Code  global class MerchandiseInventoryClass {      webservice static void ConverttoInventory(String[] merchandise_id)    {        //Convert Merchandise collection into Inventory Collection...         Merchandise__c[] merchandise_collection = [SELECT ID,Author__c,Book_Title__c,Edition__c,Publisher__c,Total_Merchandise_QtyTotal_Qty__c,Status__c FROM Merchandise__c WHERE ID = :merchandise_id];          Inventory__c i = new Inventory__c(); //Line 1        List<Inventory__c> newInventory = new List<Inventory__c>();        for(Merchandise__c m : merchandise_collection )        {            if(m.Status__c !='Fully Converted')            {            i.Author__c = m.Author__c ;            i.Book_Title__c = m.Book_Title__c;            i.Edition__c = m.Edition__c;            i.Publisher__c = m.Publisher__c;            i.Qty_Available__c = m.Total_Merchandise_QtyTotal_Qty__c;            i.Merchandise__c = m.Id;            m.Uninventoried_Qty__c = 0;            m.Status__c = 'Fully Converted';            newInventory.add(i);            }        }        insert newInventory;        update merchandise_collection;    }  }   By moving the Line 1 to within the for loop solved the issue for me.  Thanks to this post (refer the Best Answer in that post)    What puzzles me is that WHY i have to instantiate "i" for every iteration within the loop.  Why the list collection ("newInventory") is complaining that are duplicate elements and why should it even confuse in the first place when I am performing an "insert" even ?


Hybrid SharePoint 2010 On-Premise with AWS EC2 (manage DB SQL Server 2012)

We have requirement one of client to maintain that SharePoint 2010 Server on our local Server instead of AWS EC2 and SharePoint Databases (Like SP_Config,WSS_Content, Service application databases)  should be maintain in AWS EC2 (SQL Server 2012 R2).  First, I would like to know is it possible to hybrid solution [on-premise server with AWS EC2 (only for Database)]?  If yes, can you please guide us what's are steps needs to be taken care while migrating SQL Server content, config and service application database on AWS EC2?  Highly appreciate your quick response !!!


What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? For example, is there a WaitOnFile() somewhere in the .NET Framework?  I have a service that uses a FileSystemWatcher to look for files that are to be transmitted to an FTP site, but the file created event fires before the other process has finished writing the file.  The ideal solution would have a timeout period so the thread doesn't hang forever before giving up.  Edit: After trying out some of the solutions below, I ended up changing the system so that all files wrote to Path.GetTempFileName(), then performed a File.Move() to the final location. As soon as the FileSystemWatcher event fired, the file was already complete.


How can you move a document with its version history to a new library?

Here's the scenario:  2 document libraries Both contain multiple documents The documents have multiple versions  When I copy a document from library A to Library B using the Content and Structure tool from Site Settings, my versions do not carry over. I'm trying to merge the two document libraries into one, but I want to retain the versions. Do you know of a way to complete this without third party tools or custom code? I've heard suggestions of using Explorer View copy and paste, SharePoint Designer and List Templates, but I'm not sure any of those will carry version info. Modern solution For modern SharePoint experiences, use Move To. Update 4/24/2018: There's a new solution in Office 365. You can now select a file or group of files in the modern experience in OneDrive or SharePoint and select Move to. A file or group of files moved this way will retain version history. Update 6/6/2021: As @KJH mentioned in a comment, you may not see the modern experience unless you . Also, there's more detail now in the Microsoft article .


Call me nitpicky, but I can't ignore the fact that the emphasis on the following close reason is misleading:     Questions asking for code must demonstrate a minimal understanding   of the problem being solved. Include attempted solutions, why they   didn't work, and the expected results. See also:    (Emphasis not mine)   The main emphasis is about what they did wrong, rather than how to fix it!       demonstrate a minimal understanding of the problem being solved   So the OP thinks     What does that supposed to mean? I know what my problem is!   Instead, the emphasis should be on Include attempted solutions, why they didn't work, and the expected results Also, the emphasis is set on the expected results, rather than what's usually missing from the question, the attempted solutions.     I suggest the following emphasis:     Questions asking for code must demonstrate a minimal understanding   of the problem being solved. Include attempted solutions, why they   didn't work, and the expected results. See also:


Change a stylesheeted CSS value via Javascript

Hey I would like to know how to change a CSS value of the document & not from a specific element  I alredy checked  but the solution adds CSS rules. I've read this too  but targets a specific element too...  I would like to change a value that has been declared in the css file, some kind of an 'absolute value'  It might be something like (we'll here change color of a tag) :  var sheet = document.getStyle(); sheet.getTagStyle('a').getProperty('color').setValue('rgb(0,0,0)');   (The solution must anyway be in  but I don't get it)  So, is this kind of thing possible, and if yes how? (Beware in js not jquery please)


I recently opened the SE Android app on my phone, and it opened to the "Feed" screen. However, the margins on the right are way too large.  They take up way too much space (>50% in total).  They should be scaled down to something smaller - like 8% each - so that more then 3 words can be displayed per line.


This is the test method i have writtenfor batch apex ProductUpdate  .Even if i have a single callout to Database.Executebatch()  I am getting the following error.  Please help !  @isTest (seeAllData=true) global class testbatchProductUpdate  {     public static testMethod  void  pBatchUpdate()     {          /** Product to meet the Criteria in test class **/          Product2 p = new Product2();         p.Name = 'Test Product';         p.Effective_Date__c = Date.Today();         //p.CurrencyIsoCode= 'USD';         p.Material_status__c='status';         insert p;          /** Product to meet the Criteria in test class **/           test.startTest();         batchProductUpdate bpu = new batchProductUpdate();         database.Executebatch(bpu);         test.stopTest();     }  }      Error :  System.UnexpectedException: No more than one executeBatch can be called from within a testmethod. Please make sure the iterable   returned from your start method matches the batch size, resulting in   one executeBatch invocation.", Failure Stack Trace: "External entry   point"


Following scenario: I have ignored the tag (don't show questions at all)  on . Yet on , I am still shown all HNQ which are tagged with . The same example works for .   I find this behaviour quite odd, as I explicitly set exactly those questions not to be shown to me to avoid any possible spoilers in the titles (happens quite often).  Therefore I would like to propose to filter HNQ by the ignored tags per site. What I mean with that is, that if I ignore the tag  on movie.se, I don't want to see any of those questions in HNQ, but only the ones coming from movie.se. Questions tagged  from scifi.se should still be shown, as I don't ignore the tag on that site.     I hope this is understandable. If you need some clarification let me know and I will try to provide it.   I couldn't find any duplicate to this question, but if it has already been proposed, please let me know.


Create NSString by repeating another string a given number of times

This should be easy, but I'm having a hard time finding the easiest solution.  I need an NSString that is equal to another string concatenated with itself a given number of times.  For a better explanation, consider the following python example:  >> original = "abc" "abc" >> times = 2 2 >> result = original * times "abcabc"   Any hints?    EDIT:  I was going to post a solution similar to the one by , after looking at this implementation from the OmniFrameworks:  // returns a string consisting of 'aLenght' spaces + (NSString *)spacesOfLength:(unsigned int)aLength; { static NSMutableString *spaces = nil; static NSLock *spacesLock; static unsigned int spacesLength;  if (!spaces) { spaces = [@"                " mutableCopy]; spacesLength = [spaces length];     spacesLock = [[NSLock alloc] init]; } if (spacesLength < aLength) {     [spacesLock lock];     while (spacesLength < aLength) {         [spaces appendString:spaces];         spacesLength += spacesLength;     }     [spacesLock unlock]; } return [spaces substringToIndex:aLength]; }   Code reproduced from the file:  Frameworks/OmniFoundation/OpenStepExtensions.subproj/NSString-OFExtensions.m   on the OpenExtensions framework from the  by .


What happened to Voldemort's first body (corpse)?

We have seen that the use of "Avada Kedavra" produces a green flash and a dead body.  When Voldemort comes to Godric's Hollow, he kills James and Lily, whose bodies are now buried in the church graveyard, and attempts to kill Harry.  Of course, the curse rebounds back to Voldemort, 'killing' him.  Many years later, Voldemort and Peter recreate a body for Voldemort.  Is there anything, anywhere that says what might have happened to the Voldemort's original body/corpse?


I'm supposed to make a function that returns a new String that looks like base appended with suffix, but if the base already end s with the suffix it returns the base. For example: if base is lightning and suffix is bug, then it returns lightening bug But if base is lightning bug and suffix is bug it also returns lightning bug. I'm actually not sure how to start this, so I just need help with the first step, then I'll try to build off of it. Also I cannot use arrays, so >it's supposed to be really basic. so far I have:      public static String appendIfMissing(String base, String suffix) {         if(base != suffix)         {             return base + suffix;         }                  return base;     }


Workflow email with link to document in library

I have created a document library in which I am now developing the workflow. I have it setup so my workflow will send emails based on certain conditions. In those emails I want to have a link back to the new document, but I cannot figure out how to do it. I have used the Absolute Encoded URL, but it takes me back to the form in the Inforpath view. I want to view it web-based from SharePoint. I am thinking I have to do something with the fields under Current Item, but cannot figure it out.  Does Anyone have a solution?


NullPointerException in Floating Action Button in Fragment

can  you help me with this error:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.FloatingActionButton.setOnClickListener(android.view.View$OnClickListener)' on a null object reference                                                                     at com.sadface.tutorapp.FirstFragment.onCreateView(FirstFragment.java:23)   I want to handle FAB in fragment, so here's code:  FirstFragment.class  public class FirstFragment extends Fragment {  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {      View view = inflater.inflate(R.layout.fragment_first,             container, false);     FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);     fab.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)                     .setAction("Action", null).show();         }     });     return view; }   }  And fragment_first.xml :  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/holo_green_dark">  <TextView     android:id="@+id/textView3"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerHorizontal="true"     android:layout_centerVertical="true"     android:text="First Fragment"     android:textAppearance="?android:attr/textAppearanceLarge"/>  <android.support.design.widget.FloatingActionButton     android:id="@+id/fab"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_gravity="bottom|end"     android:layout_margin="@dimen/fab_margin"     app:srcCompat="@android:drawable/ic_input_add" /></RelativeLayout>   I read on stackoverflow, that i have use view.findById, but it isn't work, i don't understand what's a problem?


Expectation, Variance and Correlation of a bivariate Lognormal distribution

If $Y \sim N(\mu,\sigma^2)$ is normally distributed, then $X=\mathrm{e}^Y$ is lognormally distributed. To get the log-$\mu$ and log-$\sigma$ of this lognormal distribution you calculate $$\sigma^2 = \ln\left( \frac{\mathit{Var}}{E^2} + 1 \right)$$ and $$\mu = \ln(E)-\frac{\sigma^2}{2}$$.  But how is this in the case of a bivariate Normaldistribution, $Y \sim N((\mu_1, \mu_2),\Sigma)$, $\Sigma=((\sigma_1,\rho),(\rho,\sigma_2))$ How do I get $\mu, \sigma, \rho$? And more general in the case of a multivariate distribution?


I am fairly new to blender and I am trying to do something which I am assuming is fairly straight forward with no success. All I'm looking to do is emboss some text onto the curved part of a yogurt pot. Image attached below. What is the quickest and easiest way of doing this?  Thanks in advance


Perhaps a basic question, if I have an un-normalised histogram, my understanding was that the integral is simply the total number of points.  If I then fit a curve over the the histogram, then surely if I integrate this curve from $-\infty$ to $+\infty$ I should get a value that is very close to the total number of points in my histogram's data set -- correct?   If the histogram and the curve is centred around $0$ are there any special considerations, for example normalising?


Qmail has 500 00 messages in queue and I installed qmHandle to help sort out the spam in the queue. This process has taken a long time and alternative scripts like qmail-remove also take time. I want to move the Qmail queue to a backup (queue.BAK)and recreate a new queue so that mails can flow so long as clients cannot send or receive emails via the server at the moment.  I am running Plesk 10.4 on Ubuntu 8.04 LTS.  1) Is it possible to move the queue and recreate a new queue?  2) Please outline what I have to do to achieve this.  I followed the advice below and am adding more information here. My new qmail queue has 75 messages and all are unprocessed.I am able to send using the smtp service of the server but am not getting emails. I do not see an error in the log file but trying to download the emails gives the message that there are no new messages even when I send test messages to the email address hosted on the server.  root@alpha1:/var/qmail/queue# root@alpha:/var/qmail/queue.BAK# ls -la total 4692  drwxr-x--- 12 qmailq qmail    4096 2012-05-30 14:55 .  drwxr-xr-x 13 root   root     4096 2013-03-16 14:58 ..  drwx------  2 qmails root    90112 2013-03-13 14:37 bounce  drwx------ 25 qmails qmail    4096 2012-03-06 06:30 info  drwx------ 25 qmailq qmail    4096 2012-03-06 06:30 intd  drwx------ 25 qmails qmail    4096 2012-03-06 06:30 local  drwxr-xr-x  2 qmailq qmail    4096 2012-03-06 06:30 lock  drwxr-x--- 25 qmailq qmail    4096 2012-03-06 06:30 mess  drwx------  2 qmailq qmail    4096 2013-03-16 14:51 pid  drwx------ 25 qmails qmail    4096 2012-03-06 06:30 remote  drwxr-x--- 25 qmailq qmail    4096 2012-03-06 06:30 todo  drwxr-xr-x  2 root   root  4657152 2013-03-15 15:32 yanked  root@alpha1:/var/qmail/queue# ls -la total 48  drwxr-x--- 12 qmailq qmail 4096 2013-03-16 16:41 .  drwxr-xr-x 13 root   root  4096 2013-03-16 14:58 ..  drwx------ 25 qmails root  4096 2013-03-16 16:39 bounce  drwx------ 25 qmails qmail 4096 2013-03-16 16:40 info  drwx------ 25 qmailq qmail 4096 2013-03-16 16:40 intd  drwx------ 25 qmails qmail 4096 2013-03-16 16:40 local  drwxr-xr-x 25 qmailq qmail 4096 2013-03-16 16:40 lock  drwxr-x--- 25 qmailq qmail 4096 2013-03-16 16:39 mess  drwx------ 25 qmailq qmail 4096 2013-03-17 10:40 pid  drwx------ 25 qmails qmail 4096 2013-03-16 16:40 remote  drwxr-x--- 25 qmailq qmail 4096 2013-03-16 16:40 todo  drwxr-xr-x 25 root   root  4096 2013-03-16 16:41 yanked


I have jbutton1 which has a text "Connect" when the user clicks the jbutton1 the application runs and the text of jbutton1 changes from "Connect" to "Disconnect". Now again when the user clicks jbutton1 and the text is "Disconnect" so the application should close.   The code i have given here does not checks anything it automatically closes the application which i don't want. I want to check the text of the button if it is connect i should do a different process and if it is disconnect it shouls close my application when the button is clicked.    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                            if(jComboBox2.getSelectedItem()==null)   {   System.out.println("Select one name");    }  else  { try {      Runtime r = Runtime.getRuntime();      p = Runtime.getRuntime().exec("C:\\Program Files");       AS a4sObj = new AS(new String[]{jComboBox2.getSelectedItem().toString()});    } catch (IOException ex) {     Logger.getLogger(serialportselection.class.getName()).log(Level.SEVERE, null, ex); }    jButton1.setText("Disconnect");  //This sets connect button to disconnect   if(jButton1.getText()== "Disconnect")  // I wanted to change this line of code  {      System.exit(0); }


How do I remove a specific chapter from a table of contents?

My current layout looks like this:  \documentclass[12pt, onecolumn]{revtex4}    \tableofcontents  \section*{Acknowledgements} \section{Chapter 1} \section{Chapter 2} \section{Chapter 3} \section{Chapter 4} \section{Chapter 5} \section*{Appendix}   How do I remove the * sections (Acknowledgements and Appendix) from the contents page?  Although this question has been asked, I can't find a reasonable answer.


Dual Booting Ubuntu along with Windows 10

I have been trying to install the Ubuntu 16_04 version on my laptop (Dell Inspiron 5577). I also tried installing the 18_04 version.  Both of them possess different errors:   The 16_04 version while installing through a USB drive, stops as soon as the Ubuntu logo pops up at the beginning of the installation In the 18_04 version, the installation is successful however while booting, after we select Ubuntu, the screen goes black and nothing else happened   The laptop has got a SSD of 128GB, and by default it was MBR partitioned. The above two issues occurred while it was MBR partitioned.  Later I deleted the partitions and installed the Windows 10 using a USB drive which had Windows 10 GPT partitioned. Hence, now my laptop has GPT partitioning. Windows 10 installation was successful after GPT partitioning in the SSD.  I again tried installing both the versions of Ubuntu using the alongside Windows installation option. Now, the Ubuntu 18_04 is installed on the 1TB HDD but has the same above error (screen goes black and nothing else happened). I tried installing 16_04 version which was unsuccessful with the same error again (Ubuntu logo pops up at the beginning of the installation)!  The error reads as "(sdc) no cache ...." and some ACPI error.   PC Configuration:  SSD: 128 GB HDD: 1TB Ram: 8GB Graphics Card: Nvidia GTX 1050 4GB Processor: Intel i5 7th Gen   Can somebody please help me out?


Proving that if $G/Z(G)$ is cyclic, then $G$ is abelian

Possible Duplicate:             If $G$ is a group and $Z(G)$ the center of $G$, show that if $G/Z(G)$ is cyclic, then $G$ is abelian.  This is what I have so far:  We know that all cyclic groups are abelian. This means $G/Z(G)$ is abelian.  $Z(G)= \{z \in G \mid zx=xz \text{ for all } x \in G \}$.  So $Z(G)$ is abelian.    Is it sufficient to say that since $G/Z(G)$ and $Z(G)$ are both abelian, $G$ must be abelian?


Can the "viewed number" on a question have better formatting?

A few times now I have glanced at the "viewed" field for a  and had to count digits to figure out if it has been viewed 4 million times or 400 000 times.   Adding a thousand separator would go a long way in making that number easier to read.  I would also accept "viewed 400k" since I understand that it is an approximate number anyway.  Changing my browser locale doesn't seem to change the look of that number, so I guess it doesn't use local aware formatting.


Combinatorial proof of an binomial coefficient identity

The identity $$\sum_k \binom{2 k}{k} \binom{2n - 2k}{n - k} = 4^n$$ is found on page 187 of "Concrete Mathematics" by Knuth and Graham.  The book does not prove it combinatorially.   Is there a proof of this identity using double counting?  I have played with it for about an hour to no avail!


Riemann-Lebesgue lemma for periodic functions

Suppose $f$ is a periodic function of period $T$ and $g$ is integrable on $[a,b]$. How do I prove that $$\lim_{t\to\infty} \int_a^b f(tx)g(x) \, dx = \frac 1 T \int_0^T f(x) \, dx \int_a^b g(x)\,dx $$  The problem didn't indicate that $f$ is continuous.


Several sources suggest, that there are two canonical ways to check whether variable is undefined:  foo === undefined typeof foo === 'undefined'   But can anyone explain, why would one use === instead of == ?   EDIT: the question is not about === vs ==. It is about using correct operator with the 'undefined'. The difference between === and == is obvious. But the question is which operator would be more correct when checking if value is undefined or not.


Wrapping 3D noise functions like simplex and perlin in c#

I'm experimenting with loop-able worlds that have a height-map for terrain data.  While I can easily create loop-able .BMP textures for this in Photoshop and just load the terrain from them, but that limits the size and variance of the worlds to whatever I pre-generate for the player.  I would like to proceduralize the process. I have got a simplex terrain and a perlin terrain generator and I'd like to wrap them so that the world loops back around to the same place if you travel in a straight line in any direction North East South West  What would be the best techniques to use to wrap the noise to a tillable terrain.  This question Different as it is for both perlin AND simplex. It is also different as I forgot to mention I am using 3D noise for some of my work.


I am working on a project where I have to monitor Vehicle fuel levels using an ADC of a micro controller. My fuel signal is a 0-12V signal & my 10 bit ADC is 0-3.6V range. I have 2 questions :-   Is only putting resistor divider for 0-12V to 0-3.6V sufficient? Do I need to take care of anything else here? How do I calculate resolution of 10 bit ADC after I drop down the voltage as mentioned in point 1 using a divider circuit?


`ls -d */` is not working on one specific directory

ls -d */ runs fine in all other directories that I tried, but in one specifically, I get this:  ls: invalid option -- '/' Try 'ls --help' for more information.   I pasted the command in the terminal, so, it's exactly the same in both cases.


When using the title "Webmaster" is the first letter capital?

Trying to clarify whether the first letter in the title of Webmaster is capitalized? I am referring to a title listing and not when used in a sentence.


Lets say a creature is attacked by an adventurer with a net.  Can the creature free themselves from the net with misty step?


Global maxima/minima of $f(x,y,z) = x+y+z$ in $A$

Find the global maxima/minima of $f(x,y,z) = x+y+z$ for points inside of $A = \{ (x,y,z) \in \mathbb{R}^3: x^2-y^2 = 1 \wedge 2x+z = 1 \}$   I renamed the conditions of $A$ to a function $g(x,y,z) = x^2-y^2-2x-z = 0$ in order to be able to use Lagrange multipliers.  Deriving $f$: $\nabla(x,y,z) = (1,1,1)$  Deriving $g$:   $g_x = 2x-2$ $g_y = -2y$ $g_z = -1$   By solving the Lagrange system:  \begin{cases} 1 = \lambda(2x-2) \\ 1 = \lambda (-2y) \\ 1 = \lambda (-1) \\ g(x,y) = 0 \end{cases}  I get that $(x,y,z) = (\frac{1}{2}, \frac{1}{2}, -1)$ for $\lambda = -1$. But that point is not inside A.  Is this enough to guarantee that $f|_A$ does not have either maxima nor minima?  (Since the second derivatives are all zero, the second derivative test doesn't give any information.)  Thanks!  EDIT:  By parametrizing $y = \pm \sqrt{x^2-1}$ and $z=1-2x$ and doing the composition with $f$ I get that $f(x, \sqrt{x^2-1}, 1-2x)$ is monotonically increasing and $f(x, -\sqrt{x^2-1}, 1-2x)$ monotonically decreasing. Would that prove that $f$ never reaches either maxima nor minima?


Looking for a movie from 80s with glowing green orbs causing kids to shrivel up from the feet on up

I think it was the 80s. All I remember were these floating, green/black orbs that at one point came to hover over some kids in bed. Then the kids feet started shriveling and rolling up the legs. I don't remember if it showed what happened then, like the like were absorbed or souls sucked into the orb or something like that.   For some reason I've associated this for a long time with the Body Snatchers so maybe it was around the same time. Since then I've learned it wasn't that movie.


Does there exist a good reference on the algorithms used by calculators, especially on the trigonometric and transcendental functions?  I would still like to know how Casio generates its random numbers. I still wonder if they are any good.


Should an adverb go before or after a verb?

For example:     The word rarely turns up outside of those contexts.      The word turns up rarely outside of those contexts.   Which one is correct and why?


Classified ads website ranking very low in google indexing

We have a large classified ads website with a good sitemap and robots.txt. We have good content google crawls us 4 times per second but.... we dont get indexed by Google and our new advertisement post appears in SERP after 2 or 3 days what should we do to get index in hours?


PHP How to assign starting value to changing value?

I'm trying to make something that allows the user to change the "price" of an item. It's working so far, but my problem is that the prices show up as empty values on the first load of the page, giving me the "undefined index" error, which means that the user has to input prices first before it works as intended. I want to make it so that the prices have predefined values before loading.  Any help would be much appreciated.  <?php  $price1 = $_POST['price1']; $price2 = $_POST['price2']; $price3 = $_POST['price3']; $price4 = $_POST['price4']; $price5 = $_POST['price5']; $price6 = $_POST['price6'];  ?>
Admin
  <form method="POST" action="admin.php">

     Product Name	     Price	     Change Price

     Double Cheesy Quarter Pounder	     <?php echo "PHP" . $price1;?>	     <input type="text" name="price1">

     Crispy Bacon Burger	     <?php echo "PHP" . $price2;?>	     <input type="text" name="price2">

     Mushroom Burger	     <?php echo "PHP" . $price3;?>	     <input type="text" name="price3">

     Triple Bacon Burger	     <?php echo "PHP" . $price4;?>	     <input type="text" name="price4">

     Cheesy Bacon Fries	     <?php echo "PHP" . $price5;?>	     <input type="text" name="price5">

     Chocolate Frappe	     <?php echo "PHP" . $price6;?>	     <input type="text" name="price6">

 <input type="submit" value="Confirm">  </form>


Search string per file once and print the file name

How may I use grep (or any other tool) to  search one string per file only once and also print that file name?


Why does motion under inverse square law follows elliptical motion?

I have this in mind since quite a time. In book it was given that once kepler asked newton what is relation of distance with gravitational force. Newton said inverse square on which kepler concluded motion of planets will be elliptical, it is more easy to generalize it to circle as older attempts. I understand that circle is special eclipse with $a=b$. So my question is how inverse square determines/ derives to elliptical path motion?


Creating a folder shortcut on Desktop using command line

I know I can create a folder's shortcut by pressing Ctrl and shift, but I wonder how to do it in a command line.


How do I get the application exit code from a Windows command line?

I am running a program and want to see what its return code is (since it returns different codes based on different errors).  I know in Bash I can do this by running     echo $?   What do I do when using cmd.exe on Windows?


Can Photos app on macOS sync faces (or People)?

I'm running the Photos app on several Macs and have iCloud Photo Library enabled. One of the Macs downloads the originals as well, the others use the Optimize Mac Storage feature. But I can't seem to find out how to sync faces across the devices. In  it states the following:  Photos lets you tag people's faces in your pictures so you can find friends easily. When you use iCloud Photo Library, these faces automatically update on all your devices. iCloud doesn't automatically update changes to the names associated with Faces or the contents of the Faces photo album in the Photos app. You can tag people's faces with names on multiple Macs, but the face tags and Faces photo albums will remain unique to each computer.  Now I've read this a couple of times but I really can't figure out what this actually means; the first paragraph says "sure, it can be automatically updated on all your devices" but the second paragraph states "but it doesn't update changes". Simply put: is it, or is it not, possible to have the same faces on all my macs? And if so, what is the best approach for periodically assigning photos to faces/people? Note that I've seen a , with an appropriate response. But these do not reflect what is stated in the support article. Update 27 Sep, 2016: now with macOS Sierra and the accompanied Photos app this is still not possible. Meaning the new "People" feature is device specific and is not synched into the cloud. And is therefor useless if you have multiple devices. There is  for this as well. Update 20 May, 2017: with Photos v2.0 (3150.4.120), on macOS 10.12.5, the "Faces" feature has been renamed "People". However, it is still not possible to sync people across Macs AND iOS devices.


How can a generate an array of 5 random, single digit (0-9) integers?

I am developing a game that gets the user to crack a vault code.   int [] vault = {1,2,3,4,5};   I currently just have per-determined values for the vault code (above) but I think it would be best if they changed with each play-through of the game.   I have seen the math.random method but I'm unsure how to make it only display integer values.


Restore Steam games from non-Steam backup

I recently had to reinstall windows due to driver issues and copied all my Steam games in the steamapps folder from the C-drive to another drive, but now I'm stuck with a problem. I have installed Steam again, but when I copy the games' backup to the steamapps folder, and then install the games again, they don't seem to pickup any game files and just starts to download the games again. I have tried verifying game cache, but it just jumps to downloading as well and I have tried modifying the appmanifest files but nothing have worked so far. Any other suggestions I could try before downloading 200GB+ again with a 4Mbps line (500kbps).  Would there be any way that I can make a 'Steam'-backup (backup and restore steam games in the menu) from the games in their folders, with other words, create a bunch of *.csd and *.csm files so Steam can identify it as restoreable?


I have a cron job written to root (I'm writing to a log in /var/log so need root permission). The problem is that sometimes it works, and sometimes it doesn't.  The cron job is simply to call a python script in my home directory, this then does all the hard work.  I set the job to go off in the middle of the night so it doesn't interfere with what I'm doing and so that the API it interacts with is less likely to change (the API is updated throughout the day).  But every morning I check the logs and get the following error:  python3: can't open file '/home/myUser/path/to/the/main.py':  [Errno 2] No such file or directory   My response to this is to change the timing on the crontab to a few minutes beyond the time I am checking the logs, wait a few minutes, and the file starts running. The only thing I change is the timing, and suddenly it works.  So I know, for sure, that the file exists.  I've tried a variation of times at night (30 23 * * *, 01 01 * * *, 10 02 * * *) none have worked, but whenever I set it off for 2 minutes after I check in the morning, it is fine.  Here is the crontab as it currently stands:   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games  01 01 * * * python3 /home/myUser/path/to/the/main.py >> /var/log/thisjobs.log 2>&1   It's also worth mentioning that there is an additional newline after this job (I've heard that it is necessary).  Has anyone seen this before? Is there anything I can try to get this file found without me having to manually change the script each time?  EDIT: here is my env output for cron:  LANGUAGE=en_GB:en HOME=/root LOGNAME=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games LANG=en_GB.UTF-8 SHELL=/bin/sh PWD=/root   Also thought I'd mention that I have tried using the following command (after the timing) to no avail (same error, but only with the main.py instead of the full path):  cd /home/myUser/path/to/the; python3 main.py


Finding it difficult to keep up with coursework after joining a strong master's program in mathematics. How should I study?

I am doing M.Sc. in Mathematics from a reputed college in India. But I have a humble background in mathematics. At my undergraduate college most of my batch mates were not interested in mathematics, and the teacher taught in a way that we could sail through exams. But I tried to learn on my own from online courses like NPTEL and OCW lectures and somehow I got a position for doing master's. At that time I used to study for just an hour and manage to understand, and I didn't solve any problems. But here, the teachers are extremely good and they take 3-4 hours of lectures (i.e., one hour for each course). But now I am not able to grasp the concepts (develop intuition, visualization, looking at the big picture, etc.). To understand what my teacher/course instructor taught takes me 2-3 days of work and I am left behind. If I include memorization time then almost a week or so. I am becoming overweight and suffering from lower back problems. If stay late up at night then I don't get sunlight giving vitamin D deficiency. I don't know but I know I want to do research. But how should I deal with this, I have 6 (5courses+seminar under professor). And here we have to write an exam and be in the top 100 percent to get admitted for PhD from a reputed college with proper funding. Please guide me, help me. How can I maintain my health and study?


How to show in $R^2$, the $f(x,y)=(x^4+y^4)^{1/4}$ defines a norm on $R^2$.


My father's USA visitors visa application refused on 212(a)(6)(C)(i)

My father had a valid 10 year visit visa and he visited the US a couple of times. His visa expired recently, so he applied  for renewal. In the course of applying, he made a mistake on his application DS160 form: in the City of Birth space, he wrote the name of the city where he lives, instead of the city where where he was born as shown in his passport.   His visa was refused, citing Section 212(a)(6)(C)(i) Misrepresentation. He was sent a refusal letter, with 'Classes of Applicants Eligible to Apply for Waiver under INA 212(i)' ticked/checked.   What is our next step in order for him to get a visa?  Edit: I would like to add that my father's provided sponsorship from an American citizen and no other documents from him. They never asked to see his documents. How/where do we apply for the waiver?


Unable to assign style to dynamically created columns in table

I am unable to assign style to a dynamically created column in a table. On selecting a cell in the table, both the row and column are highlighted. this however does not work if the element is added later on. I used delegated binding by using on() but without the desired result. A search on the internet didn't give me a solution. Any ideas?    $("td").on("click", function(event) {   var table = 'table'   var styleA = {'-webkit-box-shadow':'inset 10px 10px 0px 200px rgba(213, 228, 237, 1)',               '-moz-box-shadow':'inset 10px 10px 0px 200px rgba(213, 228, 237, 1)',               'box-shadow':'inset 10px 10px 0px 200px rgba(213, 228, 237, 1)'};   var styleB = {'-webkit-box-shadow':'inset 10px 10px 0px 200px rgba(220, 231, 237, 1)',               '-moz-box-shadow':'inset 10px 10px 0px 200px rgba(220, 231, 237, 1)',               'box-shadow':'inset 10px 10px 0px 200px rgba(220, 231, 237, 1)',               'outline':' 3px solid #086aa7'};      $(table).find("td,tr").removeAttr('style');    $(table).find("td").removeAttr('style');   $(this).parent('tr').css(styleA);   $('td:eq(' + this.cellIndex + ')','tr').css(styleA);   $(this).css(styleB); });  $(document).mouseup(function(e){     var container = $("table");     if (!container.is(e.target) && container.has(e.target).length === 0)      {       $("table").find("tr,td").removeAttr('style');       $("table").find("td").removeAttr('style');     } });  $(window).on("load", function () {     $( 'table tr th:nth-child(1)').after('');   $( 'table tr td:nth-child(1)').after('	'); }); table {   font-family: arial, sans-serif;   border-collapse: collapse;   width: 500px;   margin: 50px 0 0 50px; }  td,th {   border: 1px solid #cacaca;   text-align: left;   padding: 8px;   background-color: #f5f5f5; } th {   background-color: #dce0e3; }

     Company	     Contact	     Country

     Alfreds Futterkiste	     Maria Anders	     Germany

     Centro comercial	     Francisco Chang	     Mexico

     Ernst Handel	     Roland Mendel	     Austria

     Island Trading	     Helen Bennett	     UK

     Laughing Bacchus 	     Yoshi Tannamuri	     Canada

     Magazzini Alimentari 	     Giovanni Rovelli	     Italy


apt-get update issue with pinta repository

After running sudo apt-get update, I get this issue:  Err:16 http://ppa.launchpad.net/pinta-maintainers/pinta-stable/ubuntu bionic Release 404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done                      E: The repository 'http://ppa.launchpad.net/pinta-maintainers/pinta- stable/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default.   I don't currently have Pinta installed, though. I uninstalled it via terminal after installing it a while back. I tried re-installing via the Ubuntu Software App, still got the same issue, I tried uninstalling it through it, still the same issue. I'm not sure why it displays that, and I don't know how to fix this error so I can get rid of this. Any ideas? Thanks!


Javascript pass some arguments through middleware, untouched

I have a middle ware that looks like this:  function(middleWareData) { // has more args, middleware doesn't know how many     if(middleWareData.passes()) {         origFunction(/* call with the rest of the args? */     } }   I'm not actually sure the best way to pop off the first argument from arguments then pass the rest to the original function. The original function is very dynamic (it's a connector, either to RabbitMQ which uses 4 arguments, or Redis which uses 2, or a unit test driver which just needs 1) so the middleware doesn't know how many arguments it's actually going to receive.  Using this: var args = Array.prototype.slice.call(args, 1) seems like a good start to get the true arguments. However, I believe I just turned arguments 2 through however many into one argument, that's going to be passed as an array to the first variable. Not what I want. How to do this right?


How can I hide the "Universal Access" icon in the upper panel?

If I use Gnome Tweaks to increase the text size, which I find necessary for readability on a 1920x1080 14-inch display, the "Universal Access" icon automatically appears in the upper panel. I do not need this icon/menu and would like to hide or disable it.  Opening "Universal Access" from the Settings app and enabling/disabling the top item "Always Show Universal Access Menu" does not fix my issue.


I setup a LAMP server on my desktop Ubuntu install for testing web applications. How do I set it to only run when I tell it to rather than at startup? It is not used as a production web server but instead for testing PHP scripts I write before pushing them to my public web server.


Eragon and Arya asked Angela how she killed twenty men at once she said  What is time but motion? What is motion but heat? And are not heat and energy but different names for the same thing? When you understand the implications of that, you'll understand how and what I did.  What does she mean and how does this explain what she did?


While executing below command   sudo apt-add-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"   I get the following error in command line editor  add-apt-repository: command not found


I cannot update Ubuntu because I have 99% inode usage. What is the easiest way for me to alleviate this problem?  Thanks for your help.


Note the following passage in the TeXbook (p. 110)     TeX breaks lists of lines into pages by computing badness ratings and   penalties, more or less as it does when breaking paragraphs into   lines. But pages are made up one at a time and removed from TeX's   memory; there is no looking ahead to see how one page break will   affect the next one. In other words, TeX uses a special method to find   the optimum breakpoints for the lines in an entire paragraph, but it   doesn't attempt to find the optimum breakpoints for the pages in an   entire document. The computer doesn't have enough high-speed memory   capacity to remember the contents of several pages, so TeX simply   chooses each page break as best it can, by a process of "local" rather   than "global" optimization.   Computer memory is now a bit cheaper than in 1984. Do any of the modern distributions compute page breaks in a smarter, more memory-intensive way than plain TeX?


tikzpicture is shown in PDF only after the second PDFLatex call

I am using tikzpicture to have my logo in the top left corner. It works fine, but it is only shown after the second time when I "compile" the tex file. I tried it in the editor and also in the console. It is the same result. Normally it wouldn't matter. But I want to automate the process and I want to run the PDFLatex call from a script. So I have to be sure that the picture is there. I have the following code with "random.png". I tried several pngs which have led to the same result. So it should not work with any png, I assume. Is this fixable? Thx. \documentclass{article}  \usepackage[a4paper, total={6in, 9in}]{geometry}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[ngerman]{babel} \usepackage{amsmath} \usepackage{graphicx} \usepackage{tikz}  \title{TSE-Auswertung 01.04.2020 bis 30.04.2020} \date{} \begin{document}  \maketitle     \begin{tikzpicture}[remember picture,overlay]     \node[anchor=north west,yshift=-20.0pt,xshift=40pt]%         at (current page.north west)         {\includegraphics[height=15mm]{random.png}};     \end{tikzpicture}  \begin{table}[ht] \centering \begin{tabular}{lllll} \hline Datum      & Kasse   & \# Transaktionen & \# TSE-Fehler & \# offener Transaktionen \\ \hline 15.01.2020 & Laden01 & \multicolumn{1}{r}4                        & \multicolumn{1}{r}4                     & \multicolumn{1}{r}3                                                 \\ 17.03.2020 & Laden05 & \multicolumn{1}{r}7                        & \multicolumn{1}{r}2                     & \multicolumn{1}{r}0                                                 \\ \hline \end{tabular} \end{table} \end{document}


What causes atoms to have their specific colors?

I understand that light (color) is part of the electromagnetic spectrum, and that it depends on what wavelengths are reflected/absorbed. Though what property of an individual atom gives it its color? Do electrons, neutrons, and other subatomic particles have color?  Basically: What intrinsic property causes the differences between how the varying wavelengths of light are reflected at the atomic scale? Also, how do photons factor into this?


How to determine which process or application is using excessive data

My 2015 MacBook Pro uses wifi from a 4G dongle. Some process or application is regularly making large download requests, which are very expensive over 4G - it recently used $60 of data in a single day, for an unknown purpose.  How can I detect (and disable) these processes?  To demonstrate, I rebooted and immediately opened Activity Monitor (so I'd have an accurate measure of the network activity), then used the laptop for an hour or so (but without constantly monitoring the activity).  The total Data Received is 428Mb (confirmed on the wifi dongle), but the cumulative network traffic of the processes listed is far less than this:    I assume that one or more processes is running, requesting data, then closing, and that after this they're no longer individually listed in the Activity Monitor, so it's not possible to determine which processes are implicated.  How can I debug which application or process is causing this? Activity Monitor doesn't seem to be precise enough, so is there a better option?  PS I have disabled:   App Store "check for updates" and "automatically download" DropBox Google Drive iCloud Drive and I haven't opened iTunes.


I want my citations to be shown as (LastName, year) instead of (LastName Initials, year). I am using the natbib package, with setting 'authoryear'.  Below a minimilistic example:  My .tex file:  \documentclass[]{article} \usepackage[authoryear]{natbib}  \begin{document}  Document body text with citations \\ \citep{Bertram91} \\ \citep{Bertram06} \\   \bibliographystyle{authordate1} \bibliography{myreferences}  \end{document}   And my .bib file:  @article{Bertram91,         author = "Bertram C.D., Raymond C.J.",         title = "Measurements of wave speed...",         journal = "Med. and Biol. Eng. and Comput.",         volume = "29",         year = "1991",         pages = "493--500", }  @article{Bertram06,         author = "Bertram C.D., Tscherry J.",         title = "The onset of flow-rate...",         journal = "Journal of Fluids and Structures",         volume = "22",         year = "2006",         pages = "1029--1045", }   This gives the output:    I do NOT want the initials in the citation.


T sql select int value as casting varchar

I have stored procedured called GetReport    customers.branches_ID is int type    however @Branches parameter is varchar   @Branches is "10,13534,554,776,767"  I want to search 10,13534,554,776,767 in branches_ID however if i cast/convert to varchar it is not working for me.  ALTER PROCEDURE [dbo].[GetReport]   @fromDate datetime, @toDate datetime, @Branches varchar (500) = null  AS BEGIN  SET NOCOUNT ON;   select * from customers where  (customers.CreatedDate between @fromDate and @toDate) and  (@Branches is null or CONVERT(varchar(500), customers.branches_ID) in(@Branches )) -- This part is not working for me   END   how can i solve this problem how can i search multiple comma varcvhar inside of int column ?  Thanks.


I'm writing a help document for an application and I'm unsure of the correct grammar for the following statement:     A confirmation dialog will then appear showing the number of items that will be modified by the operation.         A confirmation dialog will then appear showing the number of items which will be modified by the operation.   I've been reading & re-reading these statements over and over in my head and both seem to sound fine.  Is there a rule to determine when one should use that will and when one should use which will?  Many thanks in advance for your time.


What is best suited condition when interface is used instead of inheritance in c#?

I am wondering what is best condition to use interface instead of inheritance in c#.


Format a two column book with text on one side and images on the other

I would like to know how to format an entire book in this way, with one column for text and the other for figures. I have seen solutions to do this with mini-sections but is there a simple way to do this for the whole book ?


in javascript,why null !== undefined is true,but null == undefined also is true?

console.log(undefined !== null);//true console.log(undefined == null);//true     I can't undestand why undefined !==null,but i know undefined == null,because The language specification :     If x is null and y is undefined, return true


I have made a rig for a model, however the main torso piece does not attach to the rig due to this error. I have sought out various solutions but none seem to work. Does anyone know the issue?


Why are we allowed to move over "dt" terms when solving separable differential equations?

When solving the differential equation:  $\frac{dx}{dt}=x(t)'=f(x)g(t)$,  we manipulate it so that  $\frac{1}{f(x)}dx=g(t)dt \Rightarrow \int \frac{1}{f(x)}dx= \int g(t)dt$  But from what I understand, it's not strictly allowed to split the $dx$ and $dt$ terms in this manner, since you can't simply multiply the $dt$ term to both sides.  So then my instinct is to look at  $\frac{1}{f(x)}\frac{dx}{dt}=g(t) \Rightarrow \int\frac{1}{f(x)}\frac{dx}{dt}dt=\int g(t)dt$  But even in this case, are we allowed to just cancel out the $dt$ terms on the left hand side? My intuition tells me that $dt$ isn't a number, so you shouldn't be allowed to do this? Can someone explain what's happening here, and if you are allowed to just cancel them... why?  I guess the concept of being able to split up and cancel out $dt$ terms is relevant for the chain rule and U-sub as well, so even in these 2 cases, why are we allowed to cancel/split up these differential terms?  Thank you in advance!


I understand that upcasting/downcasting in objects do not change the object, but rather change how we deal with them. ( or change the type of their reference if I understand correctly).  However, if we have an Animal class that has a getName(); method, and a dog class which is a child class of Animal.  Animal Billy = new Animal("billy",1); Dog b = (Dog)Billy; b.getName();   I understand that it will compile, but give a run time error, my question is why, getName(); method is present in the Animal Class, and so it is inherited by the Dog class, so it's present in both, what prevents us from having it done?


Why do I get more satisfaction out of participating in SO than out of my job?

Alternatively, are there good ways to get more satisfaction out of my job, possibly by leveraging my participation in SO?


How to show hidden files in Nautilus 3.20.3 Ubuntu 16.10?


How does changing colour affect spacing?

In the following example, the space after the red equation is much larger than the space after the black one.  \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \[ a = b \]  The quick brown fox jumps over the lazy dog. \color{red} \[ a = b \] \color{black}  The quick brown fox jumps over the lazy dog. \end{document}   It appears to me that the presence of \color{black} fools TeX into thinking there is something on the line after the equation, so the paragraph break causes a spurious blank line before the text. Section 3.7 of  mentions spacing problems, but doesn't really explain the situation. What is on the line after the red equation?  Note that there is already ; I want to understand what is going on.


I am using Ubuntu 16.04 on an intel cpu with a gtx1050 gpu.  The GPU option in Kdenlive is grey-out, I have to install the moveit library in order to make the use of a GPU available.   However,  apt-get install moveit   has no effect,  so I googled for a tutorial on how to install it,  there were a few and they had different names after apt-get install and had further commands,  more complicated than a simple apt-get install command.   I tried them all, but with no positive result.


Why wasn't "When I was in Sharm El-Sheikh, I *have sunbathed* a lot" a good answer?

When I was in Sharm El-Sheikh, I .... a lot      A) Have sunbathed B) Was sunbathing C) Would sunbathe D) Sunbathed   why it can't be "have sunbathed" as verb sunbathe means to make the skin brown or darker and that has an affect and continue for a period of time so why it can't be A


Salesforce Apex Regex too complicated error

I am working on an apex class which is making a webservice callout to an external system and with the response that I get, I am updating couple of fields on the Account object. Unfortunately, this webservice is not batched or bulkified, so I need to call this service once per account and process it one at a time. The webservice response is sometimes too big (around 1MB when saved to a file). Most of the responses are processed fine and very few of them failing with the error message "Regex too complicated". The statement that is causing the response processing to fail is below. strResponse = strResponse.replaceAll('"system"','"smsystem"');  As you can see, I am not using a pattern matcher or any kind of Regular expression. I am not sure why I am getting this error message with just a replaceAll() method. Can someone help me in avoiding this error message?


updatedb & locate command problem - Files from external hard drive are no longer indexed after rebooting

Files from my external hard drive are no longer indexed after rebooting.  I have to remount and then run  # updatedb   after each reboot.  The problem is updatedb takes a few minutes for my external hard drives.  Is there any way I can retain indexing for my externals after I reboot so that the locate command can search through my externals?  EDIT:  Per Request here are my specs:  $ cat /etc/updatedb.conf PRUNE_BIND_MOUNTS="yes" # PRUNENAMES=".git .bzr .hg .svn" PRUNEPATHS="/tmp /var/spool /media" PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs ecryptfs fusesmb devtmpfs"  # mount /dev/sda5 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) none on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /dev type devtmpfs (rw,mode=0755) none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) none on /dev/shm type tmpfs (rw,nosuid,nodev) none on /var/run type tmpfs (rw,nosuid,mode=0755) none on /var/lock type tmpfs (rw,noexec,nosuid,nodev) none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/me/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=me) /dev/sdb1 on /media/me type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions) /dev/sdd1 on /media/Little Boy type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions) /dev/sde1 on /media/Fat Man type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)  # on_ac_power; echo $? 255


Suitable lens for macro photography with Nikon D90

I own a Nikon D90 and use 18-105mm kit lens for my photography. I mostly shoot flowers and objects I can get close to. Some sample here:       I would like to get much closer and capture minute details of flowers and other objects. But with 18-105mm lens I can't go any closer to objects as the lens won't focus. So can someone please suggest options for me? like what lens I need to opt for? or will extension tubes help?  I also have Nikon 50mm 2.8 lens which I use for portraits.   Thanks


Creation of a simple field failed in MySql

CREATE TABLE bdt.transactions (  `transaction no`     int UNSIGNED NOT NULL  AUTO_INCREMENT, data                 date    , by                   int  NOT NULL  , hours                int  NOT NULL  , for                  int  NOT NULL  , `transaction type`   set('normale','corso')   NOT NULL DEFAULT 'normale' , activity             text  NOT NULL  , CONSTRAINT pk_transactions PRIMARY KEY ( `transaction no` ) ) engine=InnoDB   Error:     You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near  'by                   int  NOT NULL  ,  hours                int   NOT NULL  ,  for                  int  NOT NULL    at line 4   With backquotes is now OK


Can anyone tell me how to find permittivity of a dielectric sample using a rectangular waveguide

Im trying to find the material paramters of a dielectric sample using a waveguide(X band) employing the Transmission/Reflection technique. While performing simulation in CST, how to properly orient the sample inside? Is it necessary that the waveguide is flared?


I am having a hard time understanding the definition of dichotomy.   I saw this recent article from a Harvard student: "• Dichotomy means two mutually exclusive alternatives and does not mean difference or discrepancy. Correct: There is a dichotomy between even and odd numbers."  Does that support the Oxford Dictionary's definition?  "Division or contrast between two things that are or are represented as being opposed or entirely different:"  I'm just completely confused, now.


How to get a non pixelated illustration upload to social media (mostly FB)?

Intro: I'm not a GD, but bear with me.  I've been doing digital illustrations for a while and never had an issue with posting them anywhere, until this year. I keep getting all my illustrations sort of blurred/pixelated every time I upload them to most social medias. I use Illustrator CC. Most of the time I create my work on a CMYK file (just in case if I ever want it to print it), 300 ppi, align to pixel grid and then export it on RGB. Mostly on square format (20x20cms, I changed it to 1200px x 1200px as someone suggested those measurments me for fb) This is driving me nuts. Believe me I've tried everything (save for web, save for microsoft office, jpg, png, different sizes and resolutions according to fb, tw, pinterest...) The only place they look great are tumblr or behance, since they don't compress anything, so far. I'm ready to try everything one more time, for the sake of my images looking sharp.     Here's an example of what I'm suffering. Left one is the fb uploaded version. Right one the original, how it should look.  Help a girl out! Thanks  Cecily