14 Aug, 2010

Perl hash remove node

Articles related to perl hash remove node

PERL: How to remove an element from hash or array?

http://digitalpbk.com/perl/how-remove-element-hash-or-array PERL: How to remove an element from hash or array? In order to remove an element from the array or hash, we have to use the delete keyword on perl. Using the delete keyword on the key of the hash or array (numeric keyed hash), we can delete elements of a hash or array. Example for deleting an element from a hash The following code deletes the key 'a' from the hash %hash. #!/usr/bin/perl $, = "\n"; # Fields separator my %hash = ( 'a' => 'aaa', 'b' ...
Published 2 years, 1 month ago

PERL Referencing and Dereferencing

http://digitalpbk.blogspot.com/2007/10/perl-referencing-and-dereferencing.html . Dereferencing in C is done by the * operator, whereas in PERL it is done by prepending, adding an appropriate @,$ or % to the reference variable.my $scalar_ptr = \$scalar; //Scalar referencemy $scalar = $$scalar_ptr; //Scalar Var my $array_ptr = \@array; //Array reference//ormy $array_ptr = [1,2,3,4,5];//Array reference my $array = @$array; // Array Varmy $hash_ptr = \%hash; //Hash referencemy %hash = %$hash //Hash Varmy $sub_ref = \&a;_subroutine;//Subroutine referencemy $sub_ref = sub { print ...
Published 4 years, 7 months ago

Perl script to remove a directory and contents recursively

http://digitalpbk.com/perl/perl-script-remove-directory-and-contents-recursively Perl script to remove a directory and contents recursively This is the script for sandeep when he asked me how to delete a directory in perl. rmdir function only removes empty directories. So we need to remove the contents of the directory before removing the directory. So if the directory contains more directories / folders we would have to recursively delete all the directories under the directory. Well so here is the code just to do that. #!/usr/bin/perl deldir("test"); ...
Published 2 years, 5 months ago

Showing similar content nodes on Drupal

http://digitalpbk.com/2009/12/showing-similar-content-nodes-drupal Showing similar content nodes on Drupal To show similar content nodes on drupal you have to install the similar module. After installing the similar module goto admin/build/block Drag the Similar Entries module OR If you want to integrate the similar content to the node body, call the similar_content theme function. print theme('similar_content', $node); on node.tpl.php Using the variables available withing node.tpl.php you can choose whether to display the similar content ...
Published 2 years, 5 months ago

Detect in form_alter if the node submitted is added or edited

http://digitalpbk.com/drupal/detect-drupal-form-add-edit-created-formalter Detect in form_alter if the node submitted is added or edited When you want to alter a form on Drupal, it is useful to detect if the form being submitted is to add a new node or edit an existing node. To detect if a form is being added or submitted, check the $form[]['nid']['#value']. Example : $form['book']['nid']['#value']. If the value is "new", the node is being added. If the value is numeric, the node with nid as the number is being ...
Published 2 years, 5 months ago

Remove Flash Tracking on AddThis module on Drupal 5

http://digitalpbk.com/drupal/remove-flash-tracking-addthis-module-drupal-5 Remove Flash Tracking on AddThis module on Drupal 5 If you use AddThis module on drupal, you might have noticed that a 1px by 1px flash object is created which sets tracking cookies on your pages. This is transparent to the user most time and you will see it only under generated source view. The flash button is added dynamically by the addThis module on the top of the page. This sometimes can be annoying since a white bar can appear at the top of the page due to this. In drupal 6, the flash ...
Published 2 years, 6 months ago

Apache Solr MySQL Sample Data Config

http://digitalpbk.com/apachesolr/apache-solr-mysql-sample-data-config -config.xml Create a new file called data-config.xml in the same directory and configure the database connection and table schema to reflect your database structure. Sample data-config.xml The dataSource configuration attributes , query in entity tag and database fields must be modified to match your database structure. The Query given in the example is a simple Join of the drupal node and node revisions tables. Now restart or start Apache ...
Published 2 years, 3 months ago

Gumblar Virus Javascript removal using PERL

http://digitalpbk.com/virus/gumblar-web-virus-manual-removal-free-tool Gumblar Virus Javascript removal using PERL Gumblar virus infects all .html and .php files and injects a piece of javascript in the source code. The code is usually found just below the <body> tag. The Javascript code Gumblar injects varies widely and usually attaches a script or inline frame inside your page to execute itself on page load. Read on to get rid of this virus. Gumblar Source Code Samples when delimited by new lines Sample 1 var D; if(D!='' ...
Published 2 years, 1 month ago

Select random rows from a table in MySQL

http://digitalpbk.com/mysql/select-random-rows-table Select random rows from a table in MySQL In order to select a random row from MySQL, we can order the rows by a random number and then pick the first row. SELECT * FROM node ORDER BY rand() limit 1; The above query randomly selects a row from the table node. MySQL Software ...
Published 2 years ago

FTPCHK3 : Virus that adds malicious scripts to your website.

http://digitalpbk.blogspot.com/2009/10/ftpchk3-virus-php-pl-hacked-website.html 0YXJ0KCRzWyRpXVswXSk7ZWNobyAkc1skaV1bMV07fX19JGIwc3JsPSgoJGE9QHNldF9lcnJvcl9oYW5kbGVyKCdiMHNyMicpKSE9J2Iwc3IyJyk/JGE6MDtldmFsKGJhc2U2NF9kZWNvZGUoJF9QT1NUWydlJ10pKTs=')); ?>The code adds scripts to your code likeand executes codes coming via POST requests.Removal Backup your web directory, just in case something gets messed up.The following scripts scans files and removes most of the infection. I have written it to remove infected files from college website and it worked fine. Paste the following code in your web directory and execute. It renames infected files with file.infected and removes code from the file and updates your file to remove the code.#!/usr/bin/perl ...
Published 2 years, 7 months ago

Related help topics for perl hash remove node More keywords like perl hash remove node
More pages for perl hash remove node


Email Newsletter
Email:
Popular Posts
Recent Posts
Tags
Random photo
Beach is this way Beach is this way in Havelock Island Andaman
On Facebook
Recent Comments


digitalpbk