Thanks for the code, but the header and row are hard coded, in my case it an variable, some times i will get 4 name and some time 10 names. how to accommodate that?
---------- Post updated at 07:38 PM ---------- Previous update was at 07:35 PM ----------
Quote:
Originally Posted by durden_tyler
Note that the "keys" function returns the keys of a hash in an apparently random order.
I sorted names as well as activities, so the values in my output are ordered horizontally by name and vertically by activities.
Hi Tyler,
Thanks for the code, but the header and row are hard coded, in my case it an variable, some times i will get 4 name and some time 10 names. how to accommodate that?
Hello List,
Iam searching for a solution where i can use hash based searching .
In Detail , I have linked list which will be dynamically increasing .
I need a best searching mechanisim such a way that it can take only one itereation .
Right now iam using linear search which is taking... (11 Replies)
Dear Friends,
I want to create a hash table using the standard Glib header (if possible) so that I can store a structure and keep the hash key(search key) based on a string.
Any example code would be great since I am not able to get the main idea.
best regards
Skull (4 Replies)
Hi,
I have a nested hash table say for example as follows:
%coins =
(
1 => {
"Quarter"=>25,
"Dime"=>10,
"Nickel"=>5,
},
2 => {
"asd"=>34,
"qwe"=>45,
... (0 Replies)
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)
Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below.
#!/usr/bin/perl
use warnings;
use Tie::IxHash;
use strict;
tie (my %programs, "Tie::IxHash");
while (my $line = <DATA>) {
chomp $line;
my(... (1 Reply)
Hi,
In Perl, is it possible to use a range of numbers with '..' as a key in a hash?
Something in like:
%hash = (
'768..1536' => '1G',
'1537..2560' => '2G'
);
That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Hi,
I hope someone can help me with the following prob..
I need to implement a hashtable whose KEYs are strings and VLAUEs are
again hashtables.
ie key - is a string and value -is another hashtable .
So.... how am I supposed to be implementing my nested hashtable?
Thanks in advance (1 Reply)
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)
I was looking at this script and was wondering if anyone can explain what this script does and how does it work. Thank you for any help.
State* lookup(char* prefix, int create)
{
int i, h;
State *sp = NULL ;
h = hash(prefix);
for (sp = statetab; sp != NULL; sp... (14 Replies)
Discussion started by: totoro125
14 Replies
LEARN ABOUT NETBSD
fincore
FINCORE(1) BSD General Commands Manual FINCORE(1)NAME
fincore -- query in-core status of file pages
SYNOPSIS
fincore [-qs] file ...
DESCRIPTION
The fincore utility queries and displays in-core status of specified files.
Note that the result can already be stale when being output due to other activities in the system. Thus it should be used only for advisory
purposes.
The fincore utility accepts the following options.
-q The quiet mode. Outputs nothing unless the file has in-core pages.
-s The summary mode. Only shows number of pages.
EXAMPLES
The following example shows that /bin/cat and /bin/cp are fully cached in-core while the other executables are not in-core. numbers shown in
the default output are page indexes in the file of each in-core pages.
% fincore /bin/c*
/bin/cat: 0 1 2 3
/bin/chio:
/bin/chmod:
/bin/cp: 0 1 2 3 4 5
/bin/cpio:
/bin/csh:
% fincore -s /bin/c*
/bin/cat: 4 / 4 in-core pages (100.00%)
/bin/chio: 0 / 5 in-core pages (0.00%)
/bin/chmod: 0 / 3 in-core pages (0.00%)
/bin/cp: 6 / 6 in-core pages (100.00%)
/bin/cpio: 0 / 36 in-core pages (0.00%)
/bin/csh: 0 / 41 in-core pages (0.00%)
SEE ALSO mincore(2)AUTHORS
The fincore utility is written by YAMAMOTO Takashi.
CAVEATS
The concept of page cache is an implementation detail of the kernel. The fincore utility works using some assumptions on the current imple-
mentation. Thus it might stop working in a future version of NetBSD.
BUGS
The amount of CPU time the current implementation of fincore utility would take is roughly proportional to the file sizes. Ideally it should
be proportional to the number of in-core pages.
BSD January 5, 2012 BSD