|
Anybody know of any good JavaScript libraries that provide spider plots (sometimes called radar or polar plot)?
I've used flot and found a flot plugin, but as you can see here[^], it's not quite complete. The labels are messed up. Somebody had posted a fix for the labels, but it then breaks the highlighting!
The ideal situation would be an interactive, editable spider plot where you can drag values up and down the "legs" of the plot. The author of the flot plugin had alluded in November to a new version with support for that, but I don't know if he's still working on it, or if it's abandoned.
|
|
|
|
|
I was built "Image gallery" application ...First,I need to know how to build a function that put one of these images as wallpaper on the desktop ... I think I need to change the registry file for the system ... right! . Second, If this is right any conflict with the antivirus programs?
Thank you
|
|
|
|
|
Weli05 wrote: how to build a function that put one of these images as wallpaper on the desktop
I don't believe that you can do this with javascript.
- Chrome doesn't allow this via the right-click menu.
- Internet Explorer does
- Opera does
- FireFox does
In each of these 3 instances, it's native-code in the browser which adds this functionality.
Weli05 wrote: I think I need to change the registry file for the system ... right! . Second, If this is right any conflict with the antivirus programs?
Yes indeed. You can do it with Reg Keys. Depending on which user is targeted, the exact key varies.
No, I don't believe there to be a problem with virus-scanners and these keys. (though they may not like code that gets other user's SIDs)
If you want to change them for the currently logged-in user, you can find the keys here:
HKCU\Control Panel\Desktop
->TileWallpaper
->Wallpaper
->WallPaperOriginX
->WallpaperOriginY
->WallpaperStyle
If you wish to change them for another user (eg, you log in as Admin and want to change the wallpaper for a user's account)
1. Get the user's SID - userSid
2. The keys are found here:
HKU\userSid\Control Panel\Desktop
Further Reading
Change wallpaper through registry[^]
|
|
|
|
|
Thank you "enhzflep" for your replay and the information
what I meant is to include a code with my software "Image Gallery" to change the wallpaper from inside the application.
and if it is not possible in javaScript can we do it in c# for example
Thanks
|
|
|
|
|
No worries.
Sure. There's a couple of approaches. None of which use javascript as a complete solution, since (a) javascript can't modify the registry and (b) Javascript can't write a .reg file, finally (c) I don't remember if we can get the full path of a files saved from the browser with javascript.
1) Set the Registry Keys directly (you can do this with c#)
2) Create a text file (a reg file) that contains text that when Imported with RegEdit will create/modify the required key(s).
An example of #2 may be:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WallpaperOriginX"=dword:00000000
"WallpaperOriginY"=dword:00000000
"WallpaperStyle"="10"
"Wallpaper"="C:\\Users\\enhzflep\\AppData\\Roaming\\Microsoft\\Windows\\Themes\\TranscodedWallpaper.jpg"
And, since I've nothing better to do just now, here's a webpage that will generate data that you can copy and paste into a text-file. You can then save that file with a .reg extension. Once done, you can double-click the file to have it's contents added to or modified in the registry.
Notes- I only set a wallpaper to stretch-mode
- I expect the path to have double backslashes in it already
- If constructing the string in something other than a browser, you'll want to replace those <br> tags with "\n" - since the browser displays <br> as a newline.
<html>
<head>
<script>
function byId(e)
{
return document.getElementById(e);
}
function makeRegFileData(imgFilePath)
{
var result;
result = "Windows Registry Editor Version 5.00" + "<br>";
result += "<br>";
result += "[HKEY_CURRENT_USER\\Control Panel\\Desktop]" + "<br>";
result += "\"WallpaperStyle\"=\"" + 2 + "\"" + "<br>";
result += "\"Wallpaper\"=\"" + imgFilePath + "\"" + "<br>";
return result;
}
function processInput()
{
var path, regStr;
path = byId("sourceImage").value;
regStr = makeRegFileData(path);
byId("resultDiv").innerHTML = regStr;
}
</script>
<style>
#resultDiv
{
border: 1px solid black;
border-radius: 8px;
background-color: #EEE;
display: inline-block;
}
</style>
<title>genRegFileData</title>
</head>
<body>
Enter image filename: <input id="sourceImage" size="60"/>
<button onclick="processInput();">Generate</button><br>
<div id="resultDiv"></div>
</body>
</html>
|
|
|
|
|
Thank you ... very much appreciated
|
|
|
|
|
Hi!
I'm new to HTML 5. Where can I find a Tutorial to HTML 5?
|
|
|
|
|
|
|
Hi,
I wrote a script but I am not able to pass argument to the dialog box of my ssh-tectia.
<html>
<HEAD>
<TITLE>IPs</TITLE>
<link rel="stylesheet" href="style.css"/>
<script language="javascript">
<!--
var shell=new ActiveXObject("WScript.Shell");
function Execute(ipaddress,node) {
shell.Run("ssh-client-g3.exe /script /arg \" + ipaddress + \" /ARG \" + node + \" /ARG dinesh /ARG xxxxxx");
}
</script>
</HEAD>
<CENTER>
<FONT SIZE="+2">
IP's
</FONT>
</CENTER>
<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#3a15ff" ALINK="#ff0000" VLINK="#ff282d">
<div id="wrapper">
<TABLE cellpadding="0" cellspacing="0" border="0" bgcolor="ffffcc" class="sortable" id="sorter">
<TR>
<TH><FONT FACE="Helvetica,Verdana,Arial">DEVICETYPE:</FONT></TH>
<TH><FONT FACE="Helvetica,Verdana,Arial">IPADDRESS:</FONT></TH>
</TR>
<TR>
<TD><FONT FACE="Helvetica,Verdana,Arial">4</FONT></TD>
<TD><FONT FACE="Helvetica,Verdana,Arial">
<a href="Javascript:void(0);"OnClick="Execute('100.101.20.204','dinesh1')">100.101.20.204</a></FONT></TD>
</TR>
<TR>
<TD><FONT FACE="Helvetica,Verdana,Arial">4</FONT></TD>
<TD><FONT FACE="Helvetica,Verdana,Arial">
<a href="Javascript:void(0);"OnClick="Execute('100.101.20.205','dinesh2')">100.101.20.205</a></FONT></TD>
</TR>
</TABLE>
</div>
</body>
</html>
I want some help on how to pass the arguments like ipaddress/hostname, username to the tectia dialog box and also the password is prompted only after getting the hostname and username
how to pass this?
Any ideas or suggestions please let me know.
Thanks
Dinesh
|
|
|
|
|
We need a little bit more precision. The tool you are mentioning ssh-client-g3.exe is not mentioned in the documentation I found here: Tectia-Client-6.2-User.pdf
[^] and you also forgot to tell us which version you are using.
Another thing is that none of the command line tools on that Tectia site use /ARG to signifiy any parameters. All parameters I saw are of the typical kind that are started with a - followed by one or more characters. The way you are constructing your command string is also faulty:
var command = "ssh-client-g3.exe /script /arg \" + ipaddress + \" /ARG \" + node + \" /ARG dinesh /ARG xxxxxx";
would yield this true:
command == "ssh-client-g3.exe /script /arg \" + ipaddress + \" /ARG \" + node + \" /ARG dinesh /ARG xxxxxx
you probably meant to say this:
var command = "ssh-client-g3.exe /script /arg " + ipaddress + " /ARG " + node + " /ARG dinesh /ARG xxxxxx"
which would yield true for an IP of 192.168.0.1 and a node named ERLM5ZGA
command == "ssh-client-g3.exe /script /arg 192.168.0.1 /ARG ERLM5ZGA /ARG dinesh /ARG xxxxxx"
Anyhow until you tell us your version of Tectia - Client you are using and the exact name of the command line tool, we won't be able to help you.
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Hi Ross,
Sorry for missing out that.
I wrongly typed the command. ssh tectia does not use the arg. I will briefly describe what I am trying to do.
1. I have a html file, which has valid ip address entries
2. When I click on this ip address it should call the tectia with the username and password.
3. Basically I want to automate the process of logging in.
4. I saw in tectia that it does not accept arguments like securecrt etc., so any way you think I can automate this process.
Thanks for any help.
|
|
|
|
|
Hi,
I did made some progress by following the below procedure
1. instead of using the html file I just created a .bat file
@echo off
cls
set username=root
ssh-client-g3.exe -h %username%@net.aspac.nsroot.net
Dim WshShell, scomputername
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oNetwork = WScript.CreateObject( "WScript.Network" )
WshShell.sleep 10
WshShell.Sendkeys "C2008" & chr(13)
It works but it stops in password prompt not sure how to pass password to the dialog box.
Thanks for any help
|
|
|
|
|
You still haven't supplied the details that I asked for in my first answer to your question.
Which version are you using and why isn't the documentation I pointed to you not mentioníng anything about a ssh-client-g3.exe command line tool?
Please review your documentation and give us the details I asked for.
Besides that: Trying it out in a batchfile first is a good approach. You can still try later starting it from your HTML page.
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Ross?
Who is Ross? Reading carefully does not seem to.be one your traits.
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Sorry for the typo Manfred.
|
|
|
|
|
I presume it was less of a typo than a reado.
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
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..
|
|
|
|