Win a copy of Head First Android this week in the Android forum!

Santoshkumar Jeevan Pawar

Greenhorn
+ Follow
since Aug 19, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Santoshkumar Jeevan Pawar

Hello,

When i call JasperViewer.viewReport(jasperPrint) it is throwing following exception.I am calling this method inside execute of action class.



JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters,campaignDataDS);

JasperViewer.viewReport(jasperPrint);


java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:317)
at java.awt.Frame.<init>(Frame.java:419)
at java.awt.Frame.<init>(Frame.java:384)
at javax.swing.JFrame.<init>(JFrame.java:150)
at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:176)
at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:455)
at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:368)
at com.scloud.shopdbs.store.StoreConfigUIManager.prepareCampaignDataReport(StoreConfigUIManager.java:3864)
9 years ago
Hello,

Can anyone give me few good links to Objective c and iPad developement.

I really appreciate your help in advance.

Thank You.
Have a Nice Time.

-Santosh
11 years ago
iOS
I have xsd like below:

<xs:element name="metroList">
<xs:complexType>
<xs:sequence>
<xs:element ref="clusterList" maxOccurs="1" minOccurs="1"/>
<xs:element ref="defaultThresholds" maxOccurs="1" minOccurs="1"/>
<xs:element ref="metroInfo" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="clusterList">
<xs:complexType>
<xs:sequence>
<xs:element ref="clusterInfo" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>

and i am generating classes with following ant script

<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="compile.classpath" />
<target name="jaxb-gen">
<xjc target="${generated}" schema="${src.xml}/metroList.xsd" removeOldOutput="yes"
package="com.metro">
<produces dir="${generated}/com/metro" includes="**/*" />
</xjc>
</target>


i want the generated classes to automatically "implements Serializable".

Your help will be really appreciated.

Thank You.
Have a Nice Time.

-Santosh
11 years ago
Hello,

Thanks for your efforts.

Here is solution,

GregorianCalendar gc = new GregorianCalendar();
TimeZone tz = gc.getTimeZone();
gc.add(GregorianCalendar.MILLISECOND, +tz.getDSTSavings());
System.out.println(gc.getTime());


Thank You.
Have a Nice Time.

-Santosh
11 years ago
Can you please give me block of code to print current time with daylight savings
11 years ago
Hello,

If i apply daylight savings and e.g selects PST then java new Date() returns wrong time and date.

So how can i fix this issue and get date with applying daylight savings.

E.g. System.out.println( new Date()); gives me 03:19 AM but current time is 04:19.


Your help will be really appreciated.


Thank You.
Have a Nice Time.

-Santosh


11 years ago
Hello all,

Here we lose the actual value,please check below code when we typecast from long to int.


long l = new Date().getTime(); //1238583275781
int i = (int)myLong; // value becomes 1633321080

System.out.println(new Date(i));
System.out.println(new Date(myLong));

But at the same time i dont want to lose actual value......

Thank You.
Have a Nice Time.

-Santosh
12 years ago
I want to store a long in a byte array, transfer it over a network, then convert it back to a long.And In Java, a long is 8 bytes not 4.
But i want it a 4 bytes,is there any way to convert .
12 years ago
Rob Prime ,

Thanks for quick reply,can you please provide a link to an article where i can get some part of JNI code for this type of functionality.

I am developing a app which monitors windows services in periodically basis.

Thank You.
Have a Nice Time.

-Santosh
12 years ago
Hello,

Can anyone tell me the api monitor NT services through java is available or do i need to go for any c or c++.

I want to just monitor NT Services..i mean if the specific service is running or not at current time.

Thank You.
Have a Nice Time.

-Santosh
12 years ago
Hi just use following script it should work, i have written for you.

Thank You.
Have a Nice Time.

-Santosh




var parentNodes = xmlHttp.responseXML.getElementsByTagName("parent");
var inHtml;
for (var j=0; j<parentNodes.length; j++) {

var nameNodes = parentNodes[j].getElementsByTagName("areacode");
var tempareacode = areacodeNodes[0].firstChild.nodeValue;
message[i]=tempareacode;
inHtml=inHtml+tempareacode;
}
document.getElementById('displayareacode').innerHTML=inHtml;
yes, its you are missing only table opening tag, otherwise it should work fine.

Thank You.
Have a Nice Time.

-Santosh
Hi Payal,

here is total answer for your question with code snippet
just add for text field

onKeyUp event submitenterfun(this,event)


function submitenterfun(myfield,e){

var keycode;
if (window.event)
keycode = window.event.keyCode;
else if (e)
keycode = e.which;
else
return true;

if (keycode == 13){

document.forms.loginForm.submit();
return false;
}
else
return true;
}


Thank You.
Have a Nice Time.

-Santosh
Hi everyone,

I have implemented slow motion effect for my web application.So in this case i am initially showing five items, now when user clicks on next link, i come with five more next items via AJAX request convert data in array of Javascript objects and then i append these elements in parent div, and move slowly existing items to left show new five items by yahooUI .now e.g if i go upto 100 pages then performance is low.is there any idea to free the unused memory such as garbage collector .I tried with removing children from parent bot it does not work perfect as node.remove has many issues.

Thanks in advance for any help to work around this issue.


Thank You.
Have a Nice Time.

-Santosh
Vinitha,

i am not understanding, why are you creating HttpServletResponse,just use it which is available in execute method.

e.g.


public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {


Cookie usernameCookie = new Cookie("MiniHRUsername",
user.getEmailId());
usernameCookie.setMaxAge(60 * 60 * 24 * 356 * 3);
response.addCookie(usernameCookie);



Thank You.
Have a Nice Time.

-Santosh
13 years ago