05-01-2008
Thank you Jim
I understand the rules of this forum. And this is not homework.
I have difficulty in understanding the Hashing algorithms being used in that.(Zlib)
i was googling for Dictionary (Hash tables) but was not getting any good material to understand it.
I explained about compression in my previous mail to make others understand the place where i am supposed to use the Hash tables.
I require some pointers for Hash tables.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi:
Does anybody know how to return hash tables created in a function?
I have something like so:
%a_hash_table = build_a_hash_table();
sub build_a_hash_table
{
my(%hash_table);
#some code to build hash table: "%hash_table" for e.g
return %hash_table;
}
----> This... (1 Reply)
Discussion started by: mirzabhai
1 Replies
2. UNIX for Dummies Questions & Answers
Hi:
How do I pass a hash table down to a subroutine along with some other variables?
For example, I have say a subroutine play_with_hash:
sub play_with_hash
{
my( $var1, $var2, %my_hash ) = @_;
#do stuff with %my_hash
...........
}
Then I want to call the subroutine... (1 Reply)
Discussion started by: mirzabhai
1 Replies
3. Programming
I want to store a bunch of pthread_t types in a hash table, but since pthread_t is not an integer value, I cannot hash it. I was hoping to store a unique nonzero as key 0 for each thread with thread-specific data ala pthread_key_create/pthread_setspecific, but but as it turns out only the first... (2 Replies)
Discussion started by: Corona688
2 Replies
4. Shell Programming and Scripting
I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated.
Input:
test_data_1
1 2 90%
4 3 91%
5 4 90%
6 5 90%
9 6 90%
test_data_2
3 5 92%
5 4 92%
7 3 93%
9 2 92%
1 1 92%
...
Output:... (7 Replies)
Discussion started by: justthisguy
7 Replies
5. Shell Programming and Scripting
I have a script with dynamic hash of hashes , and I want to print the entire hash (with all other hashes).
Itried to do it recursively by checking if the current key is a hash and if yes call the current function again with refference to the sub hash.
Most of the printing seems to be OK but in... (1 Reply)
Discussion started by: Alalush
1 Replies
6. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
7. Programming
How hash tables are used to quickly locate a data record? (4 Replies)
Discussion started by: rupeshkp728
4 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I want to know how hash tables for buffers were implemented in Unix and now, in linux how they are implemented ?
I am aware of what hashing is..also quite familiar with Unix/Linux.
Special case is how device numbers comes into picture..I am curious !
If possible consider some... (0 Replies)
Discussion started by: istevan
0 Replies
9. Shell Programming and Scripting
Hi,
I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all .
my %result (
$abc => {
'data_count' => '10',
'ID' => 'ABC122',
}
$def => {
'data_count' => '20',
'ID' => 'defASe',
... (1 Reply)
Discussion started by: asak
1 Replies
10. Shell Programming and Scripting
Hello gurus, Iam trying to parse following BibTex file (bibliography.bib):
@book{Lee2000a,
abstract = {Abstract goes here},
author = {Lee, Wenke and Stolfo, Salvatore J},
title = {{Data mining approaches for intrusion detection}},
year = {2000}
}
@article{Forrest1996,
abstract =... (0 Replies)
Discussion started by: wakatana
0 Replies
LEARN ABOUT REDHAT
hash::util
Hash::Util(3pm) Perl Programmers Reference Guide Hash::Util(3pm)
NAME
Hash::Util - A selection of general-utility hash subroutines
SYNOPSIS
use Hash::Util qw(lock_keys unlock_keys
lock_value unlock_value
lock_hash unlock_hash);
%hash = (foo => 42, bar => 23);
lock_keys(%hash);
lock_keys(%hash, @keyset);
unlock_keys(%hash);
lock_value (%hash, 'foo');
unlock_value(%hash, 'foo');
lock_hash (%hash);
unlock_hash(%hash);
DESCRIPTION
"Hash::Util" contains special functions for manipulating hashes that don't really warrant a keyword.
By default "Hash::Util" does not export anything.
Restricted hashes
5.8.0 introduces the ability to restrict a hash to a certain set of keys. No keys outside of this set can be added. It also introduces
the ability to lock an individual key so it cannot be deleted and the value cannot be changed.
This is intended to largely replace the deprecated pseudo-hashes.
lock_keys
unlock_keys
lock_keys(%hash);
lock_keys(%hash, @keys);
Restricts the given %hash's set of keys to @keys. If @keys is not given it restricts it to its current keyset. No more keys can be
added. delete() and exists() will still work, but will not alter the set of allowed keys. Note: the current implementation prevents the
hash from being bless()ed while it is in a locked state. Any attempt to do so will raise an exception. Of course you can still bless()
the hash before you call lock_keys() so this shouldn't be a problem.
unlock_keys(%hash);
Removes the restriction on the %hash's keyset.
lock_value
unlock_value
lock_value (%hash, $key);
unlock_value(%hash, $key);
Locks and unlocks an individual key of a hash. The value of a locked key cannot be changed.
%hash must have already been locked for this to have useful effect.
lock_hash
unlock_hash
lock_hash(%hash);
lock_hash() locks an entire hash, making all keys and values readonly. No value can be changed, no keys can be added or deleted.
unlock_hash(%hash);
unlock_hash() does the opposite of lock_hash(). All keys and values are made read/write. All values can be changed and keys can be
added and deleted.
AUTHOR
Michael G Schwern <schwern@pobox.com> on top of code by Nick Ing-Simmons and Jeffrey Friedl.
SEE ALSO
Scalar::Util, List::Util, Hash::Util
perl v5.8.0 2002-06-01 Hash::Util(3pm)