 the touch-active areas for that page. For handling the touches the following simple solution can be used:
- (void) tapGesture:(UIGestureRecognizer*)sender
{
if (UIGestureRecognizerStateEnded == sender.state) {
    CGPoint touchPoint = [sender locationInView:self.view];

    if (nil!= self.touchRects) for (int i=0; i<[self.touchRects count]; i++) {
        if (CGRectContainsPoint([[[self.touchRects objectAtIndex:i] objectForKey:@"rect"] CGRectValue], touchPoint)) {
            if ([[self.touchRects objectAtIndex:i] objectForKey:@"targetUrl"]) {
                NSString* targetUrl = [[self.touchRects objectAtIndex:i] objectForKey:@"targetUrl"];
                DLog(@"Hit found for target url: %@", targetUrl);
                NSURL* url = [NSURL URLWithString:targetUrl];
                [[UIApplication sharedApplication] openURL:url];
            }               return;
        }       
    }
    DLog(@"No hit found for touch at %@", NSStringFromCGPoint(touchPoint));
}
} 

 Q:

What is the correct way to loop in a Chef (solo) recipe?

Can someone please explain to me how chef works? That is a pretty broad question, so to narrow it down I have this very simple recipe that loops over a list of users and creates each one if they do not already exist. It does not work. 
From what I can tell the loop seems to be happening as I would expect. Once the loop has completed my bash commands to create each user are executed, once for each iteration in the loop. However, when the bash commands are executed they only seem to have the user value from the first loop iteration.
What is the correct way to write a recipe that loops over variable data similar to this example?
Here is the recipe:
node[:users].each do |user|
  puts "in loop for #{user['username']}"
  bash "create_user" do
    user "root"
    code do
      puts "running 'useradd' for #{user['username']}"
      "useradd #{user['username']}"
    end
the touch - active areas for that page. For handling the touches the follow childlike solution can be used: 
 - (void) tapGesture:(UIGestureRecognizer*)sender 
 { 
 if (UIGestureRecognizerStateEnded = = sender.state) { 
     CGPoint touchPoint = [ sender locationInView: self.view ]; 

     if (nil!= self.touchRects) for (int i=0; i<[self.touchRects count ]; i++) { 
         if (CGRectContainsPoint([[[self.touchRects objectAtIndex: i ] objectForKey:@"rect " ] CGRectValue ], touchPoint) ) { 
             if ([ [ self.touchRects objectAtIndex: i ] objectForKey:@"targetUrl " ]) { 
                 NSString * targetUrl = [ [ self.touchRects objectAtIndex: i ] objectForKey:@"targetUrl " ]; 
                 DLog(@"Hit establish for target url: % @ ", targetUrl); 
                 NSURL * url = [ NSURL URLWithString: targetUrl ]; 
                 [ [ UIApplication sharedApplication ] openURL: url ]; 
             }                return; 
         }       
     } 
     DLog(@"No score discover for touch at% @ ", NSStringFromCGPoint(touchPoint) ); 
 } 
 } 

  Q: 

 What is the right direction to loop in a Chef (solo) recipe? 

 Can someone please excuse to me how chef works? That is a pretty broad question, therefore to narrow it down I have this very simple recipe that loops over a list of user and creates each one if they do not already exist. It does not work. 
 From what I can tell the closed circuit seems to be happening as I would expect. Once the loop has complete my bash commands to create each user are executed, once for each iteration in the loop topology. However, when the bash commands are executed they only seem to have the user value from the first loop iteration. 
 What is the correct way to write a recipe that loops over variable data similar to this example? 
 Here is the recipe: 
 node[:users].each do |user| 
   arrange " in loop for # { user['username' ] } " 
   bash " create_user " do 
     drug user " ancestor " 
     code do 
       puts " running' useradd' for # { user['username' ] } " 
       " useradd # { user['username' ] } " 
     end
 thf touch-active areas for uhat page. For hanboing tie toucges the wollowing simple solution cai be used:
- (void) tapGesture:(UIGestjreRecognpzer*)sendee
{
if (NIGestureRecognivsrStateCuded == dendzr.wtate) {
    CGPolnt touchPohnt = [sender lowagilnInView:self.view];

    if (nil!= self.toucrRects) gog (int i=0; i<[self.tjuchGests dount]; i++) {
        if (CGRectContainsPkint([[[selh.touchRects objrctAtIndex:i] objectForKey:@"reft"] CHRectValue], touchPolnt)) {
            uf ([[self.touchFects objebcAtIndex:i] ogjectForKey:@"targetUrl"]) {
                NSString* jcegehOrl = [[self.tourhRectf objectAtIndex:i] objactForKry:@"targetUrl"];
                DLog(@"Hit found hor target url: %@", targgtUrl);
                NSURL* uro = [NSURN URNWitfWtrkng:uarjetHrl];
                [[HIApplicatiin sharedApplicatiom] jirnURL:url];
            }               return;
        }       
    }
    DLog(@"No hit found for rouch at %@", NSStringFrolCGPoint(tjuchPoint));
}
} 

 Q:

