Search Results

Search found 5 results on 1 pages for 'hrj'.

Page 1/1 | 1 

  • How can I disable HTML5 content in popular browsers like Firefox and Chrome?

    - by HRJ
    The bad thing about Flash video was that it required a third-party plugin to play the content. The good thing was I could select which content to play; using the click-to-play feature in Firefox and Chrome. But now that HTML5 video is getting popular, I see a lot of ads popping into view again. They are not only a distraction, they hog resources on my computer and make the fans spin full speed. Is there a way to disable HTML5 audio/video content by default, and enable it only selectively?

    Read the article

  • What is stable as Ubuntu in kernel space, but also cutting-edge as Fedora in user land?

    - by HRJ
    I am a long time Fedora user (since Fedora 6). Previously I have used Gentoo (for 2 years) and Slackware (for 5 years). The thing I liked about Fedora is frequency of package updates + great community. But lately I have noticed that Fedora is becoming too cutting-edge, nay, bleeding-edge. They changed the DNS client to be strict, without any warning, which broke some of their own packages for two Fedora releases. More critically, their LVM modules are not compatible across Fedora 12, 13, 14 (sometimes). Ubuntu is nicely polished but seems too stable for my liking. Some of the user-space applications are two major version numbers behind (even in testing or unstable or whatever they call it). Is there any Linux distro that has the stability of Ubuntu in kernel space and the bleeding edge in applications (especially harmless applications like, say, Stellarium)?

    Read the article

  • How to scale JPEG images with a non-standard sampling factor in Java?

    - by HRJ
    I am using Java AWT for scaling a JPEG image, to create thumbnails. The code works fine when the image has a normal sampling factor ( 2x2,1x1,1x1 ) However, an image which has this sampling factor ( 1x1, 1x1, 1x1 ) creates problem when scaled. The colors get corrupted though the features are recognizable. The original and the thumbnail: The code I am using is roughly equivalent to: static BufferedImage awtScaleImage(BufferedImage image, int maxSize, int hint) { // We use AWT Image scaling because it has far superior quality // compared to JAI scaling. It also performs better (speed)! System.out.println("AWT Scaling image to: " + maxSize); int w = image.getWidth(); int h = image.getHeight(); float scaleFactor = 1.0f; if (w > h) scaleFactor = ((float) maxSize / (float) w); else scaleFactor = ((float) maxSize / (float) h); w = (int)(w * scaleFactor); h = (int)(h * scaleFactor); // since this code can run both headless and in a graphics context // we will just create a standard rgb image here and take the // performance hit in a non-compatible image format if any Image i = image.getScaledInstance(w, h, hint); image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = image.createGraphics(); g.drawImage(i, null, null); g.dispose(); i.flush(); return image; } (Code courtesy of this page ) Is there a better way to do this? Here's a test image with sampling factor of [ 1x1, 1x1, 1x1 ].

    Read the article

  • How to get min/max of two integers in Postgres/SQL?

    - by HRJ
    How do I find the maximum (or minimum) of two integers in Postgres/SQL? One of the integers is not a column value. I will give an example scenario: I would like to subtract an integer from a column (in all rows), but the result should not be less than zero. So, to begin with, I have: UPDATE my_table SET my_column = my_column - 10; But this can make some of the values negative. What I would like (in pseudo code) is: UPDATE my_table SET my_column = MAXIMUM(my_column - 10, 0);

    Read the article

  • How to analyse Dalvik GC behaviour?

    - by HRJ
    I am developing an application on Android. It is a long running application that continuously processes sensor data. While running the application I see a lot of GC messages in the logcat; about one every second. This is most probably because of objects being created and immediately de-referenced in a loop. How do I find which objects are being created and released immediately? All the java heap analysis tools that I have tried(*) are bothered with the counts and sizes of objects on the heap. While they are useful, I am more interested in finding out the site where temporary short-lived objects get created the most. (*) I tried jcat and Eclipse MAT. I couldn't get hat to work on the Android heap-dumps; it complained of an unsupported dump file version.

    Read the article

1