-
Install custom build phase In Xcode go to the project settings:
Add build phase
=>Add run script
and paste`which git` show --abbrev-commit --pretty=oneline | head -1 | cut -d " " -f1 > revision
This should go before
Copy resource bundle
-
Add revision to Copy resource bundles
This file contains 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
defmodule Mischer do | |
def deck do | |
suits = ["s","h","g","e"] | |
ranks = ["7","8","9","X","U","O","K","A"] | |
for rank <- ranks, suit <- suits, do: rank <> suit | |
end | |
def shuffle(cards \\ deck) do | |
card_count = Enum.count(cards) | |
Enum.reduce 0..(card_count - 1), cards, fn(i, shuffled_cards) -> |
This file contains 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
shuffle(Cards) when is_list(Cards) -> | |
Size = length(Cards), | |
lists:foldr(fun(I, Arr) -> | |
swap(Arr, I, next_int(1, I + 1)) | |
end, Cards, lists:seq(1, Size)). | |
swap(List, I, J) -> | |
Ielement = lists:nth(I, List), | |
Jelement = lists:nth(J, List), | |
lists:map(fun(Index) -> |
This file contains 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
shuffle(Cards) when is_list(Cards) -> | |
Size = length(Cards), | |
lists:foldr(fun(I, Arr) -> | |
swap(Arr, I, next_int(1, I + 1)) | |
end, Cards, lists:seq(1, Size)). | |
swap(List, I, J) -> | |
Ielement = lists:nth(I, List), | |
Jelement = lists:nth(J, List), | |
lists:map(fun(Index) -> |
This file contains 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
var playedCard:Sprite = Card.createCard(cardVO.cardID); | |
this.container.rawChildren(playedCard:Sprite); | |
// add tweener |
This file contains 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
require 'find' | |
class RailsImageCounter | |
def self.read_images(dir = 'public/images', images = []) | |
Find.find(dir) { |f| images << [File.basename(f), 0, f] if File.file?(f) } | |
images | |
end | |
def self.count(images, dir = 'public/stylesheets') |
NewerOlder