Example server-side JavaScript Web script, Dictionary class - //Dictionary class, hash array unlimited length configurable speed/efficiency
-
//
-
printf("<html><body>");
-
-
printf("<b>Creating dictionary</b><br\n>");
-
-
var dictobj = new Dictionary(5); //dictionary class
-
var dvname = "varnam0"; //dict var name
-
-
var smplobj = new Object(); //create object
-
smplobj.xx = "text1"; //add properties
-
smplobj.yy = "text2";
-
-
printf("<b>Storing object into dictionary</b><br\n>");
-
printf("<br\n>");
-
//put object into array
-
dictobj.set(dvname,smplobj);
-
-
printf("<b>Reading value stored in dictionary</b><br\n>");
-
printf("value of " ,dvname, " property xx: [", dictobj.get(dvname).xx, "]<br\n>");
-
printf("<br\n>");
-
-
printf("<b>Changing property xx value to otherval567</b><br\n>");
-
-
//values in dictionary are stored by reference, not copy
-
//modifying value of object's property also changes value stored in dictionary
-
smplobj.xx = "otherval567";
-
-
printf("value of " ,dvname, " property xx after change: [", dictobj.get(dvname).xx, "]<br\n>");
-
printf("<br\n>");
-
-
-
printf("<b>Checking array (dictionary) length</b><br\n>");
-
printf("array length: [", dictobj.len(), "]<br\n>");
-
printf("<br\n>");
-
-
printf("<b>Deleting value from array</b><br\n>");
-
//erase value from dictionary
-
dictobj.set(dvname,null);
-
-
printf("array length after delete: [", dictobj.len(), "]<br\n>");
-
-
-
printf("</body></html>");
--
1 4150
GVDC wrote:
Example server-side JavaScript Web script, Dictionary class
Example client-side JavaScript, complete Idiot "class": - function Idiot()
-
{
-
var value = "GVDC";
-
this.who = function() { return value; };
-
}
-
-
window.alert((new Idiot()).who());
<http://jibbering.com/faq/>
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Grim Reaper |
last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have
never setup a server from the beginning, so I am a little new at creating
server groups.
Alright, I am trying to create...
|
by: Zorba.GR |
last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64
bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite
Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
|
by: EP |
last post by:
When running my asp.net hosting service (asp.net without IIS), on server
2003 with IIS not installed, I get the following when trying to process a
request.
"System.DllNotFoundException: Unable to...
|
by: coosa |
last post by:
Hi,
I was installing SQL Server on my machine and during installation my PC
freezed. It happens frequently on my machine. So i tried after
restarting to install it again and since then i always...
|
by: Peter |
last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server
2005 Express, but get the following error in the error log.
Please could someone help me....
Microsoft SQL Server 2005...
|
by: Marcus |
last post by:
I have a function that simply returns TRUE if it can connect to a
particular Sql Server 2005 express, or FALSE if it cannot. I am getting
some strange error codes returned when the computer that...
|
by: sara |
last post by:
Hi All,
I was able to connect to MS SQL Server 2005 on my computer but after a
while I can not. When I want to connect to it using MS SQL Server
Management Studio I got this error:
An error...
|
by: manish deshpande |
last post by:
Hi,
When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command:
rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown:
...
|
by: Developer |
last post by:
Hello All,
i have recently installed VS2005 and was trying to install SQL sever
2000.
I have Win XP' SP2. But when I tried installing, it only installed
client tools and not the database.
Can...
|
by: Lee T. Hawkins |
last post by:
I am having a number of problems over the last two full days trying to get
an ASP.NET 2.0 application to connect to a SQL Server 2005 database...
First off, I built this application w/ Visual...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |