Here is my code, I am getting below runtime error      "Exception in thread "main" java.lang.NoClassDefFoundError:   com/itextpdf/kernel/counter/event/IMetaInfo".   /** The HTML-string that we are going to convert to PDF. */ public static final String HTML = "&lt;h1&gt;Test&lt;/h1&gt;&lt;p&gt;Hello World&lt;/p&gt;"; /** The target folder for the result. */ public static final String TARGET = "target/results/ch01/"; /** The path to the resulting PDF file. */ public static final String DEST = String.format("%stest-1.pdf", TARGET);  /**  * The main method of this example.  *  * @param args no arguments are needed to run this example.  * @throws IOException Signals that an I/O exception has occurred.  */ public static void main(String[] args) throws IOException {      File file = new File(TARGET);     file.mkdirs();     new HelloWorld().createPdf(HTML, DEST); }  /**  * Creates the PDF file.  *  * @param html the HTML as a String value  * @param dest the path of the resulting PDF  * @throws IOException Signals that an I/O exception has occurred.  */ public void createPdf(String html, String dest) throws IOException {     HtmlConverter.convertToPdf(html, new FileOutputStream(dest)); }
I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?
Since I updated the system to 10.11.5, the Facebook message notification is not showing message text.   Is this a bug in this software upgrade of OSX? Odd behavor with POSIXct/POSIXlt and subsecond accuracy Write-only permission for a directory doesn't allow to rename (move) files inside? In fact, I would like to ask more general question -- &quot;what does write permission for a directory allow you to do exactly?&quot; -- but let's approach it with a concrete example. It is a long question, if you are in a hurry read the bold -- it should cover the main part. Different sources (, , ) say something similar to the following on the directory permissions:  r, read -- reading of the directory's content (filenames inside) w, write -- changing the directory's attributes (e.g. modification time) and creating/renaming/removing entries inside x, search -- accessing files inside, you have access to the inode of the file, hence you can reach it's actual content  My problem is with the description of w. What directory's attributes does it give you access to? I cannot create/rename/remove a file inside a directory with only write permission: I make a directory (tdir/) and a file inside (afile), chmod -x-r tdir/, mv tdir/afile tdir/af, rm tdir/afile, touch tdir/newfile -- all fail with permission denial, unless I set x permission to the directory as well. And x alone doesn't give you the permission to create/rename/remove files inside the directory. In order to do that you need both x and w. But touch tdir does change the modification time of the directory with w only. I would rephrase the sources above this way for the compliance with the issue: a directory's r allows you to see the filenames inside, but no access to the actual file (to the inode); x gives you access to the inodes of the files (which means you can see their permissions and, according to it, have access to the contents), but you still cannot change anything in the directory; directory is actually some sort of a file and to change something in it you need the w permission. Thus, when you are changing something in the directory you need w permission. If your change requires inodes of the files in the directory -- you need x as well. It explains why you cannot remove a file inside a directory with w only: when removing a file you need to reduce the link count of the inode by 1 -- you need to know the inode -- thus you need x for the directory. But why do you need x for creating (you could ask the system to create a file without exposing the inode?) and renaming/moving the file (when you move a file you don't change it in any way, you only change the records inside the directories and their inode counts?)? Maybe it is just an implementation thing? I.e. indeed you don't need the inode for renaming/creating files -- you need only filenames and w permission; but inode and filename constitute one record in the directory; thus changing the filenames = changing the records = kind of accessing the inodes. And also what attributes do directories have besides modification time, permissions and files records? What else in the directory can you change with w only? What's the difference between using > and >> in shell? When I have these facts,   French coins were not found in the ruin. German coins were not found in the ruin.   which of these sentences are grammatically correct?  1.     No French and German coins were found in the ruin.   2.     No French or German coins were found in the ruin.   3.     No french nor German coins were found in the ruin.   I think 1 is correct but I'm not sure.  By the way, I can also say     Neither German nor French coins were found in the ruin.   Also, when you have an additional fact   Italian coins were not found in the ruin   which of these statements are grammatically correct?  1.     No French, German and Italian coins were found in the ruin.   2.     No French, German or Italian coins were found in the ruin.   3.     None of French, German and Italian coins were found in the ruin.   4.     None of French, German or Italian coins were found in the ruin.   Thanks, I have up until Cov(X+Y,X-Y) = E[((X-E(X))+(Y-E(Y)))((X-E(X))-(Y+E(Y)))] and now I am stuck and do not know how this turns into Var(X)-Var(Y) Scala Lists of lists of integers How do I get adequate depth of field in macro photography? I have been messing around with some Macro Photography using the techniques (and a reversal ring) described in a  by @ My main issue is that I am having a hard time getting the subject into focus. There are times when the center is blurred and the outside is in focus or the center in focus and the outside out of focus. What are ways to get as much of the subject in focus?   I am using a Nikon D5100, I have a 18-55mm kit lens but I find the 55-200mm lens easier to use for shooting. Ubuntu 14.04 doesn' t boot after upgrade from 12.04 installed inside Windows 8.1 I have Ubuntu 12.04 installed like an app on windows 8.1 (Ubuntu 12.04 allow to be installed like an app in Windows 8.1 and it can be removed when you don't need it any more from Control Panel). Usually, to chose what os to boot when you start the laptop, you can choose between windows 8.1 and Ubuntu after windows logo appeared at start up and that was ok until I made this upgrade. Now when I try to choose Ubuntu the laptop try to boot it but, after that full colored screen is showed the screen go black and this messages appear:  mount: mounting /dev/loop0/ on /root failed : Invalid argument mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory Target filesystem doesn' t have requested /sbin/init No init found. Try passing init = bootarg.  BusyBox v1.21.1 (Ubuntu 1:1:21.0-1ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands  (initramfs) _   I don' t know what to do after this screen appears. Please help ! is the group of rational numbers the fundamental group of some space? Is it possible to use multiple here-docs in bash? Can one use multiple here-docs to provide input to a command in bash?  $ cat &lt;&lt;&lt;foo &lt;&lt;&lt;bar bar $ cat &lt;&lt;EOF1 &lt;&lt;EOF2 &gt; foo &gt; EOF1 &gt; bar &gt; EOF2 bar   Obviously, in both cases, the second here-doc is used as stdin, and replaces the first reference. Is the solution to use echos instead?  $ cat &lt;(echo -n foo) &lt;(echo bar) foobar   Also, for some reason, using a combination didn't work for me. Why would that be?  $ cat &lt;&lt;&lt;foo &lt;(echo bar) bar $ cat &lt;(echo -n foo) &lt;&lt;&lt;bar foo I am trying to modify output in my twig file. In D7, I was able modify data in my array with this  check_markup($tweet-&gt;text, 'full_html');   and I see that this function still exists in D8. However, I'm not sure how I would use this in a filter in twig. This is what I have so far:  {% for tweet in params.tweets %} &lt;div class="tweet-wrapper"&gt; &lt;div class="tweet-profile-image"&gt;     &lt;img src='{{ tweet.user.profile_image_url }}'/&gt; &lt;/div&gt; &lt;div class='tweet-text'&gt;     &lt;!--check_markup($tweet-&gt;text, 'full_html');--&gt;     {{ tweet.text }} &lt;/div&gt;   &lt;/div&gt; {% endfor %}   I actually tried to do this before I sent it to the template as well, but it didn't change anything:   foreach($tweets as $tweet) {   $tweet-&gt;text = check_markup($tweet-&gt;text, 'full_html');   $cleanTweets[] = $tweet; } dpm($tweets); $params = array('tweets' =&gt; $cleanTweets); $tweet_template = array('#theme' =&gt; 'twitter_pull_tweet_listing', '#params' =&gt; $params); return $tweet_template;   What I'm trying to do here is make drupal create links for web links in the twitter tweet text. This worked fine for me in D7. Where do I put my systemd unit file? For most OpenID options, it doesn't much matter if you pick the "Sign up" versus the "Log in" tab on the sign in page.  Whether you have an account on the site or not, it just does the right thing. Not so if you are using the Stack Exchange OpenID service:    (Bonus bug: the reCAPTCHA box is a bit too wide for the expanded "Sign up using Stack Exchange" container.)  Since we already have collected an email and password (well, two copies of the password), could we not check to see if they match and automagically log the user into their SE OpenID?  If not, the error needs to be reworded somehow to explain that while the email might have been used to create a Stack Exchange OpenID, that doesn't mean they can't log in with that OpenID to create an account.  Counterintuitively, they need to use the  even if they've never had an account there before.  The  link adds to the confusion since it sends an email that leads off with:     Someone requested an account recovery on The Workplace Stack Exchange for jericson@stackexchange.com, but we don't have an account on this site that matches this email address.   (For people with accounts on other sites and/or Stack Exchange OpenIDs, this paragraph is followed by other instructions that would probably work if followed. By that time I imagine many users are at wit's end.)  To simplify: If a user already has a Stack Exchange OpenID (likely because they have an account on another site) they should be able to use the  to sign up for an account or there should be clear instructions on what to do next if they fail. How can I modify the size of swap with LVM partitions? I have an executable program (no source code, just the compiled executable) that was made in windows (.exe extension).  It doesn't use any graphics... it simply reads and writes files.  I want to be able to run it in a linux shell script so that I don't have to switch operating systems to get my output.  Is there a way to use or convert the executable for linux operating systems? "Mornings came and cast a blinding sunlight over everything, and he felt like nothing worthwhile could be accomplished."  For some reason, I feel like "a blinding light" is ok, but if its sunlight, then I should drop the "a" and write "cast blinding sunlight", but I'm not sure why I feel this way.   Can anyone offer some enlightenment?  edit - alternate phrasing, closer to being a literal translation: "Mornings came without warning, flooding the day with a strong sun, and he felt like nothing worthwhile could be accomplished."   I would still like an answer to the technical question of whether I should drop the "a", but would also appreciate knowing if anyone thinks option #2 is a better choice. In other words, can I do something like  for() {     for {        for {        }     } }   Except N times? In other words, when the method creating the loops is called, it is given some parameter N, and the method would then create N of these loops nested one in another?  Of course, the idea is that there should be an "easy" or "the usual" way of doing it. I already have an idea for a very complicated one. Should not we apply pseudo-forces all the time as the Earth is a non-inertial frame of reference? What's the function of the ~ bitwise operator (Tilde)