Updates from June, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • Subinkrishna Gopi 10:01 am on June 30, 2009 Permalink |
    Tags: language, , writing   

    Today’s read: Better writing skills 

    This one good, in fact great I guess. Who does not want to write better English every time ! If you really want to improve your writing skills, improve the usage of punctuations, want to know about the common writing mistakes; this one is for you.

    Effective writing skills are to a writer what petrol is to a car. Like the petrol and car relationship, without solid skills writers cannot move ahead. These skills don’t come overnight, and they require patience and determination. You have to work smart and hard to acquire them. Only with experience, you can enter the realm of effective, always-in-demand writers.

    Read the article here: http://www.smashingmagazine.com/2009/06/28/50-free-resources-that-will-improve-your-writing-skills/

    Source: Smashing Magazine

     
  • Subinkrishna Gopi 10:45 am on June 19, 2009 Permalink |
    Tags: , , , standards, ,   

    Today’s read: 10 Ways To Make Your Site Accessible Using Web Standards 

    Smashing Magazine

    A Smashing Magazine article on making a website accessible using web standards. Nice read.

    Let’s take a look at 10 ways to improve the accessibility of your XHTML website by making it standards-compliant. We’ll go the extra mile and include criteria that fall beyond the standards set by the W3C but which you should follow to make your website more accessible. Each section lists the criteria you need to meet, explains why you need to meet them and gives examples of what you should and shouldn’t do.

    Read the article here: http://www.smashingmagazine.com/2009/06/18/10-ways-to-make-your-site-accessible-using-web-standards/

     
  • Subinkrishna Gopi 11:55 am on June 18, 2009 Permalink |
    Tags: , exception, , , ,   

    A JBoss 5.1.0 Exception ! 

    jbosscorp_logo

    This is about another exception you may get while playing around with JBoss, Transactions, Remote EJBs etc. And the exception is:

    org.jboss.resource.JBossResourceException:
    Could not enlist in transaction on entering meta-aware object!

    My friend Venu had a post in his blog on why this exception happens and how to fix it in JBoss 5.0. You can read it here. But if we are using JBoss 5.1.0 this solution cannot help us. Because there are a couple of changes in the configuration in this new version of JBoss. In fact if you can take a look at the JBoss 5.1.0 GA release notes we can see a lot of changes in configuration especially if we are migrating from JBoss 5.0 to 5.1.

    And here is the solution.

    Open the JBOSS_HOME/server/JBOSS_CONFIGURATION/conf/jbossts-properties.xml. Set the following.

    <!-- Support subtransactions in the JTA layer? Default is NO. -->
    <property name="com.arjuna.ats.jta.supportSubtransactions" value="YES"/>
    

    Hope this helps.

    P.S. If you have any more details in this issue, please feel free to share it. Thank you.

     
  • Subinkrishna Gopi 1:55 pm on June 16, 2009 Permalink |
    Tags: , , , obfuscation, ,   

    JavaScript Obfuscation 

    What is an obfuscated code?source Wikipedia
    Obfuscated code is source code in a computer programming language that has been made difficult to understand. Programmers may deliberately obfuscate code to conceal its purpose (a form of security through obscurity), to deter reverse engineering, or as a puzzle or recreational challenge for readers. Programs known as obfuscators transform human-readable code into obfuscated code using various techniques.

    JavaScript obfuscation: Why & why not
    An obfuscated JavaScript code can help us in many ways – reduce the download time, more optimization and a fair amount of encryption. At the same time it got some serious disadvantages too – understandability is a distant dream where there is no readability.

    JavaScript obfuscation: How

    Try this piece code:

    // Get the value of all the form fields as a string
    function getFormParametersAsAString(aWebForm)
    {
     var inputs = aWebForm.getElementsByTagName('input');
     var formParameters = '';
     var anInput;
    
     if (inputs)
     {
       for (i = 0; i < inputs.length; i++)
       {
         anInput = inputs&#91;i&#93;;
         if (anInput.name && (anInput.name.length > 0) &&
            ("submit" != anInput.type) && ("reset" != anInput.type))
            formParameters += anInput.name + '=' + encodeURIComponent(anInput.value) + '&';
       }
     }
     return (formParameters);
    }
    

    And the obfuscated version:

    var _0xf8b7=["input","getElementsByTagName","","length","name","submit","type","reset","=","value","\x26"];
    function getFormParametersAsAString(aWebForm){var inputs=aWebForm[_0xf8b7[1]](_0xf8b7[0]);
    var formParameters=_0xf8b7[2];var anInput;if(inputs){for(i=0;i<inputs &#91;_0xf8b7&#91;3&#93;&#93;;i++){anInput=inputs&#91;i&#93;;
    if(anInput&#91;_0xf8b7&#91;4&#93;&#93;&&(anInput&#91;_0xf8b7&#91;4&#93;&#93;&#91;_0xf8b7&#91;3&#93;&#93;>0)&&(_0xf8b7[5]!=anInput[_0xf8b7[6]])&&(_0xf8b7[7]!=anInput[_0xf8b7[6]]))
    {formParameters+=anInput[_0xf8b7[4]]+_0xf8b7[8]+encodeURIComponent(anInput[_0xf8b7[9]])+_0xf8b7[10];} ;} ;} ;
    return (formParameters);} ;
    

    Made using http://www.javascriptobfuscator.com/

    You can try these obfuscators
    http://www.javascriptobfuscator.com/Default.aspx
    http://www.jasob.com/
    http://ajaxian.com/archives/utility-javascript-obfuscator – It’s Java based. Download the obfuscator Jar file

    References:
    http://en.wikipedia.org/wiki/Obfuscated_code

     
    • Subinkrishna G 2:16 pm on June 16, 2009 Permalink

      JavaScript obfuscation can really help us if we have huge chunks of code to be loaded and the time need to be minimized. It can really help in reducing the code size where we use lot of string constants and can make the code more optimized. Again, everything depends on the obfuscator.

  • Subinkrishna Gopi 11:52 am on June 11, 2009 Permalink |
    Tags: cryptography, , jce, mail   

    java.lang.RuntimeException: NYI 

    Java_logo

    If we are using PGP based or similar encryption in our email application/module, we may get the following exception.

    java.lang.RuntimeException: NYI
        at cryptix.jce.provider.elgamal.ElGamalCipher.engineGetParameters(ElGamalCipher.java:120)
        …

    Here NYI is Not Yet Implemented ! The default policy setting of Java is not capable of handling encryption/decryption with higher strength keys. To add that support we need to download the Java(TM) Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

    Download JCE: http://java.sun.com/javase/technologies/security/

    Extract the downloaded archive and copy the JAR files (US_export_policy.jar & local_policy.jar) to Java_home/jre/lib/security. If those JAR files are already present in that directory, replace them with the newly downloaded archives.

    Hope this helps.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel