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
    
  
  
    
  | local Object = require("lib.classic") | |
| local TextureAtlas = Object:extend() | |
| function TextureAtlas:new(texture, numCols, numRows, regionX, regionY, regionW, regionH) | |
| self.texture = texture | |
| self.numCols = numCols | |
| self.numRows = numRows | |
| self.quads = {} | 
  
    
      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
    
  
  
    
  | namespace txml = tinyxml2; // just to reduce typing | |
| // load tileset (.tsx) XML document into TileSet struct | |
| std::shared_ptr<TileSet> LoadTileSet(const char* path) | |
| { | |
| std::shared_ptr<TileSet> tileSet = std::make_shared<TileSet>(); | |
| txml::XMLDocument document; | |
| document.LoadFile(path); | |
  
    
      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 Battle | |
| { | |
| private: | |
| std::vector<Unit*> participants; | |
| std::vector<Unit*> playerUnits; | |
| std::vector<Unit*> aiUnits; | |
| std::vector<Unit*> readyUnits; | |
| uint16_t turnCounter; | 
  
    
      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
    
  
  
    
  | @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| try { | |
| super.onCreate(savedInstanceState); | |
| getApplication(); | |
| final int duration = getResources().getInteger(android.R.integer.config_longAnimTime); | |
| final JSONObject ride = new JSONObject(getIntent().getStringExtra("ride")); | |
| ActionBar actionBar = getActionBar(); | |
| actionBar.setTitle(ride.getString("name")); | 
  
    
      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
    
  
  
    
  | <meta-data | |
| android:name="com.google.android.geo.API_KEY" | |
| android:value="@string/google_maps_key" /> | 
  
    
      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
    
  
  
    
  | public static void convolveAndTranspose(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction) { | |
| float[] matrix = kernel.getKernelData( null ); | |
| int cols = kernel.getWidth(); | |
| int cols2 = cols/2; | |
| for (int y = 0; y < height; y++) { | |
| int index = y; | |
| int ioffset = y*width; | |
| for (int x = 0; x < width; x++) { | |
| float r = 0, g = 0, b = 0, a = 0; | 
  
    
      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
    
  
  
    
  | <!doctype html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <style> | |
| body { | |
| background: white; | |
| text-align: center; | |
| padding: 20px; | |
| font-family: Georgia, serif; | 
  
    
      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
    
  
  
    
  | import os | |
| print "Forking prawns..." | |
| for i in range(5): | |
| prawn_pid = os.fork() | |
| if prawn_pid == 0: | |
| print "I'm a forkin prawn!" | 
  
    
      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
    
  
  
    
  | print "omg kerryma sux" |