Youtube embedded player can be adjusted a lot using the parameters available here https://developers.google.com/youtube/player_parameters. Some parameters are available on both HTML5 and flash players and some are not.
Check out https://developers.google.com/youtube/youtube_player_demo, for all availabel configuration and play with it.
Default video quality can be set using
Youtube allows you to have its logo to be modest, by setting
We can also set all of these values together
In Java, we can use the Calendar class to get day_of_month, day_of_week etc.
Last day of a month varies depending on the Month and on leap year we have extra day in February.
So to figure out the last day of any given month in a year, we write some code which is apparently simple.
Calendar object allows us to manipulate days, go forward or backward on the Calendar, add days, hours, minutes or seconds to any given time etc.
We will use these capabilities of Calendar class to get our last_of_month.
But, Java Calendar has a better way of doing this, by using getActualMaximum() method which is far more convenient.
A sample calendar util class which gives you few convenient methods is given below.
The following is the script I use in Macbook (Mountain Lion). It should work on most /*nix shell like
However, I have tested it only in
Save this file as “chext”, make it executable
chmod +x chext and add to your
Now you can use it like this:
When you are using Java’s mailapi.jar, it also expects supporting libraries like smtp.jar, imap.jar, pop3.jar, gimap.jar, dsn.jar. If you are using Java EE platform, then it is already included. But if you are getting the following error, you might have to include additional libraries, from Java mail API.
There are several forums and discussions happening on this same issue. Surprisingly, this is a small class path issue.
To solve this error, make sure you have both mailapi.jar and smtp.jar in your classpath. Also, make sure you don’t have duplicate jar files in your class path.
Reading the FAQ on Oracle’s documentation will give you a better idea. http://www.oracle.com/technetwork/java/javamail/faq/index.html
Ace editor is awesome! We get to edit code with instant syntax highlighting. But often, we have to get the content from the editor, than just typing some with syntax highlighting. Ace editor have a function to get the value editor.getSession().getValue().
Here is a demo on getting value from the editor and setting it with textarea.
Fiddle here: http://jsfiddle.net/deepumohanp/tGF6y/
Ace editor is a fantastic option for live source code editor on the web. One problem you come across when using Ace Editor is with the default absolute positioning. Also it doesn’t fit inside a container div by default. Here is how I overcame these issues.
The example from ace website uses absolute positioning by default, as show below. But luckily, ace can work perfectly with relative positioning
In order to put ace-editor inside a container div, we can give relative positioning to the
editor and remove the positioning attribs, like top, right, bottom and left.
We also need to give height, otherwise editor won’t show up.
That said, when using Twitter Bootstrap, you can absolutely forget about relative positioning of ace. But we still need to set height, as ace does not fill. In the following jsfiddle, I have used Bootstrap’s panel component for showing the editor.
Full Screen Result is available here. http://jsfiddle.net/deepumohanp/U5JtP/embedded/result/
Fiddle here: http://jsfiddle.net/deepumohanp/U5JtP/
Yesterday, I spend some to change the blog template using Bootstrap.
Thanks to Blogger’s new template editor. Now it is much easier to understand the templates.
The template was built on top of my older template Simple by Joshua Peterson. The process was simple and straight forward.
Blogger templates are mostly collection of widgets. I introduced few new divs with Bootstrap classes and removed few divs from older template. Bootstrap documentation has everything clearly explained along with examples.
I haven’t tested this new template on all screens yet.