Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!

sadhu charan

Greenhorn
+ Follow
since Nov 27, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 sadhu charan

Hi All,

  I am using FTP Server using java,problem on to convert  FTPFile to File in Java, is there any solution.

Example :   FTPFile[] files = ftp.listFiles(path);  

// this returning list of  FTPFile but i want process File only , any help on this , it could be great.
5 months ago
This url you are given have very difficult to understand and they have some license which we can't use for commercial purpose
6 years ago
Hi to everybody,

I have some JT file(which is in 3D format) which is only open in 3rd party viewer , now my requirement is i have to open it without 3rd party viewer; i don't want any 3rd party viewer to open JT file , I want to open it in java programing,

Thanks and Regards
SCP
6 years ago
Hi to everybody,
I am designing a jsp page where we check live data, based on data screen will display appropriate color, like red,yellow and green ;depending on condition, button color will change;
it will work on windows xp and showing continuously , but in case of windows 7 it will work max 3 to 4 hours, after that it will showing system not responding error; i am using javascrit,ajax and jquery and html for jsp page;
can anyone suggest me what is excepted problem in that case;

Thanks and Regards
SCP
6 years ago
JSP
Hi E Armitage,
Thanks for Your Response, I agree with you but Threads are created in Java timer only for 2 minutes interval I think that is not problem but I will check It,and javascript timer are for checking some windows services
One more doubt if threads are not sucessfully dead is it reason for Hanging System ?


Thanks
SCP

6 years ago
JSP
Hi every body,

My web application on production server where i install tomcat 7, My web application(in JSP) running sucessfully still 12-16 hours, after that production server(means system)get Halt ; So application get stop, If i want to start my web application then i have reboot the system, Otherwise it will not work but tomcat server showing running. But Application not working at that time;

My web application contain 50 to 60 ajax timer where i check all the Pinging status of IP, and also check status of some windows services, and my application uses 20 threads,
What is the problem i am not get yet, but application working for only 12-16 hours


Thanks in Advance
SP

6 years ago
JSP


Good morning everybody

I have "FinalChart.jsp" page which display barchart based on value, it is showing correct if i executed this page alone, But depending on my requirement i have to executed it by Ajax call , but when i send a ajax call nothing will display , so i check in alert it is only showing scripting tag, How can i display graph through ajax call ?

Here my FinalChart.jsp code


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
<html xmlns="http://www.w3.org/1999/xhtml">;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Flot Bar Chart</title>

<style type="text/css">
body { font-family: Verdana, Arial, sans-serif; font-size: 12px; }
h1 { width: 450px; margin: 0 auto; font-size: 12px; text-align: center; }
#placeholder { width: 650px; height: 200px; position: relative; margin: 0 auto; }
.legend table, .legend > div { height: 82px !important; opacity: 1 !important; right: -55px; top: 10px; width: 116px !important; }
.legend table { border: 1px solid #555; padding: 5px; }
#flot-tooltip { font-size: 12px; font-family: Verdana, Arial, sans-serif; position: absolute; display: none; border: 2px solid; padding: 2px; background-color: #FFF; opacity: 0.8; -moz-border-radius: 5px; -webkit-border-radius: 5px; -khtml-border-radius: 5px; border-radius: 5px; }
</style>

<script type="text/javascript" language="javascript" src="excanvas.min.js"></script>
<script type="text/javascript" language="javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" language="javascript" src="jquery.flot.js"></script>
<script type="text/javascript" language="javascript" src="jquery.flot.axislabels.js"></script>
<script type="text/javascript" language="javascript" src="jquery.flot.orderBars.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var d1_1 = [
[1325376000000, 120],
[1328054400000, 70],
[1330560000000, 100],
[1333238400000, 60],
[1335830400000, 35],
[1338422400000, 50],
[1341014400000, 35],
[1343606400000, 50],
[1346198400000, 30],
[1348790400000, 10],
[1351382400000, 100]

];

var d1_2 = [
[1325376000000, 80],
[1328054400000, 60],
[1330560000000, 30],
[1333238400000, 35],
[1335830400000, 30],
[1338422400000, 45],
[1341014400000, 35],
[1343606400000, 40],
[1346198400000, 40],
[1348790400000, 100],
[1351382400000, 100]

];

var d1_3 = [
[1325376000000, 80],
[1328054400000, 40],
[1330560000000, 30],
[1333238400000, 20],
[1335830400000, 10],
[1338422400000, 30],
[1341014400000, 35],
[1343606400000, 30],
[1346198400000, 50],
[1348790400000, 50],
[1351382400000, 100]

];

var d1_4 = [
[1325376000000, 15],
[1328054400000, 10],
[1330560000000, 15],
[1333238400000, 20],
[1335830400000, 15],
[1338422400000, 35],
[1341014400000, 35],
[1343606400000, 25],
[1346198400000, 20],
[1348790400000, 30],
[1351382400000, 100]
];
var d1_5 = [
[1325376000000, 15],
[1328054400000, 10],
[1330560000000, 15],
[1333238400000, 20],
[1335830400000, 15],
[1338422400000, 45],
[1341014400000, 35],
[1343606400000, 10],
[1346198400000, 30],
[1348790400000, 20],
[1351382400000, 100]

];

