10 More Discussions You Might Find Interesting
1. Programming
Program to reverse a linked list by traversing only once. (1 Reply)
Discussion started by: VSSajjan
1 Replies
2. Programming
How to delete the last node in a single linked list given only the pointer to last node ?
Head node will not be given. (5 Replies)
Discussion started by: VSSajjan
5 Replies
3. Programming
#include<stdio.h>
#include<stdlib.h>
struct LinkedList
{
int val;
struct LinkedList *next;
}node; /*Creating a structure variable*/
typedef struct LinkedList Node;
Node *start = NULL;
int create(int i)
{
Node *temp = NULL;
if (start == NULL)
... (5 Replies)
Discussion started by: prinsh
5 Replies
4. UNIX for Advanced & Expert Users
Hi, I am programming in kernel, and I want to use a double linked list that holds infos that every process could access and modify THIS list. So, I suppose it is a 'global' variable since every process(thread) can reach it, I am wondering where to put it? by changing some of the kernel files? (1 Reply)
Discussion started by: louisTan
1 Replies
5. Programming
i have a linked list set up like
typedef struct client_list {
char *client_name;
int client_socket_fd;
struct client_list *next;
} client;
client *client_list=NULL;
before adding to the list i check if it already exists, only if it does not then i add
if (client_list==NULL... (1 Reply)
Discussion started by: omega666
1 Replies
6. Programming
i have this code
typedef struct client_list {
char *client_name;
struct client_list * next;
int client_socket_fd;
} client;
client *current, *head; head = NULL;
char *h="test";
add_client(current, h, head, &client_socket_fd);
... (24 Replies)
Discussion started by: omega666
24 Replies
7. Programming
I need C++ Code for single linked list
With operations as
1)insert at any position
2)delete any
3)change the data of any position (2 Replies)
Discussion started by: girija
2 Replies
8. Programming
is this possible, if so plz please share with me..
Correct English please, not Cyber-/Leetspeak (11 Replies)
Discussion started by: vijay_manpage
11 Replies
9. Shell Programming and Scripting
Hi I am going to migrate our datawarehouse system from HP Tru 64 Unix to the Red Hat Linux.
Inside the box, it is running around 40 cron jobs; inside each cron job, it is calling other shell script files, and the shell script files may again call other shell script files or ctl files(for... (1 Reply)
Discussion started by: franksubramania
1 Replies
10. Programming
Can any one help me in reversing the single linked list and at the same time i want to print the reversed links. (2 Replies)
Discussion started by: dhanamurthy
2 Replies
Parse::MediaWikiDump::Links(3pm) User Contributed Perl Documentation Parse::MediaWikiDump::Links(3pm)
NAME
Parse::MediaWikiDump::Links - Object capable of processing link dump files
ABOUT
This object is used to access content of the SQL based category dump files by providing an iterative interface for extracting the
indidivual article links to the same. Objects returned are an instance of Parse::MediaWikiDump::link.
SYNOPSIS
$pmwd = Parse::MediaWikiDump->new;
$links = $pmwd->links('pagelinks.sql');
$links = $pmwd->links(*FILEHANDLE);
#print the links between articles
while(defined($link = $links->next)) {
print 'from ', $link->from, ' to ', $link->namespace, ':', $link->to, "
";
}
STATUS
This software is being RETIRED - MediaWiki::DumpFile is the official successor to Parse::MediaWikiDump and includes a compatibility library
called MediaWiki::DumpFile::Compat that is 100% API compatible and is a near perfect standin for this module. It is faster in all instances
where it counts and is actively maintained. Any undocumented deviation of MediaWiki::DumpFile::Compat from Parse::MediaWikiDump is
considered a bug and will be fixed.
METHODS
Parse::MediaWikiDump::Links->new
Create a new instance of a page links dump file parser
$links->next
Return the next available Parse::MediaWikiDump::link object or undef if there is no more data left
EXAMPLE
List all links between articles in a friendly way
#!/usr/bin/perl
use strict;
use warnings;
use Parse::MediaWikiDump;
my $pmwd = Parse::MediaWikiDump->new;
my $links = $pmwd->links(shift) or die "must specify a pagelinks dump file";
my $dump = $pmwd->pages(shift) or die "must specify an article dump file";
my %id_to_namespace;
my %id_to_pagename;
binmode(STDOUT, ':utf8');
#build a map between namespace ids to namespace names
foreach (@{$dump->namespaces}) {
my $id = $_->[0];
my $name = $_->[1];
$id_to_namespace{$id} = $name;
}
#build a map between article ids and article titles
while(my $page = $dump->next) {
my $id = $page->id;
my $title = $page->title;
$id_to_pagename{$id} = $title;
}
$dump = undef; #cleanup since we don't need it anymore
while(my $link = $links->next) {
my $namespace = $link->namespace;
my $from = $link->from;
my $to = $link->to;
my $namespace_name = $id_to_namespace{$namespace};
my $fully_qualified;
my $from_name = $id_to_pagename{$from};
if ($namespace_name eq '') {
#default namespace
$fully_qualified = $to;
} else {
$fully_qualified = "$namespace_name:$to";
}
print "Article "$from_name" links to "$fully_qualified"
";
}
perl v5.10.1 2010-12-05 Parse::MediaWikiDump::Links(3pm)