Thursday, December 13, 2012
Execute linux bash command and read its output from java Program
Thursday, November 22, 2012
Parsing the response headers in Java from URLConnection object
Often when doing programming with HTTP requests and responses there would be headers that would be sent via URLConnection object.
A generic java snippet to parse the headers are like this.
Monday, October 15, 2012
Mathematical puzzles to motivate a programmer
Off late have encountered multiple instance wherein, some high end technological innovations are spurred from basic mathematically theory.
Loads of links point at this piece of crucial skill.
Some links that you could follow are:
Math Puzzles
- Good repository to exerice your brain.
- MURDEROUS MATHS BRAINBENDERS
- Missionaries and cannibals problem - Wikipedia, the free encyclopedia
- Portal:Mathematics/Featured picture archive - Wikipedia, the free encyclopedia
- Basis for Cube processor techincal thought you gave and inked on 13 OCT 2012
- Menger sponge - Wikipedia, the free encyclopedia
- List of fractals by Hausdorff dimension - Wikipedia, the free encyclopedia
- Polygramme Isarel flag derived by fractals
- Index et notations courbes planes
- plane symmetries
- plane symmetry groups
- Fill-It-In Outline Mathematics
- Fill-It-In Outline Mathematics: a few dozens word problems in arithmetic, geometry, algebra, logic - all in an outline These are some brain teaser games on iPhone
- IXL - Fourth Grade Math Practice
- IXL is the Web's #1 math practice site. The 4th grade level provides unlimited practice in 200+ math skills in a colorful, fun environment.
- Java | Programming Challenges – Puzzles – Algorithms – Solutions
- Generator Matrix -- from Wolfram MathWorld
- Venn Diagram -- from Wolfram MathWorld
- Solved Problems -- from Wolfram MathWorld
- Tapping Into the Power of GPU in Mathematica « Wolfram Blog
- Mathematica's GPU programming integration is the full automation of the GPU function developing process. Write, compile, test, run code in a single step.
- 10 Puzzle Websites to Sharpen Your Programming Skills
- Here are the top 10 popular programming puzzle sites that will help test your thinking and improve your programming, problem solving, and logical thinking skills.
- Coding Horror
- Evil Mad Scientist Laboratories | Making the world a better place, one Evil Mad Scientist at a time.
- The Cathedral and the Bazaar - Wikipedia, the free encyclopedia
- The Cathedral and the Bazaar
- Math puzzles solution
- Sam Loyd's Cyclopedia of Puzzles
- Enjoy playing with numbers.
Friday, June 29, 2012
Programming technologies vs OSI layer stack
The following is a rough diagram that visualizes a understanding of my various web programming techniques to pure theoretical categorization of OSI network models
Give this a thought and life-cycle of individual technologies and you find a cohesiveness of basic concepts.
Good References
[1]
https://www.sciencedirect.com/topics/computer-science/network-architecture
[2]
https://www.sciencedirect.com/topics/computer-science/layer-architecture
[3] Spatial Networks
https://www.tandfonline.com/doi/pdf/10.1080/24751839.2017.1295601
This will help in IoT and emerging technologies solution design in 2020 and years to come
Monday, June 18, 2012
Software product consideration
Just thought of visualizing various software attributes that came across.
You may want to revolve around these terms and see map them to your experience on various projects you worked upon.
- How some products focused only on selected few; drawbacks that they encountered down the lane ; etc
Examples1) i18n for Qt 3.0 had no support for i18n
2) Security bolting on initial version of Windows OS
3) Web application ( RIA ) lacked automate ability considerations
Friday, December 16, 2011
Java snippet to open, modify and write back to same file
Objective :
Very often you find this requirement. Sometimes you try and overcome using linux commands rather than going by the Java programming technique.
Here is a snippet that would be handy.
public static void main(String[] args) throws IOException {
// Read XML as string
byte[] buffer = new byte[(int) new File(args[0]).length()];
FileInputStream f = new FileInputStream(args[0]);
f.read(buffer);
// format it
String unformattedXml = new String(buffer);
String formattedXml = new XmlFormatter().format(unformattedXml);
// Write formatted string back into same file
FileOutputStream pOUTPUT;
PrintStream pPRINT;
pOUTPUT = new FileOutputStream(args[0]);
pPRINT = new PrintStream(pOUTPUT);
pPRINT.println (formattedXml + "\n");
pPRINT.close();
System.out.println( formattedXml );
}
Found this handy even after experience in Java programmer.
Very often you find this requirement. Sometimes you try and overcome using linux commands rather than going by the Java programming technique.
Here is a snippet that would be handy.
public static void main(String[] args) throws IOException {
// Read XML as string
byte[] buffer = new byte[(int) new File(args[0]).length()];
FileInputStream f = new FileInputStream(args[0]);
f.read(buffer);
// format it
String unformattedXml = new String(buffer);
String formattedXml = new XmlFormatter().format(unformattedXml);
// Write formatted string back into same file
FileOutputStream pOUTPUT;
PrintStream pPRINT;
pOUTPUT = new FileOutputStream(args[0]);
pPRINT = new PrintStream(pOUTPUT);
pPRINT.println (formattedXml + "\n");
pPRINT.close();
System.out.println( formattedXml );
}
Found this handy even after experience in Java programmer.
Friday, December 9, 2011
Small end webserver that can meet up to aspirations of self-owned website
'Small end webserver that can meet up to aspirations of self-owned website'
Which is it ? It is Apache Tomcat . A web server ( not a full-fledged J2EE container ) but can meet up to most of your needs.
Off-late you may wonder on the kind of technical support from user community might be not very easy to get. But I was wrong.
https://blogs.apache.org/tomcat/
gives you very good support.
With respect to debugging the webserver is concerned . Never thought it would be so easy to do it on a local machine.
Its so easy to do it, with Tomcat 7 - JMX - Sun JConsole
TOMCAT 7 - JMX - SUN JDK JConsole
STEP -1 ] Install SUNJDK 1.6+ or above
STEP -2 ] Install SUNJRE 1.6+ or above
STEP -3 ] Install TOMCAT 7.0 or above
STEP -4 ] Set the ENV properties
Linux platform
$ CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=test-idc.internet2.edu";
$ export CATALINA_OPTS;
On Windows
In envirnoment variables
create CATALINA_OPTS
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=localhost
STEP -5 ] Start Tomcat
C:\tomcat70\bin\Tomact7.exe
STEP -6 ] Start JConsole
C:\SUNJDK16\bin\jconsole.exe
STEP -7 ] Connnect to local PID of tomcat process.
Reference :
https://wiki.internet2.edu/confluence/display/CPD/Monitoring+Tomcat+with+JMX
Thanks Apache Foundation.
Which is it ? It is Apache Tomcat . A web server ( not a full-fledged J2EE container ) but can meet up to most of your needs.
Off-late you may wonder on the kind of technical support from user community might be not very easy to get. But I was wrong.
https://blogs.apache.org/tomcat/
gives you very good support.
With respect to debugging the webserver is concerned . Never thought it would be so easy to do it on a local machine.
Its so easy to do it, with Tomcat 7 - JMX - Sun JConsole
TOMCAT 7 - JMX - SUN JDK JConsole
STEP -1 ] Install SUNJDK 1.6+ or above
STEP -2 ] Install SUNJRE 1.6+ or above
STEP -3 ] Install TOMCAT 7.0 or above
STEP -4 ] Set the ENV properties
Linux platform
$ CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=test-idc.internet2.edu";
$ export CATALINA_OPTS;
On Windows
In envirnoment variables
create CATALINA_OPTS
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=localhost
STEP -5 ] Start Tomcat
C:\tomcat70\bin\Tomact7.exe
STEP -6 ] Start JConsole
C:\SUNJDK16\bin\jconsole.exe
STEP -7 ] Connnect to local PID of tomcat process.
Reference :
https://wiki.internet2.edu/confluence/display/CPD/Monitoring+Tomcat+with+JMX
Thanks Apache Foundation.
Subscribe to:
Posts (Atom)