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
type Pos = (Int, Int) | |
checkCol :: Pos -> [Pos] -> Bool | |
checkCol (row, col) l = not . elem True $ map (\(_, col') -> col' == col) l | |
putFu :: Pos -> [Pos] -> Maybe [Pos] | |
putFu (row, col) l | |
| row < 1 = Nothing | |
| row > 8 = Nothing | |
| col < 1 = Nothing | |
| col > 9 = Nothing |
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
#!/bin/bash | |
LANG=ja_JP.utf8 | |
pid=$$ | |
date=`date '+%Y-%m-%d-%H_%M'` | |
playerurl=http://radiko.jp/player/swf/player_3.0.0.01.swf | |
playerfile="/tmp/player.swf" | |
keyfile="/tmp/authkey.png" |
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
data Warrior = Warrior Int | |
data Monster = Monster Int Int | |
data Attack = Normal | Critical | Gira | Begirama | |
hitPoint :: Monster -> Int | |
hitPoint (Monster hp _) = hp | |
damage :: Warrior -> Monster -> Attack -> Int | |
damage (Warrior attack) (Monster _ defence) Normal = truncate $ max 1.0 ((realToFrac attack - (realToFrac defence / 2)) / 2) | |
damage (Warrior attack) _ Critical = attack |
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
# -*- coding: utf-8 -*- | |
require "twitter" | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "YOUR_CONSUMER_KEY" | |
config.consumer_secret = "YOUR_CONSUMER_SECRET" | |
config.access_token = "YOUR_ACCESS_TOKEN" | |
config.access_token_secret = "YOUR_ACCESS_SECRET" | |
end |
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
using System; | |
using AsyncOAuth; | |
using System.Security.Cryptography; | |
using Newtonsoft.Json.Linq; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace KataomoiList | |
{ |
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
scanDigits :: Int -> Int -> (String, String) | |
scanDigits a x = (take a $ show x, drop a $ show x) | |
calcTuple :: (String, String) -> Int | |
calcTuple (x, y) = (read x) + (read y) | |
calc :: Int -> (Int, Int) | |
calc x = (calcTuple (scanDigits 1 x), calcTuple (scanDigits 2 x)) | |
checkCalc :: Int -> (Int, Int) -> Bool |
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
using System; | |
using Microsoft.SPOT; | |
using GT = Gadgeteer; | |
using GTM = Gadgeteer.Modules; | |
using GTI = Gadgeteer.Interfaces; | |
using System.IO; | |
using System.Text; | |
namespace GadgeteerApp2 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<TextView | |
android:text="Please enter name" | |
android:textAppearance="?android:attr/textAppearanceMedium" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" |
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
using System; | |
using Android.App; | |
using Android.Content; | |
using Android.Runtime; | |
using Android.Views; | |
using Android.Widget; | |
using Android.OS; | |
namespace Test01a |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Services</key> | |
<array> | |
<dict> | |
<key>0x1804</key> | |
<string>Tx Power</string> | |
</dict> |