I have epson thermal printer model M129H. How to get the status of the printer in my c# application ? The status includes:   Printer is on or off Paper roll is finished Error in printing Paper roll fitter is open   etc.
In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment.  If I know a printer's name, how can I get these values in C# 2.0?
Redirect non-www requests to www on Amazon Route 53 I want to redirect all requests from example.com to www.example.com.   Preferably, this should happen at DNS level. I tried using PTR records, but that simply fails, returning a 404.  wwww.example.com is an ALIAS for an Elastic Load Balancer.  What’s the simplest way to achieve this? What are the recommended textbooks for introductory calculus? I just updated my iPhone 7 Plus to iOS 13 tonight and noticed that the post menu in the Stack Exchange app became close to unreadable, because the font/text is too large to be properly displayed. Luckily we can still recognize the icons...    (Yes, app development has been frozen for quite a while but the app continues to serve me well.) Why Was Peter Pettigrew Sorted To Gryffindor? Does ASP.NET MVC use the regular toolbox controls? Use fixed keyboard for a given app I would like to tell my Android that when I'm in a given app it should switch to a given keyboard. My use case is that I want to use Hacker keyboard with Connectbot. Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed? In what order do multiple readied actions with the same trigger resolve? My players have been scheming with rapid entry tactics for the megadungeon I've recently started running. Unfortunately, the monsters are aware of the adventurers, and this has lead to a weird question of priority. Given the following situation (which I'm pretty sure is going to happen next session in some form or another) what happens?     Alice the adventurer readies an action; if her teammate Carlos opens   the door, she's going to throw the alchemists fire through the door,   which should do enough damage to kill any goblins hiding there.      Meanwhile, on the other side of the door, Bob the goblin is lying in   wait. He readies an action; if the door opens, he's going to hit the   switch to open the trapdoor in the next room, which should drop any    pesky adventurers into a pit with spikes at the bottom.      Carlos opens the door.   I know what happens when , but what happens when multiple readied actions get triggered at the same time? My guess would be an opposed reflex save or initiative check of some kind to see who goes first, but that's entirely just intuition speaking. The rulebook doesn't seem to speak to the issue. So, through typing several commands I've found that there's not only ls, but l and la too. There doesn't appear to be any man entries on Ubuntu 12.14. They all appear to do similar things with minor differences:  $ ls app        config     CONTRIBUTING.md  doc       Gemfile       Guardfile  LICENSE  MAINTENANCE.md  Procfile  Rakefile   script  tmp     VERSION CHANGELOG  config.ru  db               features  Gemfile.lock  lib        log      PROCESS.md      public    README.md  spec    vendor $ la app      CHANGELOG  config.ru        db   features  Gemfile       .git        Guardfile  LICENSE  MAINTENANCE.md  Procfile  Rakefile   .rspec  .secret     spec  .travis.yml  VERSION .bundle  config     CONTRIBUTING.md  doc  .foreman  Gemfile.lock  .gitignore  lib        log      PROCESS.md      public    README.md  script  .simplecov  tmp   vendor $ l app/       config/    CONTRIBUTING.md  doc/       Gemfile       Guardfile  LICENSE  MAINTENANCE.md  Procfile  Rakefile   script/  tmp/     VERSION CHANGELOG  config.ru  db/              features/  Gemfile.lock  lib/       log/     PROCESS.md      public/   README.md  spec/    vendor/   Just as a bit of trivia, are there more of these and what do they do? Is here any place to find this out? Unfortunately, google searching these commands gets ignored because they're so short. I recently decided to watch Doctor Who, and started viewing the 2005 version. I have the first two episodes from the first season, and I can't help but wonder what is the etymology of the name "Doctor Who"? And why does the protagonist call himself "the Doctor" (or is it "the doctor")? I have noticed that some questions get a lot of responses quickly, and the cool fact is that most of the time these initial responses are correct.  I see users are motivated to accept answers. Because many questions take less than 24h to get an acceptable response, I'm unsure what to do when I have a question that takes more than 24h to get a response that I feel is complete enough to warrant being marked as accepted.  And even for acceptable responses, I often hesitate to accept them out of concern that posters will pass my question by if it already has an accepted answer (unless it has lots of upvotes). Does this really deter the higher-quality posters, though? The general advise is that you should not call GC.Collect from your code, but what are the exceptions to this rule?  I can only think of a few very specific cases where it may make sense to force a garbage collection.   One example that springs to mind is a service, that wakes up at intervals, performs some task, and then sleeps for a long time. In this case, it may be a good idea to force a collect to prevent the soon-to-be-idle process from holding on to more memory than needed.   Are there any other cases where it is acceptable to call GC.Collect? I recently found a formula to help find a sequence given a generating function:  $(\frac{1}{1-x})^k=\sum_{n=0}^{\infty}\binom{n+k-1}{n}x^n, k \in \mathbb{N}$  I just wondered if there was a known proof for this, or if anyone knows of a way to prove it. Formula for coordinates (lat, lon), azimuth and distance. I would like to know how to find a set of coordinates on a small circle some distance from another point.   For example, lets say A = (39.73, -104.98) #Denver  B = (39.83, -106.06) #point approximately 50 nautical miles away from A along the great circle track to C  C = (40.75, -111.88) #Salt Lake City, approximately 323 nautical miles away from A  How do I get the set of orange coordinates when I don't know the angle but I do know the cross track distance?  For concreteness, lets say the outer points near B have a cross track distance of +- 30 nautical miles and the inner points have a cross track of +- 15nm.  And the points near C have a cross track of +- 25 nm.  Also I have an initial bearing from A to C of -1.34 #radians How to find correctly the .bib file? Why does the Stern–Gerlach quantum spin experiment conflict with classical mechanics? My understanding of the Stern–Gerlach experiment is that neutral (0 total charge) particles are sent through a non-homogeneous magnetic field, with the expectation that the field will push that particle's path higher or lower on a detector because of the collective spin of that particle. While the detector can detect particles in a two-dimensional surface, the results of the experiment are that particles appear in only two localized areas directly above the path of the particle stream, or directly below the path of the particle stream - spin up or spin down. The conclusions from these measurements are that the particle, when measured, will always have about the same magnitude.  Why does this not follow from classical mechanical theory related to magnetism? If you shot a magnet through a similar apparatus, I would expect the magnet to be rotated to align with the magnetic field in some way which, at high enough field strengths relative to the mass of the magnet, would cause us to measure basically the same magnitude as if the magnet entered the apparatus pre-aligned with the field.  How is my explanation incorrect? So to help prevent brute force attacks against my phpmyadmin install I've configured nginx to require HTTP Basic Auth (extra username and password) and then the requests need to come from a whitelisted IP Address. However the IP Address whitelist works fine if I run  however without adding the extra .php block I could load  without my IP being whitelisted. This issue doesn't affect the HTTP Basic Auth. Is there a reason this happens? Anyway to get around having to add extra .php blocks? A copy of the config area for phpmyadmin is below.  # Setup and secure phpMyAdmin location /phpmyadmin/ {   allow 1.2.3.4;   deny all;   auth_basic "phpMyAdmin - HTTP Basic Login";       auth_basic_user_file /etc/nginx/pma_pass;     location ~ \.php$ {     include snippets/fastcgi-php.conf;             fastcgi_pass unix:/run/php/php7.0-fpm.sock;     allow 1.2.3.4;     deny all;     } } Easy way to turn JavaScript array into comma-separated list? I have a one-dimensional array of strings in JavaScript that I'd like to turn into a comma-separated list. Is there a simple way in garden-variety JavaScript (or jQuery) to turn that into a comma-separated list? (I know how to iterate through the array and build the string myself by concatenation if that's the only way.) Plotting logarithmic regression with gnuplot using PGFPlots I have the data in 001.csv below that I want to plot. I need two plots: one showing the data and another one showing logarithmic regression. I have no problems plotting the line for the data (and also adding a linear regression line) but I just can't manage to get a logarithmic regression line in there. As far as I understand, I need to use gnuplot for this but unfortunately I can't make it work. Any help would be much much appreciated.  Cheers,  Cem  %%%%%%%%%%%%%%%%%%%%%% %This is my data:  \begin{filecontents}{001.csv}     1990 275     1991 187     1992 249     1993 177     1994 212     1995 303     1996 323     1997 364     1998 461     1999 427     2000 683     2001 553     2002 571     2003 682     2004 585     2005 608     2006 609     2007 643     2008 719     2009 545 \end{filecontents}  %%%%%%%%%%%%%%%%%%%%%% %This is my plot for the data:  \begin{tikzpicture} \begin{axis}[     axis on top=false, axis x line=middle, axis y line=middle,     xlabel={\footnotesize Year},     ylabel={\footnotesize Frequency count},     xmin=1975, xmax=2009,     ymin=0, ymax=900,     xtick={1980,1985,1990,1995,2000,2005,2009},     ytick={0,100,200,300,400,500,600,700,800},     legend pos=north east,     legend style={font=\fontsize{6}{5}\selectfont},     ymajorgrids=true,     xmajorgrids=true,     grid style=dashed,     /pgf/number format/.cd,     1000 sep={}     ]  \addplot[     smooth,tension=0.9,color=blue,mark=diamond         ] table {001.csv};  %Somewhere here I need a logarithmic regression line.  \end{axis} \end{tikzpicture}  %%%%%%%%%%%%%%%%%%%%%% Create default home directory for existing user in terminal How do I do this? I created a user without a home directory and now I want to create one. Not just a folder called new_user, I want the default home directory with all it's folders and hidden files, etc.