var data1 = [
{
label: "OAK",
data: d1_1,
bars: {
show: true,
barWidth: 12*24*60*60*300,
fill: true,
lineWidth: 1,
order: 1,
fillColor: "#AA4643"
},
color: "#AA4643"
},
{
label: "USN",
data: d1_2,
bars: {
show: true,
barWidth: 12*24*60*60*300,
fill: true,
lineWidth: 1,
order: 2,
fillColor: "#89A54E"
},
color: "#89A54E"
},
{
label: "OCN",
data: d1_3,
bars: {
show: true,
barWidth: 12*24*60*60*300,
fill: true,
lineWidth: 1,
order: 3,
fillColor: "#4572A7"
},
color: "#4572A7"
},
{
label: "QOK",
data: d1_4,
bars: {
show: true,
barWidth: 12*24*60*60*300,
fill: true,
lineWidth: 1,
order: 4,
fillColor: "#80699B"
},
color: "#80699B"
},
{
label: "GEN",
data: d1_5,
bars: {
show: true,
barWidth: 12*24*60*60*300,
fill: true,
lineWidth: 1,
order: 5,
fillColor: "#009900"
},
color: "#009900"
}


];

$.plot($("#placeholder"), data1, {
xaxis: {
min: (new Date(2011, 11, 8)).getTime(),
max: (new Date(2012, 11, 18)).getTime(),
mode: "time",
timeformat: "%b",
tickSize: [1, "month"],
monthNames: ["8:00 AM", "9:00 AM", "10:00 AM", "11:00 AM", "12:00 PM", "1:00 PM", "2:00 PM", "3:00 PM", "4:00 PM", "5:00 PM", "6:00 PM"," "],
tickLength: 0, // hide gridlines
axisLabelUseCanvas: true,
axisLabelFontSizePixels: 12,
axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif',
axisLabelPadding: 5
},
yaxis: {
axisLabel: 'Value',
axisLabelUseCanvas: true,
axisLabelFontSizePixels: 12,
axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif',
axisLabelPadding: 5
},
grid: {
hoverable: true,
clickable: false,
borderWidth: 1
},
legend: {
labelBoxBorderColor: "none",
position: "right"
},
series: {
shadowSize: 1
}
});

function showTooltip(x, y, contents, z) {
$('<div id="flot-tooltip">' + contents + '</div>').css({
top: y - 20,
left: x - 90,
'border-color': z,
}).appendTo("body").show();
}

function getMonthName(newTimestamp) {
var d = new Date(newTimestamp);

var numericMonth = d.getMonth();
var monthArray = ["8:00 AM", "9:00 AM", "10:00 AM", "11:00 AM", "12:00 PM", "1:00 PM", "2:00 PM", "3:00 PM", "4:00 PM", "5:00 PM", "6:00 PM"];

var alphaMonth = monthArray[numericMonth];

return alphaMonth;
}

$("#placeholder").bind("plothover", function (event, pos, item) {
if (item) {
if (previousPoint != item.datapoint) {
previousPoint = item.datapoint;
$("#flot-tooltip").remove();

var originalPoint;

if (item.datapoint[0] == item.series.data[0][3]) {
originalPoint = item.series.data[0][0];
} else if (item.datapoint[0] == item.series.data[1][3]){
originalPoint = item.series.data[1][0];
} else if (item.datapoint[0] == item.series.data[2][3]){
originalPoint = item.series.data[2][0];
} else if (item.datapoint[0] == item.series.data[3][3]){
originalPoint = item.series.data[3][0];
} else if (item.datapoint[0] == item.series.data[4][3]){
originalPoint = item.series.data[4][0];
}

var x = getMonthName(originalPoint);
y = item.datapoint[1];
z = item.series.color;

showTooltip(item.pageX+10, item.pageY+10,
"<b>" + item.series.label + "</b><br /> = " + y,
z);
}
} else {
$("#flot-tooltip").remove();
previousPoint = null;
}
});
});
</script>
</head>

<body>
<h1>Trigger Analysis Data</h1>
<div id="placeholder"></div>
</body>
</html>


and here my AJax Request jsp , i,e Test.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
<html xmlns="http://www.w3.org/1999/xhtml"; lang="ro">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
<title>Ajax tutorial - http://coursesweb.net</title>;

<script type="text/javascript"><!--
function get_XmlHttp() {
var xmlHttp = null;

if(window.XMLHttpRequest) { // for Forefox, IE7+, Opera, Safari, ...
xmlHttp = new XMLHttpRequest();
}
else if(window.ActiveXObject) { // for Internet Explorer 5 or 6
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}

return xmlHttp;
}

function ajaxrequest(php_file, tagID) {
var request = get_XmlHttp();

var the_data = '';
request.open("POST", php_file, true);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.send(the_data);
request.onreadystatechange = function() {
if (request.readyState == 4) {
var resp = request.responseText;
alert(resp);
// get the response from php
document.getElementById(tagID).innerHTML = resp; // add the response into the tag with the ID from "tagID"
parseScript(resp);
}
}
}

function parseScript(strcode) {
var scripts = new Array();
// Strip out tags
while(strcode.indexOf("<script") > -1 || strcode.indexOf("</script") > -1) {
var s = strcode.indexOf("<script");
var s_e = strcode.indexOf(">", s);
var e = strcode.indexOf("</script", s);
var e_e = strcode.indexOf(">", e);

// Add to scripts array
scripts.push(strcode.substring(s_e+1, e));
// Strip from strcode
strcode = strcode.substring(0, s) + strcode.substring(e_e+1);
}

// Loop through every script collected and eval it
for(var i=0; i<scripts.length; i++) {
try {
eval(scripts[i]);
}
catch(ex) {
// do what you want here when a script fails
}
}
}
--></script>
</head>
<body>

<div id="context"> </div>
<h4 style="cursor:pointer;" onclick="ajaxrequest('FinalChart.jsp', 'context')"><u>Test</u></h4>

</body>
</html>



Thanks in adavance

S C P
6 years ago
JSP
Hi Richard,

Can you suggest me how ? give some example in coding or if you have any link then send me

Thanks
SCP
7 years ago
Hi to All,
I have a requirement for uploading different images for different monitor which is remotely connected through network, Like suppose there are 4 computer and one Administrator computer, Here in administrative computer administrator upload different image like image-1 for computer-1 and image-2 for computer-2 and image-3 for computer-3 and image-4 for computer-4,can it possible my friends ?

Thanks in Advance
SCP
7 years ago
Hi to all i am new to ajax but i know little so for my application i write setTimeinterval funtion for calling that function and executing ajax query for every 3 seconds but in middle it crashes and not showing proper data after 10 minutes , so i want to write SetTimeOut function and implemented inside ajax function and also implemented for one object
Example:-<script type="text/javascript">
function Ajax() {
var $http, $self = arguments.callee;

if (window.XMLHttpRequest) {
$http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
$http = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
$http = new ActiveXObject('Microsoft.XMLHTTP');
}
}

if ($http) {
$http.onreadystatechange = function() {
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http.responseText;
setTimeout(function() {
$self();
}, 10000);
}
};
$http.open('GET', 'http://localhost:8080/IRADAR/content.jsp'
+ '?' + new Date().getTime(), true);
$http.send(null);
}

}
</script>
<script type="text/javascript">
setTimeout(function() {
Ajax();
}, 1000);
</script


but i am not getting how to implement for multiple object for multiple url calling how to implement, i write like but where and how i call setTimeout() it is not working properly

:-<script type="text/javascript">
function Ajax() {
var $http, $self = arguments.callee;
var $http1, $self = arguments.callee;
var $http2, $self = arguments.callee;


if (window.XMLHttpRequest) {
$http = new XMLHttpRequest();
$http1 = new XMLHttpRequest();
$http2 = new XMLHttpRequest();

} else if (window.ActiveXObject) {
try {
$http = new ActiveXObject('Msxml2.XMLHTTP');
$http1 = new ActiveXObject('Msxml2.XMLHTTP');
$http2 = new ActiveXObject('Msxml2.XMLHTTP');

} catch (e) {
$http = new ActiveXObject('Microsoft.XMLHTTP');
$http1 = new ActiveXObject('Microsoft.XMLHTTP');
$http2 = new ActiveXObject('Microsoft.XMLHTTP');

}
}

if ($http) {
$http.onreadystatechange = function() {
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http.responseText;
setTimeout(function() {
$self();
}, 10000);
}
};
$http.open('GET', 'http://localhost:8080/ssms.jsp'
+ '?' + new Date().getTime(), true);
$http.send(null);
}
if ($http1) {
$http.onreadystatechange = function() {
if (/4|^complete$/.test($http1.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http1.responseText;
setTimeout(function() {
$self();
}, 10000);
}
};
$http1.open('GET', 'http://localhost:8080/content.jsp'
+ '?' + new Date().getTime(), true);
$http1.send(null);
}

if ($http2) {
$http2.onreadystatechange = function() {
if (/4|^complete$/.test($http2.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http2.responseText;
setTimeout(function() {
$self();
}, 10000);
}
};
$http2.open('GET', 'http://localhost:8080/servit.jsp'
+ '?' + new Date().getTime(), true);
$http2.send(null);
}



}
</script>



Thanks in advance
S C P


Thanks to all it is working which is suggested by Rob Spoor

Thank you
7 years ago
Hi Rob Spoor It is working for Services which only contain one word like "ALG" but which window services contain space in middle like "SOS SIT Standby-38087" that is not working in this command like
sc \\\\43.45.46.100 query SOS SIT Standby-38087 or i did like sc \\\\?43.45.46.100 query SOS SIT Standby-38087 boths are not working can you help me ,
Thanks in advance
SCP
7 years ago
Better you try

int id = Integer.ParseInt((request.getParameter("id"));
7 years ago
Thanks Rob Spoor That is solved I did like this sc \\\\43.45.46.100 and it work fine , Thanks once again
7 years ago