|
OK it seems there is a ssh-client-g3.exe after all. Here is a link to the documentation: Using Command-Line Options of ssh-client-g3.exe
[^].
ssh-client-g3 [-r] [-p port] [-u user] [-h host] [profile]
The part highlighted in green is the name of a profile file which you can build with the SSH Tectia Configuration tool. Please read the details here: Defining Connection Profiles
[^]. On this page you can search for Defining Authentication which will describe how you can add authentication to a profile so it can be used non-interactively, just the way you wanted to.
Regards,
Manfred
P.S.: Keep us posted of your progress in this!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Hi Manfred,
Though I use tectia 6.0.12.50, the software is customized in our environment so the "Password Authentication" part is completely removed. Why I wanted to automate because of some repetitive tasks of logging in various servers.
So, is it possible to store the keystore in a variable and then copy it to a clipboard and then paste when the prompts appear? But, I am not sure how to proceed with this idea.
Thanks for your help.
Dinesh
|
|
|
|
|
dineshbabub wrote: the software is customized in our environment so the "Password Authentication"
part is completely removed
You are talking about the profile file configuration tool I presume. If this is due to a company policy you'd better ask somebody if what you are trying to do is allowed by your company. Better be safe than sorry!
Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
I know in JavaScript I can display a date in the local format using toLocaleString() , is there an easy way to do this for a number?
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
The same function can be applied to numbers. See here: http://www.tutorialspoint.com/javascript/javascript_builtin_functions.htm[^].
Here an example:
<html>
<body>
Test number formatting with locale.
</body>
<script type="text/javascript">
var num = 100234.56789;
alert(num.toLocaleString());
</script>
</html>
In my browser with german settings the number is rendered as 100.234,56789, which is exactly the expected behaviour.
Regards,
Manfred
|
|
|
|
|
Thanks, I just could not find it; brain fart on my part.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Sh*t Farts happen from time to time!
Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
I am new to ExtJS.I tried in Sencha and got some Code but its Confuse to Implement the code.I want to do the code in Visual Studio-2010.and i don't know how to do this.Please explain how to start my ExtJS examples in visual studion-2010.Please explain step by step.
Thanks a lot in advance..
|
|
|
|
|
|
Hi
I have a problem: I have a div inside HTML page then I open/update with to javascript functions: it works fine until I put code inside another div, function open window div but is not the one I want, is just empty.
The following code work fine alone (I repet out of another div)
scrip to open div like window (work fine it's based on exterlan library)
function showdivrecord(ais)
{
return hs.htmlExpand(ais);
}
Once I show div (with function showdivrecord(ais)) - I fill div
function filldivrecord(idrow)
{
var divtxtElement = document.getElementById(idrow).value;
var mySplitResult = divtxtElement.split("|");
document.getElementById("divtxt").innerHTML = divtxtElement;
document.getElementById('picdiv').src= document.getElementById('pic'+idrow).value;
document.getElementById("divtxt").innerHTML = "<hr>0) " + mySplitResult[0] + "<hr>1) " + mySplitResult[1];
}
Sorry I am novice of javascript, by the way I think problem is parameter "this": what have to write to point other right DIV?? ( I guess).
Thank you in advance
|
|
|
|
|
Your question/code-snippet is incomplete.
I don't see another div, show-div detail, etc. Though you mention 'based on external library', what does hs.htmlExpand(ais) work like? When and where you call filldivrecords? It's all connected to troubleshoot and find the culprit.
Did you DEBUG and see? Put keyword 'debugger;' at the start of method showdivrecords(before return statement), enable Javascript debugging in your browser and then step through using F11 to see the execution.
|
|
|
|
|
Hi Mewara thank you for you reply i post full html page (I just removed php), the library
hs.graphicsDir = 'js/Photoview/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
I use this function showdivrecord(ais) to have popup effect, I hope this can help you, sorry I am not a good programmer on javascript, ciao
<html>
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ELENCO CASTING - ISCRITTI |</title>
<script type="text/javascript" language="javascript" src="js/media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable();
} );
</script>
<script type="text/javascript" src="js/Photoview/highslide/highslide-with-html.js"></script>
<script type="text/javascript">
hs.graphicsDir = 'js/Photoview/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
</script>
</head>
<body id="dt_example" onLoad="myonload();">
<form name="form1" method="post" action="">
| Cognome e Nome | Localita' | Provincia | Ruolo | Telefono | Email | <input type="checkbox" name="removeid" value="" id="removeid" = 10 ? 'disabled' : '';?> > | | | | | | | | | | | | | |
<input name="elimina" type="button" class="cella_form" id="elimina" value="Elimina" onClick="javascript:delthis(this);"><input name="aggiungi" type="button" class="cella_form" id="aggiungi" value="Aggiungi" onClick="javascript:nuovoiscritto();"><input name="reset" type="button" class="cella_form" id="slideshow" value="slideshow" onClick="javascript:showpic();"><input name="azzera" type="reset" class="cella_form" id="reset" value="Azzera" onClick="javascript:azzeraform();"><input name="browse" type="button" class="cella_form" id="browse" value="Agenda Casting" onClick="javascript:window.location='browse_casting_agenda.php';">
<input type="button" name="v1" id="v1" value="S1" onClick="javascript:showdivrecord(this)">
<script>
function showdivrecord(ais)
{
return hs.htmlExpand(ais);
}
</script>
<script>
function filldivrecord(idrow)
{
var divtxtElement = document.getElementById(idrow).value;
var mySplitResult = divtxtElement.split("|"); // parte da 0
document.getElementById("divtxt").innerHTML = divtxtElement;
document.getElementById('picdiv').src= document.getElementById('pic'+idrow).value;
document.getElementById("divtxt").innerHTML = " 0) " + mySplitResult[0] + " 1) " + mySplitResult[1];
//return hs.htmlExpand(ais);
}
</script>
</form>
</body>
</html>
|
|
|
|
|
I am trying to implement the double click event on a child element of an autocomplete text box. I can assign the ondblclick to the div but when I double click the innerHTML shows all of the child elements and not the one I double clicked on. See the code below:
var aStr2 = new Array("computer - Plain IA", "computer - Plain JSOC", "communication - Plain IA", "condor - Plain IA");
function AutoComplete(oText) {
// initialize member variables
this.oText = oText; // the text box
this.oDiv = document.getElementById("acdiv"); // oDiv; // a hidden for the popup auto-complete
this.nMaxSize = 30;
this.aStr = new Array(5);
this.aStrx = new Array(5);
this.aStr3 = aStr2;
// preprocess the texts for fast access
var i, n = this.oText.value.length;
for (i = 0; i < aStr2.length; i++) {
this.aStrx[i] = aStr2[i];
}
this.nCount = this.oText.value.length;
// if a suitable number then show the popup-div
if ((this.nMaxSize == -1) || ((this.nCount < this.nMaxSize) && (this.nCount > 0))) {
// clear the popup div.
while (this.oDiv.hasChildNodes())
this.oDiv.removeChild(this.oDiv.firstChild);
// get all the matching strings from the AutoCompleteDB
for (i = 0; this.aStr3[i] != null; i++) {
if (this.aStr3[i].indexOf(this.oText.value) == -1) {
delete this.aStrx[i];
}
}
// add each string to the popup-div
var i, n = aStrx.length;
for (i = 0; i < n; i++) {
var oDiv2 = document.createElement('div');
//debugger;
oDiv.appendChild(oDiv2);
if (aStrx[i] != null) {
oDiv2.innerHTML = aStrx[i];
}
oDiv2.onmousedown = AutoComplete.prototype.onDivMouseDown;
oDiv2.onmouseover = AutoComplete.prototype.onDivMouseOver;
oDiv2.onmouseout = AutoComplete.prototype.onDivMouseOut;
this.oDiv = oDiv2;
this.oDiv.style.visibility = "visible";
this.oDiv.style.color = "Black";
this.oDiv.style.background = "Yellow";
}
}
else // hide the popup-div
{
this.oDiv.innerHTML = "";
this.oDiv.style.visibility = "hidden";
}
}
AutoComplete.prototype.onblur = function () {
this.oDiv.style.visibility = "hidden";
}
function dblclick() {
// debugger
alert("hello");
}
|
|
|
|
|
Got it working. Just made the following class var global:
var first = true;
var aStrx = new Array(5);
var oDiv;
var indextext = 0;
Then added the event to each childelement:
var oDiv2 = document.createElement('div');
//debugger;
oDiv2.id = i;
oDiv2.setAttribute('ondblclick', 'dblclick("' + oDiv2.id + '")');
Finally, added the functions:
function dblclick(id) {
if (first == true) {
populateTxt(aStrx[id]);
first = false;
}
indextext++
if (indextext >= aStrx.length - 1) {
indextext = 0;
first = true;
}
}
function populateTxt(selectedtext) {
document.getElementById("txtSearch2").value = selectedtext;
indextext = 0;
oDiv = document.getElementById("acdiv");
oDiv.innerHTML = "";
oDiv.style.visibility = "hidden";
}
|
|
|
|
|
Hello,
I'm trying to move a picture around my screen randomly.
Here is my 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=utf-8" />
<title>JavaScript: Moving an Image</title>
<script type="text/javascript">
var i = 0;
function Init()
{
var elem = document.getElementById("ss");
var move = parseInt(elem.style.marginTop+10);
elem.setAttribute("style", "marginTop:" + move.toString() + "px");
elem.setAttribute("style", "marginLeft:" + move.toString() + "px");
elem.setAttribute("style", "marginBottom:" + move.toString() + "px");
elem.setAttribute("style", "marginRight:" + move.toString() + "px");
setInterval("Init()",1000);
}
function backToCenter()
{
var elem = document.getElementById("ss");
elem.style.marginTop="200px";
elem.style.marginRight="200px";
elem.style.marginBottom="200px";
elem.style.marginLeft="400px";
}
</script>
<style>
#box
{
width: 500px;
height: 300px;
position: relative;
margin: 20px auto 0px auto;
border: 5px outset #000;
overflow: hidden;
}
.image
{
position: absolute;
z-index: 100;
}
</style>
</head>
<body onload="Init()">
<div id="ss"style="height: 200px; width: 500px;"><img class="image" id="img1" src="beer-logo.jpg" height="50px" width="50px"/></div>
</body>
</html>
but the picture doesnt move, i cant figure out how to do this.
any help would be more than thankfull.
cheers.
|
|
|
|
|
Sir;
I think it's because of the lines (below) are overwriting each other.
elem.setAttribute("style", "marginTop:" + move.toString() + "px");
elem.setAttribute("style", "marginLeft:" + move.toString() + "px");
elem.setAttribute("style", "marginBottom:" + move.toString() + "px");
elem.setAttribute("style", "marginRight:" + move.toString() + "px");
Also, the value of the attribute style should be margin-top: npx not marginTop: nxp (we remove the '-' character from the javascript identifier marginTop).
Sir, lets begin with moving the picture down at speed of 10px/sec.
elem.style.marginTop = move.toString() + "px";
then you change the direction when the picture reaches the edge of the screen.
Help people,so poeple can help you.
|
|
|
|
|
Thanks for the help.
my problem is that i need to keep it moveing all the time, with your code the picture stays in the smae place.
My problem is in this area:
var x = parseInt(elem.style.marginTop);
x=x+10;
elem.style.marginTop = x+"px";
the compiler has an issue with this line:
elem.style.marginTop = x+"px";
I changed the code abit (lost the setAttribute and replaced it with what you gave me)
Hope you can help me out.
|
|
|
|
|
What error do you get? That looks correct.
|
|
|
|
|
Let me exaplain what I want maybe it will give you a better idea of how to help me:
I need my picture to randomly move around the screen that why i give a random amount to each diarection, i'v been trying to thing of an algorithm to solve this, I have the algorithm but the syntax is just not matching up.
i found the element.style.margin(and direction here) = something will move the object, but i need the object to move in a certin step so the movement will look smooth.
any help would be more than thankfull.
Kind reggards
|
|
|
|
|
Sir;
- about you first comment what exception does the browser throw in the console?
- about the smoothing, you should make the steps faster and smaller for example 10px/sec can be 1px/100 millisecond (you change the time interval in setInterval() to 100 and the 10px in move() to 1px.
- about moving in certain steps, you can use an array than contains information about both speed and direction or the endpoints.
Help people,so poeple can help you.
|
|
|
|
|
Sir;
I have wrote some nice code that moves a panel using 4 circle formula
take a look
function DrawArc1(t) {
var a = (1.0 + t / 2000.0) * Math.PI;
var x = 50.0 + 50.0 * Math.cos(a);
var y = - 50.0 * Math.sin(a);
var panel = document.getElementById('movepanel');
panel.style.left = x + 'px';
panel.style.top = y + 'px';
}
function DrawArc2(t) {
var a = (0.5 + t / 2000.0) * Math.PI;
var x = 100 + 50 * Math.cos(a);
var y = 50 - 50 * Math.sin(a);
var panel = document.getElementById('movepanel');
panel.style.left = x + 'px';
panel.style.top = y + 'px';
}
function DrawArc3(t) {
var a = (t / 2000.0) * Math.PI;
var x = 50.0 + 50.0 * Math.cos(a);
var y = 100.0 - 50.0 * Math.sin(a);
var panel = document.getElementById('movepanel');
panel.style.left = x + 'px';
panel.style.top = y + 'px';
}
function DrawArc4(t) {
var a = (1.5 + t / 2000.0) * Math.PI;
var x = 50 * Math.cos(a);
var y = 50 - 50 * Math.sin(a);
var panel = document.getElementById('movepanel');
panel.style.left = x + 'px';
panel.style.top = y + 'px';
}
function move() {
var t = 0;
var timeout = setInterval(function() {
if (t >= 0 && t <= 2000) {
DrawArc1(t);
}
else if (t > 2000 && t <= 4000) {
DrawArc2(t - 2000);
}
else if (t > 400 && t <= 6000) {
DrawArc3(t - 4000);
}
else if (t > 6000 && t <= 8000) {
DrawArc4(t - 6000);
}
else clearInterval(timeout);
t += 100;
}, 100);
}
the function move calls DrawArc1, DrowArc2, DrawArc3, DrawArc4 according to time to make a relationship between time and position. i hope you find it useful.
you can also put the formulas and time intervals in an array.
Help people,so poeple can help you.
|
|
|
|
|
|
over my head, sir
Help people,so poeple can help you.
|
|
|
|
|
Hi there.
It seems that there's a couple of problems with your code.
Firstly, it bogs down quickly due to the way that the init function is set to create a new timer each time it's called
Next, elem.setAttribute("style" ..... - this sets the style for the element - the style is defined inline, that is - a single string that contains all of the style info - just like the style string you have for the ss div
I think there was something else, though it's been a really long day.
Anyway, here's some code that works - even if it is a bit epileptic!
<html>
<head>
<title>JavaScript: Moving an Image</title>
<script type="text/javascript">
function Init()
{
setInterval("onMove();",100);
}
function constructStyleString(xPos, yPos)
{
var result = "margin-top: " + yPos + "px;";
result += "margin-left: " + xPos + "px;";
return result;
}
function onMove()
{
var xPos, yPos;
xPos = Math.random() * 50;
yPos = Math.random() * 20;
var elem = document.getElementById("imgContainer");
elem.setAttribute("style", constructStyleString(xPos, yPos));
}
</script>
</head>
<body onload="Init();">
<div id="imgContainer" style="height: 200px; width: 500px;">
<img class="image" id="img1" src="img/progBar1024-2.gif" height="24px" width="10px"/>
</div>
</body>
</html>
|
|
|
|
|
When you use jQuery UI resizable plugin the mouse cursor style can be as "e-resize" (2 arrows in opposite directions). But, how can we change it? I've tried this:
$("#right-line").hover(function() {
$(this).css("cursor", "crosshair");
});
And it doesn't work, that is the cursor is still "e-resize".
Actually, I've made my own outer black div around the main div rectangle. That outer black div is like a thin border and has 8 small squares in top-left, top-right, bottom-left, bottom-right corners and top-center, bottom-center, left-center and right-center locations, which I want to use as my own handles. It means I don't want to allow "e-resize" cursor along the whole border of container, but only on my own squares.
So, I need to control the cursor style in jQuery UI resizable plugin.
I know I can change the original jQuery CSS file, but is there a way to achieve this programmatically?
Thank you for any suggestion.
|
|
|
|
|