Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
R0mb0 authored Nov 29, 2024
1 parent 6c8963a commit 4d2fcb6
Showing 1 changed file with 122 additions and 0 deletions.
122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,57 @@ graph TD;
K --> L[1: Value]
```

<details>
<summary>

## `Dictionary.asp`'s avaible Functions

</summary>

- **Initialize an array as a dictionary** -> `get_initialized_dictionary()`
- **Add an element into a dictionary** -> `add_element_to_dictionary(key,value)`
- **Get value from key** -> `get_dictionary_value_from_key(key)`
- **Set value from key** -> `set_dictionary_value_from_key(key,value)`
- **Change a key into dictionary** -> `change_dictionary_key(old_key,new_key)`
- **Remove dictionary element from key** -> `remove_dictionary_element_from_index(idx)`
- **Remove dictionary element from index** -> `remove_dictionary_element_from_index(idx)`
- **Remove last element from dictionary** -> `remove_last_element_from_dictionary()`
- **Remove elements from dictionary using indices (pass to function an array with the indices)** -> `remove_dictionary_elements_from_indices(indices)`
- **Remove all elements with the same value from dictionary** -> `remove_dictionary_elements_from_value(value)`
- **Replace all value occurrences with a new value in dictionary** -> `replace_all_value_occurrences(old_value,new_value)`
- **Get key index from dictionary** -> `get_key_index_from_dictionary(key)`
- **Reset a dictionary** -> `get_initialized_dictionary()`
- **Get dictionary key from index** -> `get_dictionary_key_from_index(idx)`
- **Get first value index occurrence** -> `get_first_value_index_occurrence(value)`
- **Get all indices of a value** -> `get_all_value_indices(value)`
- **Check if a key has been used into dictionary** -> `check_if_key_has_been_used(key)`
- **Check if a value is present in the dictionary** -> `check_if_value_is_present(value)`
- **Get dictionary value from index** -> `get_dictionary_value_from_index(idx)`
- **Get dictionary dimension** -> `get_dictionary_dimension()`
- **Write a dictionary** -> `write_dictionary()`

## How to use:

> From `Test.asp`
1. Create array and initialize it as dictionary
```
<!--#include file="Dictionaries.asp"-->
<%
Dim dictionary
dictionary = Array()
dictionary = get_initialized_dictionary()
```
2. Pass the dictionary to functions for manage
```
add_element_to_dictionary_array "0001","Ice ice baby"
add_element_to_dictionary_array "0002","Dove lo vuoi tu"
add_element_to_dictionary_array "0003","Hot shot"
write_dictionary
%>
```
</details>

<details>
<summary>

Expand Down Expand Up @@ -93,3 +144,74 @@ graph TD;
%>
```
</details>

<details>
<summary>

## `dictionary.class.asp`'s avaible Functions

</summary>

- **Add an element into a dictionary** -> `add_element(key,value)`
- **Get value from key** -> `get_value_from_key(key)`
- **Set value from key** -> `set_value_from_key(key,value)`
- **Change a key into dictionary** -> `change_key(old_key,new_key)`
- **Remove dictionary element from key** -> `remove_element_from_index(idx)`
- **Remove dictionary element from index** -> `remove_element_from_index(idx)`
- **Remove last element from dictionary** -> `remove_last_element(dictionary)`
- **Remove elements from dictionary using indices (pass to function an array with the indices)** -> `remove_elements_from_indices(indices)`
- **Remove all elements with the same value from dictionary** -> `remove_elements_from_value(value)`
- **Replace all value occurrences with a new value in dictionary** -> `replace_all_value_occurrences(old_value,new_value)`
- **Get key index from dictionary** -> `get_key_index(key)`
- **Reset a dictionary** -> Re-initialize the object
- **Get dictionary key from index** -> `get_key_from_index(idx)`
- **Get first value index occurrence** -> `get_first_value_index_occurrence(value)`
- **Get all indices of a value** -> `get_all_value_indices(value)`
- **Check if a key has been used into dictionary** -> `check_if_key_has_been_used(key)`
- **Check if a value is present in the dictionary** -> `check_if_value_is_present(value)`
- **Get dictionary value from index** -> `get_value_from_index(idx)`
- **Get dictionary dimension** -> `get_dimension()`
- **Write a dictionary** -> `write()`

## How to use:

> From `Test.asp`
1. Initialize the class
```
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="dictionary.class.asp"-->
<%
Dim dic
Set dic = new dictionary
```
2. Use the class
```
dic.add_element "0001","Ice ice baby"
dic.add_element "0002","Dove lo vuoi tu"
dic.add_element "0003","Hot shot"
dic.add_element "0004","7 minuti in paradiso"
dic.add_element "0005","Dimmi dove e quando"
dic.add_element "0006","Balla per me"
dic.add_element "0007","Nudi e crudi"
dic.add_element "0008","Obbligo o verita'"
dic.add_element "0009","Sotto il vestito, niente"
dic.add_element "0010","Colazione a letto "
dic.add_element "0011","Luce dei miei occhi"
dic.add_element "0012","Comprami un giocattolo"
dic.add_element "0013","Facciamo pace"
dic.add_element "0014","Less is more"
dic.add_element "0015","call me baby"
dic.add_element "0016","Pensaci tu"
dic.add_element "0017","Souvenir d'amour"
dic.add_element "0018","Proca a prendermi"
dic.add_element "0019","Meet me at the hotel"
dic.add_element "0020","Sexy movie night"
dic.add_element "0021","Doccia bollente"
dic.add_element "0022","Blind date"
dic.add_element "0023","Oggi voglio..."
dic.add_element "0024","Nuovo blocchetto"
dic.write()
%>
```
</details>

0 comments on commit 4d2fcb6

Please sign in to comment.