Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

filesystems - Perl File::Find duplicate names -


i'm using perl's module file::find traverse across directory. directory nfs share has directory .snapshot. in folder there's snapshot of yesterdays file structure , has directories same name in result. therefore following error:

[folder_in_which_find_is_executed].snapshot/sv_daily.0 encountered second time @ /usr/lib/perl5/5.8.8/file/find.pm line 566. 

is there way prevent happening e.g. removing duplicate entry?

this code sub executes find:

sub process() {         ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,             $atime, $mtime, $ctime, $blksize, $blocks) = stat $_;         $type = (-f _ ? 'f' : (-d _ ? 'd' : '*'));         ($md5sum);          if (!defined $dev)         {                 if (-l $_)                 {                         die "broken symbolic link: $file::find::name";                 } else {                         die "error processing $type '$file::find::name'";                 }         }          $name = $file::find::name;         $name =~ s|^\.\/?||;          if ($name ne '')         {                 $db->{$name} = {                         name => $name,                         mode => sprintf("%04o", $mode & 07777),                         user_id => $uid,                         group_id => $gid,                         last_modified => $mtime,                         type => $type                 };                  if ($type eq 'f')                 {                         $db->{$name}->{size} = $size;                         $db->{$name}->{inode} = $ino;                         $md5sum = sumforentry($name, $_);                         $db->{$name}->{md5sum} = $md5sum;                 }         } } 

the following line executes sub:

find({ wanted => \&process, follow => 1}, '.'); 

can please me?

the 'wanted' function can tell file::find prune search:

the function may set $file::find::prune prune tree unless bydepth specified.

on entry snapshot directory, set prune variable prevent further processing of it.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -