tag:blogger.com,1999:blog-40323466969931827032024-03-12T21:41:26.004-07:00CodeNautUnknownnoreply@blogger.comBlogger51125tag:blogger.com,1999:blog-4032346696993182703.post-77263377143966468922013-12-06T09:05:00.000-08:002013-12-06T09:05:33.209-08:00LDAP Failover configuration
Using referral attribute it is possible to implement LDAP - Failover, though it still needs to be tested.
http://docs.oracle.com/javase/jndi/tutorial/ldap/misc/url.html#MULTIUnknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-33239950350182295052013-12-06T08:51:00.001-08:002013-12-06T08:51:51.839-08:00Improving Website Performance without fixing code!Google's pagespeed is a component that can be deployed on an nginix or an apache server that compresses and caches web static resources such as css / js files and modifies header instructions on the fly to enable browser caching.
https://developers.google.com/speed/pagespeed/
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-84728721346169455072013-05-03T13:37:00.005-07:002013-12-06T08:48:05.246-08:00Unix Commands
How to find out the unix system / server architecture type?
uname -a
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-23331393509591141332012-10-03T20:51:00.001-07:002012-10-03T20:51:11.722-07:00Bitwise operator manipulation javaExcellent article explaining the bit wise operators.
http://www.divnull.com/lward/writing/bitwise.html
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-964445905938686762012-09-18T13:13:00.005-07:002012-09-18T13:17:26.363-07:00How to Avoid Getter and Setter Methods in JAVA, JSF and any POJO's
The lombok java utility helps to avoid getter and setter methods in java, especially in JSF and any POJO's
After Installing it (very simple 2 click process) and add the same jar to your project's classpath.
Here is an example of how to avoid getters and setters in java using lombak.jar , scala does that but just to avoid getters and setters this utility is more than enough.
Example:
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-58218523722636927682012-04-19T07:59:00.000-07:002012-04-19T07:59:03.026-07:00JMS Jboss behind NAT firewall
JMS clients like swing or remote clients were unable to connect to the JBOSS server because of random ports and the ip address of the machine which was not the same as the internal ip address of the machine from the cloud provider. When JBOSS starts it has to bind with the ip address of 0.0.0.0
Open inbound port 443, the JMS client was unable to connect to the server.
The following Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-2504703017372734702012-03-14T11:45:00.001-07:002012-03-14T11:46:21.771-07:00Cassandra super column
An excellent article on Cassandra super column
http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model
From cassandra learning resources at this link.
http://programmers.stackexchange.com/questions/28992/best-cassandra-learning-resourcesUnknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-88242705717221475102012-03-12T10:06:00.001-07:002012-03-12T10:06:53.036-07:00MySQL Group_concat (transposing rows into columns)To find out the columns in a table in mysql where you might need it programatically. You can use the information schema. SELECT group_concat(column_name) as columnNames FROM information_schema.columns WHERE `TABLE_NAME` = 'EMPLOYEE_TABLE' This would produce the output as a single row instead of columns.> EMP_ID,EMP_NAME,EMP_AGEThe group_concatUnknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-71143202709409553842011-12-28T10:52:00.001-08:002011-12-28T10:52:48.150-08:00Hadoop Tutorial Yahoo! Hadoop Tutorial This tutorial includes the following materials designed to teach you how to use the Hadoop distributed data processing environment: Hadoop 0.18.0 distribution (includes full source code) A virtual machine image running Ubuntu Linux and preconfigured with Hadoop VMware Player software to run the virtual machine image A tutorial which will guide you Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-82226696458957313972011-12-27T20:41:00.001-08:002011-12-27T20:41:52.569-08:00Web Usability - Accessible Data Tables Making your JSF datatable and html tables more accessible and 508 compliant. Web Usability - Accessible Data Tables shared via Firefox Share — "share links with the people that matter to you" Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-49286372549020619342011-12-22T06:38:00.001-08:002011-12-22T06:38:19.256-08:00Firefox Share (alpha) :: Add-ons for Firefox Cool add on to post from the firefox address bar. Firefox Share (alpha) :: Add-ons for Firefox shared via Firefox Share — "share links with the people that matter to you" Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-30781986007180951012011-12-15T10:18:00.000-08:002012-03-30T15:50:04.976-07:00CSS best practices
CSS Notes
I have compiled few CSS best practices and notes from various sources. I have attempted to give the original authors the credit, but if I am missing anything please leave a comment to correct.
What are the benefits of using CSS over normal HTML element?a. Re-usability with CSS we can reuse styles that can be applied across different html elements.b. Maintenance:- Easier to Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-76437901927150780072011-12-15T09:30:00.000-08:002011-12-15T09:30:31.527-08:00How to find the current logged in windows user from java?
The class NTSystem will help to retrieve the logged in user name and other credentials.
Example:
NTSystem obj = new NTSystem();System.out.println("Logged In User Name "+obj.getName());
From the java docs :-
This class implementation retrieves and makes available NT
security information for the current user.
http://docs.oracle.com/javase/6/docs/jre/api/security/jaas/spec/index.html?Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-10944298643285349602011-11-30T14:45:00.001-08:002011-11-30T14:48:15.464-08:00Inputs and Conditional Processing in Batch FileTo get input from the console in a batch file and assign it to a variable the following syntax works very well.
set /p name=Debug Y/N?
Then you can Echo %name% to print the contents of that variable.
To conditionally check for the content of that variable
IF "%name%" == "y" (other dos commands go here...) Without the enclosing braces :-)
I found it particularly usefull to start my Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-12783766571197045022011-11-29T09:08:00.001-08:002011-11-29T09:08:16.468-08:00Split String on every UpperCase Letter, String Modify Array and String Join the array as a single word.For example we have a string like “thisIsTheDay” http://stackoverflow.com/questions/3752636/java-split-string-when-an-uppercase-letter-is-found 1.String sample = “thisIsTheDay”;2.String[] sampleArray = sample.getChartType().split("(?=\\p{Lu})");3.sampleArray = (String[])ArrayUtils.removeElement(sampleArray, "this");4. String newStringName = StringUtils.join(sampleArray," "); Line 1: Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-78706430798006084262011-11-18T14:57:00.001-08:002011-11-18T14:58:19.398-08:00Debug CSSDebug your CSS and layouts using Yahoo Debug CSS
https://github.com/yahoo/debugCSS
debugCSS is meant to be loaded on an existing page to highlight potentially broken, malformed or legacy (X)HTML.
Visit the above link for more information.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-7387938913721843952011-11-18T14:34:00.001-08:002011-11-18T14:41:54.334-08:00Tool to bulk rename files in windowsThis is a very usefull to bulk rename files in a folder with most pattern and extension matching options.
www.spacetornado.com/Renamer/Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-20511992420121512202011-11-18T07:57:00.001-08:002011-11-18T08:06:19.012-08:00String substitution
To substitute words in String.
String exampleString = " There is %s disturbance in planet %s ";String newString = String.format(exampleString,new Object[]{"a","mars."});System.out.println(newString);
Output : There is a disturbance in planet mars.
Alternatively you can also use the MessageFormatClass
http://download.oracle.com/javase/6/docs/api/java/text/MessageFormat.html
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-91591576419934039432011-11-10T09:18:00.000-08:002011-12-27T19:13:09.605-08:00JSF Icefaces AccessibilityWe have a JSF based application, and this is our experience in making the website more accessible.
Accessibility guidelines from the web.
http://www.section508.gov/
http://www.w3.org/standards/webdesign/accessibility
http://www-03.ibm.com/able/guidelines/web/accessweb.html
http://www.w3.org/WAI/
http://www.w3.org/TR/WCAG/
Tools to check for accessibility
Online website accessibilityUnknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-60865473596238735202011-11-08T09:30:00.000-08:002011-11-08T09:30:17.157-08:00CSS Cross browser shadow
.shadow {
-moz-box-shadow: 3px 3px 4px #000; -webkit-box-shadow: 3px 3px 4px #000; box-shadow: 3px 3px 4px #000; /* For IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')"; /* For IE 5.5 - 7 */ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000');
}
http://robertnyman.com/2010/03Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-70569634001053289502011-10-31T13:13:00.000-07:002011-10-31T13:13:02.215-07:00Parsing XML and iterating it using XPath
How to parse XML from a string and iterate over a specific node name using Xpath
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbf.newDocumentBuilder();
String string = xmlBuffer.toString();
// not to parse a string you have to pass it in via stream
Document doc = dBuilder.parse(new InputSource(new ByteArrayInputStream(string.getBytes("utf-8Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-90888199613086993012011-10-31T11:08:00.000-07:002011-10-31T11:14:40.585-07:00Xcelsius Send and Recieve XML with Servlet
Xcelsius is a great tool to quickly wire up dashboards and reports without much coding. However there is the need to sometimes integrate it with dynamic data.
You can create an XML data connection to query values from the database and associate it to your Xcelsius Model file.
Following are the steps :-
Create an XML data connection.
Enter an URL for the xml data connection for Unknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-59286534397199361702011-10-31T09:45:00.000-07:002011-10-31T11:15:18.299-07:00Works on My Machinehttp://www.codinghorror.com/blog/2007/03/the-works-on-my-machine-certification-program.html
Post on "When developers say it workedUnknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-8073085206633973722011-06-17T12:26:00.000-07:002011-10-31T09:45:03.526-07:00Icefaces Load TestingThe problem that I faced was the ability to load test icefaces page, and I could not find an open source tool that helped me to load test icefaces. What other open source tools that are there for this purpose?
Apache JMeter is fantastic for load testing, but for testing sophisticated fully ajax layouts like icefaces applications, not sure it is really easy to use JMeter. On the other handUnknownnoreply@blogger.comtag:blogger.com,1999:blog-4032346696993182703.post-83832152940256016042011-06-13T13:31:00.000-07:002011-06-13T13:31:32.152-07:00Oracle Certified Master Architect Java EE 5The following are some useful links for the oracle certified software architect master course.
Certification Objectives: http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=326
Study Guide: http://java.boot.by/scea5-guide/ch01.html
Java Ranch:http://www.coderanch.com/t/540130/java-Architect-SCEA/certification/Cleared-Part-Thanks-all
Exam Tips:http://Unknownnoreply@blogger.com