HPLIP gives a error messages when trying to installing plug-in for HP P1102W-printer
How do I install HP P1102W printer driver
I was writing a toString() for a class in Java the other day by manually writing out each element of the class to a String and it occurred to me that using reflection it might be possible to create a generic toString() method that could work on ALL classes. I.E. it would figure out the field names and values and send them out to a String.  Getting the field names is fairly simple, here is what a co-worker came up with:  public static List initFieldArray(String className) throws ClassNotFoundException {      Class c = Class.forName(className);     Field field[] = c.getFields();     List&lt;String&gt; classFields = new ArrayList(field.length);      for (int i = 0; i &lt; field.length; i++) {         String cf = field[i].toString();         classFields.add(cf.substring(cf.lastIndexOf(".") + 1));     }      return classFields; }   Using a factory I could reduce the performance overhead by storing the fields once, the first time the toString() is called. However finding the values could be a lot more expensive.  Due to the performance of reflection this may be more hypothetical then practical. But I am interested in the idea of reflection and how I can use it to improve my everyday programming. Another meta question identified a bug that was marked as designed. To summarize the bug, the little number that appears next the Review link in the header shows an incorrect value most of the time.         I would like to propose that the feature be dropped. Honestly, I would prefer it be fixed, but the response to the question above gives me little faith that it will be. Half of the time, I click that little brown box and find out that I was lied to. There's nothing to review.  The little number no longer does the job it was created to do.        Oh sweet! Three things I can review!        Just kidding... If a superconductor has zero resistance, does it have infinite amperage? Deriving the inverse of a 2x2 matrix I am looking for a derivation for the inverse of a 2x2 matrix. I am also wondering why the determinant is involved in the expression. I am familiar with high school maths and linear algebra. If there is an intuitive reason for expression i would also be interested in that. Find the limit $\lim_{n\to\infty} \frac{x_1 y_n + x_2 y_{n-1} + \cdots + x_n y_1}{n}$ When $\lim_{n\to\infty} x_n = a$, and $\lim_{n\to\infty} y_n = b$, find the limit, $$\lim_{n\to\infty} \frac{x_1 y_n + x_2 y_{n-1} + \cdots + x_n y_1}{n}.$$ Thank you for your help in advance. Complex differential equation How do I solve $$x'=e^{it}\overline{x}?$$  This is a complex differential equation, but I don't see how to solve it.  Edit: the original ODE is given by $$(x', y')=\begin{pmatrix}\cos t&amp; \sin t\\ \sin t&amp;-\cos t\end{pmatrix}(x,y)$$ I want to show that solutions of this ODE do not remain bounded for all $t$, and the idea was to solve the complex equation. How do I tokenize a string in C++? Java has a convenient split method:  String str = "The quick brown fox"; String[] results = str.split(" ");   Is there an easy way to do this in C++? How can I sanitize user input with PHP? Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML tags? Why is any number (other than zero) to the power of zero equal to one? Please include in your answer an explanation of why $0^0$ should be undefined. I have a map of an area and georeferenced photos. I need to be able to bring the pictures as points and then be able to click at a certain point and an image pop up.   I have revisited this issue, i managed to get this far but the pop up doesn't work.   See image: I am having some issues with the hyperref package. I would like to create a Introduction chapter without a number so I use \chapter*{Introduction} and \addcontentsline{toc}{chapter}{Introduction} because I want it in the table of contents (see example).  But then the link in my PDF viewer gets it wrong and also the automatically created header is no longer correct (see picture). The table of contents shows the right page number (p.1) but the link is also wrong.   What is my mistake here?  \documentclass{scrbook}  \usepackage{hyperref} \usepackage{blindtext} \usepackage{glossaries}   \makeglossaries  \newacronym{eg}{e.g.}{% for example }   \begin{document}   \frontmatter  % abstract before the table of contents \chapter*{Abstract} \addcontentsline{toc}{chapter}{Abstract} \blindtext  \tableofcontents  % chapter with acronyms \cleardoublepage \phantomsection  \printglossary[type=\acronymtype] \addcontentsline{toc}{chapter}{Glossary}  \cleardoublepage \mainmatter   \phantomsection % \chapter{Introduction} % with this everything is correct but I don't want the number \chapter*{Introduction} \addcontentsline{toc}{chapter}{Introduction}  \blindtext  \pagebreak  \blindtext  % first chapter \chapter{Chapter1}  \gls{eg} \blindtext  \pagebreak  \blindtext   \end{document} How to compare the strings using < (Greater than symbol) Below is my input file:  PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.177, 2 PS Sensor Value = -5.501000 , Min = -5.583000 , Max = -5.319000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.210, 3 PS Sensor Value = 15.996000 , Min = 15.814000 , Max = 16.078000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.231, 4 PS Sensor Value = -16.505000 , Min = -16.587000 , Max = -16.323000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.263, 5 PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.302, 6 PS Sensor Value = 4.002000 , Min = 3.820000 , Max = 4.084000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.481.557, 1 PS Sensor Value = 6.199000 , Min = 6.017000 , Max = 6.281000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.518.691, 2 PS Sensor Value = -5.503000 , Min = -5.585000 , Max = -5.321000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.156, 3 PS Sensor Value = 15.996000 , Min = 15.814000 , Max = 16.078000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.195, 4 PS Sensor Value = -16.505000 , Min = -16.587000 , Max = -16.323000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.221, 5 PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.240, 6 PS Sensor Value = 4.002000 , Min = 3.820000 , Max = 4.084000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.480.644, 1 PS Sensor Value = 6.199000 , Min = 6.017000 , Max = 6.281000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.615, 2 PS Sensor Value = -5.501000 , Min = -5.583000 , Max = -5.319000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.729, 3 PS Sensor Value = 15.996000 , Min = 15.814000 , Max = 16.078000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.765, 4 PS Sensor Value = -16.505000 , Min = -16.587000 , Max = -16.323000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.788, 5 PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.810, 6 PS Sensor Value = 4.002000 , Min = 3.820000 , Max = 4.084000   I need to compare the PS Sensor Value, Min and Max value. (Min greater than PS Sensor greater than Max)   I'm expecting the output like below and here I should have only the normal lines.  What is normal lines? :  If Min value greater than PS Sensor value &amp;&amp; PS Sensor value  is greater than Max value then the line is normal lines and that should removed.        Expected Output:                                                                                                                                    PA43410-2  PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2 PS Sensor Value = 6.199000 , Min = 6.017000 , Max = 6.281000  Eg:     If   Min &lt; PS sensor value &lt; Max,    // Don’t care the normal  lines.          Throw this line away.    Else           Pull this line to consolidated new file. //Only focus on abnormal lines. Bibliography in Texmaker I'm having some problems with my bibliography in Texmaker. My code is:  \documentclass[11pt, a4paper]{article} \usepackage{graphicx} \usepackage{amsmath} \usepackage{natbib} \usepackage[utf8]{inputenc}     \usepackage{natbib} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \begin{document}  ....  \cite{Johnson} \bibliographystyle{plain} \bibliography{mybib}  \end{document}   I also created a new file (File > New) that I saved as mybib.bib:  @Article{Johnson, author = {Edgar G. Johnson and Alfred O. Nier}, title = {Angular Aberrations in Sector Shaped Electromagnetic Lenses for Focusing Beams of  Charged Particles}, journal = {Physical Review}, year = {1953}, volume = {91}, number = {1}, }  @phdthesis{Zoran, author = {Zoran Racic}, title = {\'Etude et essais du spectromÃ¨tre Ã  plasma {DYMIO} de la  mission {MARS 96}}, publisher = {UniversitÃ© Pierre et Marie Curie}, year = {1996} }   When I compile my .tex file, I only have a [?] appearing.  Could you tell me what my mistake is? How do file permissions work? How can I use asymmetric encryption, such as RSA, to encrypt an arbitrary length of plaintext? How Do I get into the castle walls? Add lines to cron from script Is there a way to add lines to a user's cron via script?  I usually do it using crontab -e, but I would like to automate this task with a shell script. Let $S$ be a finite collection of real numbers (not necessarily distinct). If any element of $S$ is removed then the remaining real numbers can be divided into two collections with same size and same sum ; then is it true that all elements of $S$ are equal ?  (I know the result is true if the &quot;reals&quot; are replaced by &quot;integers&quot;.) Fake a webcam using a video loopback device? I want to use a looped video clip as my webcam source in a Google+ Hangout. I installed v4l2loopback and created a . But I haven't figured out how to write the video frames to the device. The given  is:  gst-launch videotestsrc ! v4l2sink device=/dev/video1   So after reading the manual page for gst-launch and trying to understand what was going on, I made my feeble attempt:  sudo gst-launch-0.10 filesrc location=/home/briankb/Videos/darthvaderdancing.mp4 ! v4l2sink device=/dev/video0   Which resulted in:  Setting pipeline to PAUSED ... libv4l2: error getting pixformat: Invalid argument Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ...  (gst-launch-0.10:12622): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed New clock: GstSystemClock  (gst-launch-0.10:12622): GStreamer-CRITICAL **: gst_structure_get_name: assertion `structure != NULL' failed Caught SIGSEGV accessing address (nil) #0  0x00007fc1890f0b03 in poll () from /lib/x86_64-linux-gnu/libc.so.6 #1  0x00007fc18962bff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2  0x00007fc18962c45a in g_main_loop_run () #3  0x00007fc189b5c4cb in gst_bus_poll () #4  0x0000000000404587 in ?? () #5  0x0000000000403c34 in ?? () #6  0x00007fc18902b76d in __libc_start_main () #7  0x00000000004043bd in ?? () #8  0x00007fff88253ed8 in ?? () #9  0x000000000000001c in ?? () #10 0x0000000000000006 in ?? () #11 0x00007fff882548c4 in ?? () #12 0x00007fff882548d4 in ?? () #13 0x00007fff882548dc in ?? () #14 0x00007fff88254904 in ?? () #15 0x00007fff88254906 in ?? () #16 0x00007fff8825490f in ?? () #17 0x0000000000000000 in ?? () Spinning.  Please run 'gdb gst-launch 12622' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.   The clip I'm trying to use an h264 video at 29.97 fps, 320x240, and in an mp4 container (it's from Youtube). Currently, this site embeds YouTube videos as Flash. (see an example: )  However, this is not the best solution, as now YouTube also supports HTML5, and some users (like me!) prefer to use HTML5 player instead of Flash. Supposedly, it should also work on devices that don't have Flash player (I can't confirm because I don't have one).  The solution seems quite simple: just change the embed code to an iframe, as described at     EDIT:  says:     Note: YouTube &lt;object&gt; embeds were  on January 27, 2015. Please migrate your applications to the , which can intelligently use whichever embedded player – HTML (&lt;video&gt;) or Flash (&lt;object&gt;) – the client supports.