«前の日記(2016-09-24) 最新 次の日記(2016-09-29)» 編集

ToDo:

  • 99 深呼吸して、おちけつ (~12/31 あと256日)
  • 98 毎日アウトプットを重きにおいた目標をたてる (~12/31 あと256日)
  • 97 買物は行動を変えるもの・ことに限る (~12/31 あと256日)
  • 96 合理的な行動はときに我慢を強いる(~12/31 あと256日)

ɥozɐʞıɥ


2016-09-25 ようやく晴れた [長年日記]

_ [モフ太] 朝散歩

ようやく朝晴れてくれました。

モフ太さんぽ
モフ太さんぽ posted by (C)ひかぞぉ

_ [モフ太] 夕方散歩

夕方の散歩です

モフ太とポケモン
モフ太とポケモン posted by (C)ひかぞぉ

先日レベルあげでボール使い切りました。フシギダネと対峙しております。

モフ太さんぽ
モフ太さんぽ posted by (C)ひかぞぉ

普通に散歩です。

_ [Swift] JSON

Swift3だと色々変わってくれるね。

import PlaygroundSupportしてPlaygroundPage.current.needsIndefiniteExecution = trueなのね。

import UIKit

import Foundation

import PlaygroundSupport

var urlString = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://rss.dailynews.yahoo.co.jp/fc/rss.xml&num=8"

var url = NSURL(string: urlString)

let config = URLSessionConfiguration.default

let session = URLSession(configuration: config)

let task = session.dataTask(with: url! as URL,

completionHandler:

{data, response, error in

do{

var dict = try JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers)

print(dict)

}

catch{}

})

task.resume()

PlaygroundPage.current.needsIndefiniteExecution = true

_ [Swift] URLの内容を読み取り

import UIKit

import Foundation

import PlaygroundSupport

var urlString = "http://www.apple.com"

var url = NSURL(string: urlString)

var request = NSURLRequest(url: url! as URL)

let config = URLSessionConfiguration.default

let session = URLSession(configuration: config)

let task = session.dataTask(with: url! as URL,

completionHandler: {data, response, error in

print(NSString(data: data!,encoding: String.Encoding.utf8.rawValue))

})

task.resume()

PlaygroundPage.current.needsIndefiniteExecution = true

_ [Swift]WWDC2016: Swift 3.0 and the Playgrounds for iOS | Making App Pie

このPageあたりをヒントに前に作ったコードを修正してみる。



2002|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|
«前の日記(2016-09-24) 最新 次の日記(2016-09-29)» 編集