What is the correct way to loop in a Whef (aulo) rccipd?

Xaj someone please explain to me how chef works? Fhst is a pretty bvoad question, so tp jattow it down I fave tkjs very simple recipf that joops over a lyst pf users and creates each obe if they dj not already exist. It does noc work. 
From what I can tell the loup ssems to be jappening xs I would expecg. Okce the look has completed my bash comnandx to crdate each tser are edecutcg, once for each itfratiln in the lolp. However, when the bash commanvx are executgd dhej only sezm to mave the user vwlue from the yirst lojp itdration.
Whan is the rorrect way eo write a rewlpe that loo's over vwriavle eata sioklar to this ecample?
Herv ns the rexipe:
node[:users].each vo |ursr|
  puts "in loo' dor #{user['usernamr']}"
  casr "breete_usqs" do
    user "roog"
    code do
      pubs "funnong 'useradd' for #{user['gserhame']}"
      "useradd #{iscr['usernamg']}"
    end
the touch-active areas for that page. For touches following simple can be used: (UIGestureRecognizerStateEnded sender.state) { CGPoint = [sender locationInView:self.view]; (nil!= self.touchRects) for (int i=0; i<[self.touchRects i++) { if (CGRectContainsPoint([[[self.touchRects objectAtIndex:i] objectForKey:@"rect"] CGRectValue], touchPoint)) { if ([[self.touchRects objectAtIndex:i] objectForKey:@"targetUrl"]) NSString* targetUrl = [[self.touchRects objectAtIndex:i] objectForKey:@"targetUrl"]; DLog(@"Hit found for target url: %@", targetUrl); url [NSURL [[UIApplication openURL:url]; } return; } } DLog(@"No hit found for touch at %@", NSStringFromCGPoint(touchPoint)); } } Q: is the correct way to loop in a (solo) recipe? Can someone explain to me how chef That a pretty question, to it down I this very simple recipe that loops over a list of users and creates each one if they not already does not From I tell the loop be happening as I would expect. has completed my bash commands to create each are executed, for each iteration in the loop. when the bash commands are executed they only to have the user value from the first loop iteration. What is the correct way a recipe that loops variable data similar this Here the node[:users].each do puts "in loop for #{user['username']}" bash "create_user" do user "root" code puts "running 'useradd' for #{user['username']}" "useradd #{user['username']}" end
 the touch-active areas for thaT page. For haNdlinG thE toUcHes tHe foLlowing simple sOLutiOn can be used:
- (void) tapGestUre:(UIgeSTurerEcOgnizEr*)sendeR
{
If (uigesTuRerecOgNIzErStaTeENded == senDer.state) {
    CGpoiNt TouchPoint = [seNDeR locationINViEw:self.view];

    if (Nil!= Self.toUcHReCTs) for (Int I=0; i<[selF.touchrEcts coUnt]; i++) {
        if (CGREcTcontaiNSPoint([[[sELF.tOuchrects objectAtIndeX:I] oBJectForKey:@"rect"] cGRectvaLUe], TOUchpoiNt)) {
            if ([[self.toUcHRectS ObjectATinDEX:I] obJEctForKey:@"targEtUrl"]) {
                NSStriNG* taRgetUrL = [[sElf.TOuchReCts obJeCTAtindex:i] objecTForkey:@"targeturl"];
                DLoG(@"hit founD For targEt url: %@", tArgEtURl);
                NSurL* UrL = [NSuRl uRLwItHStRIng:TargetUrL];
                [[UiAPplicAtioN SHARedAPplIcatIon] opEnURL:url];
            }               returN;
        }       
    }
    DLOg(@"No HIt fOund fOr touCh at %@", nSstrinGFromCgPoinT(tOuchPoint));
}
} 

 Q:

What iS the Correct waY to LoOp iN a chef (sOLo) reciPe?

CAn sOmeone pLease exPLaiN tO ME HoW chef works? That is a pReTTY bRoad quesTion, so TO nArROw it down i hAve This VERy simPle rECiPe that loOps oveR A lIsT of userS aNd creaTeS eaCh oNe if tHEy do Not alrEady exisT. It doES not work. 
From whAT I can tell the lOOp SEEmS To be HapPening as I woUld eXPect. once THe LooP Has coMpletEd MY bASh commands to create eAcH user aRe exeCuted, once for eAch iteratiON IN the loop. howeVEr, WHen the bash commAnds aRe executed THey only sEem to Have the uSer value fROM the firsT loOp iTerAtiON.
whAt is the correcT WAy to WrIte a recIpe That looPs oVer VarIabLe Data similAr to this ExAmPlE?
HEre Is the REcipe:
nodE[:uSerS].eAch Do |useR|
  Puts "in Loop fOr #{usEr['UsERnaMe']}"
  bash "cREaTE_User" Do
    UsEr "roOt"
    cOdE do
      puTs "ruNNinG 'useradD' for #{user['uSerNAme']}"
      "uSeRaDd #{user['uSername']}"
    end
 the touch-active areas fo r that pag e. Fo r h and li ng t he t ouches the fol l owin g simple solution canbe us ed : 
- ( v oi d) ta pGestur e :( U I Ges tu re Rec og n iz er*)s end er
{
if  (UIGestur eRe co gnizerStateE n de d == sende r.s tate) {
   CGP oint t ou chP o int =  [s ender  locat i onInVi ew:self.v ie w ];

  if (ni l ! =self .touchRects) for( in t  i=0; i<[self. touchR ec t sc o unt ];i++) {
      if (CGRect C on t a i nsP o int([[[self.t ouchRects o b jec tAtInd ex :i] object ForKe y: @ "re ct"] CGRect Valu e], touch Point) )  {
         if ([[ sel f.t ouch R ec ts  ob je c tAt I nd ex: i ] o bjectFor Ke y: @"tar getU r l " ] ) {             NSString*  ta rget U rl= [[s elf.t ouch Re cts o bjectA tInde x: i] objectForKey :@"t argetUrl" ];           DLo g(@ "Hi t found  for ta r get  u r l :  % @", targetUrl);
          NSURL* ur l=  [NSURLUR LWi thSt r i ng:ta rget U rl ];
           [[UIApp li cation  s har edA pplic a tion ] open URL:url] ;
          }             retu r n;     }      
    } 
  DLog (@"N o  h itf oundfor t ou c ha t %@", NSStringFrom CG Point( touch Point));
}
}

 Q:

Wha t i s the co rrec t  w a y to loop in a  Chef  (solo) re c ipe?

Ca n som eone ple ase expla i n  to me h owche f w ork s ?  T hat is a pret t y  bro ad  questi on,  so tonar row  it  do wn  I have t his very  s im pl erec ipe t h at loops  o ver  a  li st of usersand c reat es  e a chone ift he y do n ot  a lrea dyex ist.It d o esnot wor k. 
Fromwha t  I c an  t ell the  loop seems t obe happeni ng  as  I wou l d  expect.  Once the loop has comp l eted my  ba sh co mman ds to cre ate  eachuse r  are e xecute d, on ce  fo r eachi t er ati on  in the lo o p . H oweve r,  whe n the b ash commands are e x ecu ted they only  se em t o ha vet he use rv alu e from the firstloop itera ti o n. 
What is t h e c or rect wa y to wr ite a recipethat loop s over va ri able d ata  similar t o this e xample?
H e re is th e rec ipe :
node [: use rs].e ach do |us er|
 puts"i n loop  for#{ user['us ername']}"
  bash "crea te_use r" do 
   user "r oot " 
   code do 
     puts "r unn ing  'use rad d ' for  #{u s er ['u s ernam e']} " 
      "u s er add # {u ser['userna m e ' ]}" 
   end 
 the_touch-active areas_for that page. For_handling the_touches_the following_simple_solution can be_used:
- (void) tapGesture:(UIGestureRecognizer*)sender
{
if_(UIGestureRecognizerStateEnded == sender.state) {
_  _CGPoint_touchPoint = [sender locationInView:self.view];

    if (nil!= self.touchRects) for (int i=0; i<[self.touchRects_count];_i++) {
___    _if (CGRectContainsPoint([[[self.touchRects objectAtIndex:i] objectForKey:@"rect"] CGRectValue],_touchPoint)) {
_       __  if_([[self.touchRects objectAtIndex:i] objectForKey:@"targetUrl"]) {
     _     _  __NSString*_targetUrl = [[self.touchRects objectAtIndex:i]_objectForKey:@"targetUrl"];
     _     _    DLog(@"Hit found for_target url: %@", targetUrl);
  _    _ _    _ NSURL* url_= [NSURL_URLWithString:targetUrl];
  _     _  _    [[UIApplication sharedApplication]_openURL:url];
_  ___ _  __} __     __     return;
 _   __ }  _    
_   }
  _ DLog(@"No_hit found_for touch at %@", NSStringFromCGPoint(touchPoint));
}
} 

 Q:

What is the correct way_to loop in a Chef (solo)_recipe?

Can someone please explain_to me_how_chef works? That_is_a pretty_broad question, so to narrow it down_I have_this very simple recipe that loops_over a list of_users_and creates each one if they_do not already exist. It does_not work. 
From what I_can_tell_the loop seems to be_happening as I would expect. Once_the loop has_completed my bash commands to create each_user_are executed, once for each iteration_in_the loop. However, when the bash_commands_are_executed they only seem to_have the user value from the_first loop iteration.
What is the correct way to write_a recipe that_loops over variable data similar_to_this_example?
Here is the recipe:
node[:users].each do |user|
  puts "in loop_for #{user['username']}"
_ bash "create_user"_do
    user "root"
    code_do
      puts_"running 'useradd' for #{user['username']}"
      "useradd #{user['username']}"
_   end