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
const RNG = require('rng-js'); | |
const COMMON = 21; | |
const UNCOMMON = 22; | |
const RARE = 23; | |
const MYTHIC = 24; | |
function shuffle(array, rng) { | |
let m = array.length, t, i; |
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
pragma solidity ^0.4.18; | |
/* | |
To create a campaign on Charitychain.io, you must drop half of the goal and collect the rest by inviting your entourage to unblock your donation. | |
If successful, 100% of the funds are donated to the NGO. | |
If the objective of the campaign is not achieved, everyone is refunded. | |
*/ | |
/* | |
Attention, important warning here! |
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
pragma solidity ^0.4.8; | |
// UNSAFE CODE, DO NOT USE! demo purpose | |
contract Auction { | |
enum Stages { | |
Initialization, | |
AuctionInprogress, | |
AuctionFailure, | |
AuctionSuccess |
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
pragma solidity ^0.4.8; | |
contract Crowdfunding { | |
enum Stages { | |
Initialization, | |
CampaignInprogress, | |
CampaignFailure, | |
CampaignSuccess | |
} |
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
pragma solidity ^0.4.0; | |
contract Campaign { | |
enum States | |
{ | |
inprogress, | |
success, | |
fail | |
} |
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
pragma solidity ^0.4.18; | |
/* | |
To create a campaign on Charitychain.io, you must drop half of the goal and collect the rest by inviting your entourage to unblock your donation. | |
If successful, 100% of the funds are donated to the NGO. | |
If the objective of the campaign is not achieved, everyone is refunded. | |
*/ | |
/* | |
Attention, important warning here! |
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
pragma solidity ^0.4.0; | |
contract Roulette { | |
uint public lastRoundTimestamp; | |
uint public nextRoundTimestamp; | |
address _creator; | |
uint _interval; |
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
//(@implementation UIViewController) | |
- (void)loadView | |
{ | |
UIView* myView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
myView.backgroundColor = [UIColor whiteColor]; | |
self.view = myView; | |
[myView release]; | |
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
// | |
// ClockView.m | |
// Clock | |
// | |
// Created by Vincent Le Gallic on 27/05/11. | |
// Copyright 2011 Frianbiz. All rights reserved. | |
// | |
#import "ClockView.h" |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
window = [[UIWindow alloc] initWithFrame:[ [UIScreen mainScreen] bounds]]; | |
[window makeKeyAndVisible]; | |
//init du modèle | |
model = [ClockModel new]; | |
NewerOlder