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
    
  
  
    
  | # !/bin/bash | |
| # Copyright (c) 2011 Float Mobile Learning | |
| # http://www.floatlearning.com/ | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the | 
  
    
      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
    
  
  
    
  | class Player | |
| @last_health | |
| @loosing_health | |
| def play_turn(warrior) | |
| @loosing_health = @last_health ? warrior.health < @last_health : warrior.health | |
| @last_health = warrior.health; | |
| return warrior.rest! if !@loosing_health && warrior.health < 20 | |
| return warrior.rescue! if warrior.feel.captive? | |
| return warrior.walk! if warrior.feel.empty? || warrior.feel.stairs? | |
| return warrior.attack! if warrior.feel.enemy? || @loosing_health | 
  
    
      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
    
  
  
    
  | using System; | |
| using System.Collections; | |
| using System.Drawing; | |
| using System.Globalization; | |
| using Cirrious.CrossCore.Converters; | |
| using CrossUI.Touch.Dialog; | |
| using CrossUI.Touch.Dialog.Elements; | |
| using MonoTouch.Foundation; | 
  
    
      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
    
  
  
    
  | void Application_BeginRequest(object sender, EventArgs e) | |
| { | |
| // Prevent cross site framing attacks | |
| HttpContext.Current.Response.AddHeader("x-frame-options", "SAMEORIGIN"); | |
| } | |
| void Application_EndRequest(object sender, EventArgs e) | |
| { | |
| // Send all cookies as secure if the site is running in ssl | |
| var context = HttpContext.Current; | 
  
    
      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
    
  
  
    
  | <!-- Edit your third_party/themes/pancake/views/modules/frontend/detailed.php | |
| Replace the invoices total with this block. | |
| --> | |
| <tr dontbreak="true"> | |
| <td class="total-heading" style=" vertical-align:top;"><?php echo __('invoices:total');?>:</td> | |
| <td class="total-values" style=" vertical-align:top;"><?php echo Currency::format($invoice['total'], $invoice['currency_code']); ?></td> | |
| </tr> | |
| <tr dontbreak="true"> | |
| <td class="total-heading"><?php echo __('Paid Amount');?>:</td> | 
  
    
      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
    
  
  
    
  | $line = 0; $header = array(); | |
| if (false !== ($handle = fopen($file_name, "r"))) { | |
| while (false !== ($data = fgetcsv($handle))) { | |
| if (0 === $line) { | |
| $header = $data; | |
| } else { | |
| $data = array_combine($header, $data); |