java.util.IllegalFormatConversionException when using System.out.format()
A few weeks ago I described how to format output using System.out.printl() and System.out.println() methods… Try to run the code below: double avgAge = 245 / 34; System.out.format(“Average age is %d.”, avgAge); Without doubts you’ll get an exception thrown at runtime: Average age is Exception in thread “main” java.util.IllegalFormatConversionException: d != java.lang.Double at java.util.Formatter$FormatSpecifier.failConversion(Unknown Source)…
Collections – sorting and searching
In order to sort a Collection, one should use java.util.Collections class as follows (assuming ArrayList will be used): List another object the drawback: there’s only one way of sorting Example of the class implementing Comparable interface: class Book implements Comparable { private String title; public String getTitle() { return title; } public void setTitle(String title_p)…
Windows Error Reporting – first steps in postmortem debugging – how to collect mini dump?
Note: What is described below applies to Windows Vista x64 (at least I used such OS). I’m not going to describe what to do with a mini dump – how to analyze it in a debugger (e.g. in Visual Studio); such information can be found in a very good article at CodeProject. What I’m going…
FCKeditor – inline html editor
Should you need provide inline html editor feature in your web application (WYSIWYG editor), have a look at FCKeditor. FCKeditor is very useful and functional. Let me cite a couple of its features: Integration with ASP, ASP.NET, Java, ColdFusion, Perl, PHP, JavaScript and more Complete toolbar customization Skins support Plugins support Multi-language support with automatic…
IIS on Windows XP: There are too many people accessing the Web site at this time.
I started getting this error when I accessed pages hosted on IIS installed on my machine (I’m running Windows XP): The page cannot be displayed There are too many people accessing the Web site at this time. ——————————————————————————– Please try the following: Click the Refresh button, or try again later. Open the localhost home page,…
FeedMap = Blogs + Maps
What is feedmap? Let me cite its authors: … feedmap is about mapping your blog! Using FeedMap you can tell the world where you are blogging from! Or you can simply search for bloggers right around where you live! Or even better let other local bloggers to discover your blog… I had a look at…
LastGraph – visualize your music profile
Recently, I’ve told you about my excitement about last.fm. Slightly later I’ve discovered an interesting service related to last.fm: LastGraph. What it really does? Its auhor, Andrew Godwin says: LastGraph is a web application that makes graphs of your musical listening history from your Last.fm profile. In other words, LastGraph creates a special graph that…
FCKEditor – how to access the HTML content from JavaScript?
Imagine you have a form in which you use FCKEditor as an inline HTML editor. So, inside script tag you have this: var oFCKeditor = new FCKeditor(‘body_html’); oFCKeditor.BasePath = “A_PATH_TO_FCKEDITOR”; oFCKeditor.ToolbarSet = “Basic”; oFCKeditor.Create(); As you know, this creates a textarea with id set to ‘body_html’ and make it look like an inline HTML editor….
Security in accessing reports on Report Server
Once you deploy reports on to Report Server they can be accessed from any Web application with an established URL. However, I see a scenario when one wants to prevent some users from accessing reports (e.g. a user should be able to view reports presenting only their personal information). The way around this is to…