This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package MoosifierTest::Types::Library; | |
| require Exporter; | |
| @ISA = qw/Exporter/; | |
| @EXPORT = qw /Email Bool Value Num Int Str ArrayRef HashRef Object SimpleStr NonEmptySimpleStr StrongPassword NonEmptyStr Uri DateTime/; | |
| use MooseX::Types -declare => | |
| [qw/ | |
| /]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package MoosifierTest::Schema::Statistic; | |
| use Moose; | |
| use MoosifierTest::Types::Library; | |
| extends 'DBIx::Class'; | |
| has 'accessdate' => ( | |
| isa => Int, | |
| is => 'rw', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use My::Community::Testing; | |
| my $test = My::Community::Testing->new; | |
| my $schema = $test->schema; | |
| $schema->current_user($schema->resultset('User')->find({ username => 'Harry'})); | |
| my $article_rs = $schema->resultset('Article'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub update : Chained('object') PathPart('update') Args(0) { | |
| my ( $self, $c ) = @_; | |
| my $media_dir = '/deployment/' . $c->config->{'Locales'}->{$c->stash->{lang}} . '/' . $c->config->{$c->stash->{episode}->images->result_source->source_name}->{deploy_dir} if $c->stash->{episode}; | |
| $c->stash( media_dir => $media_dir ) if $media_dir; | |
| my $form = EpisodeForm->new(media_directory => dir($media_dir)); | |
| my $item = $c->stash->{episode}; | |
| if (lc $c->req->method eq 'post') { | |
| $c->stash(episode => $item, form => $form ); | |
| $c->req->params->{'file'} = $c->req->upload('file'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (id object in [[searchViewArray valueForKey:@"produceName"] filteredArrayUsingPredicate:predicate]) { | |
| NSLog(@"While constructing loop, object is: %@",object); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (id object in [[searchViewArray valueForKey:@"produceName"] filteredArrayUsingPredicate:predicate]) { | |
| NSString *mygreen = [NSString string]; | |
| mygreen = object; | |
| NSLog(@"While constructing loop, my temp string is: %@",mygreen); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSMutableArray *tempGreens = [NSMutableArray array]; | |
| for (id object in [[searchViewArray valueForKey:@"produceName"] filteredArrayUsingPredicate:predicate]) { | |
| NSString *mygreen = [NSString string]; | |
| mygreen = object; | |
| NSLog(@"During loop, my temp string is: %@",mygreen); | |
| [tempGreens addObject:mygreen]; | |
| } | |
| NSLog(@"After loop my temp array is: %@",tempGreens); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSMutableArray *tempGreens = [NSMutableArray array]; | |
| for (id object in [[searchViewArray valueForKey:@"produceName"] filteredArrayUsingPredicate:predicate]) { | |
| NSString *mygreen = [NSString string]; | |
| mygreen = object; | |
| NSLog(@"During loop, my temp string is: %@",mygreen); | |
| [tempGreens addObject:mygreen]; | |
| } | |
| NSLog(@"After loop my temp array is: %@",tempGreens); | |
| self.greensArray = [self.greensArray arrayByAddingObjectsFromArray:tempGreens]; | |
| NSLog(@"After assignment from temp, self.greensArray is: %@",self.greensArray); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (NSString *string in [[searchViewArray valueForKey:@"produceName"] filteredArrayUsingPredicate:predicate]) { | |
| NSLog(@"During loop, my temp string is: %@",string); | |
| [self.greensArray addObject:string]; | |
| } | |
| NSLog(@"After assignment from temp, self.greensArray is: %@",self.greensArray); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (int i = 0; i < [inSeasonArray count]; i++) { | |
| // check whether this green has 4 best seasons, and if so skip | |
| NSLog(@"Here is the produceBest dictionary: ",[[inSeasonArray objectAtIndex:i] valueForKey:@"produceBest"] ); | |
| NSLog(@"Here is the number of items in produceBest dictionary: ",[[[inSeasonArray objectAtIndex:i] valueForKey:@"produceBest"] count] ); | |
| if ([[[inSeasonArray objectAtIndex:i] valueForKey:@"produceBest"] count] > 3) { | |
| continue; | |
| } |
OlderNewer