Know if your Gmail account has been hacked



To check if your account has been targeted and hacked into without your knowledge, you need to log into your Gmail account using a desktop browser.Scroll down to the bottom right of your inbox and locate a link called “Details”. Click on it, a pop-up window will appear, and it will show you a detailed list of the last ten times you – or anyone else –has accessed your account. It will also show you not just when your account was accessed but also how it was viewed. You’ll know if the inbox was opened using an email app, browser, smartphone app and the IP address through which it was accessed.If you see a suspicious device or IP address, you may want to change your password as soon as possible.To strengthen the security on your Gmail account, you can even turn the two-factor authentication system on.

Stay safe!

Posted at at 5:07 PM on Sunday, December 8, 2013 by Posted by Ravindra Nikam | 0 comments   | Filed under: ,

maven help

clean install -Dmaven.test.skip=true New Jar project mvn archetype:generate -DgroupId=com.jpmc.ti -DartifactId=TIFileImportService -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false New Webapp mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false mvn install:install-file -Dfile=C:\vti-workspace\VTI\TI\code\ThirdpartyComponents\ti-core\dynax.jar -DgroupId=ti-core -DartifactId=dynax -Dversion=1.0 -Dpackaging=jar mvn install:install-file -Dfile=C:\vti-workspace\VTI\TI\code\ThirdpartyComponents\ti-core\dynax-db-ojb-1.0.rc4.jar -DgroupId=ti-core -DartifactId=dynax-db -Dversion=1.0.rc4 -Dpackaging=jar mvn install:install-file -Dfile=C:\vti-workspace\Jars\lib\com\jpmc\ti\geGmrd\1.0\IM.jar -DgroupId=com.jpmc.ti -DartifactId=gegmrd.im -Dversion=1.0 -Dpackaging=jar

Posted at at 12:52 PM on Saturday, March 16, 2013 by Posted by Ravindra Nikam | 0 comments   | Filed under:

Validating XML with XML schema (XSD)

Guys believe me today I struggled a lot trying to do a very simple thing: Validating an xml file with my XSD( XML Schema), using a SAX parser(apache). I tried simple standalone program and in one shot I got itworking and now I want it to inside my web application. I added it(XSD)to the resources(classpath) and deployed my app to the tomcat but unfortunately I started getting the error "cvc-elt.1: Cannot find the declaration of element 'Root'". So I started checking my input xml m the XSD and all. All is well formed and Root is there. Then question remains where I went wrong. After some observation I found that the parser(com.sun.org.apache.xerces.internal.parsers.SAXParser) not able to get the XSD itself :( . I checked my project structure and but all things are at place. So I started putting the XSD in possible locations where this guy will look. But no luck. By now I'm pretty sure that culprit is not the directory structure. After some internet search I found thatparser properties value should be URL but I didn't want the XSD to be publicly available. Unfortunately, I didn't find how to do that directly on the Internet. So after trying things ,I came to know that which I didn't knew earlier the simple thing I missed it is that JAVA can generate an URL pointing to a file residing in the classpath. so here's the code :

SAXBuilder builder = new SAXBuilder("com.sun.org.apache.xerces.internal.parsers.SAXParser",true);
builder.setFeature("http://xml.org/sax/features/validation", true);
builder.setFeature("http://apache.org/xml/features/validation/schema",true);
builder.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
Properties properties = new Properties();
properties.load(getClass().getResourceAsStream("/my.properties"));
URL schemaUrl = getClass().getResource(properties.getProperty("my.xsd"));
builder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",schemaUrl);
builder.build(inXML);

I haven't used any ErrorHandler since just want to show the exact error message coming from XSD validation and halt. Good luck!!

Posted at at 6:24 AM on Friday, January 14, 2011 by Posted by Ravindra Nikam | 0 comments   | Filed under: ,

java.lang.NoClassDefFoundError: org/jaxen/JaxenException

If you see in my new project, there is going to be a lot of XML processing. So I was wondering what would be the better approach to parse the XML files with JAVA. After some R&D I came across a very nicely written API's for parsing the XML and you can go back and forth to get any node since each entity in xml file has been considered as object, so no more restrictions.Yes, I am talking about JDOM. It also comes with very good utility class to process xml using XPath. The static methods provided by class org.jdom.xpath.XPath are pretty straight forward and simple to use in one line :

Listlist = XPath.selectNodes(context, "//root"); 
Object obj = XPath.selectSingleNode(context, "//root"); 
This will return you the list/Element of matching node(s) as a object. So when I were trying this first time I just started with downloading JDOMv1.1.1.jar from the web.But unfortunately I got stuck with the this wierd exception
java.lang.NoClassDefFoundError: org/jaxen/JaxenException ... 
. So solution is: putting the jdom jar itself not resolve this problem.Since JDOM uses "Jaxen engine" for XPath processing you need to add one more jar called jaxen.jar along with it from here.

Posted at at 9:35 PM on Thursday, December 23, 2010 by Posted by Ravindra Nikam | 0 comments   | Filed under: , ,

first step with iBatis

Posted at at 10:10 AM on Friday, December 10, 2010 by Posted by Ravindra Nikam | 0 comments   | Filed under: , , ,

removing empty attributes

XSLT template to remove empty attributes from the xml.

<xsl:template match="/">
  <xsl:copy>
     <xsl:apply-templates>
       <xsl:for-each select="@*">
          <xsl:if test=".!=''">
             <xsl:copy-of select="." />
          </xsl:if>
       </xsl:for-each>
     </xsl:apply-templates>
   </xsl:copy> 
</xsl:template>

Posted at at 4:21 AM on Saturday, October 2, 2010 by Posted by Ravindra Nikam | 0 comments   | Filed under: , , ,

Sorting/Reordering elements using xslt

XSLT template to reorder the elements as per the position. The order option allows you to decide the order of sort. Depending on the select XPath query result data-type can be given.

<xsl:template match="*">
    <xsl:copy>
       <xsl:apply-templates>
          <xsl:sort select="position()"order="descending" data-type="number" />
       </xsl:apply-templates>
     </xsl:copy>
  </xsl:template>

Posted at at 6:03 AM on Friday, October 1, 2010 by Posted by Ravindra Nikam | 0 comments   | Filed under: , , ,