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
@IBAction func toView1(sender: UIButton) { | |
toView("toView1") | |
} | |
@IBAction func toView2(sender: UIButton) { | |
toView("toView2") | |
} | |
func toView(segueId: String) { | |
let mainView = (self.mm_drawerController.centerViewController as! UINavigationController).childViewControllers[0] as! MainViewController |
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
// MARK: - NavigationBarの下部に線を引くのと背景色の設定 | |
extension UINavigationController { | |
/** | |
ナビゲーションバーの色を共通色に設定し、下線を引く | |
- parameter animated: <#animated description#> | |
*/ | |
override public func viewWillAppear(animated: Bool) { | |
super.viewWillAppear(animated) |
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
-- Window関数でCOUNT(DISTINCT field) OVER()を擬似的に実現する | |
SELECT | |
都道府県名 | |
, 公園名 | |
, "訪問者IP" | |
, 県別訪問者数 | |
, 都道府県別公園別訪問者数 | |
, SUM(都道府県別ユニーク訪問者フラグ) OVER(PARTITION BY 都道府県名 ORDER BY 都道府県名) AS 都道府県別ユニーク訪問者数 | |
, SUM(公園別ユニーク訪問者フラグ) OVER(PARTITION BY 公園名 ORDER BY 公園名) AS 公園別ユニーク訪問者数 | |
, SUM(ユニーク訪問者フラグ) OVER() AS ユニーク訪問者数 |
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
# ファイル名は適当です。 | |
<VirtualHost *:80> | |
ServerAdmin admin@example.com | |
ServerName www.example.com | |
ServerAlias *.example.com # ここ重要。ここでxxx.example.comのアクセスを受ける宣言をしている。 | |
DocumentRoot /path to your rails app/public | |
<Directory "/path to your rails app/public"> | |
AllowOverride All | |
Options FollowSymLinks Includes | |
Require all granted |
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
import HealthKit | |
/// HealthKitから歩数を取得するサンプルプログラム | |
class HealthKit { | |
/// HealthKitストレージにアクセスする | |
var storage:HKHealthStore = HKHealthStore() | |
/** | |
HealthKitへのアクセス許可を確認 |
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
default: &default | |
adapter: postgis | |
encoding: unicode | |
# For details on connection pooling, see rails configuration guide | |
# http://guides.rubyonrails.org/configuring.html#database-pooling | |
pool: 5 | |
username: <ご自身のPostgreSQLユーザ名> | |
password: <PostgreSQLのパスワード> | |
host: localhost | |
port: 5432 |
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
private void ParallelNormalLoop(int threadCount) | |
{ | |
string lines = ""; | |
DateTime timer = DateTime.Now; | |
// ここで並列処理を書いています。 | |
Parallel.For(0, threadCount, i => | |
{ | |
// Thread内の文字列連結をスレッド外変数に直接行うと | |
// 同時書き込みが発生し、データが損失するため、スレッドローカルで文字連結を行う |
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
private void btnExec_Click(object sender, EventArgs e) | |
{ | |
NormalLoop(); | |
StringBuilderLoop(); | |
PachimonStringBuilderLoop(); | |
MessageBox.Show("Done."); | |
} | |
private void NormalLoop() | |
{ |
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"?> | |
<gml:FeatureCollection xmlns:fme="http://www.safe.com/gml/fme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.safe.com/gml/fme MESH03622.xsd"> | |
<gml:boundedBy> | |
<gml:Envelope srsName="EPSG:4612" srsDimension="2"> | |
<gml:lowerCorner>24.4333333329177 122.924999999934</gml:lowerCorner> | |
<gml:upperCorner>24.4833333336014 123.000000000218</gml:upperCorner> | |
</gml:Envelope> | |
</gml:boundedBy> | |
<gml:featureMember> | |
<fme:MESH03622 gml:id="id060c8300-20cf-4750-b6a6-6b9730bc8fb3"> |
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
bundles.Add(new ScriptBundle("~/bundles/highcharts").Include( | |
"~/Scripts/Highcharts-4.0.1/js/highcharts.js")); | |
OlderNewer