Map
for(String parameter : parameters.keySet()) {
int i=0;
String[] values = parameters.get(parameter);
out.write(parameter);
if (values.length>0){
out.print(values[i]);
}
i++;
}
Wednesday, March 6, 2013
Parsing all form fields from JSP
Posted by iCehaNgeR's hAcK NoteS at 10:34 AM 0 comments
Tuesday, March 5, 2013
JQuery and Google chrome debugging
Ctr + Shift+ C will get you to the Chrome java script console.
Network will take you the actual page that was executed.
Source will take you to the src where you can set the debug break points.
Console is a good place where you can see the error or your custom log out puts. For example you can do the log content by console.log(data); where data is a string that is printed to the console.
Posted by iCehaNgeR's hAcK NoteS at 10:21 PM 0 comments
Thursday, February 2, 2012
Gimp Photo scaling for even height and width.
Lot of times when you want to scale the image to a square value lets say 2x2 the scaling value won't match. To fix this use this options
- Use the rectangle select and choose fixed and size from drop down.
- Give a higher square number like 2700x 2700 so that the select rectangle cover the intended area of your picture.
- now crop the image to selection.
- During scaling provide DPI value as 300 pixels and your intended scaling number like 2 inch and 2 inch
For clearing the background.
- Use the fuzzy select and select the area you want to clear.
- Use the color picker to get the color.
- right click and fill it with the choose color
- finish it up with paint tool to get more even color.
- Finallyuse the fuzzy select tool again on the background now right click on the selection and select image color option and select brightness give the max value for a white background.
Posted by iCehaNgeR's hAcK NoteS at 4:51 AM 0 comments
Wednesday, February 16, 2011
SOAPUI
Steps needed.
- Create a New Rest SOAPUI project.
- Import the WADL to create the REST project.
- If the REST project does not have a WADL file, it can be created easily by typing the REST url with ending application.wadl under the context of REST
- http://host/project/context/application.wadl
- This will generate the WADL file required for SOAPUI.
- Create a TestSuite.
- Write the Groovy script in the setup portion of the Testcase.
- If the Groovy file needs an external library or your application class jar that file and add them under the /bin/ext folder in SOAPUI home folder. Otherwise you will get the classnot found error during exception.
- Create a property file if you want a dynamic variable change during your request.
- Create the REST request as the test case
- Now change the Request file to add the properties.
- Run the Testsuite.
Posted by iCehaNgeR's hAcK NoteS at 4:01 PM 0 comments
Monday, February 14, 2011
REST WADL
http://10.xxx.xx.x:8080/{$projectname}/{$rest}/application.wadl That should generate the required WADL for creating SOAPUI project
Posted by iCehaNgeR's hAcK NoteS at 11:33 AM 0 comments
Friday, April 16, 2010
List ports listening
Posted by iCehaNgeR's hAcK NoteS at 3:43 PM 1 comments
List all installed jre linux
Posted by iCehaNgeR's hAcK NoteS at 3:19 PM 0 comments
Thursday, March 25, 2010
Find the large hidden files in your file system
Posted by iCehaNgeR's hAcK NoteS at 5:43 PM 0 comments
Friday, January 1, 2010
Desprado Song
Desperado, why don't you come to your senses? You been out ridin' fences for so long now Oh, you're a hard one I know that you got your reasons These things that are pleasin' you Can hurt you somehow Don' you draw the queen of diamonds, boy She'll beat you if she's able You know the queen of hearts is always your best bet Now it seems to me, some fine things Have been laid upon your table But you only want the ones that you can't get Desperado, oh, you ain't gettin' no youger Your pain and your hunger, they're drivin' you home And freedom, oh freedom well, that's just some people talkin' Your prison is walking through this world all alone Don't your feet get cold in the winter time? The sky won't snow and the sun won't shine It's hard to tell the night time from the day You're loosin' all your highs and lows Ain't it funny how the feeling goes away? Desperado, why don't you come to your senses? Come down from your fences, open the gate It may be rainin', but there's a rainbow above you You better let somebody love you, before it's too late
Posted by iCehaNgeR's hAcK NoteS at 10:07 AM 20 comments
Monday, July 13, 2009
Google Voice Gizmo5 Sipphone and Ekiga on Ubuntu
This summary is not available. Please click here to view the post.
Posted by iCehaNgeR's hAcK NoteS at 8:25 AM 5 comments
Thursday, June 25, 2009
JSON, DOJO and innerHtml and Java Handler.
JSON : JavaScript Object Notation, it is the data interchange format, It simplify the data exchange between client side to server side script. In the example we will pass two string and return a Java MAP response.
DOJO : Is the working dog for ajax communication.
innerHtml: this is useful to replace a element in the html document to be replaced with a ajax response. call the element by dojo.byId("someid") then replace the content of the id by innerHtml. The id can be given to any html element.
Our ArchitecturePosted by iCehaNgeR's hAcK NoteS at 1:32 PM 2 comments
Masking for Credit Cards
This will show only the last 4 digits .
Posted by iCehaNgeR's hAcK NoteS at 1:08 PM 0 comments
Tuesday, June 2, 2009
Solr/Lucene .
I am trying to add up what I learned so far on the Solr. Lucene : Is the search engine Solr : The Search Server. Solr / Lucene Terms. Facet --- The data that have to be breakdown. example: manufacturer FacetField -- This will contain the facet data SolrDocument -- This will contain one solr search data. setFacetMinCount -- This will limit returning search data with the minimum count of hit.A sample Query using SolrJ
Querying price range need little special skill in solr, I am still exploring different option of querying. The search querys are case sensitive, if you put 'To' instead of 'TO' solr will throw invalid syntax error.
Posted by iCehaNgeR's hAcK NoteS at 1:22 PM 0 comments
Thursday, May 28, 2009
Ruby on Windows XP installation
Don't install the one click installer from ruby site. This will not help you if your script has some 'fork' command on it. Windows don't support fork.
Get CYGWIN and select the category development select-> make, select interpreters -> ruby , select Base -> cygwin
If you use default Cygwin installation these packages will not be installed. After installation type in 'which ruby' on the $ prompt this will show the ruby installation directory this is import to know about the installation directory so you can add up the location of the ruby binary on the header of your script.
Now if you want to add ruby libraries download the rubygem package from http://rubyforge.org/frs/?group_id=126
un-tar the package and to the directory. type in ruby setup.rb that will setup the gems to your ruby installation. Now to install individual gems
example. gem install hpricot
this will install the hpricot library to ruby installation.Posted by iCehaNgeR's hAcK NoteS at 10:43 AM 0 comments
Saturday, May 9, 2009
Generate Torque Schema from existing DB
I came across a situation where there is the excellent DB schema available, but no torque schema to generate the Peer and Maper classes. Solution>
Posted by iCehaNgeR's hAcK NoteS at 1:50 PM 0 comments
Wednesday, May 6, 2009
Weblogic startup failed after password change in admin console
Posted by iCehaNgeR's hAcK NoteS at 7:09 AM 1 comments
Friday, April 17, 2009
Screen Graber Deamon
This was a hack to grab the questions from a paid online quiz. Idea here is, this program will run as a deamon in the background and take the screen shot every 10 second and save it into a jpeg file on temp directory.
Posted by iCehaNgeR's hAcK NoteS at 3:52 PM 0 comments
Wednesday, April 8, 2009
JPA OneToMany using FetchType.EAGER
Scenario: Want to insert multiple address to basket header with a unique basketId.
Posted by iCehaNgeR's hAcK NoteS at 5:47 AM 1 comments
Wednesday, April 1, 2009
Struts 2 OGNL variable evaluation
'%{}' syntax is used for this purpose.
The second statement convert the string to int and add the two integers.
Posted by iCehaNgeR's hAcK NoteS at 2:10 PM 4 comments
Monday, March 30, 2009
SVN with Eclipse Ganymede
- Install svn server for windows, use the msi package.
- Create Repository
Posted by iCehaNgeR's hAcK NoteS at 6:10 PM 0 comments
